How Wenxian Yang's Team Designed a Hospital Agent OS on OpenClaw
Built by Wenxian Yang et al · · Source: arxiv
Result: According to the authors, their retrieval method matched a metadata-filtered RAG baseline on recall (0.877 vs 0.876) with 2.2x higher precision (0.779 vs 0.352), and had 21% higher recall on the hardest longitudinal queries.
What they built
Wenxian Yang and seven co-authors published an arXiv paper that proposes an architecture for running LLM agents inside hospitals. They build it on OpenClaw, the open source agent orchestration framework, and describe it as the foundation for an agentic operating system for hospitals: a layer that coordinates clinical workflows while keeping them safe, transparent and auditable.
The authors say hospitals have been slow to use agents because of safety risks, weak transparency and poor handling of a patient's long history. The design is their answer to those three problems. The abstract presents it as a proposed architecture with one component evaluated. It does not mention a deployment in a real hospital.
How it works
According to the abstract, the design has four parts:
- A restricted execution environment modeled on multi-user operating systems.
- A document-centric model that connects patient agents and clinician agents.
- Page-indexed memory for managing a patient's context over time.
- A curated set of composable medical skills.
To test the memory part, the authors introduce what they call manifest-guided retrieval. The LLM moves through a patient's records hierarchically to find what it needs. The abstract does not give setup details beyond this, so the specifics are in the full paper.
The result
The authors built a benchmark from MIMIC-IV (v2.2) with 100 de-identified patient records and 300 clinical queries, split into three difficulty tiers of 100 each. They compared manifest-guided retrieval with a metadata-filtered RAG baseline and report:
- Overall recall was about the same: 0.877 versus 0.876.
- Precision was 2.2x higher: 0.779 versus 0.352, with fewer documents retrieved.
- On the hardest tier, the longitudinal queries, recall was 21% higher: 0.846 versus 0.701.
They read this as a sign that letting the LLM move through records hierarchically helps most when a question spans several care episodes.
How to build something similar
This is our general advice, not something taken from the paper.
- Start with permissions. Give each agent its own limited account and workspace so it can only reach the files and tools its role needs, and log everything it does.
- Organize long records as an index plus pages. Give the agent a table of contents it can read first, then let it open only the pages that look relevant.
- Package repeated tasks as small skills with clear inputs and outputs, so you can review and combine them.
- Measure before you trust it. Build a set of questions with known answers at a few difficulty levels and compare your approach with plain RAG on both recall and precision. Use de-identified or synthetic data while you test.
The original post
Want to build something like this?
Join the Shipping Skool community free. Paid members get live bootcamp calls every week.
Join Shipping Skool — FreeMore use cases
- How a 30-Location Dental Group Uses OpenClaw for Financial QuestionsHealthcare
- How Dr. TJ Ahn Uses OpenClaw to Replace Most of a Virtual AssistantHealthcare
- How borja Runs Link Building for Distribb with Opus 5.5 SkillsMarketing
- How Andrej Karpathy Built HackerTube with Claude Code and Opus 5.5Developer