Background: As of 2026, Large Language Models (LLMs) demonstrate expert-level medical knowledge. However, deploying them as autonomous "Clinical Agents" remains limited. Current Electronic Medical Records (EMRs) and standards like FHIR are designed for human review, creating a "Context Mismatch": AI agents receive fragmented data and must rely on probabilistic inference (e.g., RAG) to reconstruct patient history. This approach causes hallucinations and hinders auditability. Methods: We propose MedBeads, an agent-native data infrastructure where clinical events are immutable "Beads"--nodes in a Merkle Directed Acyclic Graph (DAG)--cryptographically referencing causal predecessors. This "write-once, read-many" architecture makes tampering mathematically detectable. We implemented a prototype with a Go Core Engine, Python middleware for LLM integration, and a React-based visualization interface. Results: We successfully implemented the workflow using synthetic data. The FHIR-to-DAG conversion transformed flat resources into a causally-linked graph. Our Breadth-First Search (BFS) Context Retrieval algorithm traverses relevant subgraphs with O(V+E) complexity, enabling real-time decision support. Tamper-evidence is guaranteed by design: any modification breaks the cryptographic chain. The visualization aids clinician understanding through explicit causal links. Conclusion: MedBeads addresses the "Context Mismatch" by shifting from probabilistic search to deterministic graph traversal, and from mutable records to immutable chains, providing the substrate for "Trustworthy Medical AI." It guarantees the context the AI receives is deterministic and tamper-evident, while the LLM determines interpretation. The structured Bead format serves as a token-efficient "AI-native language." We release MedBeads as open-source software to accelerate agent-native data standards.
翻译:背景:截至2026年,大型语言模型(LLMs)已展现出专家级的医学知识。然而,将其部署为自主的“临床智能体”仍然有限。当前的电子病历(EMR)和FHIR等标准是为人工审核设计的,导致了一种“上下文不匹配”:AI智能体接收到的数据碎片化,并且必须依赖概率推理(如RAG)来重建患者病史。这种方法会导致幻觉并阻碍可审计性。方法:我们提出MedBeads,一个面向智能体的数据基础设施。其中,临床事件是不可变的“珠”(Beads)——Merkle有向无环图(DAG)中的节点——以密码学方式引用其因果前驱。这种“一次写入、多次读取”的架构使得篡改在数学上可被检测。我们实现了一个原型,包括Go核心引擎、用于LLM集成的Python中间件,以及基于React的可视化界面。结果:我们使用合成数据成功实现了该工作流。FHIR到DAG的转换将扁平资源转换为因果链接的图。我们的广度优先搜索(BFS)上下文检索算法以O(V+E)的复杂度遍历相关子图,实现了实时决策支持。防篡改特性通过设计得到保证:任何修改都会破坏密码链。可视化通过显式的因果链接帮助临床医生理解。结论:MedBeads通过将概率搜索转变为确定性图遍历,将可变记录转变为不可变链,解决了“上下文不匹配”问题,为“可信医疗人工智能”提供了基底。它保证了AI接收的上下文是确定性的且防篡改,而LLM负责确定解释。结构化的Bead格式作为一种令牌高效的“AI原生语言”。我们将MedBeads作为开源软件发布,以加速面向智能体的数据标准。