Skip to content

demo: compose capability descriptors via metaDataUrl + ANS_DNSAID - #98

Open
sparkmastergrape wants to merge 1 commit into
agentnameservice:mainfrom
sparkmastergrape:pr/payable-agent-endpoints-doc
Open

demo: compose capability descriptors via metaDataUrl + ANS_DNSAID#98
sparkmastergrape wants to merge 1 commit into
agentnameservice:mainfrom
sparkmastergrape:pr/payable-agent-endpoints-doc

Conversation

@sparkmastergrape

Copy link
Copy Markdown

Adds a small runnable demo showing that an ANS-registered agent can advertise arbitrary capabilities through the existing AgentEndpoint.metaDataUrl, pinned with metaDataHash and published as a cap locator by ANS_DNSAID. Zero code, schema, or wire changes.

Fixes #95

Addresses both points from the issue discussion

Runnable demo with a committed fixture, not a docs filescripts/demo/payable-endpoints/, with the example card committed as testdata/agent-card.json. As you noted, a hash printed against a live card breaks as soon as that card changes, and drift is indistinguishable from a legitimate new version. The demo asserts against the fixture, so the worked example stays verifiable over time; --live fetches the real descriptor and reports a mismatch without failing, with that ambiguity spelled out as the teaching point.

Protocol-neutral framing — the README leads on metaDataUrl composing capability descriptors generally. x402 appears only as the worked example, called out as the case people most often assume needs new protocol machinery.

The expected SVCB row is recorded output, not a derivation

testdata/expected-svcb.txt was captured by running scripts/demo/start.sh against main at d8ed4bb, registering the endpoint, driving it to PENDING_DNS, and taking dns-records.sh --json verbatim:

1 . alpn=a2a port=443 key65400=https://api.dnsofmoney.com/.well-known/agent-card.json key65401=IxM_ZcwgCgb3kAnTtD5l3XQ_t9CpFBCSdKbFtanA1Bs key65402=a2a key65409=agent-card.json

verify.sh derives cap-sha256 from the fixture and asserts it against that row, so if the emit path in internal/adapter/discovery/ans/dnsaid.go changes shape the demo fails rather than agreeing with its own arithmetic. Reproduction steps are in the README.

Note that register.sh does not send metaDataHash, so the fixture was produced by POSTing /v2/ans/agents directly.

Run it

scripts/demo/payable-endpoints/verify.sh

No running stack required — it asserts against the committed fixtures.


Per the pay.agents question — agreed, keeping that out of scope for its own discussion.

AI assistance: Assisted-by: Claude Code (claude-opus-5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

Docs: composing payable agent endpoints via metaDataUrl + ANS_DNSAID (no code change)

1 participant