Use case: regulated document drafting
You build an agent product for a regulated vertical — healthcare, insurance, legal, finance. The agent works. The deal stalls anyway, on two questions your hosted stack can’t answer: where does it run (their data can’t leave) and can you prove what it did (their auditor won’t take a dashboard’s word for it). Pangolin Scale is the execution substrate that answers both: self-hosted, sandboxed, and sealing a verifiable record of every run.
What you get
Section titled “What you get”The shipped demo for this use case is
examples/demo-claims-appeals:
a batch of three denied insurance claims fans out to parallel agents that each
draft an appeal, self-verify their own work, and seal the evidence.
- Safe fan-out — three
claim-appealitems run concurrently (concurrency 2), each under a per-outputresourceLock, so parallel drafts never collide. - Patch escape — each drafted appeal surfaces as a content-addressed
resultRef(the workspace diff), never stored in the run-state database. - Self-verify, sealed with the patch — each agent runs a shell check over its
own edit (
appeals/*.mdexists and cites a policy section) before its patch escapes; the pass/fail is sealed into the dispatch manifest. - A verifiable audit bundle — after all items are terminal, the run seals a hash-chained, Merkle-rooted log and the bundle report prints:
=== Audit bundle === intact: true claim: tamper-detecting anchorId: local guarantee: detectForge one byte of the exported bundle and verification fails with a non-zero exit code — that is the demo’s closing beat.
How it works
Section titled “How it works”plan.jsondeclares threeclaim-appealitems plus averifygate that depends on all three. The orchestrator resolves dependencies, locks, and concurrency — see How an offload run executes.- Each item dispatches into an isolated Docker container. The agent reads one
synthetic claim fixture (
claimId,denialReason,policySection, …) and draftsappeals/<claimId>.mdin its own workspace. - Before the patch escapes, the item’s self-verify command runs inside the worker; its result is sealed into the manifest alongside the patch.
- On completion the run seals its epoch: every lifecycle event is hash-chained, the chain is reduced to a Merkle root, and the root is signed and anchored — see Audit & guarantee tiers.
pangolin verifyre-verifies the exported bundle — see Export & verify an audit bundle.
The claims domain is a reskin, not a special case: swap the fixtures and the
claim-appeal prompt to draft legal filings, reconciliations, or procurement
documents — the proof beats are identical.
Run it yourself
Section titled “Run it yourself”Requires Node 20+, pnpm, Docker, and an Anthropic API key. The worker image is not anonymously pullable, so build it locally first:
# from the repo rootpnpm installdocker build -f docker/pangolin-worker/Dockerfile -t ghcr.io/quarrysystems/pangolin-worker:latest .cp .env.example .env # then set ANTHROPIC_API_KEY in .envpnpm --filter demo-claims-appeals-example start:envNo Docker or API key handy? The CI smoke test drives the same plan through a fake executor and asserts the bundle verifies:
pnpm --filter demo-claims-appeals-example testNext steps
Section titled “Next steps”- Your first offload run — the orchestrator tutorial (different example, same mechanics).
- Export & verify an audit bundle — produce and re-verify the evidence.
- Commercial & pilots — white-glove pilot for your regulated deal.