Inspiration
Hospitals lose millions every year from expired medications, inventory imbalances, and slow manual workflows. At the same time, healthcare systems can’t safely hand over operational decisions to unrestricted AI — every action needs to be explainable, compliant, and traceable.
We built MedFlow to explore what a safe autonomous healthcare agent could actually look like in practice.
Instead of another chatbot or analytics dashboard, MedFlow acts more like an operational teammate for hospital pharmacies: monitoring inventory, identifying risks, reasoning through possible actions, and enforcing safety policies before anything gets executed.
Our focus wasn’t just automation — it was trustworthy automation.
What It Does
MedFlow is an autonomous pharmacy operations agent that:
- monitors medication inventory,
- detects expiration and compliance risks,
- analyzes evidence like recalls and temperature excursions,
- recommends or executes safe operational actions,
- escalates high-risk situations to pharmacists,
- and logs every decision with a full audit trail.
In our demo workflow:
- one hospital branch has insulin expiring soon,
- projected local demand is too low to use the supply safely,
- while another nearby branch is experiencing shortages.
MedFlow autonomously:
- detects the issue,
- analyzes inventory and demand patterns,
- checks compliance policies,
- determines the safest operational response,
- requests approval if necessary,
- executes the workflow,
- and stores the entire reasoning chain in persistent memory.
We also built live policy enforcement into the system. If the agent attempts an unsafe or non-compliant action, NemoClaw blocks the workflow immediately.
How We Built It
Frontend
- React 19
- TanStack Start
- TypeScript
- Tailwind CSS
The frontend dashboard displays:
- live inventory monitoring,
- medication risk alerts,
- agent reasoning,
- approval workflows,
- and audit logs.
Backend
- Python
- FastAPI
- SQLite
The backend handles:
- inventory APIs,
- persistent memory,
- workflow orchestration,
- audit logging,
- and tool execution.
AI Stack
- NVIDIA Nemotron for reasoning and planning
- NanoOmni for evidence analysis
- NemoClaw for policy enforcement
- OpenClaw for autonomous tool execution
We deployed the system on NVIDIA Brev using an L40 GPU instance with 48GB VRAM for accelerated inference and orchestration.
We also used several specialized Nemotron workflows for:
- triage,
- compliance analysis,
- pattern recognition,
- and operational reasoning.
Architecture
Inventory → AI Reasoning → Policy Enforcement → Tool Execution → Audit Memory
Expanded workflow:
Hospital Inventory Systems
↓
OpenClaw Autonomous Agent
↓
NVIDIA Nemotron Reasoning Layer
↓
NemoClaw Safety & Compliance Policies
↓
Operational Tool Execution
↓
Persistent Audit & Memory Storage
Challenges We Ran Into
The hardest part of building MedFlow was balancing autonomy with safety.
We wanted the system to do more than generate recommendations — it needed to:
- take meaningful actions,
- enforce compliance rules,
- explain its decisions,
- and prevent unsafe workflows before execution.
Building the governance layer was especially challenging because healthcare environments require deterministic safeguards around recalls, transfers, and escalation procedures.
Another major challenge was coordinating multi-step reasoning across several AI systems while keeping the workflow understandable and responsive in real time.
We also had to design persistent memory so the agent could retain operational context and maintain continuity between decisions.
Accomplishments That We're Proud Of
- Built a fully autonomous healthcare operations workflow instead of a basic chatbot
- Integrated reasoning, governance, memory, and tool execution into a single system
- Created real-time policy enforcement using NemoClaw
- Implemented persistent audit trails for every action
- Simulated realistic hospital pharmacy workflows with explainable reasoning
- Successfully deployed the system using NVIDIA Brev infrastructure
Most importantly, we built something that feels operationally believable — not just experimental.
What We Learned
One of our biggest takeaways was that autonomous AI systems become far more reliable when reasoning, memory, governance, and execution are treated as separate layers with clearly defined responsibilities.
We also learned that safety guardrails are not optional in regulated industries. AI systems become significantly more useful when they can explain why a decision was made and why unsafe actions were blocked.
Finally, we realized that the most interesting AI systems are not passive assistants — they’re workflow orchestrators capable of reasoning, acting, adapting, and maintaining accountability across complex operational environments.
Why It Matters
MedFlow demonstrates how autonomous agents can safely operate in regulated healthcare systems by combining:
- autonomous reasoning,
- deterministic safety guardrails,
- explainable decision-making,
- persistent auditability,
- and enterprise workflow orchestration.
Rather than replacing healthcare professionals, MedFlow is designed to reduce operational burden while keeping human oversight central to high-risk decisions.
What’s Next for MedFlow
Next, we want to expand MedFlow with:
- real-time hospital ERP integrations,
- predictive demand forecasting,
- automated recall response workflows,
- multi-agent coordination across healthcare networks,
- and advanced anomaly detection for cold-chain failures.
Long term, we see MedFlow evolving into a secure autonomous operations layer for pharmaceutical logistics and healthcare inventory governance.
Built With
- 19
- apis
- css
- css3
- fastapi
- functions
- github
- html5
- httpx
- javascript
- nanoomni
- nemoclaw
- nemotron
- nvidia
- openclaw
- pydantic
- python
- query
- react
- rest
- server
- shadcn/ui
- sqlite
- start
- tailwind
- tanstack
- typescript
- vite
Log in or sign up for Devpost to join the conversation.