Deep-memory vertical agents for healthcare — pure Python, fully local, zero agentic frameworks.
Disclaimer: Educational / research prototype only. Never use for real medical decisions. Always consult qualified clinicians.
https://cadence-healthcare.vercel.app/
Status: Public UI is a client-side companion + share-code clinician brief. Live chat uses Groq
llama-3.3-70b-versatile(envOPENAI_API_KEYon Vercel). If the key is missing or Groq errors, the badge switches to demo fallback. Full multi-layer memory + consent grants run locally (python run_patient.py/python run_clinician.py+ Ollama). Do not enter real PHI.
| Overview | Companion |
|---|---|
![]() |
![]() |
| Share code | Clinician brief |
|---|---|
![]() |
![]() |
Vertical AI agents that remember — symptoms, history, preferences — across sessions.
- Multi-layer deep memory (session · episodic · semantic · knowledge · insights)
- Pure Python only (no LangChain, CrewAI, AutoGen, Mem0…)
- Fully local & free (Ollama + SQLite + sentence-transformers)
- Consent-scoped clinician brief / note draft
- Patient journey first: Baseline → Triage → Visit Prep → Care → Pattern → Recovery
| Layer | Choice |
|---|---|
| Agents | Pure Python (no LangChain / CrewAI / Mem0) |
| Local LLM | Ollama (llama3.1) |
| Live UI chat | Groq llama-3.3-70b-versatile via Vercel /api/chat |
| Memory | SQLite + sentence-transformers (injectable embedder) |
| Consent | Scope-gated grants + audit table |
| UI | Static HTML / Tailwind CDN on Vercel |
# 1. Ollama
ollama pull llama3.1
# 2. Python
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# 3a. Patient journey (recommended)
python run_patient.py
# 3b. Single triage agent
python run_agent.py
# 3c. Clinician grant / brief / note
python run_clinician.py grant --patient demo --clinician dr_lee --hours 48Force a stage:
python run_patient.py --stage VISIT_PREPIn-session: type /stage CARE to switch.
Memory lives in data/ and survives restarts (gitignored).
pip install -r requirements-dev.txt
python -m pytest -q
npm ci && npx playwright install chromium && npm run test:e2e| Stage | Agent | Role |
|---|---|---|
| BASELINE | Baseline | Profile, allergies, meds, goals |
| TRIAGE | Triage | Symptom structure + cautious red flags |
| VISIT_PREP | VisitPrep | Questions + brief for the clinician visit |
| CARE | CareCompanion | Adherence, side effects, care-plan tasks |
| PATTERN | Pattern | Hypothesis correlations from memory |
| RECOVERY | Recovery | Milestones and “what better looks like” |
Spec: docs/PATIENT_JOURNEY.md
- Session / Working – recent turns
- Episodic – timestamped events, symptoms, visits
- Semantic – vector long-term facts
- Knowledge – local RAG over guidelines
- Insights – synthesized patterns (human-verified)
healthcare-deep-memory-agents/
├── docs/screenshots/ ← product screenshots
├── run_patient.py ← patient journey CLI
├── run_clinician.py ← grant / brief / note CLI
├── src/memory/ ← DeepMemory + ConsentStore
├── src/agents/
├── web/ ← Cadence UI (Vercel)
├── tests/ ← pytest (no torch / Ollama)
├── e2e/ ← Playwright smokes
└── data/ ← local DB (gitignored)
See SECURITY.md. Educational prototype. Public chat messages go to Groq when live mode is on.
MIT (code). Any medical content you add keeps its original license.




