Local-First Personal & Family Health AI Companion & Specialist Runtime.
"Great care starts with prepared patients and supported families. Carefold brings local-first AI to your household—helping you organize records, prepare thoughtful questions for your care team, and navigate coverage with clarity and privacy."
Carefold is a source-available, local-first personal and family health AI companion and specialist agent runtime built on yarvelle-core and @yarvelle/ui. Designed to work alongside your doctors, care teams, and health plans, Carefold runs on your own hardware (or private household instance) to help you prepare for clinical visits, organize health records and physiological vitals across family members, track USPSTF/ACIP preventive screenings and pediatric school forms, and understand health insurance benefits.
It pairs a 5-phase LangGraph orchestration engine with 25 specialist clinical, administrative, and wellness navigators, 28 modular clinical skill packs, multi-profile household care with per-profile AES-256-GCM envelope encryption, scoped health and calendar connectors (Epic SMART on FHIR, Withings, Google Calendar, CalDAV, Google Workspace Gmail MCP, Microsoft 365 Graph, Apple Health, FHIR R4, C-CDA, SMART Health Cards), multilingual support (en-US, es-ES, fr-FR, hi-IN, ar-SA with RTL), and a two-tier clinical safety guardrail system.
📸 Explore More Carefold Screens — Consultation Studio, Specialist Marketplace, Vitals & Biometrics, Clinical Visits, Preventive Care, Scoped Connectors, Household Profiles & Diagnostics (Click to expand)
Get a local Carefold runtime and household companion running in seconds:
Run Carefold with a single command using the published multi-architecture image (supports Apple Silicon arm64 and Intel/AMD amd64 automatically):
# Pull and start the all-in-one container (Next.js UI on :3000, FastAPI backend on :8000)
docker pull ghcr.io/spectrayan/carefold:latest
# Run container (connecting to local Ollama on your host machine)
docker run -d \
--name carefold \
-p 127.0.0.1:3000:3000 \
-p 127.0.0.1:8000:8000 \
-e OLLAMA_URL=http://host.docker.internal:11434/v1 \
-v carefold-data:/data \
ghcr.io/spectrayan/carefold:latestVisit http://localhost:3000 to browse specialist helpers and launch private household consultations.
Tip
- Connecting to Ollama on host: On Docker Desktop (macOS / Windows), use
-e OLLAMA_URL=http://host.docker.internal:11434/v1so the container can reach your host machine's Ollama instance. - Legacy tags on Apple Silicon: If pulling older single-architecture tags (e.g.
0.3.0-beta.1), append--platform linux/amd64todocker pullanddocker run.
To build and run the entire stack locally:
# 1. Set up the environment variables
cp deploy/docker/.env.example deploy/docker/.env
echo "CAREFOLD_VAULT_KEK=$(openssl rand -hex 32)" >> deploy/docker/.env
# 2. Start the stack
docker compose up -d
# 3. (Optional) Start with local Ollama AI
docker compose --profile local-ai up -dPrerequisites: Python 3.12+ (tested on 3.12 and 3.14), Node.js 22 LTS, and pnpm (>=9.0.0).
# Clone repository
git clone https://github.com/spectrayan/carefold.git
cd carefold
# Install frontend and workspace dependencies
pnpm install
# Set up backend virtual environment
python3 -m venv backend/.venv
source backend/.venv/bin/activate
pip install -e "backend[dev]"
pip install -r backend/requirements-dev.txt
# Option A: Start both backend (:8010) and Next.js UI (:3010) with the unified launcher
./start.sh
# Option B: Run in separate terminals
# Terminal 1 — FastAPI Backend (:8010)
PYTHONPATH=backend/src backend/.venv/bin/uvicorn carefold.main:app --host 127.0.0.1 --port 8010 --reload
# Terminal 2 — Next.js Web UI (:3010)
pnpm --filter @spectrayan/carefold-web devVisit http://localhost:3010 to open the Carefold Web UI.
Carefold features a modular catalog of 25 specialist clinical, administrative, and wellness navigators backed by 28 clinical and administrative skill packs, organized into three core domains:
- Clinical Organ & Specialty Navigators (
clinical_assist— 18 Specialists): Dedicated navigators for Cardiology (heart-care-coordinator), Pulmonology (lung-breathing-coordinator), Gastroenterology (digestive-care-coordinator), Oncology (cancer-care-coordinator), Neurology (brain-nerve-care-coordinator), Nephrology (kidney-care-coordinator), Dermatology (skin-care-coordinator), Endocrinology (diabetes-thyroid-coordinator), Orthopedics (bone-joint-care-coordinator), Rheumatology (autoimmune-care-coordinator), Urology (bladder-pelvic-care-coordinator), ENT (ent-care-coordinator), Ophthalmology (eye-care-coordinator), Hematology (blood-care-coordinator), Podiatry (foot-care-coordinator), Vascular Medicine (circulation-vein-care-coordinator), Oral Health (dental-care-coordinator), and General Visit Preparation (appointment-prep-coordinator). Each specialist helps you organize symptoms, review lab trends and vital signs, and prepare clear, prioritized questions to discuss with your clinician. - Administrative & Insurance Stewards (
admin— 5 Specialists): Stewards for Health Insurance Benefits & Coverage explanation (benefits-coordinator), Prior Authorization preparation (prior-authorization-coordinator), Claims & Denials Appeals (claims-appeals-coordinator), Prescription Drug Formularies (prescription-cost-coordinator), and Multi-Provider Medical Records coordination (records-coordinator). - Wellness & Nutrition Companions (
wellness— 2 Specialists): Daily companions for chronic care routines, hydration, and sleep check-ins (habit-coordinator) plus evidence-based dietary pattern planning and medical nutrition therapy visit preparation (nutrition-coordinator).
You can explore, search, and interact with all specialist agents through:
- Web Consultation Studio: Launch the web app (
./start.shorpnpm dev:webathttp://localhost:3010) to browse and chat with any specialist helper. - Living Documentation Catalog: Read
docs/agents/catalog.mdfor detailed descriptions, taxonomy classifications, and key capabilities. - Carefold CLI & API: Run
carefold agent listor queryGET /api/v1/agentsto inspect the runtime catalog programmatically.
orchestrator: Two-hop intent classification, dynamic skill provisioning, and multi-topology dispatch.document-extractor: Ingestion sandbox, PII sanitization, structured Pydantic extraction, and numerical grounding validation.quality-reviewer: Clinical safety boundary audit, tone inspection, and persona alignment verification.triage-auditor: Compliance logging, risk tagging, and clinical safety telemetry.skill-generator: Synthesis of dynamic skill manifests and validation templates from clinical guidelines.suggestion-generator: Context-aware follow-up suggestion chips presented in the client UI.
Carefold implements a hexagonal architecture for memory, search, and household data isolation on top of yarvelle-core:
- Per-Profile Household Scoping & Envelope Encryption: Every family member profile (
Self,Child,Parent,Spouse) is isolated at the database, Content-Addressed Storage (CAS), and cryptographic levels using per-profileHKDF-SHA256/AES-256-GCMData Encryption Keys (ADR-0005,ADR-0007). MemoryPort& 3-Tier Consolidation: Cognitive memory interface supporting working, episodic, and semantic memory tiers with salience ranking and decay (ADR-0002).- Hybrid
SearchIndex: Combines SQLiteFTS5lexical BM25 search withsqlite-vecdense embeddings, Reciprocal Rank Fusion (RRF), and Maximal Marginal Relevance (MMR). - End-to-End Internationalization (
ADR-0009): Supportsen-US,es-ES,fr-FR,hi-IN, andar-SA(RTL) with IETF BCP 47 locale negotiation, Unicode UAX #15NFCcanonical storage normalization, HL7 FHIR R4 language-neutral clinical coding, and localized safety disclaimers.
Carefold enforces strict safety invariants to protect families and ensure non-clinical boundaries:
- Tier 1 (Multilingual Emergency Red Flags): Instant termination with
911/988/112emergency escalation when acute symptoms are detected across supported languages (e.g., crushing chest pain, acute stroke FAST symptoms, anaphylaxis, severe respiratory distress, or active self-harm crisis). - Tier 2 (Collaborative Clinical Preparation): Helps patients organize questions and records for their licensed healthcare providers while never diagnosing conditions, prescribing medications, or adjusting dosages.
- 4-Tier Tool Execution Gate: Classifies every tool into
read,write_local,write_external, orirreversibleacross user-selectable autonomy levels (A0Manual,A1Assisted,A2Routine) with monotone taint tracking (UntrustedResult) and SHA-256 hash-chainedaudit_events. - Path Traversal & Symlink Shield: Strict lexical normalization and containment checks preventing
../traversal, null bytes, and symlink escapes acrossattachments/andworkspace/notes/. - 47-Attack Penetration Test Suite: Automated security verification covering path traversal, command injection, symlink overwrites, and unauthorized skill access.
Carefold maintains rigorous verification standards across all code changes:
# 1. Spectrayan License Header Check
pnpm run check:licenses
# 2. Backend Pytest Suite
PYTHONPATH=backend/src backend/.venv/bin/pytest backend/tests/
# 3. Security Penetration Suite (47 Attack Vectors)
PYTHONPATH=backend/src backend/.venv/bin/python backend/tests/penetration_suite.py
# 4. Frontend Typecheck
pnpm --filter @spectrayan/carefold-web typecheck
# 5. Frontend Unit & Component Tests
pnpm --filter @spectrayan/carefold-web test --exclude "**/api/**"
# 6. Frontend Production Build
pnpm --filter @spectrayan/carefold-web buildCarefold documents all major architectural decisions in docs/adr/:
- ADR 0001: Orchestrator-Driven Agent Architecture
- ADR 0002: Hexagonal Memory and Catalog Ports
- ADR 0003: Progressive Disclosure & Skill Context Management
- ADR 0004: Policy Approvals & Resume
- ADR 0005: Vault Threat Model & Per-Profile Envelope Encryption
- ADR 0006: Deployment Modes & Requirement Tiers (Mode L vs Mode S)
- ADR 0007: Content-Addressed Storage & Hybrid Search Index
- ADR 0008: Stateless OAuth 2.0 PKCE Bounce Relay & Scoped Connectors
- ADR 0009: End-to-End Internationalization & Multilingual Architecture
Thank you to all the contributors who help build and improve Carefold!
Carefold is source-available software licensed under the PolyForm Noncommercial License 1.0.0 together with the Carefold Additional Terms and the Carefold Trademark Policy:
- Permitted (Free Personal & Household Local Use): You may install, run, study, and modify Carefold for personal and family use on your own local hardware or private household instance, and contribute improvements back to the official repository under the Carefold Individual CLA.
- Prohibited Without a Commercial License: Selling, reselling, offering Carefold as a hosted service (SaaS/API/portal), deploying inside any business or healthcare organization, rebranding or white-labeling, removing Carefold/Spectrayan attribution, or redistributing modified forks outside your household is strictly prohibited.
- Commercial Licensing: For commercial, clinical, enterprise, or OEM licensing inquiries, contact
[email protected].
See LICENSE, ADDITIONAL-TERMS.md, TRADEMARKS.md, CLA.md, and NOTICE for full terms.
Required Notice: Copyright © 2026 Spectrayan (https://spectrayan.com). All rights reserved.











