Inspiration
Looking at the Prompt Opinion marketplace, almost every agent is built to produce a confident output: a prior auth packet, a discharge summary, a trial match. Very few are built to check those outputs. Clinical AI fails in two distinct ways: by being wrong, and by being confident about being wrong. The second is more dangerous in production. I wanted to build the agent that sits between confident outputs and clinical action.
What it does
Attest is an agent-to-agent verification service for the Prompt Opinion marketplace.
When another agent makes a clinical claim about a patient (a prior auth proposal, a treatment recommendation, an eligibility determination), Attest is called as a second opinion. It performs four operations:
- Decomposes the claim into checkable assertions.
- Searches the patient chart for supporting evidence and contradicting evidence, with citations to specific FHIR resources.
- Extracts documented patient preferences: advance directives, religious objections, treatment refusals, goals of care.
- Returns a structured verdict: CONCUR, REBUT, or INSUFFICIENT_EVIDENCE, with cited evidence and a recommended next action for the clinician.
Attest is designed for safe degradation. When it cannot access the data it needs to verify a claim, it does not invent a verdict. It returns a structured access-issue response, explains what it would have verified, and asks the upstream agent for what it needs to proceed. Knowing what it does not know is part of the product.
How we built it
- MCP server in Python using FastMCP, deployed to Hugging Face Spaces.
- Four MCP tools: SearchSupportingEvidence, SearchRefutingEvidence, ExtractDocumentedPreferences, CiteFhirResource.
- Each tool uses Claude (Anthropic) to reason over FHIR data and clinical notes returned via SHARP context.
- SHARP headers (x-fhir-server-url, x-fhir-access-token, x-patient-id) flow from Prompt Opinion to the MCP server on every call. The server forwards the token on every FHIR request and uses the patient ID directly. The agent never has to pass these manually.
- The Attest agent itself is configured natively inside Prompt Opinion as a BYO agent with A2A enabled. The system prompt instructs the agent to decompose claims, call the four MCP tools in order, and synthesize a structured verdict.
- Custom Synthea FHIR bundles were generated for four test patients spanning different scenarios: documented religious objection to transfusion, documented advance directive declining feeding tube, supportive goals-of-care for active treatment, and comfort-care-only directives.
- Each patient was paired with a hand-written DocumentReference note containing the preference that Attest must find.
- A second BYO agent, Attest Demo Agent, simulates an upstream Prior Auth agent that drafts confident authorization packets and consults Attest before finalizing.
Challenges we ran into
- Aligning FHIR resource permissions between the platform proxy and an external MCP server proved to be the hardest part of the integration. Even with full authority granted, certain resource queries from the external server were rejected. The system was designed to gracefully surface these failures rather than fabricate verdicts, which became a feature rather than a bug. ## Accomplishments that we're proud of
What we learned
- The hardest part of healthcare AI is not the model. It is the chain of trust between the data, the tool, the agent, and the clinician. SHARP is a real attempt at that chain, and using it teaches you why every layer matters.
- Marketplaces of agents only work if some agents check other agents. Confident output factories without verification layers are a recipe for compounding error.
- Saying "I do not know" well is a product feature. It is also a hard one to design, because every layer of the system has to be honest with the layer above it.
Log in or sign up for Devpost to join the conversation.