A Self-Evolving Agent for Longitudinal Personal Health Management

Haoran Li, Jiebi Deng, Tong Jin, Jinghong Han, Yuxin Wang, Zexin Wang, Qingyi Si, Weikang Gong, Xiahai Zhuang, Jia You, Wei Cheng, Jianfeng Feng, Hongcheng GuoarXiv 2026 · arXiv

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:

  1. Perception: Integrating multi-source signals (wearables, prior records, current dialogue).
  2. Reasoning: Formulating a constrained plan using task-relevant memory.
  3. Action: Executing tools (like image classifiers or database lookups).
  4. Induction: A post-episode memory writeback phase.
Figure 1. Unified architecture of HealthClaw: closed-loop interaction and five-layer evolving memory. The top row shows the closed interaction loop. A, Perception integrates three input streams (wearables and devices, prior records and ongoing dialogue) into a current health context. B, Reasoning performs memory-informed task planning through knowledge retrieval, sub-problem decomposition and constrained plan formulation. C, Action executes the plan iteratively through tool invocation, intermediate-result checking and plan refinement, producing user-facing outputs. D, Induction operates after each episode to determine what should be carried forward by consolidating user facts, revising reusable task procedures and preserving episode traces. The bottom panel, E, shows the five-layer evolving memory. L0 (behavioural rules) and L1 (domain knowledge index) are shared domain-level layers, whereas L2 (privacy-critical personal profile), L3 (reusable task standard operating procedures, SOPs) and L4 (episodic memory) are personalized user-level layers. In this design, L2 stores sensitive profile information locally rather than exposing raw identifiable memory payloads during retrieval. Memory read supports planning in B, and memory writeback from D updates the user-level layers after each completed episode, enabling longitudinal personalization through incremental accumulation rather than one-shot responses.

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).
Quantitative performance metrics across longitudinal support, context exposure, privacy outcomes, and biomedical tasks.

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

Abstract

Personal health management unfolds over repeated encounters, yet most health AI systems treat each request in isolation. We developed HealthClaw, an open-source agent architecture that updates support as a person's routines, preferences, measurements and risks change. It separates shared safety rules and medical knowledge from private longitudinal memory containing profile facts, reusable procedures and episodic traces. After each episode, induction determines what should update the profile, revise a procedure, remain episodic or be excluded. We evaluated HealthClaw with a synthetic year-long benchmark and nine 200-case biomedical tasks. Across 900 longitudinal support probes, answer accuracy increased from 0.2% with current-query prompting to 45.7% with HealthClaw, while prompt-side context exposure was 71.7% lower than with full-history prompting. In 100 privacy probes, HealthClaw produced higher privacy-aware answer quality and fewer unsafe disclosures than both baselines. Across the biomedical tasks, the mean absolute gain in the task-specific primary metric was 27.0 percentage points, and seven gains remained significant after false-discovery-rate correction. These offline benchmarks support governed, self-evolving memory for longitudinal personal health agents, although clinical effectiveness requires prospective evaluation. HealthClaw is publicly available at https://github.com/HC-Guo/HealthClaw.
BibTeX
@misc{li2026self,
  author = {Haoran Li and Jiebi Deng and Tong Jin and Jinghong Han and Yuxin Wang and Zexin Wang and Qingyi Si and Weikang Gong and Xiahai Zhuang and Jia You and Wei Cheng and Jianfeng Feng and Hongcheng Guo},
  title = {{A Self-Evolving Agent for Longitudinal Personal Health Management}},
  year = {2026},
  eprint = {2607.13940},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.13940},
}
Figure