OpenClaw in Hospitals: The Agentic Operating System Paper Explained

By Beau Johnson··8 min read

Quick answer

A team of researchers adapted OpenClaw into an agentic operating system for hospitals. It has four parts: restricted permissions, interactions tied to documents, manifest-guided memory, and composable medical skills. On real clinical data its retrieval got 2.2x higher precision than standard RAG.

In this video I go through a research paper where a team adapted OpenClaw into an operating system for hospitals. It covers how they kept AI agents safe in a setting where mistakes can cost lives, and what their tests on real clinical data showed. You don't need to work in healthcare for this to be useful. If you're building agents that handle sensitive data or coordinate a lot of moving parts, the same ideas apply to you.

I recorded this in March 2026. Tools and research change fast, so check the current docs and the paper itself before you build on any of this.

What I cover in this video

  • 0:00 Why AI agents in hospitals is a touchy subject, and why this paper is worth a look anyway
  • 2:15 The problem: communication breakdowns and medical errors
  • 3:01 Component 1: a restricted execution environment with role-based permissions
  • 3:46 Component 2: document-centric interaction
  • 6:01 Component 3: manifest-guided memory and retrieval
  • 6:47 The test results: 2.2x higher precision than standard RAG
  • 7:33 Component 4: a library of composable medical skills
  • 12:53 How I use the same principles in my own 13-agent setup

The problem the researchers are solving

The paper is called "When OpenClaw Meets Hospital". It was posted on arXiv by researchers from several universities. Hospitals are hard environments for coordination. Doctors, nurses, specialists, pharmacists, and lab technicians all have to work around individual patients, and each patient has their own history, conditions, and treatment plan. Right now most of that coordination runs on a mix of electronic health records, phone calls, pagers, handwritten notes, and people's memory.

Medical errors are one of the leading causes of death in the US, and many of them come from communication breakdowns. Information gets dropped at a shift change. An allergy is recorded in one system and missing from another. A specialist's recommendation gets lost in paperwork. Keeping track of everything and coordinating between people is exactly what agents are good at. But you can't drop a standard agent into a hospital, because the risk is too high. So the researchers designed four components that work together.

The four components

1. Restricted execution environment

Think of a multi-user operating system. On your computer, your kid's account can't install software but yours can. The researchers applied the same idea to agents. Each agent, whether it's a patient agent or a clinician agent, gets specific permissions. A nurse agent might be able to read certain records and update vitals but not change treatment plans. A doctor agent might have broader access but still can't override pharmacy safety checks. Most OpenClaw setups give the agent access to everything. In a hospital that would be a disaster, so they built walls between roles and between types of data.

2. Document-centric interaction

The agents don't just chat back and forth the way we do on Telegram. Every interaction is tied to a specific patient document. When a clinician agent talks to a patient agent, that conversation is anchored to the patient's record. Nothing gets lost and everything can be traced. If something goes wrong, you can go back and see what was shared, when, and between which agents. This also answers one of the biggest open questions with agents right now, which is accountability. You get a paper trail, and hospitals already need one for legal and compliance reasons.

3. Manifest-guided memory

To me this is the most interesting part technically. A patient can have years of history: dozens of visits, multiple conditions, hundreds of test results. Even the best current memory systems struggle here. They either forget older information or get confused when they try to put it in order on a timeline. The researchers' answer is manifest-guided retrieval. It works like a table of contents. Instead of searching every page of the record, the system first checks a manifest, which is a high-level summary of what's in the record and where it is. Then it goes straight to the relevant sections.

4. Composable medical skills

OpenClaw already has skills for things like sending email and searching the web. The researchers built medical skills on the same model: checking drug interactions, calculating dosages from patient weight and kidney function, generating discharge summaries, and flagging abnormal lab results. What matters is that they're composable, so you can combine them differently for each workflow. An emergency room workflow might chain triage assessment, vitals monitoring, and medication checks. A post-surgical workflow might combine wound assessment, pain management tracking, and discharge planning. The building blocks are the same and only the combination changes.

The test results

They tested the system on the MIMIC-IV dataset, a large collection of real clinical data from Beth Israel Deaconess Medical Center. The test used 100 patient records and 300 clinical queries split across three difficulty levels.

  • Manifest-guided retrieval got 2.2x higher precision than a standard RAG approach, which is what most AI systems use today.
  • It also retrieved fewer documents to get there. So it was more efficient as well as more accurate, and in a hospital both time and compute cost money.
  • On the hardest tier-three queries, the ones that span multiple care episodes over time (for example, what changed in a patient's treatment between their first and third hospital visits), it reached 21% higher recall than the baseline.

Doctors need answers to exactly those tier-three questions, and current systems handle them badly.

Why this matters beyond healthcare

I see this paper as a blueprint for running AI agents anywhere the stakes are high. If you have high stakes, complex coordination, and a lot of data, you need this kind of architecture. Some examples:

  • Law firms: agents that can open case files but can't reach client financial data without authorization.
  • Financial services: agents that can analyze portfolios but can't execute trades without human approval.
  • Education: agents that can access student records while keeping privacy boundaries between students.

The researchers built all of this on OpenClaw, the same open-source tool you can install on a Mac mini. They didn't use a proprietary enterprise platform. I'm not telling you to go build a hospital operating system, because that takes real domain expertise in clinical workflows and patient safety. But the principles carry over to almost anything.

My own setup is a much simpler version of the same thing. I run 13 agents on a Mac mini with one execution agent managing the rest, and each agent has specific permissions. My content agents can write to the database but can't send emails. My social media agents can post but can't access financial data. My research agents can search the web but can't modify files.

Key takeaways

  • Restrict permissions by role. Don't give every agent access to everything. Build walls between roles and between types of data.
  • Anchor interactions to documents so every exchange is traceable and you have a paper trail for accountability.
  • Use a manifest for long-term memory. Look up a summary of what's stored and where before you retrieve. In the paper this beat standard RAG on precision and pulled fewer documents.
  • Build small, composable skills that you can combine in different ways for different workflows.
  • You don't need a PhD or a big budget. These researchers took an open-source framework and adapted it.

FAQ

What is the "When OpenClaw Meets Hospital" paper?

It's a research paper posted on arXiv by researchers from several universities. It describes how they adapted OpenClaw into an agentic operating system for clinical workflows, with the goal of keeping patients safe.

What are the four components of the OpenClaw hospital system?

A restricted execution environment with role-based permissions, a document-centric interaction model that ties every exchange to a patient record, manifest-guided memory for long patient histories, and a library of composable medical skills.

How well did manifest-guided retrieval perform?

On 100 patient records and 300 clinical queries from the MIMIC-IV dataset, it got 2.2x higher precision than a standard RAG approach and retrieved fewer documents. On the hardest queries, which span multiple care episodes, it got 21% higher recall than the baseline.

Can I apply these ideas to my own OpenClaw agents?

Yes. Give each agent only the permissions it needs, tie interactions to documents so you have a paper trail, use a manifest-style index for long-term memory, and build small skills you can combine into different workflows.

Chapters

  1. 0:00AI Agents in Hospitals? Yes, Really.
  2. 2:00The Problem: Medical Errors Kill
  3. 4:00Component 1: Restricted Execution
  4. 5:30Component 2: Document-Centric Interaction
  5. 7:00Component 3: Manifest-Guided Memory
  6. 9:00The Test Results (2.2x Better)
  7. 11:00Component 4: Composable Medical Skills
  8. 12:30Why This Matters Beyond Healthcare
  9. 14:00Applying These Principles to Your Builds

Transcript

Read the full transcript

0:00In this video, we're going to be going over one of the coolest open claw use cases, something that could actually change the future of healthcare forever. A team of researchers just published a paper showing how they built an entire operating system for hospitals using open claw. And I'm not talking about a side project. This is actually full architecture running clinical workflows with AI agents while keeping patients safe. So, I know what you're thinking. This is a touchy subject. Hospitals and AI agents that sounds a little scary. And you mean honestly, it does. It really does. But healthcare is literally life and death. So, you can't have an agent hallucinate on someone's medication dosage or forget critical patient history. The stakes don't get

0:45any higher than this. But that's exactly what makes this paper so fascinating and why I want to share it with you. If you want to build something similar like agents as a service, you know, these researchers from multiple universities didn't just throw open claw into a hospital and hope for the best. They actually designed a completely new architecture with four specific components that address the exact things that make AI agents dangerous in high-stakes environments. And they tested it with real clinical data and the results are pretty good, pretty impressive. I'm going to break this down because I think this is one of the most important open claw use cases I've ever covered on this channel. The paper is called "When Open Claw Meets Hospital Toward an Agentic Operating System for

1:30Dynamic I have a link down below you can check out the paper. It was published on Arvix, which is where research papers are published for before pre-review studies. And the lead author is Winicson Yang, so along with seven other researchers. So, the problem is that they're trying to solve is that hospitals are incredibly complex environments. You know, you've got doctors, nurses, specialists, pharmacists, lab technicians, and all these people need to coordinate around individual payments patients who have unique histories, conditions, and treatment plans. And right now most of that coordination happens through a messy combination of electronic health records, phone calls, pagers,

2:15handwritten notes, and sheer memory. It's messy. Medical errors are the one of the leading causes of death in the US, medical errors. And a lot of those errors come from communication breakdowns, information that doesn't get passed along during a shift change, a medication allergy that wasn't documented in one system but now it's visible in another, a specialist recommendation that got lost in a stack of paperwork. This is exactly the kind of problem that AI agents are pretty good at solving, keeping track of everything, making sure nothing falls through the cracks, coordinating between multiple people. But you can't just drop a standard AI agent into a hospital. The risks are way too high. So, here's what the researchers built. They designed four components that work together. The first component is a restricted

3:01execution environment. Think of it like a multi-user operating system. You know how your computer basically you can have multiple users with different permissions. Your kids' account can't install software but yours can. They basically built the same concept for AI agents in the hospital setting. Each agent, whether it's a patient agent or a clinician agent, has specific permissions. A nurse agent might be able to read certain records and update vitals but can't modify their treatment plans. A doctor agent might have broader access but still can't override pharmacy safety checks. This is huge because in most open claw setups, the agent basically has access to everything. But in a hospital, that would be catastrophic. It would be terrible. You

3:46need walls. You need walls between different roles and different types of data and they built those walls into the architecture. So, the second component is what they call a document-centric interaction model. Instead of agents just chatting back and forth like we do on Telegram, every interaction is linked to a specific page patient document. So, when a clinician agent communicates with a patient agent, that conversation is anchored to the patient's record. So, nothing gets lost. Everything is traceable. If something goes wrong, you could go back and see exactly what information was shared, when it was shared, and between which agents. Real quick, before we keep going, if you're watching this and you want to actually build with some of these tools, not just watch videos about them, then you're

4:31going to want to check out our community down below, Shipping School. We have a full Claude code course, a full open claw course, and four live bootcamps every single week where we actually help you get set up from scratch. Like actually set this thing up, not just watch a tutorial and figure it out by yourself. And we also provide one-on-one coaching, so you could book a call with me. We could share screens and I can help you get Claude code or open claw running on your machine. That's it, no fluff. I built this community because watching YouTube's only gets you so far. We launched it just 3 days ago and we have over 55 members. You need people around you who are actually building, people who hold you accountable, and coaches who can help you when you get stuck. I'll put the link in the

5:16description down below. Get in now before the price goes up. This is really smart because one of the biggest problems with AI agents right now is accountability. If your agent makes a bad decision, who's responsible? By tying everything to documents, they create a paper trail, which is exactly what hospitals already need for legal and compliance reasons. The third component is a page index memory architecture and this one that I think is the most interesting technically. So, here's the problem with AI up front is and basically healthcare is a patient might have years of medical history, dozens of visits, multiple conditions, hundreds of test results. Current AI memory systems, even the best ones, struggle they either forget old stuff or

6:01get confused when trying to piece it all together on a timeline. These researchers built what they call manifest-guided retrieval. Think of it like a table of contents in a book. Instead of searching through every single page of a patient's history, the system first consults a manifest, a high-level summary of what's in the record and where. Then it navigates directly to the relevant sections. Here's where the results get impressive. This is why we're even talking about this is they tested this on the MIMIC-IV data set, which is a massive collection of real clinical data from the Beth Israel Deacons Medical Center. 100 patient records, 300 clinical queries across three difficulty levels. Their manifest-guided retrieval

6:47achieved 2.2 times higher the precision than a standard rag approach to most AI systems that they use today. And they retrieved fewer documents to get there. So, it's not just more accurate, it's more efficient. In a hospital where time matters and compute costs money, that's a pretty big deal. The most impressive part was the hardest queries, the tier three queries, which are the ones that span multiple care episodes over time, like asking what changed in a patient's treatment between their first and their third hospital visit. Their system achieved 21% higher recall than the baseline test. That's the exact type of question that doctors need answered. But the current systems are terrible at it.

7:33The fourth component is a curated library of composable medical skills. So, just like open claw has skills for sending emails, searching the web, these researchers built medical-specific skills. Things like checking drug interactions, calculating dosages based on patient weight and kidney function, generating and discharging summaries, flagging abnormal lab results. And the keyword here is composable. These skills can be combined in different ways for different clinical workflows. An emergency room workflow might chain together triage assessment, vital monitoring, and medication checking. A post-surgical workflow might combine wound assessment, pain management, tracking, and discharge planning. Same building blocks, different combinations

8:19depending on the clinical need. Now, here is what I want you to understand about why this matters beyond just hospitals. This paper is essentially a blueprint for how to deploy AI agents in any stakes environment. If you're dealing with high-stakes stuff, these four principles they just laid out, restricted permissions, document-anchored interactions, intelligent memory, and composable task libraries, these pretty much apply everywhere in a high-stakes environment. So, if you think about law firms, you need agents that can access case files but not the client financial data without authorization. Think about financial services. You need agents that can analyze portfolios but can't execute trades without human approval. Think about education. You need agents that can access student records but maintain privacy boundaries between students. The

9:05pattern is the same here. High stakes plus complex coordination plus lots of data equals the need for this kind of architecture. And these researchers just showed it works. Now, I want to connect this to what's happening in the broader open claw world right now. Just this week, China gave a billion people access to AI agents through WeChat. Cisco just launched defense claw for enterprise security. Anthropic is in a court with the Pentagon over AI safety. The conversation about AI agents is not theoretical. It's a real thing happening in real time right now. And it's moving into the most critical sectors of society. Healthcare is a two trillion dollar industry in the United States, just the US alone. And it's drowning in administrative work. The doctors spend more time on paperwork than they do with

9:51the patients. The nurses are burning out from documentation requirements. The patients are dying from preventable errors caused by communication breakdowns. If you can build a system that reduces even a fraction of those errors, that saves even a few hundred hours of administrative work per day, the impact is massive. We're talking about saving lives here, literally. If you're struggling to keep up with content, well, I'm about to save you about 40 days worth of work. [music] I built something called Content Machine. It's 10 AI agents that run on the Open Claw orchestration, and they handle everything. Scripts, thumbnails, X [music] posts, blogs, outreach, clips, newsletters, all of it. So, I went from 1,000 subscribers to 4,000 subscribers

10:38on YouTube in 7 days using this exact system. Every single morning, I wake up and the content's already done. I spend maybe 15-20 minutes reviewing and approving them, and I move on with my day. It works for any niche, fitness, finance, real estate, marketing, whatever you are building, and it is 100% completely customizable to your use case. So, you get the mission control dashboard, all of the cron jobs, everything I've built over the last 40 days helping me gain more and more people to subscribe and join the community. So, you plug in your own thing and it molds it to you. It learns how you talk and it writes so it doesn't sound like AI slop. $97 one time, it's not a subscription. [music] I'll put the link down below and you'll thank me

11:23later. And here's the part that connects to what I keep telling everyone about in people building is the researchers who wrote this paper built it on top of Open Claw, guys. This is insane. The same open-source tool that you can install on your Mac mini today. They didn't need some proprietary enterprise platform. They didn't need millions in funding. They took an open-source framework and adapted it for one of the most complex environments on Earth. That's the power of open source. Somebody in Austria builds a framework, research across multiple universities use it to potentially change how hospitals work. A mom in California uses it to home school her kids. A guy in Shanghai uses it to find a job. And I'm sitting here in Oregon using it to run my entire content business. Same tool, infinite

12:08application. Now, am I saying to you go and build a hospital operating system? Go ahead, but probably not. You know, that takes serious domain expertise, and you know, you need to really understand clinical workflows and patient safety. But, the principles in this paper do apply to whatever you're building. You know, if you're building AI agents for any kind of service, you know, any service business, think about restricted permissions. If you're building agents that handle sensitive data, or think about document and anchored interactions, you're building agents that need to remember things over time. If that's what you're doing, think about manifested guided memory and apply that. These aren't just academic concepts. They're practical architecture decisions that will make your agents more reliable and more trustworthy. So, I think about

12:53my own setup. Like, I run the 13 agents on this Mac mini. I have one execution agent that manages them all, and everyone has specific permissions. Like, my content agents can write to the database, but they can't send emails. My social media agents can post, but they can't access financial data. My research agents can search the web, but they can't modify any files. That's basically the same type of principle just applied in a different way, and much simpler. This is why I love this space so much. I can learn from cutting-edge academic research and apply the same ideas to my own setup. You don't need a PhD. You just need to pay attention and start building. That's what we do inside the community with over 156 members, and today is day 15. I love you guys. Thanks

13:38for coming in. We're helping people build and share ideas and ship products from all across the world. We have six live boot camp calls every single week. Every day, maybe that'd be pretty cool. You know, some people are building simple automations for their businesses, but other people are building more complex systems, trading bots, financial bots, people that, you know, want to monitor the markets better. And everyone is learning, and everyone is shipping. Everyone is making progress, and that's what really matters. So, if this video got your wheels turning and you're pumped up and you're fired up and you want to learn more on how to build with Open Claw, I'll put the link to the community down below. Like I said, six boot camp calls a week. We want to meet your needs with human-to-human interaction, help you build something amazing, because the time is now. You know, make sure you subscribe to to the

14:23channel if you're wanting AI news and more use cases just like this that we feature with Open Claw. I will say, you know, just the future of AI agents is just so beyond chatbots. It's building intelligent systems and coordinating complex real-world workflows. It's happening right now, and it's hard to keep up. So, make sure you hit the notification bell for the next video to drop, and I hope you guys have a blessed day. We'll see you in the next one. Bye-bye.

Ready to start building with AI?

Join the Shipping Skool community free. Paid members get live bootcamp calls every week and weekly-updated courses.

Join Shipping Skool

Keep reading