TL;DR
HealthClaw is an open-source AI agent architecture designed for long-term, personalized health management. By separating static medical knowledge from a dynamic, five-layer evolving user memory, it continuously adapts to a patient's changing routines and preferences while drastically reducing prompt token costs and protecting data privacy.
What Problem Does This Paper Address?
Most medical AI models treat user interactions as isolated, single encounters. In reality, personal health management is inherently longitudinal—your diet preferences change, new allergies are discovered, and wearable sensor trends develop over months or years.
The naive solution is "full-history prompting"—dumping the entire chat history into a Large Language Model (LLM) at every turn. However, this approach quickly becomes unsustainable. It skyrockets computational context costs, introduces irrelevant historical noise that confuses the model, and critically, risks exposing highly sensitive, identifiable health data to unauthorized disclosure. The core challenge is selective persistence: an AI needs to explicitly decide what to remember, what to update, and what to safely forget or withhold.
Methods
The authors introduce HealthClaw, an agent framework that operates on a continuous, closed loop of four stages:
- Perception: Integrating multi-source signals (wearables, prior records, current dialogue).
- Reasoning: Formulating a constrained plan using task-relevant memory.
- Action: Executing tools (like image classifiers or database lookups).
- Induction: A post-episode memory writeback phase.
The core novelty lies in its Five-Layer Evolving Memory, split cleanly between domain-level governance and user-level personalization:
- L0 (Behavioral Rules) & L1 (Domain Knowledge Index): Static, maintainer-edited layers containing global safety policies and curated medical insights.
- L2 (Personal Health Profile): Stores durable, privacy-critical personal facts (e.g., chronic conditions, allergies).
- L3 (Reusable Task SOPs): Standard Operating Procedures or "playbooks" that the agent refines over time (e.g., an evolving personalized meal-planning rule).
- L4 (Episodic Memory): Raw interaction traces, tool logs, and timestamps subject to summarization and decay.
After every interaction, the Induction step evaluates the episode to update profile facts (L2), refine procedures (L3), or leave details as decaying episodic traces (L4). This prevents raw, sensitive identifiers from being exposed during standard retrieval.
Datasets
The framework was evaluated using two distinct approaches:
- Year-Long Benchmark: A newly constructed synthetic dataset tracking 20 users over 365 days (7,300 daily turns total). It features 900 longitudinal support queries (evaluating allergy recall, trend tracking, etc.) and 100 privacy probes (testing data minimization and cross-identity leakage).
- Biomedical Tasks: Nine distinct 200-case public biomedical evaluation datasets spanning diverse modalities: imaging (NoduleMNIST3D, BreastMNIST, PAD-UFES-20, ODIR5K), clinical records (PhysioNet ICU SOFA, diabetes readmission), protein sequences (DeepLoc), and genomics/multi-omics (GeneTuring, MLOmics).
Key Insights and Ideas
- Selective Memory Beats Raw Recall for Privacy: Simply providing the full history yields high recall but terrible privacy control. HealthClaw demonstrates that filtering information through an induction layer protects sensitive identifiers without sacrificing task performance.
- Unused Information Isn't Neutral: In long-term health tracking, keeping irrelevant or outdated details in the prompt context actively degrades the model's reasoning capabilities by introducing noise.
- Procedural Memory Allows True Adaptation: Instead of just remembering facts, an effective health agent must refine how it performs tasks. For instance, if a user consistently logs late dinners, HealthClaw refines the underlying meal-planning SOP (L3) rather than just logging it as a repetitive episodic complaint.
Key Results
- Context Reduction: HealthClaw reduced prompt-side context exposure by 71.7% compared to full-history prompting (averaging 18.3k vs 64.5k characters), significantly lowering inference latency and cost.
- Accuracy & Privacy: On longitudinal support queries, answer accuracy jumped from 0.2% (current-query only) to 45.7%. In privacy probes, HealthClaw drastically minimized risk, reducing unauthorized disclosures to just 5% (compared to 15% for full-history prompting).
- Biomedical Performance: Across the 9 biomedical tasks, HealthClaw achieved a mean absolute gain of 27.0 percentage points in primary metrics over the base models, showing massive improvements in specialized tasks like 3D CT imaging (+61.5 pp) and genomic QA (+52.5 pp).
Limitations and Future Work
- Synthetic and Offline Constraints: The year-long trajectories were entirely simulated, and evaluations relied on an LLM-as-a-judge (Qwen-3.7) rather than real-world human clinicians or patients.
- Tool Overlap: Several task-specific tools utilized public resources close to their benchmark sources, meaning the results reflect agentic routing and evidence integration capabilities rather than zero-shot clinical generalization.
- Prospective Validation Needed: The authors emphasize that these offline benchmarks do not evaluate actual patient outcomes or real-world safety. Future work must involve prospective clinical trials to test stability under sparse feedback, contradictions, and distribution shifts.
Summary updated