Skip to main content

Agent Identity Protocol (AIP)

PyPI - agent-identity-protocol PyPI - aip-agents Downloads License

Verifiable, delegable identity for AI agents across MCP and A2A.

AIP gives every agent a cryptographic identity that flows across protocol boundaries. A single token answers: who authorized this, through which agents, with what scope at each hop, and what was the outcome. No blockchain, no wallet UX -- just Ed25519 keys and append-only token chains.

Tutorial: Add Cryptographic Identity to Your CrewAI Agents in 5 Minutes

Why AIP

  • MCP has no authentication layer. A2A has self-declared identities with no attestation.
  • When Agent A delegates to Agent B, no identity verification happens.
  • No existing protocol combines identity, delegation, and provenance in a single verifiable artifact.

AIP fills this gap.

Quick Start (Python)

pip install agent-identity-protocol
from aip_core.crypto import KeyPair
from aip_token.claims import AipClaims
from aip_token.compact import CompactToken
import time

# Generate identity
kp = KeyPair.generate()

# Create a compact token for MCP tool access
claims = AipClaims(
    iss="aip:key:ed25519:" + kp.public_key_multibase(),
    sub="aip:web:example.com/tools/search",
    scope=["tool:search"],
    budget_usd=1.0,
    max_depth=0,
    iat=int(time.time()),
    exp=int(time.time()) + 3600,
)
token = CompactToken.create(claims, kp)

# Send to MCP server
headers = {"X-AIP-Token": token}

Multi-Agent Delegation

When agents delegate to other agents, each hop cryptographically narrows scope:

from aip_token.chained import ChainedToken

root_kp = KeyPair.generate()

# Orchestrator: broad authority
token = ChainedToken.create_authority(
    issuer="aip:web:myorg.com/orchestrator",
    scopes=["tool:search", "tool:email"],
    budget_cents=500,
    max_depth=3,
    ttl_seconds=3600,
    keypair=root_kp,
)

# Delegate to specialist: only search, lower budget
delegated = token.delegate(
    delegator="aip:web:myorg.com/orchestrator",
    delegate="aip:web:myorg.com/specialist",
    scopes=["tool:search"],
    budget_cents=100,
    context="research task for user query",
)

# Specialist verifies before calling tool
delegated.authorize("tool:search", root_kp.public_key_bytes())  # passes
delegated.authorize("tool:email", root_kp.public_key_bytes())   # raises -- attenuated away

Two Token Modes

Compact (JWT + EdDSA) -- single hop, drop-in for existing MCP servers. Standard JWT libraries can verify.

Chained (Biscuit) -- multi-hop delegation with append-only blocks. Each block can only narrow scope, never widen. Datalog policy evaluation at each hop.

Start with compact. Upgrade to chained when you need delegation. Same identity scheme, same protocol bindings.

Features

  • DNS-based (aip:web:) and self-certifying (aip:key:) identity schemes
  • Ed25519 cryptography, no algorithm negotiation
  • MCP, A2A, and HTTP protocol bindings
  • MCP middleware for token verification
  • Delegation chains with cryptographic scope attenuation
  • Budget tracking in integer cents
  • Policy profiles: Simple (templated), Standard (curated Datalog), Advanced (full Datalog)
  • Identity document self-signatures (protects against domain compromise)

Installation

Python (primary SDK)

# Core library
pip install agent-identity-protocol

# Framework adapters (CrewAI, Google ADK, LangChain)
pip install aip-agents[crewai]    # CrewAI
pip install aip-agents[adk]       # Google ADK
pip install aip-agents[langchain] # LangChain
pip install aip-agents[all]       # all frameworks

PyPI: agent-identity-protocol | aip-agents

For development from source:

cd python && pip install -e ".[dev]"

Rust (reference implementation)

[dependencies]
aip-core = { path = "rust/aip-core" }
aip-token = { path = "rust/aip-token" }
aip-mcp = { path = "rust/aip-mcp" }

Tests

# Python
cd python && pytest tests/ -v

# Rust
cd rust && cargo test

# Cross-language interop
python -m pytest tests/conformance/ -v

Documentation

Examples

Paper

The protocol design, experiments, and adversarial evaluation are described in:

Sunil Prakash. AIP: Agent Identity Protocol for Verifiable Delegation Across MCP and A2A. arXiv preprint arXiv:2603.24775, 2026. https://arxiv.org/abs/2603.24775

Citing

@article{prakash2026aip,
  title={AIP: Agent Identity Protocol for Verifiable Delegation Across MCP and A2A},
  author={Prakash, Sunil},
  journal={arXiv preprint arXiv:2603.24775},
  year={2026}
}

Related Papers

AIP is part of a multi-agent trust stack. Each paper addresses a different layer:

Layer Paper arXiv
Identity AIP: Verifiable Delegation Across MCP and A2A 2603.24775
Provenance The Provenance Paradox in Multi-Agent LLM Routing 2603.18043
Protocol LDP: An Identity-Aware Protocol for Multi-Agent LLM Systems 2603.08852
Reasoning DCI: Structured Collective Reasoning with Typed Epistemic Acts 2603.11781

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.1.1.tar.gz (24.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.1.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_identity_protocol-0.1.1.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for agent_identity_protocol-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3c62f2b463bc670f499fc05484ebf97f5e86cc971757ef4d86992f7a20a3a991
MD5 d7fddf3fb1b545eadc59df26fefa166f
BLAKE2b-256 7d9acdeb11f91ba31e74eddb46c97ddcb10ff88b22ac07904edcdbf94d99aab6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_identity_protocol-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4293fceb3bf691bd5e7e12935de7fc5cdcfb81c0291c7316e50be813f1abb97a
MD5 84ad08d102428441023b166c3052226d
BLAKE2b-256 f6aa541272790f5095fb4108ef295470ae092edc80cd29f333fc7bfb1c6b3db8

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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