Skip to main content
Glama

A202: the Verifiable Agreement Protocol for Agent-Led Commerce

Status: Informative in full.

A202 is verifiable commerce for agent-to-agent or agent-led transactions: an open specification of commercial authority, negotiation state, and verifiable conformance for transactions between independent organisations, including transactions conducted on their behalf by software agents.

It defines typed objects for delegated commercial authority, a state machine for the transaction and for each bilateral session inside it, rules for what may be disclosed to whom, and an executable conformance suite that turns each of those into a check an implementation either passes or fails.

The full statement of purpose, scope, and non-goals is in CHARTER.md.

Created and developed by A. A. Musse. See MAINTAINERS.md.

Status

Released, pre-1.0.

  • v0.1.0 is the first tagged release of the set: a tag, a digest for every schema file, the conformance manifest, and release notes, published together. See RELEASES.md and CHANGELOG.md. Before 1.0 a MINOR increment may break compatibility, and any break carries migration notes.

  • The name is A202, spoken "A two-oh-two", and in full A202, the Verifiable Agreement Protocol for Agent-Led Commerce. The long form is a descriptor and not an expansion: the letters do not stand for it. The 202 is HTTP 202 Accepted, which A202-0017 makes the status an accepted submission returns, because acceptance is the primitive the rest of the specification is built on. The A202- reason-code prefix, the A202-NNNN proposal identifiers, and the a202-commercial/0.1 specification version string all follow from the name.

  • A202™ is a trademark of Plural Worlds. Permitted use of the name is stated in TRADEMARK.md.

  • Schema $id values resolve under https://schemas.a202.org. Fixture hosts use reserved .invalid names, because test data must never resolve.

  • Licensed under the Apache License, Version 2.0. One licence covers the whole repository: specification text, schemas, fixtures, manifest, runner, and informative documents. The licence carries an express patent grant from each contributor. See LICENSE and CONTRIBUTING.md.

  • External contributions are accepted on the terms in CONTRIBUTING.md: inbound contributions under the same licence, with a developer certificate of origin sign-off.

Related MCP server: pact-mcp

Layout

Path

Contents

CHARTER.md

Purpose, scope, non-goals, design principles

GOVERNANCE.md

How the project is run, and what the sponsor does and does not control

MAINTAINERS.md

Who maintains this repository

CONTRIBUTING.md

Contribution status, and the terms a contribution is accepted under

SECURITY.md

Private coordinated disclosure

THREAT-MODEL.md

Adversaries assumed, properties defended, and what is deliberately not defended

CODE_OF_CONDUCT.md

Expected conduct

TRADEMARK.md

The A202 name, and what use of it is and is not permitted

RELEASES.md

Versioning, what a release consists of, compatibility policy

CHANGELOG.md

What changed, and where the release notes required by RELEASES.md accumulate

.github/

Review routing, the pull request and issue forms, and the workflow that runs the suite on every change

proposals/

The A202 change proposal process

schemas/

Canonical commercial model, transaction profile extension model, and the JSON schemas

authority/

Commercial mandate: delegated authority, constraints, delegation, approval, revocation

discovery/

Counterparty invitation: how an unregistered party enters one named transaction

negotiation/

Transaction and session state machines, and auction event semantics

conformance/

Fixtures, manifest, normative runner, and the conformance grade definitions

Each specification document carries a status header stating which of its sections are normative and which are informative.

Running the conformance suite

The runner validates every fixture named in the manifest against the schemas, then applies the invariants that JSON Schema cannot express. Schema validity is not conformance, which is the reason the runner exists.

It needs jsonschema>=4.18. If that is not on the system interpreter, a virtual environment is enough:

python3 -m venv .venv && .venv/bin/pip install "jsonschema>=4.18"

Run it from the repository root:

python3 conformance/run-conformance.py --verbose

The expected result is every fixture passing and none failing, with the totals the manifest carries: the manifest is the single source for the count, and the runner prints it on every run. The runner also asserts that each negative fixture is refused for the reason code the manifest declares for it, wherever the normative layer raises codes at all. Run it before and after any schema change.

Every negative fixture is minimal: removing the single offending element must leave a document that validates cleanly. A negative fixture that fails for an incidental reason tests nothing, so verify that when adding one.

The suite does not depend on anyone remembering to run it. It runs, together with the reference implementation tests and the MCP server tests, on every pull request and on every push to the default branch, under .github/workflows/checks.yml. GOVERNANCE.md section 3.4 requires the suite to pass for any change to schemas, fixtures, the manifest, or the runner, and that workflow is what turns the requirement into a gate.

Where to start reading

  1. CHARTER.md for what this is and what it deliberately is not.

  2. schemas/canonical-commercial-model-v0.1.md for the object model, the envelope, and the invariants schema validation cannot express.

  3. negotiation/pilot-transaction-state-machine-v0.1.md for what moves state and what does not.

  4. conformance/manifest-v0.1.json for the fixtures that decide whether an implementation agrees with either of the above.

Available Tools

7 tools
create_agreementForm an agreement with a known counterpartyA

Form an agreement between two parties who already know each other, with no marketplace and no negotiation room. Call this once per transaction.

Both parties present the allow decision their own mandate produced. The offeror verifies {"action_type": "offer.submit", "transaction_id": ..., "counterparty_organization_id": <the offeree's org>, "proposed_terms": } and the offeree verifies the same document with action_type offer.accept and the offeror's organisation. Pass each result as buyer_decision and supplier_decision. A decision over a different act, a different mandate, or an amount the mandate did not allow refuses the whole call and records nothing.

It writes the whole formation in one call: the offeror's signed offer carrying a session identifier it mints, the offeree's acceptance over the exact offer hash, the agreement carrying both parties' signatures over the same bytes, the supplier's commitment, and two events, agreement.direct (draft to agreement_pending) and agreement.committed (agreement_pending to committed), each countersigned by the other party.

The transaction ends this call in state committed. Follow with record_obligation act=issue.

Refusals: a transaction that already left draft (A202-STATE-TRANSITION-DENIED), an unregistered profile (A202-PROFILE-UNKNOWN), terms the profile does not allow (A202-PROFILE-TERMS-INVALID), an offer expiring before it was made (A202-OFFER-EXPIRED).

Inputs: buyer (required), terms (required), supplier (required), buyer_decision (required), +7 more.

get_transaction_recordRead the transaction recordA
Read-onlyIdempotent

Return this party's own copy of the hash-chained transaction record: every event in chain order with the state it moved the transaction to, which keys signed it, and the object it concerns, plus the state the record currently reaches and every object identifier held for the transaction.

Call it at any point to see where a transaction stands before deciding what to do next. Ordering is by predecessor reference rather than by a counter, because bilaterally there is no ordering service, and a record whose links do not form one chain is reported as broken with A202-EVIDENCE-CHAIN-GAP.

Inputs: transaction_id (required).

issue_approvalApprove one exact actA

Record a named principal's approval of one exact act, bound to the action_hash verify_mandate reported. Call this only after verify_mandate answered require_approval, then call verify_mandate again passing approval_id and the identical proposed_action.

The approval is signed by the approving principal's own key, not by the agent's, because the control is that somebody other than the acting agent said yes. It binds one action hash and one transaction and is reusable across neither: change one byte of the act and the next verify_mandate returns A202-APPROVAL-HASH-MISMATCH. It also expires, after which it authorises nothing.

An approval never releases a deny. A denied constraint is a limit, not a question.

Returns the approval identifier, the action hash it binds, and when it expires.

Inputs: approver (required), action_hash (required), requested_by (required), transaction_id (required), +4 more.

issue_mandateIssue a commercial mandateA

Issue and sign a commercial mandate: the document stating which organisation an agent represents, which acts it may take, under which limits, for which transaction or category, and for how long. Call this once per acting agent before anything else. Every other tool names the mandate an agent acts under.

A spending_limit becomes two explicit constraints, an amount ceiling and a currency, both visible in the audit record.

The mandate is checked before it is signed, so a refused one never receives a signature that would make it look issued. Refusals: no constraint at all (A202-MANDATE-UNBOUNDED), a scope naming neither a transaction nor a category (A202-MANDATE-SCOPE-TOO-BROAD), an inverted validity interval (A202-MANDATE-INTERVAL-INVALID), a status endpoint that is not HTTPS (A202-MANDATE-STATUS-INSECURE), a subject naming both an agent and a principal (A202-MANDATE-SUBJECT-AMBIGUOUS).

Returns the mandate identifier and the signed document.

Inputs: scope (required), issuer (required), actions (required), subject (required), +11 more.

record_obligationIssue, assert, or answer an obligationA

Record one act in the obligation exchange. Three acts, in this order, each signed by a different party, and each carrying that party's own allow decision from verify_mandate.

act=issue: the obligee derives an obligation from a committed agreement and activates it. Needs agreement_id, obligor, obligee, term_path, quantity, unit_code, due_condition, and a decision the obligee obtained for {"action_type": "obligation.activated", "transaction_id": ..., "counterparty_organization_id": <the obligor's org>, "proposed_terms": {"core": {"quantity": ..., "unit_code": ..., "total": }}, "agreement_id": ...}. The transaction moves to in_performance.

act=assert: the obligor asserts it performed. Needs obligation_id, obligor, obligee, asserted_quantity, at least one evidence entry, and a decision the obligor obtained for action_type performance.declared naming the obligee as counterparty, the asserted quantity and unit as proposed_terms, and the obligation_id. An assertion with no evidence is refused with A202-OBLIGATION-ASSERTION-UNEVIDENCED. The transaction moves to acceptance_pending.

act=respond: the obligee accepts or rejects, bound to the exact assertion hash. Needs assertion_id, responder, counterparty, response_type, and a decision the responder obtained for action_type acceptance.granted or acceptance.rejected naming the counterparty and the assertion_id. A response signed by anyone but the obligee is refused with A202-OBLIGATION-RESPONSE-UNAUTHORIZED; accepting less than is owed without naming a remainder obligation is refused with A202-OBLIGATION-REMAINDER-MISSING. Accept moves the transaction to settlement_pending, reject back to in_performance, where the obligor may assert again.

Inputs: act (required), decision (required), obligee, obligor, +18 more.

verify_evidenceVerify a record against the published procedureA
Read-onlyIdempotent

Run the seven-step verification procedure over a set of objects: content hashes, signatures and the purpose each was issued for, version chains, event-chain continuity, guarded transitions replayed against the rules version in force, whether each determination follows from its rules, and what could not be checked. Use it on your own record before relying on it, and on anything a counterparty sends you.

Pass transaction_id to verify this server's record of one transaction, object_ids to verify part of it, or objects to verify a bundle somebody handed you.

Every check returns verified, failed, or not_checkable, and the result carries no overall boolean, because a report reduced to one discards what could not be checked. A signature whose key you do not hold is not checkable and is never thereby verified. Without rules_version, guarded transitions are not checkable rather than verified: an unresolvable rule set is not permission in either direction.

Inputs: objects, object_ids, rules_version, transaction_id.

verify_mandateVerify a mandate and decide on an actA
Read-onlyIdempotent

Check a mandate and decide whether an act is permitted under it. Call this before every act, on your own mandate or on one a counterparty presented.

It checks the document against the published schema and the rules the schema cannot express, verifies the issuer signature, checks the validity interval, and, when proposed_action is given, checks the act against the mandate's actions, its four scope axes, its constraints in stable order, and its approval rules.

Returns one decision, allow, deny, or require_approval, with the registered reason codes behind it, the per-constraint outcomes, and action_hash, the hash of the exact act evaluated.

On require_approval: pass that action_hash to issue_approval, then call this tool again with the returned approval_id and the identical proposed_action. The decision becomes allow. A deny is never approvable.

This server makes no network call. Resolve the mandate's status_endpoint yourself and pass the result as status. An absent result, one older than 60 seconds, or any status other than active denies with A202-MANDATE-STATUS-UNRESOLVED or A202-MANDATE-INACTIVE: unavailability is not permission.

Inputs: at, status, mandate, approval, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 7 tools

    Disambiguation5/5

    Each tool addresses a distinct phase of the transaction lifecycle: issuing/verifying mandates, approving specific acts, forming agreements, recording obligation states, retrieving transaction records, and verifying evidence. The descriptions clearly separate these concerns, with no apparent overlap or ambiguity in purpose.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case (issue_mandate, verify_mandate, create_agreement, record_obligation, get_transaction_record, verify_evidence, issue_approval). The verbs and nouns are descriptive and match the tool's function, making the API predictable.

    Tool Count5/5

    With 7 tools, the server is well-scoped for its purpose of managing commercial mandates, agreements, and obligations. Each tool has a clear and necessary role in the workflow, and the count is neither too sparse nor overwhelming.

    Completeness4/5

    The core lifecycle is covered: mandate issuance, verification, approval, agreement creation, obligation recording, and evidence verification. However, there is no tool for updating or revoking a mandate, and no explicit final settlement step after acceptance_pending, which are minor gaps that could be worked around but may cause dead ends in some scenarios.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that gives AI agents the ability to discover, match with, and build relationships with other autonomous agents. Supports agent registration, matchmaking, messaging, shared goals, relationship lifecycle management, and real-time event subscriptions.
      45 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for Pact, an escrow protocol for agent-to-agent commerce, enabling agents to create pacts, fund escrow, deliver work, and settle with an LLM evaluator as dispute backstop.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides a sovereign, MIT-licensed MCP server for professional-service workflows, running entirely on your infrastructure with Ed25519 cryptographic signing for every action.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for permissioned, structured agent-to-agent communications, enabling agents to coordinate and negotiate through scoped, typed messages with authentication and audit logging.
      398 PyPI
      MIT