Inspiration

In precision oncology, matching patients to the right clinical trials is a matter of life and death. The biggest bottleneck in using Generative AI for this task is "hallucination"—LLMs cannot be blindly trusted with complex, high-stakes medical decisions. We needed a system that leverages the reasoning power of modern LLMs while completely removing their dangerous autonomy. This inspired the creation of Omni-Match A2A, a zero-hallucination orchestration layer that places hard deterministic guardrails between raw medical data and the AI.

What it does

Omni-Match A2A: Oncology Orchestrator is a secure, Agent-to-Agent (A2A) clinical matching pipeline. It acts as a specialized backend doctor. When a user asks a General Front-end Agent (like Prompt Opinion) about trial eligibility, the system performs a secure hand-off. It follows a strict 4-step workflow:

Request Routing: Captures the query securely via A2A protocols.

Data Hydration: Fetches structured patient EHR data and medical history via standardized FHIR APIs.

Privacy Layer: Executes strict PII/PHI scrubbing routines to ensure 100% HIPAA compliance.

Clinical Verdict: Passes only the sanitized, structured data to the Gemini LLM reasoning engine to generate a high-fidelity, highly accurate clinical matching report.

How we built it

We engineered the core architecture using a robust Python and FastAPI backend to handle the complex A2A protocol routing. The system is containerized using Docker for seamless deployment. For the intelligence layer, we integrated the Google GenAI SDK (Gemini Flash) because of its exceptional reasoning capabilities. The front-end interaction and agent routing are managed through the Prompt Opinion platform, where Omni-Match is published as an External A2A Agent.

Challenges we ran into

Building an enterprise-grade A2A system came with significant hurdles. First, mastering the state management of the A2A protocol (handling session locks, Task IDs, and state mapping like completed vs input-required) required deep architectural planning. Secondly, we faced complex cloud deployment issues where free-tier server IPs were occasionally blocked by the GenAI API due to high demand, forcing us to dynamically optimize our SDK versions and routing to maintain a stable connection.

Accomplishments that we're proud of

We successfully built a system where the AI does not guess. We are incredibly proud of our Privacy Layer and deterministic routing. By ensuring that the front-end agent never touches raw medical logic, we created a truly enterprise-ready, HIPAA-compliant AI pipeline that doctors can actually trust.

What we learned

This project was a massive deep dive into secure AI orchestration. We learned how to properly implement Agent-to-Agent communication, manipulate structured healthcare data (FHIR), and most importantly, how to effectively constrain and guide Large Language Models using deterministic code instead of just prompt engineering.

What's next for Omni-Match A2A: Oncology Orchestrator

We plan to expand our deterministic guardrails to other medical domains like Cardiology and Neurology. On the technical side, we aim to fully implement dynamic multi-turn state management (the TASK_STATE_INPUT_REQUIRED pipeline) so the backend can iteratively ask doctors for missing lab reports without ever breaking the secure session lock.

Built With

  • a2a-protocol
  • docker
  • fastapi
  • fhir-api
  • google-gemini
  • prompt-opinion
  • python
Share this project:

Updates

Submission history