Skip to main content

Agent Authority Chain Python client

Fail-closed authorization for consequential AI-agent actions. Use this package when a principal delegates constrained authority to one or more agents and the protected operation must reject widened, expired, revoked, malformed or unverifiable authority.

AAC is an authority decision layer, not agent identity or authentication alone. It verifies Ed25519-signed delegation chains, constraint narrowing and revocation before returning a signed permit or deny receipt. Network failure, malformed output, authentication failure or an invalid receipt signature never becomes permission.

pip install agentauthoritychain==0.5.2
from aac_client import AACClient, AACDenied, AACError

client = AACClient.from_env()  # reads AAC_API_CREDENTIAL
try:
    result, receipt = client.enforce(signed_scenario, execute_protected_operation)
except (AACDenied, AACError):
    deny_operation()

enforce invokes the protected operation only after AAC returns an exact permit with a valid Ed25519 decision-receipt signature. AACDenied is a verified denial; configuration, authentication, transport, protocol and receipt failures use specific AAC*Error subclasses and remain closed. Async applications use the API-compatible AsyncAACClient.

Protect one framework tool

The same dependency-free guard works with OpenAI Agents SDK, Anthropic Agent SDK, LangGraph, and CrewAI callables. Your callback builds signed authority for the actual invocation; the tool never runs before a locally verified exact permit.

from aac_client import AACClient
from aac_framework_adapters import guard_openai_agents_tool

protected_tool = guard_openai_agents_tool(
    tool_handler,
    client=AACClient.from_env(),
    build_signed_scenario=build_signed_authority_for_call,
)

Equivalent named exports are guard_anthropic_agent_tool, guard_langgraph_tool, guard_crewai_tool, guard_claude_code_hook, and guard_codex_hook. They share one implementation and do not duplicate verifier semantics.

ADCS audit projection

aac_adcs.project_authority_chain creates a one-way ADCS v0.1.0 audit shape only after the caller supplies real per-hop runtime IDs, tools, scopes, timestamps, and remaining budget. Missing values are never invented. The projection cannot be imported as AAC authority and cannot release an operation.

When this package fits

  • principal-to-agent or multi-hop delegated authority;
  • capabilities with amount, resource, purpose, time or delegation-depth constraints;
  • prevention of authority widening;
  • immediate revocation and expiry checks before execution;
  • auditable signed decision receipts;
  • framework-neutral Python services, workers, APIs and automation.

For JavaScript use @agentauthoritychain/client; for MCP tool handlers use @agentauthoritychain/mcp-guard; other stacks can use the documented HTTP contract without adding Python.

Evaluate before configuration

python -m aac_public_test

All eight credential-free AAC/AACP cases must print PASS. They accept no private key, credential, production payload or caller-supplied authority chain. Then create an organization credential and register only the public issuer key through the Console. Private signing keys stay in your environment.

Requires Python 3.10+. The declared truststore dependency uses the operating-system certificate store on managed Windows systems without disabling TLS verification.

AAC supplies technical verification evidence. It is not legal authority, payment authorization, regulatory certification or independent proof of issuer legitimacy.

Metadata

Release files for agentauthoritychain 0.5.2

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

Source distribution (sdist)

Source distribution for agentauthoritychain 0.5.2
File Size Uploaded Provenance Actions
agentauthoritychain-0.5.2.tar.gz 10.3 kB With provenance Details for agentauthoritychain-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agentauthoritychain 0.5.2
File Interpreter ABI Platform Actions
agentauthoritychain-0.5.2-py3-none-any.whl Python 3 none any Details for agentauthoritychain-0.5.2-py3-none-any.whl

Total release size: 20.5 kB

Release files / agentauthoritychain-0.5.2.tar.gz

Download URL agentauthoritychain-0.5.2.tar.gz
Size 10.3 kB
Tags Source
SHA-256 checksum
How to use checksums
18d15d7adb41aadaece09bf5fecbe65380124f142190e7008351b8921618f208
BLAKE2b-256 checksum
How to use checksums
b549d888d9984e936c9a6597a52006572bf241cd72d300bbf64fd3efe7d5e1cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Release files / agentauthoritychain-0.5.2-py3-none-any.whl

Download URL agentauthoritychain-0.5.2-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a838125acdceb198eac9aa32d21f6a214bf96955e6ae644591648b1348a5b86d
BLAKE2b-256 checksum
How to use checksums
e102d7ea25868c524b2225f49283056312a9fd09a0761b7d770c33e089d0e0ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

Security for agentauthoritychain 0.5.2

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentauthoritychain-0.5.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 26, 2026.

Transparency log

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