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
- Protocol specification: github.com/sunilp/aip
- MCP proxy, framework guides, security model: sunilprakash.com/aip
- Paper: arXiv:2603.24775 (preprint)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63554a6b490d8882b984995ee3cc58644221b5b346dbd76d0847cc11438d08b3
|
|
| MD5 |
ac1233a73a6fce88adb7fd029ced1544
|
|
| BLAKE2b-256 |
23930cec6e8cb48d583f666c75317f3d50caf1626e877bed92ab7f8b7dbfa384
|
Provenance
The following attestation bundles were made for agent_identity_protocol-0.5.0.tar.gz:
Publisher:
publish-core.yml on sunilp/aip
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_identity_protocol-0.5.0.tar.gz -
Subject digest:
63554a6b490d8882b984995ee3cc58644221b5b346dbd76d0847cc11438d08b3 - Sigstore transparency entry: 2574408445
- Sigstore integration time:
-
Permalink:
sunilp/aip@0ad099d354561b750517827b519f34eac98af98b -
Branch / Tag:
refs/tags/aip-core-v0.5.0 - Owner: https://github.com/sunilp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-core.yml@0ad099d354561b750517827b519f34eac98af98b -
Trigger Event:
push
-
Statement type:
File details
Details for the file agent_identity_protocol-0.5.0-py3-none-any.whl.
File metadata
- Download URL: agent_identity_protocol-0.5.0-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c8bfd050437f3875abf986fcf758db49e432d1552609a245ec379f25eaad895
|
|
| MD5 |
bb1fc7e00cae6ca1505f0b9e21711113
|
|
| BLAKE2b-256 |
4566738fec6b8b8469d6e2c5dcb5a18cfe576e6241a80a53a09afd7049069597
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_identity_protocol-0.5.0-py3-none-any.whl -
Subject digest:
4c8bfd050437f3875abf986fcf758db49e432d1552609a245ec379f25eaad895 - Sigstore transparency entry: 2574408467
- Sigstore integration time:
-
Permalink:
sunilp/aip@0ad099d354561b750517827b519f34eac98af98b -
Branch / Tag:
refs/tags/aip-core-v0.5.0 - Owner: https://github.com/sunilp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-core.yml@0ad099d354561b750517827b519f34eac98af98b -
Trigger Event:
push
-
Statement type: