Inspiration

Emergency departments triage 40+ patients simultaneously with manual processes. Diagnostic errors harm thousands yearly. We built Clinexa to automate intelligent clinical triage with explainability — so every decision is transparent to clinicians.

What it does

6 specialized AI agents work together like a hospital team: Intake Agent: Parses free-text patient symptoms into structured data. Risk Agent: ML model predicts LOW/MEDIUM/HIGH risk (78% accuracy). XAI Agent: SHAP explains WHY using top clinical factors. Treatment Agent: LLM generates evidence-based care plans. Drug Safety Agent: Flags dangerous interactions (catches warfarin + aspirin). FHIR Agent: Produces HL7 R4 clinical bundles + SOAP notes.

Input: Patient symptoms + vitals Output: Risk classification + explanation + treatment plan + safety alerts + FHIR bundle All using synthetic data only (zero PHI).

How I built it

Phase 1 (ML Foundation): RandomForest trained on 1000 synthetic patients. SHAP TreeExplainer for interpretability. Phase 2 (MCP Servers): 4 FastAPI services (FHIR, Drug Safety, XAI, Grok LLM) exposing clinical tools. Phase 3 (Agent Orchestration): 6 A2A agents chained together. Each calls MCP services via HTTP. Phase 4 (Cloud Deployment): All 4 servers are deployed to Railway (free tier, permanent URLs). Phase 5 (Testing & Demo): Integration tests validate the full pipeline. The demo video shows 3 synthetic patients processed end-to-end.

Challenges nh I ran into

  • Time: 10 days to concept → production (forced prioritization).
  • Complexity: 6 interdependent agents needed careful orchestration.
  • Prompt Opinion Platform: MCP endpoint registration had compatibility issues.
  • Cold Starts: Railway cold starts on first request.
  • Synthetic Data: Building realistic clinical data without PHI required domain knowledge

Accomplishments that I am proud of

Working multi-agent system – All 6 agents talking to each other seamlessly. ✓ Real explainability – SHAP shows clinicians exactly why AI predicted HIGH risk. ✓ Drug safety detection - Actually caught warfarin + aspirin interaction in demo. ✓ Clinical standards compliance - FHIR R4 output works with real hospital EHR systems. ✓ Zero PHI by design – 100% synthetic data, hospital-safe from day 1. ✓ Production deployment – Servers live on the internet 24/7, not just local demos. ✓ Clean architecture - MCP + A2A + FHIR separation of concerns. ✓ Integration test validated – 3 synthetic patients, 6 agents, 100% success, all outputs working

What I learned

  • Multi-agent systems outperform monolithic LLMs when agents are specialized.
  • SHAP explanations are critical for clinical trust.
  • FHIR compliance is the bridge between research projects and real hospitals.
  • MCP is powerful, but platform integration still has rough edges.
  • Synthetic data generation requires careful attention to realistic distributions.
  • Time-boxing forces better prioritization.

What's next for Clinexa AI

Phase 6 (Real Clinical Data): Integrate with actual FHIR servers from partner hospitals. Phase 7 (More Agents): Add a radiology AI agent, a lab result interpreter, and a detailed medication interaction analyzer. Phase 8 (Mobile): iOS/Android app for ED nurses to access triage on device. Phase 9 (FDA Submission): Formalize as a clinical decision support system (not diagnosis, not treatment). Phase 10 (Scale): Deploy to 10+ hospitals and measure impact on triage accuracy and patient outcomes. Current focus: Prove clinical utility and regulatory pathway to market.

Built With

  • a2a
  • fastapi
  • hl7-fhir-r4
  • mcp
  • python-3.11
  • scikit-learn
  • shap
  • xai-grok-api
Share this project:

Updates