Counterclaim

Their AI denies. Ours appeals.


Inspiration

Gene Lokken was 91. He broke his leg. UnitedHealthcare's nH Predict AI cut off his skilled nursing coverage after 19 days — against his doctor's orders, without individualized review, in what a federal court later described as a systematic pattern of algorithmic denials.

His family paid $14,000 a month out of pocket for a year while fighting the insurer. He died during the lawsuit that now bears his name.

Here's what insurers know that patients don't:

90% of denied Medicare claims get reversed on appeal. Only 0.2% of patients ever appeal.

AI denies claims in 1.2 seconds. Patients spend 40 hours fighting back — when they're sick, broke, and terrified. That asymmetry isn't a bug. It's the business model.

We built Counterclaim to close it.


What it does

Counterclaim is open multi-agent infrastructure for fighting wrongful Medicare claim denials. A patient uploads their denial letter. Five specialized AI agents — registered on Fetch.ai's Agentverse and coordinating via Chat Protocol — produce a legally-grounded, citation-backed appeal letter in under 60 seconds.

Denial Letter → [5 Agents on Agentverse] → Ready-to-send Appeal

The five agents:

🔍 Doc Parser Agent

Reads the denial letter and insurance contract using computer vision. Extracts denied procedure codes (CPT), diagnosis codes (ICD-10), denial reason, appeal deadline, treating physician, and identifies evidence gaps.

📞 Contact Agent

Fills information gaps autonomously — fetches the insurer's own published clinical policy bulletins, pulls CMS Local Coverage Determinations for the patient's region, and drafts outreach emails to the treating physician for supporting documentation.

🏥 Personal Evidence Agent

Extracts patient-specific facts from medical records. Documents failure of prior treatments, specialist notes, comorbid conditions — everything that contradicts the insurer's rationale with the patient's own clinical history.

📚 External Evidence Agent

Pulls federal authority supporting the denied treatment — CMS National Coverage Determinations, Medicare Benefit Policy Manual provisions, specialty society guidelines, and the insurer's own published clinical policies (the strongest possible evidence because the insurer can't dismiss their own documents).

⚖️ Appeal Strategy Agent

The brain. Synthesizes everything into a structured argument chain. Identifies specific contract and policy violations. Generates confidence-scored remedy options:

Option Confidence Timeline Recovery
Full Overturn 0.72 60 days $12,000
Procedural Remand 0.58 90 days $0
External Review 0.50 120 days $12,000

Patient picks their path. Agent explains the tradeoffs.

✍️ Drafting Agent

Produces the formal appeal letter — structured legal-medical writing with citation footnotes, adapted to the correct Medicare appeal level (5 levels: redetermination → reconsideration → ALJ → Appeals Council → federal court), with submission instructions and deadline tracking.


The War Room

A real-time dashboard visualizes all five agents working simultaneously. The patient watches as their appeals get understood, researched, and written in real time.


How we built it

Focus: Medicare-only. Medicare publishes every coverage rule, every Appeals Council decision, every clinical policy transmittal — publicly. This makes it the cleanest possible domain for an evidence-grounded appeal system. We pre-loaded the most commonly denied procedures with their relevant NCDs and embedded them using MongoDB Atlas Vector Search for semantic citation retrieval.

Agent stack: Each agent is a Python FastAPI service backed by Claude claude-sonnet-4-6 with forced structured output via tool use — so every output is schema-validated JSON that the downstream agent can rely on. No hallucinated citations. Every citation links to a real public CMS document.

Fetch.ai integration: All five agents are wrapped as Fetch.ai uAgents, registered on Agentverse with Chat Protocol manifests published, making them discoverable through ASI:One. The Counterclaim Coordinator orchestrates the full pipeline and accepts direct chat requests from ASI:One.

🤖 Agent Address: agent1qwv5hzqy6vq4g8srs3d5hjzxjkss9p0tacvmhdkecus8fk55z5rdv6leevj 💬 ASI:One Chat Session: https://asi1.ai/shared-chat/93bd0964-153c-4a24-8061-a1265b9b5a9d

Infrastructure: MongoDB Atlas for case graph, coverage corpus (vector search), and anonymized precedent database.

Prototyping: The war room dashboard was designed in Claude Design before a line of production code was written. The five-panel layout originated there.


Challenges we faced

Getting the agent output right. A system that cites fake regulations is worse than useless — a patient might send a fabricated appeal and destroy their credibility. Every citation had to link to a real public document. This required pre-loading real CMS data, careful prompt engineering with tool-use forced output, and extensive testing against real anonymized denial letters from public court filings.

Agent-to-agent contracts. Five agents, four teammates, 17 hours. If one agent's output format drifted, the downstream agent silently failed. We built a shared schema library early and enforced strict JSON contracts between agents. Breaking changes required team announcement before merging.

The Contact Agent latency problem. Our Contact Agent was designed to actively reach out to fill evidence gaps — but waiting for a doctor to respond doesn't fit a 60-second demo (or a sick patient's life). We solved this by splitting outreach into two tracks: auto-fetch (insurer policy bulletins, CMS LCDs — instant) and drafted outreach (physician emails the patient sends themselves). The system proceeds with what it can get immediately and tells the patient exactly what to send to push confidence higher.


What we learned

Medicare's public data is an underutilized asset. Every NCD, every Appeals Council decision, every clinical policy transmittal is publicly available. The information patients need to win is out there. They just can't find or use it when they're sick and scared and on deadline.

The agent that matters most is the one that argues. The Appeal Strategy Agent's output — after testing against real denial letters from the UnitedHealth class action filings — independently surfaced the Jimmo v. Sebelius settlement, 42 CFR §422.568(f), CMS-4201-F, and internal UHC self-contradictions without being instructed to look for any of them specifically. The quality of the argument chain determines everything downstream. We spent more time on that agent's prompt than on any other single piece of the system.


What's next

The open protocol framing is the long-term vision. Any patient advocate, legal aid clinic, or specialty nonprofit can register a specialist agent on Agentverse — a rare disease agent, a California-specific external review agent, an oncology evidence agent — and the system discovers and incorporates them automatically.

$$\text{Reversal Rate} \times \text{Appeal Rate} = \text{Justice}$$

Right now: $0.90 \times 0.002 = 0.0018$. We're building toward $0.90 \times 0.90$.

As patients report outcomes, the precedent corpus builds a real evidence base — what arguments win against which insurers at which appeal levels. Within thousands of cases, confidence scoring becomes empirically grounded, not just base-rate adjusted. That's a moat no closed product can replicate, and it grows without us.


Track coverage

🤖 Fetch.ai Agentverse Search & Discovery Five uAgents on Agentverse with Chat Protocol manifests. Discoverable via ASI:One. Coordinator accepts direct chat. Dynamic specialist agent discovery demonstrated live in demo.

🌐 Arista Networks — Connect the Dots A denied insurance claim isn't a dead end — it's a network failure. The data exists: patient history, medical precedent, denial codes, missing documentation. But it's siloed, disconnected, and unreachable by the people who need it most. Counterclaim is the network layer that was missing. Built as a distributed mesh of specialist AI agents, it does what high-performance networks do best: move the right data to the right node at the right time, with zero latency and zero manual handoff. The orchestrator acts as the routing engine — it reads the denial, maps the evidence gaps, and dispatches packets of structured case data to parallel specialist agents: one surfacing personal medical records, one pulling external research and legal precedent, one flagging missing information that would kill the appeal before it starts. Every agent speaks the same protocol. Every handoff is typed, versioned, and traceable. When the mesh converges, a drafting agent assembles the routed intelligence into a ready-to-submit appeal letter. Deployed on Fetch.ai's Agentverse and discoverable through ASI:One, Counterclaim is itself a node on a larger network — one that any patient can reach with a single message. This is Arista's vision applied to healthcare: not just connecting devices, but connecting people to the resources that change their lives. One denied claim in. One winning appeal out. The network does the rest.

🍃 MongoDB Atlas Atlas Vector Search for semantic citation retrieval over the Medicare coverage corpus. Document storage for case graph and anonymized precedent database.

❤️ Catalyst for Care 67 million Americans on Medicare. One asymmetry exploited by every major insurer. One protocol to close it.

Built With

Share this project:

Updates