What inspired me

I was inspired by the fragmentation in healthcare technology, where isolated AI Agents often fail to communicate with one another. I wanted to tackle the prior authorisation process and turn a multi-day administrative burden into a rapid, automated workflow. The ultimate goal was to move beyond standalone tools and assemble interoperable AI agents into governed, context-aware workflows that could handle complex clinical requirements autonomously.

How I built the project

I built the project using Prompt Opinion, an AI platform by Darena Health that natively supports FHIR standards and provides a built-in patient management interface. I designed a multi-agent system consisting of a primary EHR Orchestrator agent and a specialized Prior Authorization agent. I equipped them with specific skills using the Model Context Protocol (MCP), which acts as a universal standard to connect tools like medical record extraction and database queries. To enable the agents to collaborate, I implemented the Agent-to-Agent (A2A) protocol, allowing the EHR agent to seamlessly delegate tasks to the specialist agent using synchronous JSON-RPC 2.0 requests.

What I learned

The architectural difference between a standard sub-agent and an "AgentTool," discovering that specialized agents function best as external information that the primary orchestrator invokes only when specific expertise is required.

Challenges faced

The primary challenge was establishing autonomous communication between the agents without stalling the workflow. Initially, the EHR agent required explicit human commands (like "generate PA") to initiate a handoff. I overcame this by refining the semantic triggers in the "Consult Prompt" and enforcing a strict prompt for the A2A request and response payloads. Standardising these structured and managing schema evolution was difficult, but it ultimately prevented the specialist agent from generating unstructured text and ensured seamless interoperability.

Built With

  • fastapi
  • gpt-5.1
  • huggingface
  • pinecone
  • python
  • render
  • unstrcutured
Share this project:

Updates