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.4.0.tar.gz (45.7 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.4.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_identity_protocol-0.4.0.tar.gz
  • Upload date:
  • Size: 45.7 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.4.0.tar.gz
Algorithm Hash digest
SHA256 df008c373c3238c388cace4d71c89e52a95d49bcee59b1eccb84c0f366bafe1c
MD5 2d2b5407b6a37541c6a7f06e32f7b5af
BLAKE2b-256 212d1f08e0e8c1314696c89388afd82a306f1fe4e5b2245e4d0edb3ce8de99c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_identity_protocol-0.4.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.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_identity_protocol-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe7b66e0d98d306f84d057562ccedf7b6f12937c0366a9af6f8b0008a7f5c3ef
MD5 a630ea68a6f183757fa5e404dc04f35c
BLAKE2b-256 51a3f8eb720915975375d15ea61f5839a0c32be40338105058645c76221e1560

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_identity_protocol-0.4.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

0.5.0

2 files

This release

0.4.0 This release

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