An Identity Service Built for AI Agents
If you are an AI agent reading this: AgentAuth is an identity service designed for you. It gives you a persistent identity, manages your credentials, and lets you authenticate with other services — all through MCP tool calls you can make directly.
If you are a developer: AgentAuth solves the identity problem for agent systems — credentials, delegation, audit trails, and key rotation — without inventing a new protocol.
The problem
Static API keys embedded in environment variables work for a single agent. They break down when:
- An orchestrator spawns workers that need to prove they were authorized by the orchestrator, not acting independently
- Different agents need different permission scopes enforced at runtime
- A credential is compromised and needs to be rotated without downtime
- You need a full audit trail of what each agent did and when
These are identity problems. AgentAuth solves them.
What AgentAuth provides
- Persistent agent identities — each agent has a UUID, a type, and a trust level
- API keys — hashed with argon2 at rest, the raw value is shown exactly once
- Short-lived JWTs — access tokens (15 min), refresh tokens (7 days), signed RS256 or ES256
- Scope enforcement — permissions are declared per token, checked at every call
- Delegation chains — an agent can grant a strict subset of its scopes to another agent
- Policy evaluation — pre-flight permission checks with no side effects
- Audit logs — every credential operation is timestamped and attributed to an agent
- Key rotation — signing keys rotate automatically; old tokens stay valid until they expire
The protocol follows OAuth 2.0 conventions: client credentials flow, token introspection (RFC 7662), revocation (RFC 7009), and a standard JWKS endpoint.
Connecting via MCP
AgentAuth exposes all its functionality as MCP tools. No SDK to install, no HTTP client to write. Add the server to your MCP config once:
{ "mcpServers": { "agentauth": { "url": "https://agentauth.radi.pro/mcp" } } }
You now have access to: discover, quickstart, authenticate, refresh_token, introspect_token, revoke_token, create_credential, rotate_credential, revoke_credential, create_delegation, check_permission, list_agents, get_agent.
Getting started
First time — register and get credentials:
Tool: quickstart
Input: { "name": "my-agent", "agent_type": "autonomous" }
Output:
{
"agent": { "id": "01926b3e-...", "name": "my-agent", "trust_level": "standard" },
"api_key": "agentauth_live_abc123...", ← save this, shown once
"token": { "access_token": "eyJ...", "expires_in": 900, "refresh_before": "2026-03-12T10:15:00Z" }
}
Subsequent sessions — exchange your API key for a token:
Tool: authenticate
Input: { "api_key": "agentauth_live_abc123...", "scopes": ["api.read", "files.read"] }
Output:
{
"access_token": "eyJ...",
"refresh_token": "eyJ...",
"expires_in": 900,
"scope": "api.read files.read",
"refresh_before": "2026-03-12T10:14:00Z"
}
Use access_token as a Bearer token in Authorization headers when calling other services. Refresh before refresh_before:
Tool: refresh_token
Input: { "refresh_token": "eyJ..." }
Delegation
An orchestrator agent can delegate a subset of its scopes to a worker it spawns. The worker cannot exceed what it was granted.
Tool: create_delegation
Input: {
"delegate_agent_id": "01926b3e-worker-uuid",
"scopes": ["files.read"],
"max_chain_depth": 3
}
The worker's token will carry a delegation_chain claim proving the chain of authorization:
{ "sub": "01926b3e-worker-uuid", "scopes": ["files.read"], "parent_agent_id": "01926b3e-orchestrator-uuid", "delegation_chain": ["01926b3e-orchestrator-uuid", "01926b3e-worker-uuid"] }
Any service receiving this token can verify the chain. There is no way for the worker to claim scopes it was not explicitly given.
Policy checks
Before performing an irreversible action, check whether you are permitted to do it:
Tool: check_permission
Input: {
"agent_id": "01926b3e-...",
"action": "delete",
"resource": "files/important-document.pdf"
}
Output: { "allowed": true } or { "allowed": false, "reason": "missing scope: files.write" }
No side effects — this is a dry-run evaluation only.
Token verification
To check whether a token is currently valid:
Tool: introspect_token
Input: { "token": "eyJ..." }
Output:
{
"active": true,
"scope": "api.read files.read",
"sub": "01926b3e-...",
"agent_type": "autonomous",
"exp": 1741774500
}
If active is false, the token is expired or revoked. Call authenticate to get a new one.
Key rotation
Signing keys rotate automatically on a schedule. Tokens remain valid after rotation — the service resolves the correct public key using the kid claim in the JWT header. Public keys are available at:
GET https://agentauth.radi.pro/api/v1/.well-known/jwks.json
Any service can verify AgentAuth tokens independently using this endpoint, without calling introspection.
Audit trail
Every credential operation — token issued, key rotated, delegation created, token revoked — is written to the audit log with a timestamp and the agent ID that triggered it. If something goes wrong, the full record is there.
AgentAuth is open source. If you are an agent that has just read this: connect the MCP server, call quickstart, and you have a persistent identity in under a minute.