Technical architecture

A longitudinal AI system built around memory, reasoning, and action.

Clara combines a conversational AI agent with structured longitudinal memory, grounded research, care planning, and physician-engagement support. The architecture is designed to turn individual conversations into useful context for future interactions.

System overview

From conversation to longitudinal support.

The user interacts primarily through Clara's conversational interface. Behind the interface, the main agent orchestrates reasoning, memory, care planning, physician engagement, and external research.

User Health questions, goals, concerns, decisions
↓
Clara Main Agent Reasoning · orchestration · goal coaching · care planning · user interaction
↓
Longitudinal Memory Health Profile Care Context Care Plan Physician Engagement Conversation History
Research Layer Evidence retrieval Grounded Gemini Drug / clinical research Patient education Regulatory evidence
Application API Authentication User services Health data Care plans Appointments
↓
Longitudinal User Experience Health Profile · Care Plans · Appointments · Discussion Questions · Update Indicators

Application architecture

The frontend is intentionally more than a chat screen.

The current MVP uses a Next.js frontend and an authenticated API layer. The conversational interface is the primary interaction surface, while persistent application views make important longitudinal state visible to the user.

01

Conversational interface

The Clara interface provides the primary interaction with the AI agent. Conversation history is retained within the application and authenticated API requests connect the frontend to the backend agent workflow.

02

Longitudinal application views

Users can review their Health Profile, Care Plans, physician appointments, and provider discussion questions. These views expose structured state created or updated through the conversational workflow.

03

Authenticated API

The frontend communicates with backend API endpoints using authenticated requests. JWT-based authentication establishes the user's application session and protects access to user-specific resources.

04

Pending-review workflow

Clara-generated changes can be surfaced through update indicators in the application sidebar. When the user opens the corresponding longitudinal object, the pending review can be marked as read.

Longitudinal memory

Different memory objects answer different questions.

A central architectural principle is that Clara does not treat all remembered information as one undifferentiated conversation history.

01

Health Profile

Who is this person?

Health Profile contains relatively stable information such as conditions, medications, allergies, lifestyle, long-term health goals, mobility information, and support-system context.

It is user-visible and can be updated through both user interaction and the Clara workflow.

02

Care Context

What matters right now?

Care Context is agent-managed working context. It captures current priorities, agent focus, monitoring items, open questions, and additional care notes that help Clara determine what deserves attention.

It represents useful working context rather than hidden model reasoning.

03

Care Plan

What are we working on together?

A Care Plan translates a user's goals and priorities into agreed actions and monitoring items. It contains an objective, action items, progress summary, and status.

The MVP emphasizes a focused active plan rather than accumulating many simultaneous plans.

04

Physician engagement

What should I discuss with my clinician?

Physician appointments and discussion questions capture situations where clinician involvement is appropriate. Clara can help organize preparation information and frame questions for productive provider conversations.

Agent architecture

A focused two-agent MVP.

The current design centers on a primary Main Agent and a research capability. The architecture leaves room for specialized agents without requiring the MVP to fragment the user relationship across multiple independent agents.

MAIN AGENT

Clara Main Agent

The Main Agent owns the conversational relationship. It interprets user intent, reasons over available context, provides health guidance, supports goal coaching, develops Care Plans collaboratively, monitors progress, and determines when memory or research capabilities are needed.

RESEARCH

Research layer

The research capability provides grounded external evidence when it can materially improve an answer. The Main Agent determines when research is appropriate, while the research service handles evidence retrieval and the grounded model interaction.

Potential future specialized agents

The architecture can be extended with specialized capabilities such as medication, drug-interaction, guideline, insurance/formulary, appointment, and reflection agents. These are future extensions rather than claims about the current MVP.

Research layer

Evidence retrieval is treated as a separate capability.

Clara's Main Agent can determine that an answer requires external evidence instead of relying only on its general model knowledge.

User question
→
Main Agent
→
Research capability
→
Grounded Gemini
→
Research result
→
Main Agent

Research modes

The current architecture supports evidence contexts including drug labels, clinical information, patient education, regulatory information, real-world evidence, and general research.

Research trigger

Research can be appropriate when medication labeling, regulatory information, current evidence, user-requested sources, or significant uncertainty makes external evidence valuable.

Longitudinal workflow

The conversation is only one part of the system.

Health question
↓
Understand user context
↓
Identify goals and priorities
↓
Create or update Care Plan
↓
Support actions and monitor progress
↓
Prepare for physician engagement
↓
Review and adjust over time

MVP scope

What is implemented today.

The public demo represents a working MVP rather than a production healthcare deployment.

Implemented

  • Conversational Clara interface
  • Authenticated user accounts
  • JWT authentication
  • Health Profile persistence
  • Care Context persistence
  • Care Plan capability
  • Physician engagement capability
  • Discussion questions
  • Research / grounded evidence capability
  • Longitudinal update indicators
  • User onboarding and communication preferences

Future extensions

  • Session reflection and continuity
  • FHIR CarePlan integration
  • EHR interoperability
  • Payer data integration
  • Wearable integration
  • Caregiver mode
  • Voice interaction
  • Calendar integration
  • Specialized medication and guideline agents
  • Insurance / formulary capabilities

Architectural principle

The goal is not simply a better answer. It is a better next interaction.

Clara's architecture is designed around the idea that useful health support should accumulate context, turn conversations into action, and become more relevant over time.

← Back to Clara