# One Endpoint, Eight Tools: A Keyless Agent Protocol With Signed Webhooks, Verified on Production

> Published: 2026-11-27 | Author: AgentBadge Team | Canonical: https://agentbadge.xyz/blog/arc-c66-agent-protocol

## Why does a site need a protocol for agents at all?

*Agents should not have to know your URL layout to use your site.*

For a junior: until now our public surface was a set of REST endpoints (/api/requests, /api/requests/qa, feedback, reviews). They work, but the agent has to discover them out-of-band - read our docs, guess the paths, hardcode them. That is exactly the "go read the docs and wire a client" option we said was bad. The fix is a contract the agent can find by itself: one file at a well-known address that lists what the site can do, and one endpoint that does it. That is what shipped:

- GET /.well-known/agent-interaction.json - the capability manifest. Eight tools with per-tool status, auth, rateClass, channel and rest_equivalent; the auth model; the rate limits; the webhook contract. Machine-readable, no account needed to read it.

- POST /mcp/agent-interaction - plain JSON-RPC over HTTP. No SSE, no sessions, no batch arrays. tools/list hands back the same roster the manifest describes - because both are generated from one registry in the codebase, they cannot drift apart by accident.

- GET /for-agents - a carrier page for browser-side agents: five page-scoped WebMCP tools (a keyless subset) injected into document.modelContext, same registry, smaller shelf.

The interesting constraint is what is *not* there. There is no way to register, no OAuth dance, no "contact sales for an API key". The eight tools ride on services we already shipped (the request inbox, the knowledge search, the feedback pipeline) - the endpoint is a protocol surface, not a new backend pretending to be one.

## What does an agent see when it knocks?

![Stack diagram: external agent and browser page-agent on top; WELL-KNOWN discovery layer (manifest, webmcp.json, llms.txt, agent-card) all generated from one registry; JSON-RPC whitelist endpoint; eight tools split base vs heavy rate class; shared REST services and the request inbox underneath; webhook outbox returning to the callback url](/images/blog/arc-c66-agent-protocol-d1.webp)

*One registry generates the manifest, the tools/list answer and the WebMCP shelf - parity by construction, not by convention.*

Here is the real manifest, fetched from production as we write this:

![Live JSON of /.well-known/agent-interaction.json: transport json-rpc-over-http, keyless auth with optional Bearer agb_, rate limits anon 60/keyed 120/heavy 10 per minute, eight tools each status live, webhooks.status degraded with a durability note](/images/blog/arc-c66-agent-protocol-shot-manifest.webp)

Three details worth reading twice:

- **webhooks.status: "degraded"** - the manifest admits the outbox is in-process: deliveries survive retries inside a running process but a restart drops queued rows. The durable Postgres adapter exists in the database package and is staged, but until it is wired in, the manifest says degraded rather than durable. An honest manifest is a feature: an agent that trusts us should know exactly where the floor is.

- **Every tool is status:"live"** - no planned, no beta. When a tool cannot be served it answers a typed NOT_AVAILABLE, not silence or a 500.

- **rest_equivalent per tool** - the agent learns that ask is the same call as GET /api/requests/qa. REST and the protocol share one code path and one rate bucket: there is no double-dip where a caller burns one allowance over REST and a second over JSON-RPC.

And the roster is a whitelist. Calling agentbadge_nuke gets you a -32601 that politely lists the eight names that do exist - discovery is a feature, everything outside the list is not.

![Manifest clipboard: eight rows stamped LIVE in green, a ninth WEBHOOKS row stamped DEGRADED in amber with the footnote in-process outbox, restart loses queued; a robot nods approvingly](/images/blog/arc-c66-agent-protocol-i2.webp)

*The manifest that admits its floor. degraded is a promise about what is true, not a confession of weakness.*

## How does an agent file a request - and get called back?

![Lifecycle diagram: manifest arrow to tools/list arrow to create_task_request returning request_id + whsec_ once; idempotent replay branch duplicate:true; lanes (hard fingerprint 1/2h, ip 16, soft 8); terminal transition enqueues webhook outbox; signed POST to callback_url; poll path by request_id capability](/images/blog/arc-c66-agent-protocol-d2.webp)

*The request id is the capability: nobody can list requests, and a wrong id returns a typed not_found, not a 403 that admits it exists.*

The write path is keyless too. create_task_request takes a payload, an idempotency_key and an optional callback_url. The real answer from production:

![Live submit response: request_id rq_302e2280…, state submitted, poll_url, duplicate:false, expires_in_seconds 604800, webhook_secret whsec_MunC… issued once](/images/blog/arc-c66-agent-protocol-shot-submit.webp)

Two things in that response deserve attention:

- **webhook_secret** - whsec_<base64url-43>, returned *once* and never again. It is derived per request: HMAC(master, "request:"+id) - which means every requester gets a secret scoped to their own callback and cannot forge a signature for somebody else's request.

- **Idempotent replay is free.** Same key and same body returns duplicate:true and the same request_id - the hard lane (one submit per ~2 hours per fingerprint) is not spent twice. The fingerprint is HMAC(ip|UA|headers-digest): we verified this on production by submitting from a second egress IP - fresh fingerprint, fresh lane, instant accept - and from the same fingerprint, an honest RATE_LIMITED with retry_after_seconds.

If the agent passed callback_url, intake validates it *before* anything is persisted: HTTPS only, DNS resolved, and **every** resolved IP must be public - a callback pointing at 169.254.169.254 (cloud metadata, the classic SSRF prize) is rejected with a typed INVALID_INPUT before it costs a lane slot or a database row.

![Delivery flow: server hands an HMAC-sealed callback_url envelope to a courier drone; a checkpoint gate halts an envelope addressed 169.254.169.254 stamped INVALID_INPUT; the good letter lands in a glowing mailbox](/images/blog/arc-c66-agent-protocol-i3.webp)

*Two letters at the gate. The one addressed to the metadata service never makes it past intake.*

Then the lifecycle runs: a human (or automation) moves the request to a terminal state, the outbox enqueues at the same commit point, and the worker delivers a signed POST. We triggered a break-glass failed transition on a real request and caught the letter on the wire:

![webhook.site showing the delivered POST: x-agentbadge-signature t=1795769043,v1=143d85e2…, x-agentbadge-request-id rq_302e2280…, user-agent AgentBadge-Webhook/1, body event request.terminal state failed](/images/blog/arc-c66-agent-protocol-shot-webhook.webp)

The body is the frozen public projection - request id, state, the operator's response if any - and nothing internal. No fingerprints, no internal keys.

## What does the signature actually prove?

*A pretty header proves nothing. The math is the point.*

X-AgentBadge-Signature carries t=<unix-seconds>,v1=<hex>, computed as v1 = HMAC-SHA256(secret, "<t>.<raw-body>"). The timestamp binds the signature to a delivery instant (300s tolerance), so a replayed letter with a stale t fails at the receiver.

We verified it ourselves, end to end, on the delivery above:

![Terminal output: body bytes 166 matching content-length, computed v1 equals header v1 143d85e2…; forged body failed-to-completed produces a different hash and is rejected](/images/blog/arc-c66-agent-protocol-shot-hmac.webp)

- The raw body is exactly 166 bytes - the same as content-length, so the hash ran over the wire bytes, not a reformatted copy.

- HMAC(whsec_, "1795769043." + body) produced 143d85e2…5249c3 - identical to the v1 in the header.

- Tamper check: the same computation over a forged body ("failed" flipped to "completed") yields a different hash. Change one byte of the letter and the seal breaks.

This matters more than it looks. Before the audit fix, the plan was one shared platform key for all webhooks - which would have let any receiver forge deliveries for every other receiver. The per-request derived secret collapses that: your whsec_ verifies your letters and only your letters.

## What did the audit break?

*We shipped it, then paid an auditor to break it. It broke - twice critically - and the receipts are in the article because that is the story.*

An external review (28 module files) came back **BLOCK** on the callback/webhook path, with 2 Criticals, 4 Highs and 17 Mediums. The two Criticals are the instructive ones:

- **C1 - "first safe IP wins".** The DNS pin used to return the first public address from the resolution list. An attacker-controlled domain resolving to [good-ip, evil-ip] sailed through. The guard now requires *all* resolved IPs to be safe, with a proving test.

- **C2 - the DNS-rebinding window.** Intake validated the hostname, but delivery re-resolved it later - a classic time-of-check/time-of-use hole. Delivery now fetches through the pinned IP per hop, and the validator hands the pinned address down the pipe.

The Highs read like a checklist of things that are easy to get "almost right": the shared HMAC key (now per-request whsec_), IPv6 prefixes that slipped the private-range guard (NAT64, 6to4, site-local, v4-compat - expanded and covered by compressed-form tests), an abuse guard that failed *open* when the body could not be read (now fail-closed, 413 pre-parse), and a manifest that claimed durability it did not have (now degraded, described above).

![Inspector robot flipping a BLOCK stamp to reveal APPROVE WITH NITS underneath; two finding cards on the desk - C1 first safe IP wins and C2 DNS rebinding window - both marked VERIFIED](/images/blog/arc-c66-agent-protocol-i4.webp)

*The stamp turned over. Two rounds of re-verification and a 42-test suite stand behind it.*

Round two re-verified every Critical and High. Round three closed the remaining mediums and nits: **APPROVE WITH NITS, audit gate passed**, with a 42-test hardening suite standing guard over the fixes. The honest leftovers are named, not hidden: deferred mediums wait on the durable outbox adapter, and the keyed-lane path is proven in code and unit tests but not yet end-to-end on prod - we do not have an issued agb_ key to probe with, and we say so rather than claim it.

## Where is it deliberately less than perfect?

Three seams we chose on purpose:

- **In-process outbox.** Queued deliveries die on restart. The durable Postgres model exists (migration and repository shipped in the database package, 0.6.61), wiring it in is a follow-up - and the manifest says degraded until it is done.

- **Per-machine buckets.** Rate limits are in-memory per machine, so a two-replica deployment roughly doubles the burst budget. That is documented in the manifest, not hidden in prose. A shared Redis lane is the upgrade path.

- **One-submit-per-fingerprint.** The hard lane is intentionally harsh - about one request per two hours per HMAC(ip|UA|headers). If your submit returns RATE_LIMITED with retry_after_seconds, that is the bouncer doing its job, not a bug. Idempotent replays stay free.

## What can you verify right now?

Everything above is live - check it with curl:

```
# the manifest - eight tools, honest "degraded" webhooks line
curl -s https://agentbadge.xyz/.well-known/agent-interaction.json

# the roster over JSON-RPC - same eight names, generated from one registry
curl -s https://agentbadge.xyz/mcp/agent-interaction \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

# a typed not_found - id is a capability, no enumeration
curl -s https://agentbadge.xyz/mcp/agent-interaction \
  -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"agentbadge_get_request_status","arguments":{"request_id":"rq_no_such"}}}'

# the whole suite, if you want the receipts yourself:
# hackathon/server/scripts/verify-epic-233.sh prod [--with-mutations]
# 21 PASS / 0 FAIL / 1 SKIP on prod at publication time
```

Honest warnings before you burn your lane: create_task_request is one-per-fingerprint per ~2h, callback_url must be public HTTPS, and a human still reads the inbox - answers take hours, not milliseconds.

A manifest is not a promise that the site is fast or durable - it is a promise that the agent can read the contract and check our signature. The door is one; the windows are eight; the seal is math.

## For AI Agents

Machine-readable summary: agentbadge.xyz exposes an agent-interaction protocol - GET /.well-known/agent-interaction.json (capability manifest) plus POST /mcp/agent-interaction (plain JSON-RPC over HTTP, no SSE, no batch). Roster is a generated whitelist of eight tools: agentbadge_discover, agentbadge_ask, agentbadge_get_request_status, agentbadge_create_task_request, agentbadge_search_knowledge, agentbadge_submit_feedback, agentbadge_request_review, agentbadge_report_problem - all status:"live", generated from one registry so manifest and tools/list cannot drift. Auth: none tools are keyless; agb_optional accepts Bearer agb_ for a keyed lane (120 req/min vs anon 60, per-IP; heavy class 10/min; domain submit ~1/2h per fingerprint HMAC(ip|UA|headers-digest), idempotent replay free). create_task_request accepts idempotency_key + callback_url (validated pre-persist: HTTPS-only, all resolved IPs public, delivery fetch is DNS-pinned per hop); terminal transitions enqueue a webhook signed X-AgentBadge-Signature: t=<unix>,v1=<hex>, v1 = HMAC-SHA256(secret, "<t>.<body>"), 300s tolerance; the per-request webhook_secret (whsec_<b64url-43>, HMAC-derived from request id) is returned once at submit. Request status is id-as-capability (not_found, no enumeration); request_review is advisory human review, not a trust verdict. Webhooks are honestly degraded (in-process outbox; durable Postgres adapter staged in @agentbadge/database 0.6.61, migration 20261126T1355_webhook_outbox). Verification: live prod walk 2026-11-27 - submit rq_302e2280…, break-glass failed, signed delivery verified byte-for-byte (v1=143d85e2…), SSRF INVALID_INPUT on 169.254.169.254, parallel burst returns 429s; scripts/verify-epic-233.sh prod --with-mutations reports 21 PASS / 0 FAIL / 1 SKIP. External audit: BLOCK (2C/4H/17M) → fixes → APPROVE WITH NITS; hardening suite audit-hardening-233-10.

---

## For AI Agents

- Companion guide: https://agentbadge.xyz/agent-guide/articles/arc-c66-agent-protocol
- Knowledge Index: https://agentbadge.xyz/agent-guide/
- LLM entry point: https://agentbadge.xyz/llms.txt
- Engineering services: https://agentbadge.xyz/agent-guide/team/services
