As pretraining scales, medical language models have advanced rapidly in clinical question answering. Their ability to achieve effective physiological control through sustained intervention still lacks systematic quantitative evaluation. Type 1 diabetes provides a concrete setting: impaired insulin secretion creates dependence on exogenous insulin, with dosing continually adjusted using information about meals, exercise, illness, and glucose measurements. We introduce DiabAgent, a research suite for agentic physiological control comprising the Agentic Physiological Control (APC) framework, the DiabetSim simulator, and the SweetBench benchmark. APC controls glucose through medical-device tools, using ongoing observations to infer individual states, accumulate personal experience, and choose treatment actions. We build DiabetSim to simulate different patients, events, and device conditions for scalable virtual testing and training. Using DiabetSim, we construct SweetBench by instantiating 32 scenario designs as 212 glucose-control tasks. With Claude Opus 5.5 and a fixed decision interval of one hour, APC achieves a COGI of 73.5, compared with 71.2 for the open-source closed-loop baseline OpenAPS. Ablations further show that individual adaptation and contextual information improve glucose control. Combining high-frequency rule-based control with lower-frequency agent decisions shows potential for balancing control performance and computational cost. Our work provides a framework, simulator, and evaluation foundation for agents to participate in human physiological control.
Figures & tables
Figure 1: APC and its first instantiation. (a) The APC loop, in which an agent acts on a physiological system through device tools and is scored on the physiological outcome. This work applies it to type 1 diabetes, and other systems remain open. (b) DiabetSim combines a physiological engine, device models, and an instance generator; APC acts through the devices and observes their readings. The plot shows a simulated glucose trajectory. (c) SweetBench composes 212 tasks in seven scenario groups and scores the true glucose trajectories, which are hidden from the agent. The donut chart gives the tasks per group, and the bars show the mean COGI of APC with five backend models and of the three baselines.
Figure 2: The APC loop. The agent reaches the physiological system only through medical devices. Sensor readings and the person’s reports return through monitoring, which wakes the agent at its chosen time or when a trigger fires, and the personal record persists across decisions and days. The score S is computed from the true physiological trajectory.
Benchmark
Long-horizon control
Verifiable score
Evaluation tasks
HealthBench ( Arora et al., 2025 )
–
∘
Medical QA
AgentClinic ( Schmidgall et al., 2024 )
–
∘
Diagnostic dialogue
MedAgentBench ( Jiang et al., 2025 )
–
✓
EHR tasks
LongMedBench ( Xu et al., 2026 )
∘
✓
Longitudinal clinical reasoning
DM-Bench ( Cardei et al., 2025 )
∘
∘
Diabetes QA and planning
HealthLoopQA ( Niu et al., 2026 )
∘
✓
Time-series QA
Table 1: Task scope and scoring in medical benchmarks.
Group
Example design
Designs
Tasks
A
Meal timing and absorption
A03: a meal cancelled after pre-bolusing, followed by activity
4
28
B
Insulin from earlier doses
B01: repeated doses after a small meal overlap as absorption ends
4
28
C
Exercise
C04: breakfast and lunch skipped during prolonged aerobic activity
4
24
D
Changing insulin needs
D02: needs returning after sleep loss and the dawn phenomenon
6
38
E
Pump under-delivery
E04: silent under-delivery with progressively false-high sensor readings
4
28
F
Sensor errors
F06: missed meals and exercise causing lows masked by positive sensor bias
6
36
Table 2: Scenario groups of SweetBench . Each design yields tasks for four to eight individuals. Appendix A lists all 32 designs.
Controller / model
Interval
COGI
STIR
SHypo
SGV
Baselines
BB ( Fox et al., 2020 )
15 min
61.16
33.82
94.54
74.42
BB+Rules ( Riddell et al., 2017 )
15 min
63.57
38.35
95.04
74.21
OpenAPS ( OpenAPS community, 2026 )
15 min
71.19
51.62
96.45
77.48
APC (backend model)
Claude Opus 5.5 ( Anthropic, 2026 )
60 min
73.54
54.58
97.29
81.28
Table 3: Main evaluation. APC rows average completed 72-hour episodes under I2 with a 60-minute decision interval. The three baselines use 15-minute decisions; APC uses high reasoning effort. COGI and its three unweighted subscores range from 0 to 100, higher being better.
Figure 3: Daily scores under the four record and review conditions. Each point is the mean COGI across six configurations in the corresponding 24-hour window, matching Table 4 (a). Lines connect daily means without smoothing. The four conditions are defined in the text.
Configuration
Slow-Meal Overlap
Stress Resolution
Post-Illness Refeeding
Woman, 39 y
Boy, 15 y
Boy, 9 y
COGI
STIR
SGV
COGI
STIR
SGV
COGI
STIR
SGV
APC + Pens
74.61
52.55
88.90
72.33
51.04
78.71
67.10
46.76
58.11
APC + DASH-w/o CL
80.56
61.11
100.00
80.22
63.66
89.29
74.67
60.88
61.57
APC + DASH-w/ CL
85.19
71.18
97.33
82.75
68.52
89.93
74.51
60.88
60.49
DASH-w/ CL only
71.77
43.87
98.93
79.12
61.11
90.41
67.67
48.84
55.02
Table 5: Delivery devices and background closed-loop control. Each configuration runs for 72 hours per case; APC uses Claude Opus 5.5. Bold marks the highest COGI per case.
Figure 4: Three hardware trajectories within each scenario. Each panel overlays the complete 72-hour true-glucose trajectories for the same patient and exogenous event sequence: pens, DASH-w/o CL (without background closed-loop control), and DASH-w/ CL (with background closed-loop control). The pale teal horizontal band is 4–8 mmol/L, and time is relative to each episode start.
Case
Controller
COGI
STIR
SHypo
SGV
C04, adult female
Claude Opus 5.5
85.06
84.14
83.02
92.85
OpenAPS
77.73
85.42
59.10
95.57
F06, child female
Claude Opus 5.5
72.75
68.52
76.85
77.26
OpenAPS
48.52
57.18
26.70
70.61
E04, adolescent female
Claude Opus 5.5
47.37
10.65
100.00
47.00
OpenAPS
66.20
44.56
100.00
59.48
Table 7: Whole-episode outcomes for the three case studies. Claude Opus 5.5 and OpenAPS in the same world under I2; each row is one 72-hour episode. COGI and its three unweighted subscores range from 0 to 100, higher being better. Bold indicates the better value within each case, including ties.
Figure 5: Stronger control: C04, adult female. Solid blue shows true glucose under agent control; open circles mark meter checks; dashed gold shows OpenAPS true glucose in the same world; and the pale teal band marks 4–8 mmol/L. The event lane shows hidden fasting, exercise, and meals. Lower lanes show realized basal delivery relative to scheduled basal, boluses, and carbohydrate rescue. Numbered markers identify the decisions discussed in the text.
Figure 6: Stronger control under sensor bias: F06, child female. Curve and meter conventions match Figure 5 , with OpenAPS as the comparator. The event lane shows hidden fasting, exercise, positive sensor drift, and meals. Lower lanes show the agent’s basal changes, boluses, and carbohydrate rescue; gray diamonds mark preset meal boluses from the event calendar, not agent decisions. Markers identify meter verification on the first two mornings and an earlier basal reduction on the third. Hidden events are retrospective annotations, not agent inputs.
Figure 7: Weaker control: E04, adolescent female. Curve and action conventions match Figure 5 . Orange shading in the event lane marks evaluator-confirmed reduced tissue delivery; hatching marks programmed sensor-drift intervals, and triangles mark hidden meals. The vertical dashed line in the bolus lane is the sole infusion-set change; the red cross marks the rejected bolus request. The empty carbohydrate lane indicates that no carbohydrate rescue was issued. The repair and later recurrence can be verified from effective delivery, whereas the agent sees only measurements and device and action records.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
ID
Event combination
Tasks
A01
Repeated small intakes overlapping a slowly absorbed main meal
6
A02
Two slow-meal tails overlapping subsequent intake
8
A03
A meal cancelled after pre-bolusing, followed by activity
8
A04
Breakfast cancelled after a meal bolus, followed by prolonged fasting
6
B01
Repeated dosing after a small meal; absorption ends while insulin effects overlap
6
B02
Activity and small meals after earlier stacked doses
8
Appendix
Table 8: SweetBench designs and their event combinations. Each design yields evaluation tasks for different patients.
Function / parameter
Meter
Dexcom G5
Dexcom G6/G7
Guardian 3
Libre 2/3 real-time
Libre 1 scan
Libre 2 scan
MEASURE_BG from this device
✓
×
×
×
×
×
×
SCAN
×
×
×
×
×
✓
✓
CALIBRATE_CGM
×
✓m
×
✓m
×
×
×
High/low-only alarm before scan
×
×
×
×
×
×
✓a
Observation mode
Point
Real-time
Real-time
Real-time
Real-time
Scan
Scan
Simulated sensor interval (min)
Per check
5
5
5
5
5
5
Appendix
Table 9: Sensing-device capability matrix. Each column describes the device itself; a separately configured meter adds fingerstick measurement to any sensor combination. ✓m requires that meter; ✓a requires the optional alarm to be configured.
Function / parameter
Pens (MDI)
Combo
DASH
Dana-i
Medtrum Nano
Insight
Ordinary bolus
✓
✓
✓
✓
✓
✓
Long-acting insulin injection
✓
×
×
×
×
×
Set / cancel temporary basal
×
✓
✓
✓
✓
✓
Suspend / resume pump
×
✓
✓
✓
✓
✓
Infusion-site / pod change
×
✓
✓
✓
✓
✓
Independent ordinary-bolus cancellation
×
×
✓
✓
✓
✓
Appendix
Table 10: Delivery-device capability matrix. ✓ : the function is exposed for this model; × : not exposed.
Model
Harness type
Version
Effort
Claude Opus 5.5
Claude Code
2.1.296
high
GPT 6.1 Sol
Codex CLI
0.163.0
high
DeepSeek 4.1 Flash
Claude Code
2.1.296
high
Kimi K3.1 Pro
Claude Code
2.1.296
high
GLM 5.3 Flash
Claude Code
2.1.296
high
Appendix
Table 11: Model harnesses, versions, and reasoning effort.
Decision interval (min)
15
30
60
120
240
COGI
71.19
68.40
63.20
59.53
56.84
Appendix
Table 12: Decision-frequency ablation for OpenAPS. Entries are COGI, with higher values indicating better control.
Continuous glucose monitors (CGMs) used in diabetes care collect rich personal health data that could improve day-to-day self-management. However, current patient platforms only offer static summaries which do not support inquisitive user queries. Large language models (LLMs) could enable free-form inquiries about continuous glucose data, but deploying them over sensitive health records raises privacy and accuracy concerns. In this paper, we present CGM-Agent, a privacy-preserving framework for question answering over personal glucose data. In our design, the LLM serves purely as a reasoning engine that selects analytical functions. All computation occurs locally, and personal health data never leaves the user's device. For evaluation, we construct a benchmark of 4,180 questions combining parameterized question templates with real user queries and ground truth derived from deterministic program execution. Evaluating 6 leading LLMs, we find that top models achieve 94% value accuracy on synthetic queries and 88% on ambiguous real-world queries. Errors stem primarily from intent and temporal ambiguity rather than computational failures. Additionally, lightweight models achieve competitive performance in our agent design, suggesting opportunities for low-cost deployment. We release our code and benchmark to support future work on trustworthy health agents.
Large Language Models (LLMs) are increasingly being investigated for physiological time-series prediction, yet their effectiveness may depend not only on the model itself, but also on how physiological information is represented and presented at inference time. This study investigates prompt-based general-purpose LLMs for postprandial hyperglycemia and hypoglycemia prediction in individuals with type 1 diabetes. Using the OhioT1DM dataset, we evaluate multiple open-weight LLMs under zero-shot and few-shot inference across prediction horizons of 30, 60, and 90 minutes. The analysis varies both the textual representation of the available physiological information and the amount of information exposed to the model, ranging from glucose observations alone to derived descriptors and additional contextual variables related to insulin, meals, carbohydrates, and physical activity. Performance is compared with conventional patient-specific supervised models and with Gluco-LLM, a language-model-based architecture explicitly adapted to glucose time-series forecasting. Results show a marked task-dependent behavior. Conventional supervised models achieve the strongest performance for hyperglycemia prediction, whereas the best observed prompt-based LLM configurations improve performance for hypoglycemia across all investigated horizons. The effectiveness of prompt-based inference is also strongly influenced by how physiological information is represented, while providing additional contextual information does not lead to a systematic improvement. Overall, these findings highlight physiological information representation as a central design factor in prompt-based LLM approaches to glycemic-event prediction.
Andrea Apicella, Pasquale Arpaia, Matteo Orefice +2
Department of Information Engineering, Electrical Engineering, and Applied Mathematics (DIEM), University of Salerno, Fisciano (SA), Italy · Department of Electrical Engineering and Information Technology, University of Naples Federico II, Naples, Italy
Continuous glucose monitors, smartwatches, meal logs, and health profiles form a rich multimodal personal context that can significantly enhance glucose forecasting. However, existing methods struggle to effectively utilize these signals to improve glucose prediction because the relevance of different modalities varies drastically across individuals and time. We present GlucoAgent, an LLM-based agentic system that addresses this challenge through dynamic, case-by-case analysis at inference time. For each forecast, GlucoAgent writes and runs code over an individual's multimodal context and returns predictions with a reason and supporting evidence. The generated programs are highly diverse, ranging from retrieving similar past meals to fitting and back-testing physiological and statistical models. On CGMacros, a multimodal glucose dataset, GlucoAgent outperforms time series foundation models on every forecasting horizon, achieving an average RMSE of 22.5 mg/dL compared to 23.5 mg/dL of Chronos-2, the leading multimodal time series foundation model. Furthermore, GlucoAgent is highly effective at leveraging multimodal data. The addition of multimodal data reduces its average RMSE by 1.4 mg/dL (24.0 mg/dL to 22.5 mg/dL), compared to a marginal 0.3 mg/dL (23.8 mg/dL to 23.5 mg/dL) improvement for Chronos-2. This advantage is most pronounced in challenging post-meal windows, where GlucoAgent uses multimodal context to reduce 60-minute forecast RMSE by 4.6 mg/dL (31.0 mg/dL to 26.5 mg/dL), far exceeding the 0.8 mg/dL (31.9 mg/dL to 31.1 mg/dL) reduction achieved by Chronos-2.