Skip to main content

agent-identity-protocol

Verifiable cryptographic identity and delegation for AI agents, across MCP and A2A.

Python reference implementation of the Agent Identity Protocol (AIP), specified in draft-prakash-aip-01.

Install

pip install agent-identity-protocol

Framework adapters for CrewAI, Google ADK, and LangChain live in the separate aip-agents package.

What it does

Agents get an Ed25519 keypair and a verifiable identifier. Authority is delegated in chains where each hop can only narrow scope, budget, and expiry, never widen them. Any party can verify a chain offline from the token and the issuer's published key, with no callback to the originating organization.

Two token modes:

  • Compact (JWT) for single-hop calls where no delegation is needed.
  • Chained (Biscuit) for multi-hop delegation with per-hop attenuation.

Quickstart

from aip_core.crypto import KeyPair
from aip_token.chained import ChainedToken

root = KeyPair.generate()

authority = ChainedToken.create_authority(
    issuer="aip:web:example.com/agents/orchestrator",
    scopes=["tool:search", "tool:browse"],
    budget_cents=500,
    max_depth=3,
    ttl_seconds=3600,
    keypair=root,
)

# Narrow on the way down. Widening is refused.
delegated = authority.delegate(
    delegator="aip:web:example.com/agents/orchestrator",
    delegate="aip:web:example.com/agents/researcher",
    scopes=["tool:search"],
    budget_cents=100,
    context="research subtask for quarterly report",
)

delegated.authorize("tool:search", root.public_key_bytes())   # ok
delegated.authorize("tool:browse", root.public_key_bytes())   # raises

Verification

authorize() runs the algorithm in draft-prakash-aip-01 Section 4: it re-verifies every block signature from the serialized form, walks the chain confirming each hop narrows its parent across scope, budget, expiry and principal, requires a non-empty delegation context, and then evaluates policy.

An AIP token is a bearer credential. Verification establishes what authority the chain conveys and that no hop exceeded its predecessor. It does not establish that the presenting party is the one the token was issued to; that requires binding the token to a key at the transport or message layer.

Documentation

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_identity_protocol-0.5.0.tar.gz (50.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_identity_protocol-0.5.0-py3-none-any.whl (35.2 kB view details)

Uploaded Python 3

File details

Details for the file agent_identity_protocol-0.5.0.tar.gz.

File metadata

  • Download URL: agent_identity_protocol-0.5.0.tar.gz
  • Upload date:
  • Size: 50.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for agent_identity_protocol-0.5.0.tar.gz
Algorithm Hash digest
SHA256 63554a6b490d8882b984995ee3cc58644221b5b346dbd76d0847cc11438d08b3
MD5 ac1233a73a6fce88adb7fd029ced1544
BLAKE2b-256 23930cec6e8cb48d583f666c75317f3d50caf1626e877bed92ab7f8b7dbfa384

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_identity_protocol-0.5.0.tar.gz:

Publisher: publish-core.yml on sunilp/aip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_identity_protocol-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_identity_protocol-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c8bfd050437f3875abf986fcf758db49e432d1552609a245ec379f25eaad895
MD5 bb1fc7e00cae6ca1505f0b9e21711113
BLAKE2b-256 4566738fec6b8b8469d6e2c5dcb5a18cfe576e6241a80a53a09afd7049069597

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_identity_protocol-0.5.0-py3-none-any.whl:

Publisher: publish-core.yml on sunilp/aip

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page