Skip to main content

Agent Approval Interchange Specification (AAIS)

A transport-neutral contract for asking a human to authorize an exact agent action.

Specification 1.0 release candidate · support libraries 0.1.0 · Released · Python library 0.2.0 released

Specification · Security · Conformance · Integration guide · WebMCP mapping

AAIS lets a harness pause any chat, bot, subagent, or graph node and hand a portable approval request to a CLI, web UI, desktop app, policy service, or other trusted decision surface. The response is cryptographically bound to the exact action shown to the user, is idempotent, expires predictably, and cannot grant a broader scope than the harness offered.

{
  "aais": "1.0",
  "type": "approval.requested",
  "id": "evt_01JQ8QH80E4M7KJ6J7J7Y2RKSC",
  "occurred_at": "2026-08-30T18:00:00Z",
  "sequence": 41,
  "request": {
    "id": "apr_01JQ8QH80E4M7KJ6J7J7Y2RKSC",
    "created_at": "2026-08-30T18:00:00Z",
    "expires_at": "2026-08-30T18:10:00Z",
    "status": "pending",
    "origin": {"harness": "example", "session_id": "s-1", "run_id": "r-7"},
    "action": {
      "kind": "tool.call",
      "name": "shell.exec",
      "summary": "Run the JavaScript syntax check",
      "arguments": {"command": "node --check script.js"}
    },
    "action_digest": "sha256:...",
    "risk": {"level": "medium", "reasons": ["executes a local process"]},
    "choices": [
      {"decision": "approve", "scope": "once", "label": "Allow once"},
      {"decision": "approve", "scope": "session", "label": "Allow for this session",
       "scope_constraints": {"action_name": "shell.exec"}},
      {"decision": "deny", "scope": "once", "label": "Deny"}
    ]
  }
}

Scope

AAIS standardizes the authority-bearing boundary only:

  • exact-action requests, human-readable presentation, risk, and provenance;
  • explicit approve, deny, and cancel decisions with bounded scopes;
  • action digests, expiry, idempotency, stale-decision rejection, and receipts;
  • durable snapshots and ordered events for reconnecting clients;
  • adapter mappings for AG-UI interrupts, MCP hosts, HTTP/SSE, WebSocket, and stdio.

It does not define chat messages, model reasoning, tool discovery, agent profiles, workflow graphs, authentication, or a network transport. Those remain the responsibility of AG-UI, MCP, OAP, AGS, the host application, or another runtime protocol.

Support libraries

The repository contains release-candidate libraries with a shared API and conformance corpus for Python, TypeScript, Go, Rust, and Java. Each library can:

  • validate AAIS envelopes;
  • compute RFC 8785 / SHA-256 action digests;
  • create approval requests and decisions;
  • maintain a fail-closed, replay-safe pending-approval store;
  • emit and restore durable snapshots.

The Python library adds aais.store.FileApprovalStore in 0.2.0. It is a stdlib-only approval authority that several processes can share through one JSON file. It locks whole transactions across processes, writes atomically with fsync, quarantines corrupt state instead of reading it as empty, compacts resolved history with an explicit replay-gap signal, and tracks owners by PID, start time, and host so that PID reuse cannot keep a stopped owner alive. Storage is pluggable: ApprovalAuthority accepts any backend that implements the aais.backends protocols, and aais.testing provides a conformance kit for third-party backends. See the Python durable file store guide.

Published packages:

See release preparation for coordinates and verification.

Repository layout

Path Contents
spec/v1/ Normative specification, security, and conformance rules
schema/v1/ JSON Schema Draft 2020-12 envelope schema
conformance/ Shared valid and invalid fixtures
python/ Python 3.10+ support package
typescript/ Node.js 20+ TypeScript package
go/ Go 1.23+ module
rust/ Rust 1.85+ crate
java/ Java 17+ Maven library

Design principles

  1. The harness remains the authority. A UI conveys a decision; the harness revalidates it against current policy and current action state.
  2. Approval is exact by default. Every approval carries the digest of the canonical action reviewed by the user.
  3. Scopes are offered, never invented. A client may select only a choice present in the request.
  4. Reconnect is normal. Pending approvals are durable state, not a terminal prompt waiting on stdin.
  5. No hidden reasoning is required. AAIS carries concise activity, provenance, and risk explanations—not private chain-of-thought.

License

Apache License 2.0. See LICENSE.

Maintenance

Maintenance findings, acceptance checks and completion log.

Metadata

Release files for agent-approval-interchange 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-approval-interchange 0.2.1
File Size Uploaded Provenance Actions
agent_approval_interchange-0.2.1.tar.gz 94.5 kB Without provenance Details for agent_approval_interchange-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-approval-interchange 0.2.1
File Interpreter ABI Platform Actions
agent_approval_interchange-0.2.1-py3-none-any.whl Python 3 none any Details for agent_approval_interchange-0.2.1-py3-none-any.whl

Total release size: 137.3 kB

Release files / agent_approval_interchange-0.2.1.tar.gz

Download URL agent_approval_interchange-0.2.1.tar.gz
Size 94.5 kB
Tags Source
SHA-256 checksum
How to use checksums
782fd2e6956cc0a89451ebd5f90ca31de2e8399c4b24b5e34d18d01f8aa3772d
BLAKE2b-256 checksum
How to use checksums
f9d0b8255f59f0293dfb1660ca559f8fa31707de54b035518ca156d3065b1978
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / agent_approval_interchange-0.2.1-py3-none-any.whl

Download URL agent_approval_interchange-0.2.1-py3-none-any.whl
Size 42.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cbf57ab49089695bbe04c4de0a830fe94baa12d2e2a18ef1d51673158da65df
BLAKE2b-256 checksum
How to use checksums
389050c08b7e4182861259e64d4af137f50d2871c8bc96349c602ad8c6ae3204
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for agent-approval-interchange 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page