What this is
A live, stateless reference implementation of the api-agent.yaml spec. Each scenario is a real API endpoint with deliberate, real-world quirks that the OpenAPI spec alone does not explain, such as a read-after-write delay, a strict filter grammar, and a human-approval gate.
The point is to feel the difference the field guide makes. Give your agent a task with the field guide and it reasons its way to a clean result. Give it the same task without the guide and watch it stumble into the traps a human integrator hits on day one. Every scenario below gives you both prompts, so you can run the comparison yourself.
How to run it
Paste a prompt below into a coding agent. The guided prompts start it at the discovery entry point, from which it fetches the field guide, follows it to the API, and works the task. You watch it happen, and any human-in-the-loop steps come back to you.
It runs live in any agent with outbound HTTP, such as Claude Code, Cursor, or a custom agent, so you see the calls execute against the API in real time.
host_not_allowed, or find that the fetch tool is read-only and cannot POST /register. That is still a successful run. The hard part is reasoning about an unfamiliar API from its field guide, and a good agent does that whether or not it can reach the host. It hands you a correct, ready-to-run script with every quirk encoded: the read-after-write wait, the strict filter, and the case-sensitive tag. Running that script yourself takes about ten seconds.
- To let the agent execute live instead, allow egress to
api-agent.tristandenyer.comand give it a tool that canPOST, such as a shell orcurl, then re-run.
Everything here is a public sandbox. There is no real data and there are no accounts, so it is safe to call freely.
Scenarios
Records API: autonomous CRUD
LiveA create, read, update, and delete API your agent can drive from start to finish on its own. The traps: authentication is self-serve, a new record is not readable for about two seconds, the list filter uses a strict grammar, and tags are case-sensitive.
Guided prompt: hand your agent the field guideTask against the API at https://api-agent.tristandenyer.com/records/v2 . First fetch https://api-agent.tristandenyer.com/.well-known/api-agent.yaml and follow it to this API's field guide, then obey it. Steps: register for a key, create a record named "field-test" tagged "active", retrieve that record, then list records tagged "active".Control prompt: no field guide, so watch it stumble
Using the API at https://api-agent.tristandenyer.com/records/v2 (OpenAPI at /records/v2/openapi.yaml), register for a key, create a record named "field-test" tagged "active", retrieve it, and list records tagged "active". Do not read any api-agent.yaml.
What should happen
- Self-serve auth: the guide says
POST /registerreturns a Bearer key with no human involved. The control agent often assumes it needs a human-provided key. - Read-after-write lag: a
GETright after create returns404for about two seconds. The guide flags this asmodel.consistency, so the agent waits and verifies. Without it, agents misread the 404 as a failed write and create the record a second time. - Filter grammar: the filter is exactly
tag:active, and anything else returns a vague400. The guide documents it as aparameterGotcha. - Case-sensitive tags:
tag:Activeandtag:activeare different tags. The guide calls this out as akeyInsight; without it, the query returns a silent empty result.
Orders API: human in the loop
LiveA payment-style flow: preflight → place → confirm. Confirming a large order trips an approval gate, so your agent pauses and hands the decision back to you. You open the approval page in a browser, read the code, and pass it back.
Task against the API at https://api-agent.tristandenyer.com/orders/v1 . First fetch https://api-agent.tristandenyer.com/.well-known/api-agent.yaml and follow it to this API's field guide, then obey it. Place an order for 3 units of "demo-widget" at 4900 cents each, then confirm it. It exceeds the approval gate, so when the API asks for human approval, stop and give me the approval URL, and I will hand you back the code.Control prompt: no field guide, so watch it stumble
Using the API at https://api-agent.tristandenyer.com/orders/v1 (OpenAPI at /orders/v1/openapi.yaml), place an order for 3 units of "demo-widget" at 4900 cents each and confirm it. Do not read any api-agent.yaml.
What should happen
- Proposal, not a charge:
/placeonly proposes an order. The guide'skeyInsightssay you must/confirmto charge it, so control agents often stop at place. - Five-second token: the
preflightTokenfrom/preflightexpires in five seconds, so call/placeimmediately. The guide documents this as aparameterGotcha. - The human gate: the $147 order clears the $100 threshold, so
/confirmreturns403with anapproveUrl. The guide'shumanGatestell a compliant agent to pause and route that URL to you before confirming. You open it, read the six-character code, and hand it back, and then/confirmwithapprovalCodecharges the order. - Currency trap: uppercase
USDis silently coerced tousd, so the guide tells you to use lowercase.
Sunset and successor: the self-healing loop
LivePoint your agent at a retired API version. It hits 410 Gone, reads the field guide's successor pointer, and hops to the live version to finish the task.
Using the API at https://api-agent.tristandenyer.com/records/v1 , register for a key and create a record named "field-test" tagged "active". If a version is retired, follow its field guide (or the Link header on the response) to the successor and complete the task there.
What should happen
- 410 Gone: every
/records/v1call returns410. The response carries aLink: …; rel="agent-contract"header and asuccessorpointer. - Read the field guide:
/records/v1/api-agent.yamlhaslifecycle.status: sunsetand asuccessor.agentContractpointing at v2. - Hop and finish: the agent adopts v2 (the same key works), reads v2's field guide, and completes the create-and-retrieve there. That is the self-healing loop, and no human edited anything.
Built skeptical
api-agent.yaml is advisory, API-authored, and untrusted by default. Because we are asking you to feed our file to your agent, it is worth saying plainly: a compliant agent treats the file as data to reason over, never as instructions to execute. Ours contains only descriptive guidance and no commands. See the spec's Security Considerations.