Inspiration
Triage delay kills. When someone doesn't know whether their symptoms belong in self-care, urgent care, the ER, or a 911 call, that uncertainty creates dangerous hesitation during emergencies — while simultaneously clogging healthcare systems with lower-acuity visits. Online searches are too slow when seconds matter, and generic LLM chatbots respond with little urgency or empathy. We wanted to build something that helps people make better first-step decisions, faster, and with the calm clarity they need when they're scared.
What it does
Medical Triage Agent is a multi-agent healthcare triage system accessible through ASI:One. A user describes their symptoms in plain language, and the system immediately classifies urgency, identifies likely explanations, recommends the appropriate care pathway (self-care, urgent care, ER, or 911), and returns a structured, empathetic response designed to be understood under stress. For life-threatening patterns like stroke, cardiac events, anaphylaxis, or overdose, the system bypasses all LLM inference entirely and returns emergency instructions instantly via a deterministic fast-path. A full safety pipeline — including hedged diagnostic language, mandatory warning signs, and mental health crisis routing to 988 — runs on every response before the user ever sees output.
How we built it
The system is a four-agent pipeline built on Fetch.ai's uagents framework and deployed to Agentverse with mailbox support and ASI:One chat protocol compatibility. An Orchestrator Agent (Claude Haiku) handles user-facing synthesis — tone, structure, and careful phrasing. Three specialist agents powered by Gemma 4 handle symptom classification, knowledge retrieval, and care routing, each returning structured JSON outputs the orchestrator uses to compose the final response. A deterministic regex-based emergency detector runs before any LLM call. Post-model guardrails validate every TriageResponse object before delivery, rewriting overly definitive language and enforcing required escalation warnings. Session metadata is logged to a local SQLite database using hashed inputs, keeping operational analytics without storing raw symptom text.
Challenges we ran into
Hosting on Agentverse and getting the four agents to reliably communicate with each other was the biggest technical hurdle — inter-agent messaging over the uagents protocol required careful orchestration, and mailbox delivery added its own timing complexity. The deeper problem was latency: running four sequential LLM calls per prompt made the system too slow to feel useful. A routine, non-urgent query still takes around 30 seconds end-to-end. That performance reality directly inspired the regex fast-path for emergencies — we couldn't let the most critical cases depend on model inference time — but the underlying slowness for standard queries remains a known limitation we're working around rather than through.
Accomplishments that we're proud of
We're proud of the safety architecture most of all. The decision to default to severity 3 (urgent) on any classifier failure, enforce mandatory warning signs on every pathway including self-care, and route mental health crises to 988 rather than blanket-routing to 911 reflects genuine thought about real-world consequences, not just demo-quality output. We're also proud of the dual-model design — using Claude Haiku specifically for synthesis and Gemma 4 specifically for structured specialist inference reflects an intentional, production-minded architectural choice rather than just plugging in one LLM everywhere.
What we learned
We learned firsthand how powerful Fetch.ai's Agentverse is for building systems where multiple specialized agents need to collaborate, be discovered, and eventually be monetized through platform-native protocols. A triage workflow is a genuinely natural fit for this model — each agent has a clear responsibility, and the framework gives them a standardized way to find and talk to each other. We also learned the hard way how much latency compounds in a sequential multi-agent pipeline, and gained a deep appreciation for deterministic fast-paths as a design pattern for safety-critical systems. Building from agent.py up gave us a solid foundation for understanding how the uagents lifecycle actually works in practice.
What's next for Medical Triage Agent
Reducing end-to-end latency through parallelizing specialist agent calls is the most urgent priority. Beyond that: EHR integration for richer clinical context, voice input for accessibility and hands-free use, multilingual support, and deeper pediatric and obstetric specialization. We also want to build out the payment-gated premium workflow more fully using Fetch.ai's Payment Protocol, and explore human-in-the-loop escalation paths that hand off to telehealth or nurse triage services for cases that sit in the ambiguous middle ground.
Built With
- agentverse
- asi:one
- claude
- gemma
- python
Log in or sign up for Devpost to join the conversation.