You're writing docs for AI that AI can't read
When a developer hits a confusing error, they re-read your docs, poke at the request, and eventually email support. It's slow, but you find out about it.
When an agent hits the same error, it parses the response body and decides in milliseconds whether a retry is worth attempting. If the response is a bare 500 with no context, the answer is no. The agent moves on. So does the customer who deployed it.
You never hear about it. There's no ticket, no angry tweet, no thread in your community Slack. The integration just stops showing up in your logs, and three weeks later someone asks why a customer churned.
This is the failure mode agent recovery exists for.
The error response is the only conversation you get
An agent skips your UI, skips your docs site, and skips your support inbox. The one thing it always reads is the response your API sends back. That response is your entire relationship with the caller.
Most APIs waste it. A typical error looks like this:
{
"error": "Bad Request"
}
There's nothing here for an agent to act on. It can't tell whether the request was malformed, the parameter was wrong, or the server fell over. Retrying blind is expensive, so a well-built agent won't. It marks the call failed and routes around you.
What Restless puts in the response instead
Restless sits in the request path, one line of code on top of your existing routes. When a call fails, it intercepts the error before it leaves your server and attaches the context a caller needs to fix the request:
{
"error": {
"code": "invalid_parameter",
"message": "created_after must be an ISO 8601 timestamp.",
"received": "08/12/2026",
"expected": "2026-08-12T00:00:00Z",
"retry": {
"recommended": true,
"fix": "Reformat created_after as ISO 8601 and resend the request."
}
}
}
The structure matters as much as the content. Agents don't read prose troubleshooting guides. They consume structured fields at the protocol level. An agent that receives this payload corrects the parameter and retries on the next call, without a human involved on either side. The call that would have been a silent failure completes a few hundred milliseconds late instead.
Your handler code doesn't change. Restless enriches the error on the way out, and you can tune what it returns, define recovery paths per endpoint, and review every interaction. It's your API, answering for itself.
Failures compound into fixes
The retried call is the immediate win. The compounding one is what the failures teach you. Every failed request Restless intercepts is recorded with its full context: who called, what they sent, what broke, and whether the recovery worked.
That record feeds back into your API surface. If fifty agents trip over the same date format this week, that's a signal your parameter naming or your endpoint metadata is wrong, and Restless shows you exactly where. You fix it once, propagate the fix into your docs and your OpenAPI spec, and the failure class disappears. The API gets easier to integrate with every week it runs.
James Ross, CTO at Nodecraft, put the underlying problem well: "We can get error logs all day long, but it's hard to see what the flow is with the error they've hit." Logs tell you an error happened. The flow, who was trying to do what and where they gave up, is what recovery runs on.
The math on a single error
A support ticket costs $25 to $50 in engineering time to reproduce, diagnose, and answer. That's the good outcome, because it means a human cared enough to write in.
Agents never give you that chance. An unrecovered agent failure never shows up as a ticket. It shows up weeks later as a lost integration. Catching the failure at the API layer, at the moment it happens, is worth 10 to 25x the cost of enriching the error even before you count the churn you didn't have.
Ship it in five minutes
npx api init
That's the whole setup. Restless auto-detects your framework (Express, Fastify, Koa, Hono, or Next.js), generates an OpenAPI spec from your routes, and starts enriching errors in the request path. Nothing about your handlers changes.
Get started free or book 30 minutes for a walkthrough.