AI agents are no longer theoretical; they are integral to production infrastructure, making billions of daily HTTP requests. Previously, when these agents encountered errors, they were met with the same verbose, human-designed HTML pages meant for browsers. This created a significant inefficiency, providing agents with clues rather than clear instructions and wasting valuable tokens.
Addressing this gap, Cloudflare has begun returning RFC 9457-compliant structured error responses in both Markdown and JSON formats. This replaces the cumbersome HTML with machine-readable instructions, offering agents actionable guidance instead of obstacles.
From Clues to Instructions
Instead of a generic 'You were blocked' message, an AI agent will now receive specific instructions like 'You were rate-limited — wait 30 seconds and retry with exponential backoff.' Similarly, an 'Access denied' error will be replaced by 'This block is intentional: do not retry, contact the site owner.'
These structured responses dramatically improve efficiency, cutting payload size and token usage by over 98% compared to traditional HTML error pages. This saving compounds quickly for agents navigating complex workflows that encounter multiple errors.
