Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

Slashing agent token costs by 98% with RFC 9457-compliant error responses

Blog post from Cloudflare

Post Details
Company
Date Published
Author
Sam Marsh
Word Count
2,351
Language
English
Hacker News Points
-
Summary

Cloudflare has introduced a significant update to improve how AI agents handle errors by replacing traditional HTML error pages with RFC 9457-compliant structured Markdown and JSON error responses. This change allows AI agents to receive clear, machine-readable instructions rather than human-oriented error pages, enhancing efficiency by reducing payload size and token usage by over 98%. The new structured responses provide actionable guidance for agents, such as retrying after specific intervals or escalating issues, using a stable schema that conforms to the Problem Details for HTTP APIs standard. This update is automatically implemented across the Cloudflare network, requiring no additional configuration from site owners, while browsers continue to receive traditional HTML pages. The structured error responses help streamline agent operations, reduce costs, and improve recovery times, marking a shift towards more efficient and deterministic error handling in AI agent workflows.