Layer 1 of AIP establishes who the agent is through cryptographic attestation. It provides the foundation for all authorization decisions in Layer 2. Without identity, enforcement is just allowlists. With identity, enforcement becomes accountable, auditable, and revocable.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/openagentidentityprotocol/agentidentityprotocol/llms.txt
Use this file to discover all available pages before exploring further.
Layer 1 is currently in progress (as of AIP v1alpha2). The AAT structure and session semantics are defined, but the full Root Registry and federation infrastructure are under development.
The Problem: Agents Have No Identity
Today, when an AI agent makes a tool call, the infrastructure cannot answer:- Which specific agent made this request?
- Which human is this agent acting on behalf of?
- What policy was this agent authorized under?
- Is this a new session or a continuation of an existing one?
Root of Trust
Root Registry
The trust anchor for the AIP ecosystem. Acts as a Certificate Authority for agent identities.
- Agent Registration: Maintains canonical list of registered agents
- Certificate Signing: Signs Agent Identity Documents (AID) with its private key
- Revocation Lists: Publishes lists of revoked agent certificates
- Token Verification: Provides public keys for AAT signature validation
- Registry holds a root private key (Ed25519 or ECDSA P-256)
- Private key must be protected (HSM recommended for production)
- Public key is distributed to all AIP proxies for signature verification
Agent Identity Documents (AID)
An Agent Identity Document is a JSON structure that defines an agent’s cryptographic identity. It’s analogous to an X.509 certificate but designed specifically for AI agents.AID Structure
agent_id
agent_id
Unique identifier for the agent. Must be globally unique within the registry.Format: DNS-like naming (e.g.,
github-agent-v1, prod.customer-support.v2)Purpose: Used in AATs, audit logs, and policy referencespublic_key
public_key
The agent’s public key in PEM format.Key Generation: Agent generates its own key pair (private key never leaves the agent)Supported Algorithms:
ed25519(RECOMMENDED, 256-bit, fast)ecdsa-p256(NIST P-256, widely supported)ecdsa-p384(Higher security, slower)
capabilities
capabilities
Optional list of capabilities the agent declares it will use.Purpose: Pre-declaration for auditing and least-privilege analysisNote: This is informational in v1alpha2. Layer 2 policy is authoritative.
registry_signature
registry_signature
Ed25519 signature over the canonical form of the AID (minus this field).Verification:
Agent Key Pairs
Each agent generates its own private/public key pair:Revocation
The Registry maintains a revocation list of compromised or decommissioned agents:Agent Authentication Tokens (AAT)
An Agent Authentication Token is a short-lived, signed token that proves the agent’s identity at runtime. It’s the bridge between Layer 1 (identity) and Layer 2 (enforcement).AAT Structure (v1alpha2)
version
version
Token format version. Must be
aip/v1alpha2 for this spec.aud (Audience)
aud (Audience)
NEW in v1alpha2: The intended recipient of this token.Purpose: Prevents tokens issued for one MCP server from being accepted by another.Configuration:Validation: Proxy MUST reject tokens where
aud doesn’t match its configured audience.policy_hash
policy_hash
SHA-256 hash of the canonical policy document.Purpose: Binds the token to a specific policy version. If the policy changes, tokens become invalid.Computation:
session_id
session_id
UUID v4 identifying the agent session.Purpose: Correlates all tool calls within a session for audit analysis.Lifecycle: Generated at session start, persists until session ends (process termination).
nonce
nonce
Random hex string (32+ bytes) for replay prevention.Purpose: Each token has a unique nonce. Proxies track used nonces to prevent replay attacks.Storage: Nonces are stored for
nonce_window duration (default: same as token_ttl).binding
binding
NEW in v1alpha2: Context binding to prevent token theft.Fields:
process_id: OS process ID (always included)policy_path: Absolute path to policy file (always included)hostname: Normalized hostname (included forsession_binding: strict)container_id: Container ID if running in Docker/containerd (optional)pod_uid: Kubernetes pod UID if running in k8s (optional)
Token Encoding
AATs can be encoded in two formats:- JWT (Server Mode)
- Compact (Local Mode)
When: Token Example:Verification: Standard JWT libraries can verify signatures using JWKS endpoint.
server.enabled: true (REQUIRED)Format: RFC 7519 JWT with custom aip+jwt type:Token Lifecycle
Session Start
When an AIP engine loads a policy with
identity.enabled: true:- Generate
session_id(UUID v4) - Compute
policy_hash - Gather
bindingcontext (process ID, hostname, etc.)
Session Management
Session Binding Modes
- process (Default)
- policy
- strict
Binding: Token tied to process IDConfiguration:Validation:Use Case: Single-instance agents (local development, single container)Security: Prevents token use in different process (stolen token scenario)
Nonce-Based Replay Prevention
Each AAT includes a unique nonce (random hex string). Proxies track used nonces to prevent replay attacks. Challenge: In distributed deployments, nonces must be shared across instances. Solution: Configurable nonce storage backends:- Memory (Default)
- Redis (Production)
- PostgreSQL
Configuration:Implementation:
sync.Map or similar in-memory structureUse Case: Single-instance deployments onlyLimitation: Cannot prevent cross-instance replay attacksRevocation
Revocation Targets
- Token Revocation
- Session Revocation
- Agent Revocation
Scope: Single token (by nonce)Use Case: Suspected token compromiseMechanism:Storage: Retained for
nonce_window duration (tokens naturally expire after that)Revocation Check Flow
Revocation checks happen before any other validation (expiry, policy hash, etc.). This ensures revoked credentials fail immediately.
Key Management (v1alpha2)
Whenserver.enabled: true, AATs must be signed with a cryptographic key. AIP supports multiple key sources:
- Auto-Generated (Default)
- File-Based
- External KMS (Future)
Configuration:Behavior:
- Implementation generates key pair at startup
- Private key stored in memory (or encrypted file)
- Public key exposed via JWKS endpoint (
/v1/jwks) - Keys rotate every
rotation_period
Next Steps
Layer 2: Enforcement
Learn how policy enforcement uses AATs to authorize tool calls
Architecture
See how Layer 1 and Layer 2 work together
Threat Model
Understand how identity prevents impersonation and hijacking
Policy Reference
Write policies that require AAT validation