Action State / Evidence Layer Library for Agentic Commerce

Evidence Layer Library · open drafts and Apache-2.0 code

Identity says who an agent is. Evidence says how it has behaved.

The Evidence Layer Library runs beside each agent. It keeps that party’s own record of its deals, asks the other side for theirs, and decides under a policy you write. It adds to identity, approval and payment. It replaces none of them.

Where this stands. The specifications are individual Internet-Drafts and repository specs, with no IETF standing. The Go and Rust libraries are released. No unaffiliated developer has yet passed the third-party verifier pack (evidencebook#41). The open gaps are listed on this page.

exists today: your stack keeps doing thisadded by the Evidence Layer: select a step
  1. todayDiscoverywho is out there
  2. todayIdentitywho they are
  3. 01Historyhow each side has behaved
  4. 02Admissioneach side decides for itself
  5. todayOffer and approvalwhat the person agreed to
  6. todayPaymentwhat was paid
  7. 03Settlementwhat each side recorded
  8. 04Disputeonly if the records do not match

the outcome goes on both history cards, where the next deal starts

The loop

History, Admission, Settlement, Dispute, and back to History

Four steps sit between the steps a purchase already has. Each one answers a question that identity and payment do not, and each leaves a signed record in the book of the party that made it.

01

History

How has this counterparty behaved?

A party publishes one signed evidence commitment where it is discovered. The other side sends a signed request and gets exactly one of three outcomes: a history card, a signed refusal with a reason, or a recorded absence. The card holds counts only, by outcome and by size band. It carries no name, item, amount or counterparty.

Records
evidence request, standard_history/1 card, signed refusal
Defined in
Evidence Request Internet-Draft
Standard history card repo spec
Commitment carrier repo spec, experimental
In code
Book.Request, Book.Respond, CheckStaple · Guide paths 0, 3 and 4
02

Admission

Do I deal with it, and up to what size?

Your admission pack is your own policy. It reads the verified card and returns GO, ASK, LIMIT or NO, with the tier and one row for each property it checked. It never returns a score. A refusal to share limits a deal and never bans a party. A card that was not verified goes in as unverifiable and is never guessed.

Records
admission_decision, sealed in your own book
Defined in
Admission pack profile v0 code only, no draft
baseline pack admission-baseline@1
In code
admission.Evaluate in capsule-engine, Go and Rust · Guide path 5
03

Settlement

What did each side record?

Payer and payee each seal only what their own system observed: the terms, the payment, the delivery. No record claims the two sides agree. Whoever verifies the two halves derives that. A record moves through three states: observed by one side, witnessed once a checkpoint covers it, and corroborated when the other side’s record matches.

Records
terms, payer-observed, payee-observed, delivered, close
Defined in
Settlement Records Internet-Draft
Evidence Layer Internet-Draft
Deal reconcile contract repo spec
In code
Book.Append, Book.Reconcile, Book.Close, Book.Bundle · evidencebook
04

Dispute

Who resolves a mismatch?

The deal terms name an Evaluator by key before any money moves, with the dispute pack it would apply. It sees nothing unless one side files a dispute. Then each side discloses its own records of that one deal, the Evaluator can ask the payment rail and the carrier directly, and it signs a result that both sides check.

Records
dispute, disclosures, outside-source statements, Evidence Result
Defined in
Evidence Result repo spec
Dispute pack ec:deal-terms@1 and disclosure policy code only, no draft
In code
capsule-engine referee judge, Book.SealResult. The code calls this role the referee.

Back to History. The outcome of the deal, disputed or not, goes on both parties’ history cards. The next counterparty that asks sees it in the counts.

What changes

The same purchase, with and without it

The walkthrough runs one order of conference badges twice. This is its closing table.

Identity and auth onlyIdentity and auth plus Evidence Layer
Who the seller isCheckedChecked, exactly as before
How each side has behavedNot checkedEach agent’s library asks, and checks the signed answer itself
Who decides to dealLowest priceEach side’s own admission pack: GO, ASK, LIMIT or NO
What happened in the dealTwo private ledgers, never comparedEach side’s own record: observed, then witnessed, then corroborated by the other side’s
If the records do not matchEach side shows its person its own logAn Evaluator named in the terms sees both sides’ records, and asks the rail and the carrier
What the next counterparty seesNothingThe outcome, on both history cards

What travels

A pointer at discovery, counts on request

Two small objects do most of the work. Neither one shows a deal.

The commitment entry. A seller adds one attestation entry to its catalog record. It is a pointer. A verifier ignores what the carrier says and verifies the commitment the entry points to.

json · one entry in trustManifest.attestations[], shape from carriers v0 §5.1
{
  "type": "evidence-commitment/1",
  "uri": "https://seller.example/evidence/commitment.json",
  "mediaType": "application/json",
  "digest": "sha256:<64 hex>",
  "description": "Answers evidence requests about its own records; verify the commitment, not this entry"
}

The history card. Every count sits beside the total it is part of, so a reader sees 9 of 12 and never 75%. A card never carries a ratio, a percentage or a score.

json · excerpt of the example in standard history v0 §4
{
  "derivation": "standard_history/1",
  "holder_kind": "person",
  "since": "2026-03",
  "window": {"months": 3},
  "in_window": {"of": 4, "counted": 3, "not_counted": 1},
  "outcomes":  {"of": 3, "held": 2, "did_not_hold": 0, "undecided": 1},
  "bands": [{"currency": "USD", "decade": 1, "of": 3,
             "held": 2, "did_not_hold": 0, "undecided": 1}],
  "roles":     {"of": 3, "provided": 2, "bought": 1},
  "disputes":  {"raised": {"of": 0, …}, "received": {"of": 0, …}}
}

Your role

What you keep, what you add, where you start

Nobody has to join a platform. Each party runs its own library and checks the other side itself.

Buyer or personal agent platform

You carry a person’s authority into a purchase.

  • keepYour agent, wallet and approval flow
  • addA book, an admission pack, and one evidence request before you pay. Requests ride on A2A or MCP as the same bytes.
  • statusGo and Rust released. Python is in the repository and not yet published. TypeScript is not started.

Start: join the loop, then admit a peer.

Seller or merchant agent

Your agent is being found, and it sells.

  • keepYour catalog, checkout and payment provider
  • addOne commitment entry in your catalog record, a history card for anyone who sends a signed request, and your own record of what you delivered
  • statusServing a history runs in the Go SDK. No export to a card dispute evidence package yet.

Start: serve a History.

Payment rail or processor

You move the money and hold the settlement fact.

  • keepEverything. The library moves no money.
  • addNothing is required. An adapter reads your native objects under your own verification method, and an Evaluator may ask you about one payment reference.
  • statusAdapters for x402, UCP and ACP. A common rail adapter interface is open work.

Start: what each adapter checks.

Discovery or registry

You publish or index catalog entries.

  • keepYour catalog format and search
  • addOne attestation entry that carries the evidence commitment. History is not listed. It is disclosed after discovery, by request.
  • statusA proposal. The carrier spec names an attestation entry in an ARD file as one of four carriers.

Start: commitment carriers v0.

Evaluator

A deal’s terms name you to resolve a dispute.

  • keepYour independence. Your result moves no money, and you see no deal until a dispute is filed.
  • addA key and a mailbox that terms can name, the dispute pack you recompute, and a signed result in your own book
  • statusThe referee command runs today. The dispute record kinds are open work.

Start: capsule-engine referee judge in capsule-engine.

Works with

It sits beside the protocols you already chose

An adapter checks another protocol’s object under that protocol’s own verification method and reports each property with the method used. It never re-signs anything. None of these projects has reviewed or endorsed this page.

ProtocolWhat it coversWhat the library does with itStatus
ARD and AI CatalogPublishing and finding agentsCarries the evidence commitment as one attestation entryproposal
Open Agent CommerceIdentity, approval and payment between agents that have never metRuns after its checks and adds the four loop stepsdesign preview
A2AAgent to agent messagesCarries evidence requests and answers (Book.A2A). A task-evidence extension is proposed.in the Go SDK extension: preview
MCPTools for agentsCarries the same request and answer bytes (Book.MCP)in the Go SDK
x402Payment over HTTPChecks the payer’s signed transfer authorization and the settlement responseadapter
UCP with AP2Checkout, and mandates that can serve as evidence in a disputeValidates the checkout schema and verifies the merchant authorization signatureadapter
AP2 mandates on their ownWhat the person approvedNo adapter for a checkout or payment mandate outside a UCP checkoutgap
ACPCheckout sessions and delegated payment tokensReports possession of the exact bytes. ACP signs none of these objects, so no check can pass natively.adapter
Card network agent programsRecognizing a trusted agent at the merchantNo adapter yetgap

Building a protocol or a registry? The interop profile pins the exact bytes, how each message is bound to its request, and the checks a verifier runs. The conformance vectors are indexed in VECTORS.md. A cross-run with your implementation goes in the interop registry by pull request, with a link to the public record.

Start

Run the loop on your machine

Every example in the guide reads a conformance vector and runs in CI, so the guide, the tests and the vectors are the same files.

  1. Run the examplesClone the repository and run the guide’s examples: join the loop, serve a history, staple two halves of a deal, admit a peer.
  2. Open a book in your agentSeal each action as it happens. The verbs are Append, Query, Bundle, Request, Respond, Reconcile and Close.
  3. Admit a peerVerify the other side’s card, load an admission pack, and seal the decision. Start from the baseline pack and change the thresholds.
  4. Check it without usWrite your own verifier from the profile text and test it against the responder. Third-party verifier guide.
shell · needs Go 1.27 or newer
git clone https://github.com/action-state-group/evidencebook
cd evidencebook
go test -run 'Example_joinTheLoop|ExampleBook_Respond|Example_staple|Example_admitAPeer' -v .
go · from the evidencebook README
book, err := evidencebook.Open(ctx, evidencebook.Config{
    BookID: "orders", Operator: "example-operator",
    Store: store, Substrate: substrate, Originals: originals, Signer: signer,
})

// seal what your agent observed
observed, err := book.Append(ctx, evidencebook.Entry{
    RecordType:    "observation",
    EpistemicType: evidencebook.ObservedEvent,
    SubjectRef:    "order-17",
    Payloads:      [][]byte{[]byte(`{"status":"approved"}`)},
})

// a portable bundle anyone can verify
bundle, err := book.Bundle(ctx, evidencebook.BundleRequest{Root: observed.RecordID})
In your agent’s turnCallWhat it leaves in your book
Before you offerBook.Request, then Book.RecordResponse or Book.RecordAbsenceThat you asked, and the card, refusal or absence that came back
Before you commitCheckStaple, admission.Evaluate, Book.AppendThe admission decision and the rows behind it
As the deal runsBook.Append for each step you observedYour half: terms, payment, delivery
At the endBook.Reconcile, Book.Close, Book.CheckpointThe close, covered by a checkpoint a witness can see
When someone asks youBook.RespondA signed answer or a signed refusal, never silence you cannot account for

Go releasedRust crate releasedPython in the repository, not yet publishedTypeScript not startedNot writing code? Install Action State Receipts (release candidate, Linux x86_64 only).

SDK guideAPI referenceAdaptersDesign and known limits

For leaders

Why the evidence layer is a strategic choice

The protocols for finding, authorizing and paying are arriving. They tell you who an agent is and what a person approved. They do not tell you how a counterparty has behaved or what each side recorded after the payment.

Your record is an asset you hold

The book sits on your infrastructure, signed with your keys. You decide what to disclose and to whom. Because the formats are open drafts, the record moves with you when you change platforms.

Admission is your policy

You write the rules for whom you deal with and up to what size. The answer is GO, ASK, LIMIT or NO with the reasons listed. No third party hands you a reputation score.

A dispute has more than two private logs

Today each side shows its own person its own log. With two signed records of the same deal, a named Evaluator and the rail’s own statement, a mismatch can be resolved from evidence.

Interoperability without a shared platform

Each agent’s library checks the other side itself. The same request and answer bytes travel over A2A or MCP. The specifications are public and the code is Apache-2.0.

If you run an agent platformYour users’ agents meet strangers. Admission and history are how they decline a bad deal before paying.
If you sell through agentsA good record becomes something a new buyer’s agent can check, and your delivery record is on file if an order is contested.
If you move moneyYou stay the source of the settlement fact. The library reads your objects as you sign them and holds no funds.

What it does not do

  • It moves no money and holds no funds.
  • It gives no score and no ranking of parties.
  • Verification shows that records are unchanged since they were sealed. It does not show that the events they describe happened.
  • It is not a standard. The drafts are individual submissions and the repository specs are not drafts yet.

Public record

What has run, with a link for each line

This is a small, early list. An open pull request is not adoption and is not listed as such.

  • Runs todayThe capsules plugin for Mesh-LLM keeps each node’s record on its own shelf. A weekly service history is derived from it, and a buyer’s agent can check that history and admit the node against it.
  • Merged upstreamThe receipt test vectors under these libraries were merged into the IETF SCITT working group’s shared examples repository (examples#3).
  • Merged upstreamVerifiable capsule receipts were merged into Project NANDA’s nandatown as a trust and payments layer (nandatown#197, #200).
  • Independent draftAn Internet-Draft by an author outside this project builds on the capsule’s extension points (Datatracker).
  • Cross-runsRuns with other implementations are listed with their public records in the interop registry, and implementations in IMPLEMENTATIONS.md.
  • Not yetNo unaffiliated developer has passed the third-party verifier pack for the evidence layer itself (evidencebook#41).

Status

Drafts, specs and code, kept apart

Each part of the loop names the document it comes from. Six are Internet-Drafts, five are specifications in the public repository, and three run in code with no draft.

Internet-Drafts 6

Individual submissions. Each link is the Datatracker page, which shows the posted revision.

Code only 3

These run today and have no draft or specification yet.

  • Admission pack
  • Disclosure policy
  • Dispute pack ec:deal-terms@1

Open gaps

What is missing, and where it is tracked

Each line is something an implementer would need that is not there yet. Comment on the issue if it blocks you. Lines marked not yet filed were found while writing this page.

  • Any implementerAn unaffiliated developer passes the third-party verifier packevidencebook#41
  • Agent platformsTypeScript binding over the Rust core, for Node and browsersevidencebook#195
  • Agent platformsPython binding over the Rust coreevidencebook#194
  • Agent platformsJVM and Swift bindingsevidencebook#196
  • Payment railsSettlement rails behind one adapter interfaceevidencebook#190
  • EvaluatorsDispute, dispute response, adjudication and revocation record kindsevidencebook#404
  • EvaluatorsDisputes where the terms name no adjudicatorevidencebook#510
  • Agent platformsAdapter for AP2 checkout and payment mandates held on their ownevidencebook · not yet filed
  • SellersAdapter for agent recognition signatures at the merchant, as card network agent programs useevidencebook · not yet filed
  • Sellers, registriesOne command that writes the ARD attestation entry, with a worked example fileevidencebook · not yet filed
  • SellersExport of a deal's evidence as a card dispute evidence packageevidencebook · not yet filed
  • Any implementerOne runnable example of the whole loop, dispute includedevidencebook · not yet filed
  • EvaluatorsOne name for the dispute role across page, specs and code: Evaluator, referee or judgeevidencebook · not yet filed
  • Any implementerInstall lines in the README and guide that match the release the guide needsevidencebook · not yet filed
  • Protocol authorsA machine-readable index of posted and working draft revisionsagent-action-capsule · not yet filed