Vigil: The Diagnostic Intelligence Endgame
"When the agents assemble, no patient gets left behind."
Inspiration
Every 7 to 12 years (Sometimes a lifetime). That's how long patients with conditions like Ehlers-Danlos Syndrome, Endometriosis, Mast Cell Activation Syndrome (MCAS), or POTS wait, on average, before receiving a correct diagnosis. Not because the data doesn't exist. Not because the science isn't there. But because no single clinician can hold 10 years of fragmented records, 300+ peer-reviewed papers, and the rare co-occurrence patterns of a dozen overlapping conditions in their head simultaneously.
This is the Last Mile problem in healthcare AI: the gap between raw clinical intelligence and the moment a patient finally gets an answer.
I built Vigil because I believed that gap was closable. Not with a single, clever model - but with a society of specialized agents, each an expert, all collaborating under a single orchestration engine built for the standards healthcare demands.
What It Does
Vigil is a HIPAA-aware, FHIR-native, multi-agent diagnostic orchestration engine deployed on the Prompt Opinion platform. It doesn't answer questions. It investigates cases.
Here's what happens when a clinician invokes Vigil on a complex patient:
1. Intelligent Triage: The Agent Summoner
Vigil's root orchestrator reads the patient's full FHIR record and applies a probabilistic triage model driven by a Clinical Knowledge Graph. This graph maps "Upstream" root causes to "Downstream" symptomatic phenotypes, allowing Vigil to identify the likely origin of multi-systemic illness rather than just treating symptoms. It dispatches only the relevant subset of specialists - avoiding cost and noise.
2. Parallel Specialist Deep-Dives: 15 Expert Agents
15 autonomous specialist agents execute in parallel powered by Vertex AI on Google Cloud Run. Each agent is a domain expert in a specific rare or multi-systemic condition. This fleet is fully modular; while 15 are live today, the architecture is designed to scale to hundreds of specialized agents as medical consensus evolves.
| Agent | Specialization |
|---|---|
| Endometriosis | Whole-body inflammatory & hormonal overlap |
| Adenomyosis | Uterine wall infiltration & pelvic pain |
| POTS | Dysautonomia & orthostatic intolerance |
| MCAS | Mast cell activation & multi-systemic triggers |
| EDS | Ehlers-Danlos Syndrome & connective tissue laxity |
| ME/CFS | Myalgic Encephalomyelitis / Chronic Fatigue Syndrome |
| CIRS | Chronic Inflammatory Response Syndrome (Biotoxins) |
| Lupus | Systemic autoimmune disease |
| Sjögren's | Systemic autoimmune / exocrine dysfunction |
| Long COVID | Post-acute sequelae of SARS-CoV-2 |
| PMDD | Premenstrual Dysphoric Disorder |
| PCS | Pelvic Congestion Syndrome |
| IC/BPS | Interstitial Cystitis / Bladder Pain Syndrome |
| Fibromyalgia | Central sensitization & chronic pain |
| Autoimmune Thyroid | Hashimoto's & Graves' disease |
Each agent uses Google's Firebase URL Context grounding tool to cross-reference patient data against live, reputable medical literature (PubMed, The Lancet, NIH databases), ensuring every hypothesis is evidence-based, not hallucinated.
3. Adversarial Peer Review: The Council
Before any differential diagnosis recommendation reaches a clinician, it passes through the Peer Review Council: an adversarial agent cluster that runs a Generator-Critic loop. One agent challenges the conclusions; another defends them. The result is a ranked differential diagnosis with a calibrated clinical confidence score, bias-tested and audited for psychosomatization errors.
4. Closing the Last Mile: Patient Outreach
If the chart is incomplete, Vigil triggers a Gemini Live 2.5 Flash + Twilio voice call to the patient directly: a focused, maximum 2-minute conversation designed to gather the specific symptomatic or biometric data needed to narrow down a potential differential diagnosis before generating its final report.
[!IMPORTANT] Regulatory & Safety Compliance: For Vigil to initiate a call, the patient's phone number must be verified on Twilio, and the clinician must expressly permit the outreach in the chat. This ensures human-in-the-loop oversight for all outbound interactions. The default behavior is to not call the Patient unless when explicitly authorized.
5. FHIR-Native Integration: Back to the Chart
Every report is written back to the patient's Electronic Health Record as a structured FHIR DocumentReference resource with a Two-Tiered Report structure: a "Quick View" for immediate clinical decisions and a "Deep Dive" for exhaustive investigative detail.
The "Society of Agents" Architecture
Vigil isn't just a bot; it's a distributed society of 22 microservices deployed on Google Cloud Run, with agentic reasoning powered by various Gemini models via Vertex AI.
- 15 Specialist Agents: The domain experts focused on specific pathologies.
- 7 Core Infrastructure Agents: Including the Orchestrator (Strategist), Triage Router, Evidence Merger, Peer Review Council, FHIR Writer, Knowledge Base, and the Outreach Engine.
Cost-Efficient & Scalable
Every one of these 22 microservices is architected to scale to zero when not in use. This makes Vigil extremely cost-efficient for healthcare organizations; you only pay for the compute required to analyze a specific case, and the system can scale from a single patient to thousands of concurrent investigations instantly.
Extreme Modularity
Vigil's greatest strength is its modularity. Because each specialist is an independent microservice, you can update the Endometriosis agent with the latest emerging research or a new medical consensus and redeploy it to Cloud Run in seconds without taking down the entire ecosystem. This ensures clinicians are always getting the most current information without systemic downtime.
How We Built It
Vigil is architected on the open standards this hackathon celebrates.
- Agent-to-Agent (A2A) Protocol: Every specialist and infrastructure agent is a discoverable, network-addressable A2A service. The orchestrator routes tasks using standard A2A task delegation - no custom glue code.
- SHARP Extension Specifications: Patient identity, FHIR access tokens, and FHIR server URLs propagate seamlessly through the entire multi-agent chain via SHARP context.
- Parallel-with-Sequential-Fallback: To ensure production-grade reliability, the orchestrator uses a fan-out pattern with a failsafe. If a parallel microservice hits a rate limit, the orchestrator automatically retries in a throttled sequential loop to guarantee report completion.
- Firebase URL Context Grounding: Every medical claim is grounded in URLs from peer-reviewed sources (PubMed, The Lancet). Every report includes a "Clinical Evidence Integrity" score.
- Vertex AI: Powers all agentic executions on Google Cloud Run, providing the enterprise-grade infrastructure that runs every Gemini model invocation across the system.
- Gemini 2.5 Flash (via Vertex AI): Powers the core reasoning across the system, providing the speed and context window necessary for analyzing years of medical records.
- Gemini Live 2.5 Flash (via Vertex AI): Drives the bidirectional, low-latency voice patient outreach: a real-time AI interview that gathers whatever is missing from the patient's chart.
Challenges We Ran Into
Context Fragmentation Across Agent Hops Maintaining a coherent patient context across 15+ independent microservices was a significant hurdle. I solved this by strictly adhering to the SHARP extension as the single source of truth for FHIR context propagation.
Psychosomatization Bias During testing, I found that agents sometimes mirrored systemic clinician bias, interpreting borderline labs as "inconclusive" when psychological history was present. I built the Adversarial Peer Review Council specifically to detect and challenge this pattern.
Intelligent Triage at Scale Running all specialists on every case is inefficient. I developed a probabilistic triage layer that scans the FHIR record for signal patterns and routes only to statistically plausible agents, reducing cost while improving signal quality.
Accomplishments We're Proud Of
A True Society of Agents: I moved from a single monolithic AI to a fully autonomous, 22-service collaborative system that can analyze a decade of medical history in seconds, grounded in auditable, peer-reviewed evidence.
Closing the Last Mile: Vigil is one of very few systems that can identify a missing piece of clinical context and proactively go get it by calling the patient, and then integrate the result back into the FHIR record.
Zero-Trust Interoperability: By building entirely on A2A, MCP, and SHARP, Vigil can be dropped into any compliant workspace with little or no modification.
What I Learned
Specialization beats generalization in medicine. A single large model knows a little about everything. Fifteen focused agents, each deeply grounded in the literature of their specific domain, know a lot about the things that matter.
Grounding is the difference between a demo and a tool. In healthcare, a plausible-sounding hallucination is dangerous. Requiring every diagnostic claim to be URL-grounded in live medical literature is what makes Vigil deployable in a real clinical context.
The "plumbing" is the product. Token propagation, FHIR session handling, and context preservation are the difference between a demo and a production system. SHARP solved this elegantly.
What's Next for Vigil
→ Scaling to 100+ Specialists: Expanding the registry to cover every rare disease in the National Organization For Rare Disorders (NORD) database. → Long-Term Diagnostic Memory: Implementing HIPAA-compliant persistent memory so Vigil can watch a record over months, alerting clinicians the moment a new signal surfaces a pattern. → Predictive Co-Occurrence Clustering: Training the triage layer to proactively identify diagnostic triads (like the MCAS-POTS-EDS constellation), before a full specialist sweep.
Note: Vigil's A2A Agent Card requires an Authentication Key. Without a valid Authentication key, Vigil will return a 403 or 401 error when consulted.
Built with Google Cloud Run · Vertex AI · Gemini 2.5 Flash · Gemini Live 2.5 Flash · Firebase URL Context · A2A Protocol · MCP · SHARP Extension Specs · FHIR R4 · Twilio
Vigil. Keeping watch over your health.


Log in or sign up for Devpost to join the conversation.