Verifiable Authorization for AI Agents

Cryptographic proof of what agents are authorized to do

πŸŽ‰ No API Key Required βœ… Free Tier: 1K/day ⚑ <50ms Latency

What is AgentOAuth?

AgentOAuth is a neutral protocol for AI agents to prove who authorized what. It provides verifiable authorization tokens with clear scope, limits, and expirationβ€”built on OAuth/JWT patterns for maximum interoperability.

Unlike traditional OAuth which only proves "access was granted," AgentOAuth creates a cryptographic audit trail proving both the agent's intent and the verifier's approval.

Traditional OAuth

User β†’ Grant Access β†’ App uses token

Problem: Only proves access, not specific intent

AgentOAuth

User β†’ Agent signs policy β†’ Verifier approves β†’ Merchant enforces

Benefit: Proves both intent AND verification

The Two-Layer Signature System

Every AgentOAuth transaction has two independent, verifiable signatures:

1

Intent Layer

Agent's Signature

{"policy": {...}, "exp": ..., "jti": ...} <agent-signature>

Proves: "This agent was authorized by the user to perform this specific action"

β†’
2

Verification Layer

Verifier's Signature

{"decision": "ALLOW", ...} <verifier-signature>

Proves: "A trusted third party verified and approved this request"

Why This Matters

If either side cheats or gets hacked, it's detectable.

  • βœ… Merchants can check the agent's token β†’ "Was this really authorized?"
  • βœ… Auditors can check the verifier's receipt β†’ "Did a trusted verifier approve?"
  • βœ… Rogue agents can't forge authorization (missing user delegation)
  • βœ… Compromised verifiers can't approve without valid agent tokens

What is a Consent Token?

A Consent Token is a signed JWT containing the agent's authorization policy. It specifies exactly what the agent can do, with verifiable limits and constraints.

Example Token Structure

{
  "ver": "act.v0.2",
  "user": "did:user:alice",
  "agent": "did:agent:travel-assistant",
  "scope": "payments.send",
  "policy": {
    "version": "pol.v0.2",
    "id": "pol_abc123",
    "actions": ["payments.send"],
    "resources": [
      {"type": "merchant", "match": {"ids": ["airbnb", "expedia"]}}
    ],
    "limits": {
      "per_txn": {"amount": 500, "currency": "USD"},
      "per_period": {"amount": 1500, "currency": "USD", "period": "week"}
    },
    "constraints": {
      "time": {"start": "08:00", "end": "20:00", "tz": "UTC"}
    }
  },
  "policy_hash": "sha256:3fd9...",
  "exp": 1762140000,
  "jti": "act_unique_id"
}

Policy Features

Actions

What operations are allowed (payments.send, data.read, etc.)

Resources

Which merchants or endpoints can be accessed

Limits

Per-transaction and per-period spending caps

Constraints

Time windows, day-of-week restrictions, timezone aware

Quick Start: Verify a Token

No signup required! Start verifying tokens immediately:

Verify with cURL

# No API key needed!
curl -X POST https://verifier.agentoauth.org/verify \
  -H "Content-Type: application/json" \
  -d '{
    "token": "eyJhbGciOiJFZERTQSI...",
    "audience": "merchant.example"
  }'

Response (Success)

{
  "valid": true,
  "payload": {
    "user": "did:user:alice",
    "agent": "did:agent:travel-ai",
    "scope": "payments.send",
    "policy": {...}
  },
  "policy_decision": {
    "allowed": true,
    "receipt_id": "receipt_abc123",
    "remaining": {
      "period": 1100,
      "currency": "USD"
    }
  }
}

Creating Tokens

To create AgentOAuth tokens with policies:

Using the SDK (Recommended)

import { issueConsent, buildPolicyV2 } from '@agentoauth/sdk';
import { generateKeyPair, exportJWK } from 'jose';

// 1. Create policy
const policy = buildPolicyV2()
  .id('pol_travel_001')
  .actions(['payments.send'])
  .merchants(['airbnb', 'expedia'])
  .limitPerTxn(500, 'USD')
  .limitPerPeriod(1500, 'USD', 'week')
  .timeConstraints({ start: '08:00', end: '20:00', tz: 'UTC' })
  .finalize();

// 2. Generate signing keys
const { privateKey } = await generateKeyPair('EdDSA');
const privateJWK = await exportJWK(privateKey);

// 3. Issue token
const { token } = await issueConsent({
  user: 'did:user:alice',
  agent: 'did:agent:travel-ai',
  scope: 'payments.send',
  policy: policy,
  privateKey: privateJWK,
  keyId: 'key-001',
  expiresIn: '7d'
});

console.log('Token created:', token);

Playground Demo Tokens

Want to test the full flow without setting up the SDK? The AgentOAuth Playground now supports demo token issuance for educational purposes!

How it Works

  1. Build a policy using the Policy Builder form
  2. Issue a demo token - server-signed with a dedicated demo issuer key
  3. Verify the token - test policy evaluation in real-time
  4. See the full flow - policy β†’ token β†’ verification β†’ receipt
⚠️ Demo Tokens are Educational Only

Demo tokens are signed with iss: https://demo.agentoauth.org and clearly marked for testing. They provide a safe way to learn the protocol without managing keys.

For production: Use the SDK to generate tokens with your own issuer identity and keys.

Demo Token API

You can also issue demo tokens programmatically:

# Issue a demo token (100/hour rate limit per IP)
curl -X POST https://verifier.agentoauth.org/playground/issue-demo-token \
  -H "Content-Type: application/json" \
  -d '{
    "policy": {
      "version": "pol.v0.2",
      "id": "pol_demo_001",
      "actions": ["payments.send"],
      "resources": [],
      "limits": {
        "per_txn": { "amount": 500, "currency": "USD" }
      }
    },
    "user_id": "demo-user",
    "agent_id": "demo-agent",
    "expires_in": 3600
  }'

Demo Issuer JWKS

Demo tokens are signed with a dedicated demo issuer key. Public key available at:

https://verifier.agentoauth.org/playground/.well-known/jwks.json

Demo Tokens

  • βœ… Perfect for learning the protocol
  • βœ… No key management needed
  • βœ… Server-signed (secure)
  • βœ… Verifiable by hosted verifier
  • ⚠️ Educational use only

Production Tokens (SDK)

  • βœ… Your own issuer identity
  • βœ… Your own signing keys
  • βœ… Full control and portability
  • βœ… Production-ready
  • πŸ“˜ Requires SDK setup

Free Tier Limits

The hosted verifier is free to use with generous limits:

1,000
Verifications/day
per token issuer
10,000
Verifications/month
per token issuer
60
Requests/minute
per IP address
1,000
Requests/hour
per IP address

No API key required! Rate limits are enforced by token issuer (iss claim) and IP address. Perfect for testing, prototypes, and low-volume production use.

Need higher limits? Contact us for custom API keys with increased quotas.

API Endpoints

POST
/verify

Verify AgentOAuth tokens with policy evaluation

POST
/simulate

Test policy evaluation without state changes

GET
/receipts/:id

Retrieve signed verification receipt

GET
/.well-known/jwks.json

Public keys for receipt verification

GET
/health

Service health and feature flags

Full API documentation: SPEC.md

Resources