Family Care Anchor
Team of a Walmart Senior Manager and a NextPhase.ai Engineer skilled in Python, PySpark, and production ML, holding degrees from Penn State and SFSU.
YouTube Video
Project Description
Project Overview:
Anchor is a generative-UI caregiving command center for families managing complex care at home. Instead of behaving like a text chatbot, Anchor turns caregiver observations into a live, interactive clinical operations interface.
A caregiver can enter a natural-language update such as: “Tom’s ankles are really swollen, he barely ate anything, missed his evening blood thinner, and does not seem himself.” Anchor parses the observation, scores it across three care lenses — cardiac symptoms, early cognitive/behavioral change, and caregiver burden — and then generates a structured UIPlan that rebuilds the interface in real time.
The output is not a paragraph of advice. The interface itself changes. Depending on the agent’s assessment, Anchor can render a calm dashboard, watch-state banner, single-alert layout, combined triage view, family load meter, care-plan card, message-drafting panel, and generation receipt. For example, if Tom crosses a heart-failure risk threshold, his card changes status, the trend visualization updates, an alert layout appears, and the system generates delegated care actions for the family.
The most important interaction is the Approve & Draft flow. When Anchor recommends an action, the caregiver can approve it and instantly generate a ready-to-send message inside the UI. Tone chips such as Caring, Softer, More direct, Shorter, and Add specifics regenerate the message inline without starting a new chat turn or leaving the page. This closes the loop from observation → risk detection → UI generation → real-world family coordination.
Anchor is built around the idea that the best caregiving interface is not static. It should recompose itself based on the patient’s condition, the caregiver’s capacity, and the urgency of the situation.
Why This Is Generative UI:
Anchor moves beyond text-based chat because the agent does not simply answer questions. It generates a functional interface.
The agent produces a typed UIPlan that determines which layout, components, alerts, charts, care steps, drafting flows, and transparency receipts should appear. The same user input can produce different UI states depending on severity, family member, care lens, and accumulated evidence. Two low-risk observations may create a watch banner. A high-risk cardiac pattern may create a single-alert workflow. Multiple active risks may generate a combined triage surface ordered by urgency.
In Anchor, the UI is the agent output.
Technical Implementation
Anchor uses a working full-stack implementation with a typed generative UI pipeline.
A2UI:
Anchor uses an A2UI-style UIPlan JSON schema to define the agent-generated interface. The backend creates structured UI plans containing layout type, component tree, severity state, reasoning, and available user actions. The React frontend maps each component_type to a live renderer, allowing the agent to generate dashboards, alerts, care-plan cards, drafting panels, and receipts dynamically.
AG-UI:
Anchor uses a FastAPI Server-Sent Events stream at /api/agui/stream to emit an agent event sequence, including run start, state snapshot, tool calls, text deltas, UI updates, and run finish. The frontend hook useAGUIStream.ts listens to the stream and updates React state live, so the interface responds as the agent works.
MCP:
Anchor exposes eight MCP-style tools through FastMCP, including observation parsing, scoring, pattern matching, support finding, care-plan generation, and message drafting. These tools allow the agent to convert unstructured caregiver input into structured scores, risk states, and UI actions.
CopilotKit:
The app is wrapped with CopilotKit, and the prototype demonstrates CopilotKit protocol usage through useCoAgent, useCopilotReadable, and useCopilotAction with renderable actions. This connects agent state, user context, and interactive UI actions inside the application.
Backend:
FastAPI, Python 3.11, Pydantic v2, uv, Gemini 2.5 Flash as an optional LLM layer, plus a deterministic plan_builder fallback to ensure the demo works reliably even without model quota.
Frontend:
React 18, Vite, TypeScript, Tailwind CSS, and a component-based rendering system that turns structured agent output into live UI.
Originality
Most generative-UI demos generate one widget or one visualization. Anchor generates a multi-step caregiving operating surface: clinical signal detection, caregiver burden awareness, triage prioritization, family delegation, inline message generation, and transparent reasoning.
Its originality is the combination of three things:
A dynamic interface that changes based on agent reasoning.
A human-in-the-loop caregiving workflow that produces real actions, not just recommendations.
A transparent generation receipt that shows why the interface changed, which components rendered, and which tools were used.
Anchor is not a chatbot with a prettier frontend. It is an agent-driven UI system where the application surface is generated from live patient and caregiver context.