Skip to content

Latest commit

 

History

81 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HomeRelay

HomeRelay turns discharge paperwork into a coordinated first 72 hours at home.

HomeRelay

When a patient leaves the hospital, the family often receives a packet full of medication instructions, follow-up requirements, warning signs, and practical tasks. The information may be present, but the work of turning it into a safe home plan is fragmented: someone must spot contradictions, assign family help, arrange follow-up, and confirm that unresolved clinical questions are escalated instead of guessed.

HomeRelay demonstrates that workflow through Robert, a fictional discharge case. Robert's daughter Maya starts with a seeded discharge packet containing nine medications, an unbooked cardiology follow-up, unowned home tasks, and two conflicting lisinopril instructions. HomeRelay reads the packet, builds a cited journey, pauses at the medication conflict, routes the question to a restricted clinician handoff, coordinates caregiver help, creates a calendar draft, and unlocks Home-ready only after an independent review passes.

This project was built for the Band of Agents Hackathon, whose challenge is to build practical multi-agent workflows where agents communicate, exchange structured context, delegate work, involve humans, and coordinate decisions through Band. HomeRelay targets the regulated and high-stakes workflow track: care-transition coordination where traceability, escalation, and careful decision-making matter.

Purpose

HomeRelay's purpose is to reduce the coordination burden after discharge.

It does not replace clinicians, prescribe medication, book appointments, or claim production readiness for healthcare use. Instead, it demonstrates a safe operational pattern:

  • extract cited tasks from the packet;
  • separate clinical uncertainty from routine coordination;
  • assign work to named people or agents;
  • require a human response for medication contradictions;
  • preserve source evidence and collaboration history;
  • run an independent readiness review before declaring the plan covered.

The family sees a calm journey. Judges can inspect the collaboration trace behind it.

Hero Section

Core Features

  • First-72-hours journey: a chronological plan with owners, status, timing, and source citations.
  • Medication conflict gate: contradictory lisinopril instructions block readiness until Dr. Chen's fictional response is submitted.
  • Private clinician handoff: a token-scoped page shows only the relevant question and cited excerpts.
  • Follow-up coordination: provider options and a calendar draft are created without pretending that an appointment was booked.
  • Caregiver invites: Omar receives bounded task links and explicitly accepts medication pickup and home check-in work.
  • Robert Today view: the patient sees one simple next step, not the agent system.
  • Independent review: readiness rules are checked before Home-ready unlocks.
  • Evidence surfaces: documents, source pages, care-team activity, rooms, and event trace show how the result was produced.

Login Page

Architecture

HomeRelay is a two-app monorepo:

backend/   FastAPI API, SQLite state, Band agent runtime, seeds, trace export
frontend/  Next.js App Router UI, BFF routes, coordinator and role pages

The frontend acts as the family and judge experience. It stores the coordinator session in server-side BFF routes, proxies authenticated API calls to the backend, and renders public token-scoped pages for Dr. Chen, Omar, and Robert.

The backend owns the source of truth: cases, rooms, events, documents, safety issues, handoffs, invites, reviews, and exported traces. A single backend process supervises the local agent runtime and persists demo state in SQLite. For deployment, the backend should run as one replica with persistent storage.

Agent Workflow

HomeRelay uses six specialized agents:

  • Journey Commander: creates the mission room, recruits specialists, and coordinates the workflow.
  • Discharge Interpreter: extracts structured, page-cited instructions from the discharge packet.
  • Medication Reconciler: normalizes medication instructions, detects conflicts, and requests human clarification.
  • Follow-up Coordinator: prepares provider options and a calendar draft.
  • Caregiver Coordinator: identifies unowned home tasks and creates bounded caregiver invites.
  • Safety Reviewer: performs independent review and blocks Home-ready until hard readiness rules pass.

Dr. Chen is a human participant in the fictional demo, not an autonomous agent.

Family

Band Usage

Band is the coordination layer, not a notification add-on. HomeRelay uses Band for separate agent identities, shared mission rooms, dynamic specialist recruitment, structured task assignment, private clinical handoff rooms, agent responses, human escalation evidence, and room/event history.

This directly addresses the hackathon requirement that at least three agents collaborate through Band and that Band be central to planning, execution, review, decision-making, or task handoff.

AI/ML API Usage

AI/ML API is used where model selection and multimodal or reasoning capability matter:

  • discharge packet interpretation and structured extraction;
  • medication reconciliation assistance;
  • follow-up coordination assistance;
  • independent safety review using a separate model-backed reviewer path.

The event trace exposes model work, tool calls, fallback recovery, and final review evidence so the model layer is visible in the workflow.

Demo Flow

  1. Maya starts a fresh Robert run.
  2. HomeRelay builds the first-72-hours journey from the seeded packet.
  3. A lisinopril conflict blocks readiness.
  4. Maya opens a restricted Dr. Chen handoff and submits the fictional clinician clarification.
  5. Maya creates a cardiology calendar draft.
  6. Omar accepts caregiver task links.
  7. Robert's Today page shows the confirmed next action.
  8. The Safety Reviewer passes the plan.
  9. HomeRelay opens the Home-ready summary.
  10. Judges inspect activity, rooms, source pages, and event trace.

What Is Real vs Seeded

Real in the MVP:

  • Band rooms, agent identities, task assignments, and event history.
  • Backend state changes for handoffs, invites, reviews, and readiness.
  • Source-cited document pages and traceable safety issues.
  • Token-scoped demo role routes.
  • Calendar draft generation.
  • Exported redacted backup trace.

Seeded or simulated:

  • Robert, Maya, Omar, Dr. Chen, the packet, and provider details.
  • The clinical authority of Dr. Chen's response.
  • Appointment booking, EHR integration, pharmacy fulfillment, email/SMS delivery, and production healthcare deployment.

Tech Stack

  • Frontend: Next.js 16, React 19, TypeScript, App Router, Vitest.
  • Backend: FastAPI, SQLite, SQLAlchemy, Pydantic, SSE.
  • Agents: Band SDK, LangGraph, PydanticAI, Google ADK, LangChain.
  • Models: AI/ML API and OpenAI-compatible model providers.
  • Deployment target: Vercel-style frontend plus Railway-style backend with persistent SQLite storage for the hackathon demo.

Running Locally

Backend:

cd backend
uv run python scripts/run_service.py

Frontend:

cd frontend
npm run dev

Open http://localhost:3000 and start Robert's demo.

Documentation

About

HomeRelay turns discharge paperwork into a coordinated first 72 hours at home.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages