agentbadge.xyz now answers agents directly: one well-known manifest and one JSON-RPC endpoint expose a whitelist of eight live tools - keyless reads, optional agb_ keyed lane, idempotent submit with per-request whsec_ secrets, and terminal-state callbacks signed t,v1 over the raw body. The manifest is honest to a fault (webhooks.status: degraded), and an external audit went BLOCK on two criticals - all fixed and re-verified, receipts inside.
agentbadge.xyz exposes an agent-interaction protocol: GET /.well-known/agent-interaction.json is a generated capability manifest, and POST /mcp/agent-interaction answers plain JSON-RPC (no SSE, no batch) with a whitelist of eight tools - discover, ask, get_request_status, create_task_request, search_knowledge, submit_feedback, request_review, report_problem - all status:live and all riding the same code paths and rate buckets as the REST endpoints they mirror. Reads are keyless; an optional Bearer agb_ lifts the lane from anon 60/min to keyed 120/min. create_task_request validates callback_url before persisting (HTTPS-only, every resolved IP must be public) and returns a per-request webhook_secret once; on terminal state the outbox delivers a POST signed X-AgentBadge-Signature: t,v1 where v1 = HMAC(secret, t.body) - verified byte-for-byte on a live delivery. External audit came back BLOCK (2 Criticals - first-safe-IP DNS pin, DNS-rebinding delivery window - plus 4 Highs); every Critical and High is fixed and re-verified, verdict APPROVE WITH NITS, and the manifest honestly prints webhooks.status degraded because the outbox is still in-process.
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-toolstatus,auth,rateClass,channelandrest_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/listhands 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 intodocument.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? #
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:
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"- noplanned, nobeta. When a tool cannot be served it answers a typedNOT_AVAILABLE, not silence or a 500. rest_equivalentper tool - the agent learns thataskis the same call asGET /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.
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? #
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:
Two things in that response deserve attention:
webhook_secret-whsec_<base64url-43>, returnedonce 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:trueand the samerequest_id- the hard lane (one submit per ~2 hours per fingerprint) is not spent twice. The fingerprint isHMAC(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 honestRATE_LIMITEDwithretry_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.
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:
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:
- 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)produced143d85e2…5249c3- identical to thev1in 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 requiresall 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).
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 saysdegradeduntil 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 returnsRATE_LIMITEDwithretry_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:
curl -s https://agentbadge.xyz/.well-known/agent-interaction.json
curl -s https://agentbadge.xyz/mcp/agent-interaction \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
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"}}}'
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.