Skip to content

Hospital digital twin Simulation Agent

Based on the 25-patient clinical record provided, we built digital twins of the patients visiting an imaginary hospital.

Core trick

Generative-agent architecture gives each synthetic patient and staff member memory and plans, then walks them through hospital departments.

Tags

Description

Based on the 25-patient clinical record provided, we built digital twins of the patients visiting an imaginary hospital. This prototype digital twin of an operating hospital can be used to model a real hospital patient flow, identify the areas of improvements needed, and test the efficacy of its implementation. Furthermore, by adding further patient data features, we can identify underlying patient-originated causes of hospital inefficiency to address and achieve operational improvements to serve them better.
georgia-max/hospital-generative-agents★ 10 forksHTMLCreated Jul 18, 2026 · last push Jul 20, 2026

README excerpt

# Hospital Generative Agents

A faithful port of Stanford's **Generative Agents** (Smallville, arXiv 2304.03442)
to a **hospital**. Villagers become **patients and clinical staff**; Smallville
becomes a **General Hospital**. The 25 synthetic FHIR encounters in
[`dataset/`](dataset) are the *knowledge the agents have about the hospital*:
they seed the world's departments, each patient's own chart and symptoms, and the
staff's aggregated clinical knowledge.

![The hospital replay: 25 synthetic patients walking their care pathways through the departments, with live per-department occupancy and waiting-time charts.](assets/hospital-replay.png)

> Inspired by [joonspk-research/generative_agents](https://github.com/joonspk-research/generative_agents).

The original cognitive architecture is kept intact — the same
`perceive → retrieve → plan → reflect → execute` chain, the same three memory
structures, the same `world:sector:arena:game_object` maze addressing, and the
same `movement` / `meta` replay contract. Only the domain content and the LLM
backend (Claude, not OpenAI) change.

> The full design rationale lives in [`hospital_gen_agent/CLAUDE.md`](hospital_gen_agent/CLAUDE.md)
> and the detailed specs in [`hospital_gen_agent/plans/`](hospital_gen_agent/plans).

---

## Why this exists

**The problem.** You can't experiment on a real hospital. You can't rerun a bad
night in the ER to see whether a second doctor would have cleared the backlog, and
you can't test a new triage policy

Team