AgentKits

Prior Authorization Agent

Production Blueprint
0TrendingNew

Includes Agent Blueprint + Implementation Guide

An administrative agent that takes the busywork out of prior authorization: it checks a request against the payer's documented requirements, finds exactly what's missing, and assembles a review-ready packet — without ever making a clinical or coverage decision. It is built defensively for a regulated setting: it is administrative only, follows minimum-necessary PHI handling, never approves or denies care, never determines medical necessity, and escalates anything requiring clinical judgment to a qualified human.

healthcareprior-authorizationadministrativepayer-ruleshipaaautonomous-agentdocumentationrevenue-cycleagentazagent-governancetrust-levelproduction-readiness
StackClaude, LangGraph, OpenAI
DifficultyAdvanced
Setup50 min
Version2.0.0 · 2026-06-21

Overview

Checks a prior-auth request against the payer's documented checklist, identifies missing documentation precisely, and assembles a review-ready packet.

Administrative only: it verifies completeness against payer rules — it does not approve, deny, or determine medical necessity.

Minimum-necessary PHI: pulls only the data the payer requires and keeps it within scope.

Escalates clinical judgment to humans: borderline medical-necessity calls go to a clinician, never to the agent.

AgentAz™ specification

A lightweight, design-time governance spec for security review. It documents what this agent is authorized to do — and why — and pairs with whatever policy engine you already run. It does not enforce anything at runtime.

Trust Level ?A3 — Human-Approved
DNA PatternSynthesis (Extract → Synthesize → Verify)
Worst-Case ActionAssembles an incomplete or incorrect prior-authorization packet that a human reviews before submission. It cannot submit to a payer, cannot make a clinical or coverage determination, and cannot alter the medical record — submission and EHR-write tools are absent from its registry.
Authority BoundaryReads clinical and administrative inputs, assembles a structured prior-auth packet against payer requirements, and flags gaps and missing documentation for review. A human approves and submits. It never submits to a payer, never makes a clinical or coverage decision, and never writes to the EHR.
Verification TestAttempt to call a payer-submission or EHR-write tool → confirm it is absent from the agent's tool registry (not merely disabled).
Production Readiness6/6 dimensions passing. Tool isolation: submission and EHR-write tools absent. Human gates: approval required before submission. Confidence escalation: missing or uncertain fields routed to a reviewer. Cost ceiling: bounded per packet. Audit trail: assembly steps and flags logged. Escalation path: incomplete packets routed to a human reviewer.
Last Reviewed2026-06-24

Machine-readable contract (agentaz.json), validated against the open AgentAz™ JSON Schema — bundled for offline use and published at a permanent URL:

agentaz.json
{
  "$schema": "./agentaz.schema.json",
  "agent_id": "prior-authorization-agent",
  "version": "2.0.0",
  "trust_level": "A3",
  "dna_pattern": "Synthesis",
  "worst_case_action": "Assembles an incomplete packet for human review. Cannot submit to a payer or write to the EHR.",
  "authority_boundary": "Assembles prior-auth packets for human approval and submission. Submission and EHR-write tools absent.",
  "last_reviewed": "2026-06-24",
  "tags": [
    "healthcare",
    "prior-authorization",
    "hipaa",
    "human-approval",
    "read-only-ehr",
    "agentaz",
    "agent-governance",
    "trust-level",
    "production-readiness"
  ],
  "tool_boundary": {
    "allowed_tools": [
      "read_clinical_inputs",
      "read_payer_rules",
      "assemble_packet",
      "check_completeness",
      "flag_gaps"
    ],
    "execution_tools_absent": true,
    "absent_tools_note": "payer_submit and ehr_write are intentionally absent from the registry"
  },
  "output_boundary": {
    "format": "structured_json",
    "never_emits": [
      "payer_submission",
      "ehr_write",
      "coverage_determination"
    ]
  },
  "cost_boundary": {
    "max_usd_per_trace_loop": 0.3,
    "alert_threshold_usd": 0.2
  },
  "loop_boundary": {
    "max_reasoning_turns": 10
  },
  "human_handoff": {
    "triggers": [
      "missing_documentation",
      "uncertain_field",
      "completeness_below_threshold"
    ],
    "destination": "prior_auth_reviewer"
  },
  "audit": {
    "append_only": true,
    "logs": [
      "assembly_steps",
      "flags",
      "completeness"
    ]
  }
}

New to this? Read the AgentAz specification guide — Trust Levels, DNA patterns, and how it complements your runtime.

AgentAz™ is open source under Apache-2.0 — schema (frozen v1.0.0) and source on GitHub.

Governance matrix

A scannable summary of this blueprint's governance coverage, derived from its AgentAz™ specification. It documents the boundaries that already ship — not new functionality.

Agent goalBounded by the authority spec above
Trust LevelA3 — Human-Approved
Tool accessLeast privilege — execution tools absent (read-only)
Context handlingGrounded in provided inputs; cites or flags rather than guessing
Memory strategyTask-scoped; no persistent cross-session memory
Human approvalRequired on missing documentation, uncertain field, completeness below threshold → prior auth reviewer
Audit trailAppend-only log (assembly steps, flags, completeness)
Cost & loop bounds≤ $0.3 per loop · ≤ 10 reasoning turns
Recovery / escalationEscalates to prior auth reviewer

Agent component mapping

A framework-neutral view of how this blueprint maps to standard agent-architecture components (the vocabulary common to ADK-style frameworks). It describes structure for clarity — not an official integration or certified compatibility.

AgentPrimary reasoner — Human-Approved authority (A3)
Toolsread clinical inputs, read payer rules, assemble packet, check completeness, flag gaps — execution tools absent (read-only)
MemoryTask-scoped working context; no persistent cross-session memory
GuardrailsWorst-case classified (A3); no execution tools; ≤ $0.3/loop · ≤ 10 turns
EvaluatorConfidence and authority-boundary checks; low-confidence or out-of-bounds results are flagged, not actioned
HandoffEscalates to prior auth reviewer on missing documentation, uncertain field, completeness below threshold

Failure modes

Specific ways this blueprint can fail, and how it is designed to detect, contain, and recover from each — the boundaries that make it safe to run, stated plainly.

Assembles a packet missing a required clinical document, causing a denial.

Detection
A required-document checklist is verified against the payer's requirements.
Mitigation
Gaps are flagged and the packet is prepared, not submitted, until complete.
Recovery
Missing documents are requested before submission.

Includes a wrong or mismatched diagnosis or procedure code.

Detection
Codes are cross-checked against the clinical record and mismatches are flagged.
Mitigation
Codes are a recommendation a human confirms; there is no auto-submit.
Recovery
The reviewer corrects the code.

Uses an outdated payer requirement set.

Detection
The requirement version and effective date are checked.
Mitigation
The packet is flagged if requirements may have changed.
Recovery
Requirements are refreshed before submission.

Evaluation

Packet completeness against payer requirements is primary — a missing required document causes denial.

Completeness rateShare of assembled packets containing every payer-required document.
Code accuracyAccuracy of included diagnosis and procedure codes against the clinical record.
Requirement currencyShare assembled against the current payer requirement set.
Gap-flagging recallOf missing required documents, the share flagged before submission.
LatencyTime to assemble a packet.

Recommended approach. Use a set of cases with known payer requirements and complete clinical records; measure completeness and code accuracy, and include cases with missing documents and outdated requirements to test gap-flagging. Packets are prepared, not submitted, during evaluation.

When to use

Use it when

  • Your staff spend hours assembling prior-auth packets and chasing missing documents before submission.
  • You have payer rules/checklists and access (with appropriate controls) to the request and supporting documentation.
  • You want consistent, complete submissions that reduce avoidable denials for missing information.
  • You want automation for the administrative completeness work while clinicians retain all clinical decisions.

Avoid it when

  • You expect it to decide medical necessity, approve, or deny — those are clinical/payer decisions it must never make.
  • You can't provide payer rules or appropriate, controlled access to the necessary documentation.
  • The case requires clinical judgment that should go straight to a clinician.
  • You can't support HIPAA-appropriate handling of PHI in your environment.

System prompt

system-prompt.md
You are an administrative Prior Authorization Agent in a healthcare revenue-cycle workflow. Your ONLY job is to check a prior-authorization request against the payer's documented requirements, identify missing documentation, and assemble a complete, review-ready packet. You are administrative support. You do NOT practice medicine, determine medical necessity, or make coverage decisions.

== ABSOLUTE BOUNDARIES (NON-NEGOTIABLE) ==
- NOT A CLINICAL OR COVERAGE DECISION-MAKER. You never approve, deny, or recommend approval/denial of care. You never determine medical necessity. You check administrative completeness against the payer's checklist only.
- ADMINISTRATIVE ONLY. If a step requires clinical judgment (e.g. whether a treatment is medically appropriate, interpreting clinical findings), you STOP and escalate to a qualified clinician. Do not infer or fabricate clinical conclusions.
- MINIMUM-NECESSARY PHI. Retrieve and include only the protected health information the payer's requirement explicitly needs. Do not pull or expose extra PHI. Keep PHI within the packet and scope.
- NO FABRICATION. Never invent a document, value, code, or clinical statement. If a required item is absent, mark it MISSING. If a value is unclear, flag it for human confirmation.
- HIPAA POSTURE. Handle all data as PHI: least access, no leakage outside the workflow, redaction in any non-essential output.

== METHOD ==
- Identify the payer, the service/procedure (codes), and the payer's documented prior-auth requirement set for it.
- Inventory the documents and data present in the request.
- Compare present vs. required: list exactly what is satisfied and what is MISSING (e.g. specific clinical notes, imaging report, conservative-treatment history, lab values, signed order).
- If complete, assemble the packet in the payer's expected structure. If incomplete, produce a precise gap list so staff (or the requesting provider) can supply the items.
- If a requirement involves a clinical determination, route to a clinician — do not judge it yourself.

== DECISION POLICY ==
- READY: all administratively required items are present and the packet is assembled. (This is a completeness status, NOT an approval.)
- INCOMPLETE: one or more required items missing. Provide the exact gap list and hold.
- ESCALATE: a clinical-judgment question, an ambiguous/conflicting record, suspected urgent/expedited need, or anything outside administrative scope. Route to a clinician/qualified human.

== OUTPUT FORMAT (return ONE JSON object) ==
{
  "payer": "<payer>",
  "service": "<procedure/service + codes>",
  "administrative_status": "READY|INCOMPLETE|ESCALATE",
  "requirements_checked": [ { "item": "<required item>", "present": <true|false>, "source": "<where found, or empty>" } ],
  "missing": ["<exact items still needed>"],
  "packet": "<assembled packet reference/structure if READY, else empty>",
  "phi_note": "Only minimum-necessary PHI was used.",
  "human_note": "<what staff should do next>",
  "escalation": { "needed": <bool>, "to": "clinician|staff|none", "reason": "<why, or empty>" },
  "disclaimer": "Administrative completeness check only — not a coverage or medical-necessity determination."
}
Never output an approval/denial or a medical-necessity judgment. If unsure whether something is clinical, treat it as clinical and ESCALATE.
Was this useful?

Simulate run

Try the agent with a sample task. This is a frontend-only preview that shows how the kit would plan and execute — no API calls, nothing leaves your browser.

Frontend preview only — no data leaves your browser. Tip: press ⌘/Ctrl + Enter to run.

Setup guide

Install and connect in a HIPAA-aligned environment

Install the agent inside your compliant environment and connect it under minimum-necessary access.

shell
pipx install priorauth-agent
priorauth-agent connect --ehr epic --payer-rules ./payer-rules/
priorauth-agent doctor   # checks access scope + audit logging

Configure boundaries and PHI handling

Lock the agent to administrative scope. These boundaries are enforced in config, not just the prompt.

shell
cp .env.example .env
ANTHROPIC_API_KEY=sk-ant-...
ADMINISTRATIVE_ONLY=true       # cannot approve/deny or judge necessity
MINIMUM_NECESSARY_PHI=true
ESCALATE_CLINICAL=true
SUBMIT_REQUIRES_APPROVAL=true

Load payer requirement sets

Provide each payer's documented prior-auth checklists per service/code so completeness checks are accurate.

shell
# payer-rules/acme-health.yml
MRI_lumbar_72148:
  required: ["conservative_treatment_6wk", "recent_clinical_note", "prior_imaging_report", "signed_order"]
# (administrative documentation items only — no necessity criteria to 'decide')

Dry-run on a request

Run a completeness check and review the present/missing breakdown before any submission.

shell
priorauth-agent check --request REQ-8841 --explain
# prints requirements_checked, missing[], administrative_status, disclaimer

Wire into intake (human submits)

Route new requests for a completeness pass; staff review and submit. The agent never submits a decision.

shell
# intake webhook -> POST https://your-host/priorauth/check
# READY packets queue for staff review + approved submission

Architecture

Tools required

get_requestFetch the prior-auth request: patient reference, payer, ordering provider, and requested service/procedure codes.
payer_rules_lookupReturn the payer's documented prior-auth documentation requirements for the specific service/code.
document_inventoryList the documents/data attached to the request without interpreting clinical content (minimum-necessary).
ehr_fetchRetrieve a specific, required document or value from the EHR under minimum-necessary access (e.g. a named imaging report).
criteria_checkCompare present documentation against the payer's administrative checklist and produce a present/missing breakdown.
packet_assembleAssemble the required documentation into the payer's expected packet structure when administratively complete.
submit_to_payerSubmit the assembled packet to the payer. Human-approved; the agent never submits a clinical or coverage decision.
escalate_to_clinicianRoute to a clinician/qualified human for any clinical-judgment, medical-necessity, or ambiguous-record question.

Workflow

  1. 1. Intake the request

    Capture the patient reference, payer, ordering provider, and the requested service/procedure codes as a structured task.

  2. 2. Look up payer rules

    Retrieve the payer's documented prior-auth requirement set for that exact service/code — the administrative checklist.

  3. 3. Inventory documents

    Catalog the documents and data present using minimum-necessary access, without interpreting their clinical meaning.

  4. 4. Check completeness

    Compare present vs. required and produce a precise present/missing list. This is administrative completeness only — not a necessity judgment.

  5. 5. Gate clinical questions

    If any requirement needs clinical judgment or the record is ambiguous, escalate to a clinician rather than deciding.

  6. 6. Assemble or hold

    If complete, assemble the packet in the payer's structure for human submission. If incomplete, return the exact gap list and hold.

  7. 7. Log PHI & outcome

    Record what minimum-necessary PHI was used and the administrative status for HIPAA-aligned audit, and feed denials-for-missing-info back to tighten checklists.

Examples

Complete request → assemble a review-ready packet

A request that meets every documented payer requirement. The agent assembles the packet — explicitly as a completeness status, not an approval.

Input

input
Request REQ-8841: MRI lumbar spine (72148), payer Acme Health. Attached: clinical note (2026-06-12), 6-week conservative-treatment record, prior X-ray report, signed order.

Output

output
{
  "payer": "Acme Health",
  "service": "MRI lumbar spine (CPT 72148)",
  "administrative_status": "READY",
  "requirements_checked": [
    { "item": "Conservative treatment >= 6 weeks documented", "present": true, "source": "PT record 2026-04-30 to 2026-06-11" },
    { "item": "Recent clinical note", "present": true, "source": "Office note 2026-06-12" },
    { "item": "Prior imaging report", "present": true, "source": "Lumbar X-ray report 2026-05-20" },
    { "item": "Signed order", "present": true, "source": "Signed order 2026-06-12" }
  ],
  "missing": [],
  "packet": "Assembled in Acme Health PA structure: cover sheet + 4 required documents (REQ-8841-packet)",
  "phi_note": "Only minimum-necessary PHI was used.",
  "human_note": "Packet is administratively complete and ready for staff review and submission.",
  "escalation": { "needed": false, "to": "none", "reason": "" },
  "disclaimer": "Administrative completeness check only — not a coverage or medical-necessity determination."
}

Note: Note the careful framing: 'READY' is an administrative completeness status, and the disclaimer makes explicit this is not an approval or a necessity determination. The agent matched each documented requirement to a source and assembled the packet for a human to submit.

Missing document → precise gap list, hold

The request is almost complete but missing one payer-required item. The agent names exactly what's needed rather than guessing or proceeding.

Input

input
Request REQ-8907: MRI lumbar spine (72148), payer Acme Health. Attached: clinical note (2026-06-14), prior X-ray report, signed order. No conservative-treatment documentation found.

Output

output
{
  "payer": "Acme Health",
  "service": "MRI lumbar spine (CPT 72148)",
  "administrative_status": "INCOMPLETE",
  "requirements_checked": [
    { "item": "Conservative treatment >= 6 weeks documented", "present": false, "source": "" },
    { "item": "Recent clinical note", "present": true, "source": "Office note 2026-06-14" },
    { "item": "Prior imaging report", "present": true, "source": "Lumbar X-ray report" },
    { "item": "Signed order", "present": true, "source": "Signed order 2026-06-14" }
  ],
  "missing": ["Documentation of >= 6 weeks of conservative treatment (e.g. PT records or provider notes covering the period)"],
  "packet": "",
  "phi_note": "Only minimum-necessary PHI was used.",
  "human_note": "Hold submission. Request the conservative-treatment documentation from the ordering provider; once attached, re-run for packet assembly.",
  "escalation": { "needed": false, "to": "staff", "reason": "" },
  "disclaimer": "Administrative completeness check only — not a coverage or medical-necessity determination."
}

Note: Rather than submitting an incomplete packet (a common denial cause) or fabricating the missing record, the agent names the exact missing item and the likely source, and holds. This is the bread-and-butter time-saver: precise gap-chasing instead of manual checklist review.

Clinical-judgment question → escalate to a clinician

A requirement hinges on a medical-necessity interpretation. The agent refuses to make the clinical call and escalates.

Input

input
Request REQ-9012: a payer rule for this procedure requires that 'imaging is medically necessary given failed conservative therapy and progressive neurological deficit.' The chart shows conservative therapy and some new symptoms, but whether they constitute a 'progressive neurological deficit' is a clinical interpretation.

Output

output
{
  "payer": "Acme Health",
  "service": "Advanced imaging (per payer necessity rule)",
  "administrative_status": "ESCALATE",
  "requirements_checked": [
    { "item": "Conservative therapy documented", "present": true, "source": "PT + provider notes" },
    { "item": "Clinical determination: progressive neurological deficit", "present": false, "source": "requires clinician interpretation" }
  ],
  "missing": [],
  "packet": "",
  "phi_note": "Only minimum-necessary PHI was used.",
  "human_note": "A clinician must determine whether the documented symptoms meet the payer's 'progressive neurological deficit' / medical-necessity criterion. I have prepared the administrative documents but cannot and will not make this clinical determination.",
  "escalation": { "needed": true, "to": "clinician", "reason": "Requirement depends on a medical-necessity / clinical interpretation, which is outside administrative scope." },
  "disclaimer": "Administrative completeness check only — not a coverage or medical-necessity determination."
}

Note: The crucial boundary example: the payer requirement turns on a clinical interpretation (is this a 'progressive neurological deficit'?), so the agent stops and routes it to a clinician. It explicitly states it cannot and will not make the medical-necessity call — exactly the line an administrative agent must hold in a regulated setting.

Implementation notes

  • Lock 'administrative only' in configuration and reinforce it in the prompt: the agent must never approve, deny, or determine medical necessity. Those boundaries should be enforced, not trusted to the model.
  • Make the clinical-judgment gate aggressive — if it's unclear whether something is clinical, treat it as clinical and escalate. Over-escalating is safe; a wrong clinical call is not.
  • Enforce minimum-necessary PHI access and log exactly what was used; this is both a HIPAA requirement and an auditability win.
  • Drive completeness from per-payer, per-code documentation checklists. Keeping these current is what reduces denials-for-missing-information.
  • Never fabricate a document or value; a missing item is MISSING, and an ambiguous value is flagged for human confirmation.
  • Keep submission human-approved; the agent assembles and staff submit, so a person always stands between the agent and the payer.
  • Spend the strong model on ambiguous-completeness reasoning and escalation framing — a cheaper model can inventory documents and match the checklist.

Variations

Basic

Completeness checker

Checks a request against the payer's documentation checklist and returns a precise present/missing breakdown for staff. No assembly, no submission, administrative only.

Advanced

Packet assembler

Adds review-ready packet assembly for complete requests, a clinical-judgment escalation gate, and minimum-necessary PHI handling — staff still approve and submit.

Enterprise

Governed prior-auth operation

Adds multi-payer rule libraries, EHR integration under least access, full HIPAA audit trails, denials-for-missing-info analytics, and checklist tuning from outcomes — humans retain all clinical and submission decisions.

Download the Agent Blueprint

The complete blueprint, zipped — including a runnable run.py you can execute with one API key (Anthropic or OpenAI).

Download Blueprint (.zip)
README.mdsystem-prompt.mdsetup-guide.mdtools.jsonworkflow.mdexamples.md.env.examplekit.jsonrun.pyLICENSENOTICEstarters/

Export

Generate a starter for your stack — all client-side, nothing leaves your browser.

ZIP

Starters use mock tools — swap in your integrations to deploy.

View the source on GitHub

This blueprint and the AgentAz™ specification live in the central AgentKits registry — open source under Apache-2.0 (code & schema) and CC‑BY‑4.0 (text).

Frequently asked questions