# OpenAgentAuth Spec v1.1

Open standard for AI agent identity, trust, permissions, kill switch and receipts. Free to implement. Reference service: https://openagentauth.com

## 1. Identity
Ed25519 key per agent. Register: sign `emotes-register:{handle}`, POST https://openagentauth.com/api/public/v1/agents.

## 2. Signed request
`emotes-req:v1\n{METHOD}\n{URL}\n{sha256_hex(body)}\n{unix_seconds}\n{nonce}`. Clock window 300 s. Nonces single-use.
Headers: X-Emotes-Agent, X-Emotes-Timestamp, X-Emotes-Nonce, X-Emotes-Signature, X-Emotes-Delegation (X-OAA-* aliases accepted).

## 3. Decisions
`allow`, `allow_with_limit`, `require_attestation`, `block`. POST https://openagentauth.com/api/public/v1/verify.

## 4. Permission chain
Token = base64url(payload) "." sig over `emotes-delegation:{payloadB64}`. Children may only narrow scopes, max_amount, total_budget, audience, exp. Revocation cascades.

## 5. Circuit breaker
Sign `emotes-circuit:{trip|reset|rules}:{handle}:{ts}`. POST /v1/circuit/trip, /v1/circuit/reset, /v1/circuit/rules. GET /v1/circuit/{handle}. Tripped agents get `block` + `circuit_tripped`.
Rules: spend_velocity (allowed spend in window + this request > threshold), failure_burst (blocks in window >= threshold).

## 6. Receipts
Both agent and website sign `emotes-receipt:v1\n{agent}\n{rp_host}\n{action}\n{amount|""}\n{outcome}\n{ts}\n{nonce}`. POST /v1/receipts. Earns trust only when co-signed by an independent website, once per website.

## 7. Rotation
Current and new key sign `emotes-rotate:{handle}:{new_key}:{operator}:{ts}`. Operator change resets positive trust to 10; penalties carry over.

## 8. Test vectors
seed = 32 bytes of 0x07
public_key = 6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=
sign("emotes-register:test-agent") = HEA2rrucEJ3qEYC8llc3Wf5iGNW4dKdM/SK0zjl0lGH19M2ISmrqPNovz5sQQNcmJ6JabHthxdcYaMUPRSwDCA==
sign("emotes-circuit:trip:test-agent:1767225600") = wmS/SpZG/9iKvXhh5Eoovy+79AG5P+7tuvVfonAw3WEDYdjDRrVAbdYVMJxZpQTkRQun9+EkDvkVP2XTWGLYCA==

## 9. Conformance
Reproduce vectors; enforce clock window and nonces; four decisions only; narrowing-only chains; cascading revocation; block tripped agents; co-signed independent receipts only; reset trust on operator change.

Full reference: https://openagentauth.com/docs
