-
-
Project Inforgraphic
-
Community Submission Screenshot for - PriorAuthGuard_Master
-
Community Submission Screenshot for - PriorAuthGuard_Revision
-
Google Drive showing both saved documents (PA letter + Value Summary). Proves the end-to-end delivery.
-
The Revision pipeline canvas on Airia showing the full chain: Claude AI Model → HITL → Agent 4.
-
The Master pipeline canvas on Airia showing the full chain: PDF Relay → Agent 1 → Agent 2 → Agent 3 → HITL → Agent 4.
-
The generated PA submission letter (Page 1). Shows the output quality.
-
The HITL approval email. The actual email the physician received. Shows real-world enterprise integration.
PriorAuthGuard: The Story Behind the Build
The Spark
We didn't set out to build a prior authorization tool. We stumbled into it.
Both of us have been deep in the healthcare and pharmaceutical space through our current internship work where we have been working on pharma related projects. We have been actively looking into clinical workflows, researching how medical practices actually run day to day and much more. Over the past few months, we kept hearing the same frustration from physicians and coordinators: "The medicine is easy. The paperwork is the problem."
Prior authorization kept coming up. Again and again. In every conversation about clinical efficiency, someone would mention PA as the thing that slows everything down - the bottleneck that no one had really fixed. We started pulling on that thread.
The numbers stopped us cold.
$$ \text{40,000,000+ PA requests annually} \quad | \quad \text{94\% of physicians report care delays} \quad | \quad \text{\$14,000 per denied case} $$
Nearly 53 million prior authorization requests were submitted to Medicare Advantage insurers alone in 2024. Physicians and their staff spend an average of 13–14 hours per week just on PA paperwork. And 15–20% of surgical cases are denied on first submission - not because the patient doesn't qualify, but because the documentation was incomplete or misaligned with the payer's criteria.
We sat with that for a while. These aren't edge cases. This is the default state of healthcare administration in 2026. A patient waiting weeks for a knee surgery approval while their coordinator manually cross-references a payer policy PDF.
That's when we asked the question that changed the direction of this project: "What if an AI agent could do every single step of this?"
Why Airia
The moment we mapped out and brainstormed the possible PA workflow we could build, on paper, we realized Airia would be perfect for exactly this kind of problem.
Prior authorization isn't one task - it's a chain of specialized tasks:
- Extract structured data from unstructured clinical documents
- Retrieve and interpret live payer policy
- Score compliance gaps with clinical reasoning
- Generate a professionally written submission letter
- Route to a human for review before anything goes out
- Save, log, and audit the entire case
That's not a single LLM call. That's a multi-agent pipeline with real tools, real governance, and a human checkpoint. Airia's A2A protocol, native HITL node, MCP connectors, and audit logging made this buildable in a hackathon window.
How We Built It
We structured the build in phases, each one teaching us something new.
Phase 1 - Understanding the domain deeply.
Before writing a single prompt, we mapped out the real PA workflow for a surgical procedure (CPT 27447 - Total Knee Arthroplasty). We created realistic mock clinical documents, a physician's clinic note, a radiology imaging report, and actual payer PA request forms for two separate payers (Aetna Medicare FIDE and UnitedHealthcare Medicare Advantage). Getting the domain data right made everything downstream more meaningful.
Phase 2 - Agent 1: Intake & Smart Scan.
The first agent needed to extract 17 structured fields from 3 PDFs that each had different formats, layouts, and clinical vocabularies. We tuned the extraction prompt carefully at Temperature 0, with cross-document referencing logic and a SCENARIO_FLAG propagation mechanism that carries the user's intent through the entire 4-agent chain.
Phase 3 - Agent 2: Live Policy Intelligence.
This was the most technically exciting agent to build. Instead of hardcoding any policy data, we connected Brave Web Search MCP and built multi-payer routing logic. Agent 2 reads the payer name from Agent 1's JSON output and dynamically constructs the right search query. It retrieves Aetna's Clinical Policy Bulletin 0660 or UHC's Medical Policy in real time, then uses deep reasoning mode to score the clinical case against live criteria. The compliance gap report: criteria met, partial, missing, score 0-100 comes out the other side.
Phase 4 - Agent 3: Dynamic Document Generation.
Given the gap report and clinical data, Agent 3 generates either a PA Submission Letter or an Appeal Letter depending on the scenario flag. The letters are fully populated - no placeholders, no templates - professional medical prose ready to fax to a payer portal.
Phase 5 - The Master Pipeline.
Chaining four agents via A2A was where Airia's platform really showed its strength. We hit a critical limitation early: A2A sub-agents can't directly access files attached at the master pipeline level. We solved this by engineering a PDF Relay Node, a Claude 4 Sonnet step at the master pipeline level that reads all three PDFs and passes verbatim text downstream as a structured payload. An elegant solution to a real architectural constraint.
Phase 6 - HITL & Orchestration.
Airia's native Human Approval node gave us a real governance checkpoint. The pipeline pauses, the physician receives a live email notification, reviews the complete letter in the Airia Approvals Center, and approves or denies. On approval, Agent 4 generates a Case Value Summary, saves both documents to Google Drive via the Google Workspace MCP, and writes a full audit log entry.
Phase 7 - The Revision Pipeline.
We built a second standalone pipeline - PriorAuthGuard_Revision, that accepts physician feedback text and the original letter, regenerates a complete revised version incorporating every feedback point, and routes it through a second HITL approval gate. This closed the loop on physician-directed document improvement without requiring a full pipeline restart.
The Challenges
The A2A file forwarding limitation was the biggest technical challenge we faced. Sub-agents called via A2A don't inherit file attachments from the master pipeline. We spent significant time debugging why Agent 1 was receiving empty inputs before identifying the root cause. The PDF Relay Node solution was non-obvious. It required rethinking how data flows between pipeline levels in Airia's architecture.
SCENARIO_FLAG propagation was a subtle but critical problem. The flag
indicating whether to generate a submission letter or appeal letter needed to survive handoffs through four agents, each of which reformats its output. We solved this by implementing explicit delimiter blocks (---SCENARIO_FLAG---) that each agent was instructed to reproduce verbatim at the end of its output, ensuring the intent signal was never lost across the chain.
Multi-payer routing required careful prompt engineering. Agent 2 needed to read the payer name from a JSON field and route to the correct live search query without hallucinating policy content. We added strict governance rules: only report criteria found in actual search results, never fabricate policy data and verified end-to-end accuracy across both Aetna and UnitedHealthcare cases.
Staying under 4 minutes in the demo video was honestly harder than some of the technical challenges.
What We Learned
We learned that the hardest part of building multi-agent systems isn't the individual agents. Its's definitely the contracts between them. How data flows, how intent is preserved, how failures are handled at handoff points. Every delimiter, every flag, every forwarding rule we wrote was a lesson in inter-agent protocol design.
We also learned that Airia's native tooling: HITL, MCP connectors, A2A, audit logging is genuinely enterprise-ready and easy to use. We didn't build governance on top of the platform. The platform gave us governance, and we built the product on top of that.
Most importantly, we learned that AI agents are most powerful when they're solving problems that are genuinely painful, well-understood, and currently handled by humans doing repetitive, high-stakes work. Prior authorization is all three. The gap was real. The solution is real. And the impact - 5 hours to under 10 minutes, per case, every case is real.
The Result
$$ \text{Processing Time: 5–6 hrs → <10 min} \quad | \quad \text{Denial Risk: 18\% → 3\%} \quad | \quad \text{Savings: \$1,250 per case} $$
Two pipelines. Four agents. Two payers verified. Four scenarios tested. Every document saved to Google Drive. Every case audit-logged.
From 5 hours to 5 minutes. Every prior authorization. Every time.
— Built by Radhika Bhati & Deepanshu Aggarwal
Built With
- a2a-multi-agent-protocol
- airia
- anthropic
- brave-web-search
- claude
- css
- elevenlabs
- google-drive
- google-workspace-mcp
- hitl-humanintheloop
- html
- javascript
- mcp
- pdf-parsing
- rest-api
Log in or sign up for Devpost to join the conversation.