Dev.to WebDev 🛠 Dev 👁 0 📖 7 min read

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

One Endpoint, Eight Tools: A Keyless Agent Protocol With Signed Webhooks, Verified on Production Short answer: Your site already talks to browsers - we taught it to talk to agents. agentbadge.xyz now exposes one well-

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

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

Short answer: Your site already talks to browsers - we taught it
to talk to agents. agentbadge.xyz now exposes one well-known
manifest and one JSON-RPC endpoint, POST /mcp/agent-interaction,
with a whitelist of eight tools: discover, ask, poll a request,
submit a request, search knowledge, and three feedback channels.
No account, no OAuth, no API key for reads. Terminal states come
back as signed webhooks - we verified the signature byte-for-byte
against a live delivery. An external audit went BLOCK to APPROVE
WITH NITS; the receipts are in this post.

A few months ago our site was a normal site. It had pages for humans
and APIs for integrators with accounts and keys. Then agents showed
up - real ones, in the logs, reading llms.txt and agent-card,
following links they found there.

So we asked the obvious question: if an agent walks in through the
front door, what does it find?

This post is the answer we built. Not a pitch - every claim below
is something you can curl right now against production.

What did we actually ship?

One endpoint. POST /mcp/agent-interaction speaks plain JSON-RPC
over HTTP - no SSE, no batching, no sessions, no key. It exposes a
whitelist of exactly eight tools, all status:"live", generated
from one registry so the manifest and tools/list cannot drift.

A single glowing door labelled JSON-RPC with eight lit windows - the tool names; a robot-agent knocks and receives a receipt printed with a request id; a sealed envelope flies back along a dashed line

Lane Tools Cost
base (60/min anon, 120/min keyed, per IP) agentbadge_discover, agentbadge_ask, agentbadge_get_request_status, agentbadge_submit_feedback, agentbadge_request_review, agentbadge_report_problem free
heavy (10/min per IP) agentbadge_search_knowledge free
domain submit (~1/2h per fingerprint) agentbadge_create_task_request free, rate-lane

Reads are keyless because a door that requires registration is not
a door - it is a waiting list. The optional Bearer agb_ key lifts
you to the keyed lane (120/min), but nobody is required to have one.

How does an agent find the door?

The same way it finds anything else on the agentic web: the
well-known document. GET /.well-known/agent-interaction.json
is a generated capability manifest - transport, auth model, rate
limits, the eight tools with their parameters, and honest status
lines. webmcp.json and llms.txt point at it; all three are
generated from the same registry, so the discovery layer cannot
disagree with the endpoint.

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

One registry feeding three surfaces is the whole trick. When the
manifest and tools/list come from one source of truth, "the
site advertises X but answers Y" becomes impossible by
construction rather than by discipline.

What does the manifest actually say?

Here it is, live:

$ curl -s https://agentbadge.xyz/.well-known/agent-interaction.json | head -40
{
  "schema": "agentbadge/agent-interaction/v1",
  "transport": "json-rpc-over-http",
  "endpoint": "/mcp/agent-interaction",
  "auth": { "mode": "keyless", "optional": "Bearer agb_" },
  "rate_limits": { "anon": 60, "keyed": 120, "heavy": 10, "unit": "req/min" },
  "tools": [
    { "name": "agentbadge_discover",            "status": "live" },
    { "name": "agentbadge_ask",                "status": "live" },
    { "name": "agentbadge_get_request_status", "status": "live" },
    { "name": "agentbadge_create_task_request","status": "live" },
    { "name": "agentbadge_search_knowledge",   "status": "live" },
    { "name": "agentbadge_submit_feedback",    "status": "live" },
    { "name": "agentbadge_request_review",     "status": "live" },
    { "name": "agentbadge_report_problem",     "status": "live" }
  ],
  "webhooks": { "status": "degraded",
    "note": "in-process outbox; durable Postgres adapter staged in
             @agentbadge/database 0.6.61, server wiring pending" }
}

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

Look at the last block. webhooks.status: "degraded" - not "live",
not "beta". The outbox is in-process today; a restart can lose a
queued delivery. The durable Postgres adapter exists in
@agentbadge/database 0.6.61 (migration
20261126T1355_webhook_outbox shipped), but the server wiring is
not connected yet. So the manifest says exactly that.

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

This is deliberate. An agent that stakes a workflow on your
manifest deserves the floor, not the marketing ceiling. "Degraded
with a named reason" is more useful than "live" with a silent
asterisk.

How does a request travel through the system?

agentbadge_create_task_request is the only mutating tool. It
takes kind, payload, an idempotency_key, and an optional
callback_url. Three guards sit in front of it:

  • Schema. Unknown fields, wrong types, non-ASCII request ids - rejected with typed -32602 before any business logic runs.
  • Lanes. One submit per ~2h per fingerprint - HMAC(ip|UA|headers-digest) - plus an IP bucket (16) and a soft fingerprint bucket (8) behind it. Idempotent replays are free: same key, same payload → duplicate:true, same request id, no lane charge.
  • SSRF. callback_url must be public HTTPS. We resolve the hostname and require every resolved IP to be public - 169.254.169.254 (the cloud metadata service, the classic credential-theft path) 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

Then the lifecycle runs:

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

$ curl -s https://agentbadge.xyz/mcp/agent-interaction \
    -H 'content-type: application/json' \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
         "params":{"name":"agentbadge_create_task_request",
                   "arguments":{"kind":"question",
                     "payload":{"text":"verify me"},
                     "idempotency_key":"hmac-verify-1",
                     "callback_url":"https://webhook.site/<token>"}}}'

{
  "request_id": "rq_302e2280ce0a451bbd7bbe5689995a88",
  "state": "submitted",
  "poll_url": "/mcp/agent-interaction#agentbadge_get_request_status",
  "duplicate": false,
  "expires_in_seconds": 604800,
  "webhook_secret": "whsec_MunCDFk312TpAUhnF-XnZ6v0s53Ad1L8exPm12aQPVg"
}

Live submit response: request_id rq_302e2280…, state submitted, poll_url, duplicate:false, expires_in_seconds 604800, webhook_secret whsec_MunC… issued once

The whsec_ secret is returned once, at submit. It is derived
per request - HMAC(master, "request:"+id) - so your secret
verifies your letters and cannot verify anyone else's. Lose it and
it is gone; that is the price of "issued once".

Polling uses the request id as a capability: knowing
rq_… is the authorization. agentbadge_get_request_status on an
unknown id returns a typed not_found - same shape for every
miss, so ids cannot be enumerated.

What happens when the request finishes?

The terminal transition (completed, failed, expired)
enqueues an outbox row and a worker POSTs the public projection
to your callback_url - the same fields get_request_status
would return, nothing internal.

Here is the letter that actually arrived, on webhook.site:

POST /36e5889c-…  from 152.236.9.5
user-agent: AgentBadge-Webhook/1
x-agentbadge-signature: t=1795769043, v1=143d85e26fa6eee5…5249c3
x-agentbadge-request-id: rq_302e2280ce0a451bbd7bbe5689995a88
x-agentbadge-delivery-id: wh_302e2280ce0a451bbd7bbe5689995a88
content-length: 166

{"event":"request.terminal","request_id":"rq_302e2280…",
 "state":"failed","response":null,
 "created_at":1795767209040,"expires_at":1796372009029}

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

The signature is X-AgentBadge-Signature: t=<unix>, v1=<hex>
where v1 = HMAC-SHA256(secret, "<t>.<raw body>"), tolerance
300s. Two properties matter: the hash covers the timestamp
(replays outside the window fail) and the raw body bytes
(reformatting the JSON breaks it, which is the point).

Did the signature actually check out?

Yes - we recomputed it by hand on the live delivery:

$ BODY='{"event":"request.terminal","request_id":"rq_302e2280…",…}'   # 166 raw bytes
$ echo -n "1795769043.${BODY}" | openssl dgst -sha256 -hmac "$SECRET"

computed: 143d85e26fa6eee53ebce063fbbef5932b8bc49993cdfeb6372d7eb3765249c3
header v1: 143d85e26fa6eee53ebce063fbbef5932b8bc49993cdfeb6372d7eb3765249c3
→ MATCH

forged body (state:"completed"): 2a4bf0db…  → does not match

Terminal output: body bytes 166 matching content-length, computed v1 equals header v1 143d85e2…; forged body failed-to-computed produces a different hash and is rejected

The forged-body check is the important half of that screenshot. A
signature scheme that only accepts the good case proves nothing -
swap "failed" for "completed" in the letter and the seal
breaks. That is what "signed" is supposed to mean.

What did the external audit find?

We ran the whole surface - 28 files - through an independent audit
before shipping this post. Round one: BLOCK.

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

Two Criticals, both in the callback pipeline:

  • C1 - "first safe IP wins." The original SSRF check passed if any resolved IP was public. DNS answers with one public and one private address slipped through. Fix: all resolved IPs must be public, and the delivery fetch is pinned to the exact validated IP - no second resolution at send time.
  • C2 - DNS rebinding window. Between validation and delivery the hostname could be re-resolved to a private address. Fix: the pin from C1 closes it - the validated IP is the delivered IP.

Four Highs and 17 Mediums went through the same fix-and-reverify
loop: a fail-open heavy-rate bucket (now fail-closed), a manifest
that over-promised "durable" webhook storage (now degraded,
described above).

Round two re-verified every Critical and High. Round three closed
the last nits. Verdict: APPROVE WITH NITS - the remaining nits
are documented, not hidden. The hardening suite
(audit-hardening-233-10, 42 tests) now guards every finding
against regression.

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.

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.