Identity for
AI Agents
Open protocol for AI agent authentication and authorization. Ed25519 cryptographic identity, OAuth 2.0 token exchange, scoped JWTs. 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
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
Non-human identity is an $11.3B market. Here's where AID fits.
| AID | Entra Agent ID | AWS AgentCore | API Keys | |
|---|---|---|---|---|
| Cloud Lock-in | None | Azure | AWS | None |
| Crypto Identity | Ed25519 | Certificates | IAM Roles | None |
| Secret Rotation | Not needed | Auto | Auto | Manual |
| Multi-Tenant | Native | Via Azure AD | Via IAM | Manual |
| Open Source | MIT | No | No | N/A |
| Price | Free | $$$/mo | $$$/mo | Free |
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.
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.