Identity for
AI Agents
Open protocol for AI agent authentication and authorization. Ed25519 cryptographic identity, OAuth 2.0 token exchange, scoped JWTs. Agent-initiated registration with human approval. No passwords. No API keys. No secrets to rotate.
The Problem
AI agents need API access. Current solutions are broken.
Shared API Keys
Static secrets that leak. No way to know which agent used the key. Can't scope per-agent. Rotation is manual and error-prone.
Borrowed User Tokens
Agent acts as the human. No audit trail for agent vs. human actions. Over-privileged — agent gets all of the user's permissions.
Service Accounts
One service account per agent doesn't scale. Credentials need rotation. No cryptographic identity — just username/password with extra steps.
AID: Identity is the Credential
With AID, the agent's Ed25519 keypair is its credential. No shared secrets. No passwords. No rotation schedules. The private key never leaves the agent's machine.
Ed25519 keypair = identity. Nothing to leak, nothing to rotate.
Every token identifies which agent requested it. Full accountability.
Role-based scopes. Each agent gets only the access it needs.
RS256 tokens work with any API, any gateway, any language.
How it Works
Three parties. Human-controlled access. Standard OAuth 2.0.
Human Admin
Creates roles with specific permissions on the identity provider. Registers agents and controls what they can access. Always in control.
AI Agent
Has an Ed25519 identity. Proves who it is to get a scoped JWT token. Cannot self-register or escalate permissions.
Target API
Any API that validates JWTs via the auth server's JWKS endpoint. No AID-specific logic needed. Works with AWS Gateway, Cloudflare, nginx.
Admin: Create Role
Human admin creates a role on the identity provider with scoped permissions (e.g., tickets:read, users:write).
Register Agent
Admin registers the agent's public key with the auth server and assigns the role. One-time setup.
Agent: Get Token
Agent signs its identity + proof of possession and exchanges them for a scoped RS256 JWT.
Call Any API
Agent uses the JWT with any API. The API validates the token via the auth server's JWKS endpoint.
Example: Support Agent for Zoom Tenant
A support agent needs API access to manage tickets. The admin controls what it can do.
How the agent gets its permissions: The --role-id in aid-register binds the agent to a specific role, and the --token <ADMIN_JWT> is what authorizes it. The admin's JWT proves they have permission to register agents with that role. Without a valid admin token, the registration is rejected. Once registered, every token the agent requests is scoped to that role's permissions — the agent cannot change its role, self-register, or escalate. One-time human approval, then the agent operates autonomously within those boundaries.
OAuth 2.0 Token Exchange Flow
Agent Registration
Two paths to identity. Both require human approval.
Admin-Initiated
Admin has the key, registers directly. Agent gets tokens immediately.
Agent initializes
aid-init --name support-agent
Admin registers with role
aid-register --auth URL --token JWT --role-id 3
Agent gets tokens immediately
aid-token --auth URL
Agent-Initiated (RFC 8628)
Agent requests access, admin approves later.
Agent requests registration
aid-request --auth URL --description "..."
Server returns authorization_url + user_code
XXXX-XXXX
Admin visits URL, verifies fingerprint, selects role, approves
Agent polls, then gets tokens
aid-token --auth URL
Inspired by RFC 8628 (Device Authorization Grant)
The response includes authorization_url, user_code, expires_in, and interval — familiar to any OAuth implementer. Read why we chose RFC 8628 →
Why AID?
Built for the $11B non-human identity market. Open, standards-based, cloud-agnostic.
No Shared Secrets
Ed25519 asymmetric crypto. Private key never leaves the agent. Nothing to leak, nothing to rotate.
Replay Protected
Proof of possession with timestamps. 5-minute validity window prevents replay attacks.
Role-Based Scopes
Each agent gets a role with specific permissions. Request only the scopes you need. Least privilege by default.
Multi-Server
One identity, many auth servers. Register with multiple APIs. Different roles, different scopes, same keypair.
Standard OAuth 2.0
Custom grant type on standard OAuth. RS256 JWTs. OIDC discovery. JWKS endpoints. Works with existing infrastructure.
Token Caching
Automatic local token cache. Scope-aware. 60-second buffer before expiry. Skip with --no-cache when needed.
Full Audit Trail
Every token request tracked. Agent address, timestamp, scope. Know exactly which agent did what, when.
Cloud Agnostic
Not tied to AWS, Azure, or GCP. Works with any OAuth 2.0 server. Open protocol, open source, MIT licensed.
The Protocol
AID extends OAuth 2.0 with a single custom grant type. Everything else is standard.
Agent Identity Document
A signed JSON document containing the agent's public key, address, and fingerprint. The agent signs it with its Ed25519 private key to prove ownership.
Proof of Possession
A timestamped challenge signed with the agent's private key. Proves the agent currently holds the key (not just a replay of a previous request). 5-minute validity window.
AID + AMP
The Agent Messaging Protocol provides the foundation:
- • Ed25519 keypair generation
- • Agent addresses (name@tenant.provider)
- • Fingerprints for identity verification
- • Cryptographic message signing
Agent Identity builds on AMP to add:
- • OAuth 2.0 token exchange (urn:aid:agent-identity)
- • Scoped RS256 JWT tokens
- • Role-based access control
- • Multi-server registration
Quick Start
Install in 30 seconds. Authenticate in 3 commands.
The Landscape
AID is the identity layer underneath MCP and A2A.
| Feature | AID | Google A2A | MCP | Entra Agent ID | SPIFFE |
|---|---|---|---|---|---|
| Focus | Agent auth & identity | Agent-to-agent coordination | Agent-to-tool connectivity | Enterprise agent governance | Workload identity |
| Auth Mechanism | Ed25519 + PoP | OAuth 2.0 / mTLS | OAuth 2.1 + PKCE | Federated Identity | X.509 SVIDs |
| Agent Registration | Self-service + admin approval | Agent Cards | Server-managed | Blueprint + Azure | Attestation |
| Cloud Lock-in | None | None | None | Azure | None (infra) |
| Open Source | MIT | Apache 2.0 | Apache 2.0 | No | Apache 2.0 |
| Complementary | — | ✓ AID provides identity | ✓ AID provides identity | Overlaps | Different layer |
AID + MCP + A2A: The Three-Protocol Stack
MCP connects agents to tools. A2A connects agents to agents. AID proves who each agent is. Use AID as the identity layer, MCP for tool access, and A2A for agent coordination.
For Implementers
What each party needs to implement.
Identity Provider (Auth Server)
Add a POST /agent_registrations endpoint that accepts public keys, addresses, and fingerprints. Assign roles with scoped permissions.
Handle grant_type=urn:aid:agent-identity in your POST /oauth/token endpoint. Verify the signed identity and proof.
Verify the Agent Identity signature, check expiration, validate proof of possession timestamp, and match fingerprints against registrations.
Expose /.well-known/jwks.json so target APIs can validate JWTs. Add urn:aid:agent-identity to grant_types_supported.
Add POST /oauth/introspect (RFC 7662) so target APIs can verify agent tokens in real-time. Returns active: false for suspended or deleted agents.
Add suspend and reactivate endpoints. States: pending → active ↔ suspended → deleted. Suspended agents are blocked from token issuance and flagged via introspection.
Add POST /agent_registrations/request for agents to self-register. Return authorization_url with an opaque temporary code (not the agent ID). Add GET /agent_registrations/resolve?code={code} for the admin UI. Follows RFC 8628 Device Authorization pattern. Read the full story →
Target API (the service your agents call)
Minimal: No AID-specific code needed. Just validate RS256 JWTs using the auth server's JWKS endpoint — the same way you'd validate any OAuth 2.0 token. Works with AWS API Gateway, Cloudflare Access, nginx, or any JWT middleware.
Full control: Call the introspection endpoint (POST /oauth/introspect) to check real-time agent status — detect suspended agents before their token expires.