← Back
Cloudflare
Cloudflare cuts agent error response sizes by 98% with RFC 9457 machine-readable errors
Cloudflare · featureapiperformanceintegration · blog.cloudflare.com ↗

Machine-Readable Errors for AI Agents

AI agents now receive actionable machine-readable error responses from Cloudflare instead of HTML pages designed for human browsers. When an agent sends Accept: text/markdown, Accept: application/json, or Accept: application/problem+json headers, Cloudflare returns structured error payloads with semantic meaning.

What Changed

Starting today, all 1xxx-class Cloudflare edge errors (DNS issues, access denials, rate limits, etc.) return RFC 9457-compliant responses in three formats:

  • Markdown: YAML frontmatter with machine-readable fields plus human prose guidance
  • JSON: Flat object structure with all operational fields
  • Problem JSON: RFC 9457 standard format for HTTP API errors

The responses include critical metadata for agent automation:

  • error_code, error_name, error_category — error classification
  • retryable and retry_after — backoff instructions
  • owner_action_required — whether to retry or escalate
  • ray_id, timestamp, zone — deterministic logging

Why This Matters

Instead of parsing HTML like "You have been blocked," agents now receive explicit instructions: "This block is intentional—do not retry, contact the site owner" or "You are rate-limited—wait 30 seconds and retry with exponential backoff."

The efficiency gains are dramatic: structured error responses consume 98% less bandwidth and tokens than equivalent HTML error pages. For agent workflows that encounter multiple errors, savings compound quickly.

What Developers Need to Know

This rolls out automatically across the Cloudflare network with zero configuration required. Browsers continue receiving HTML error pages as before. The schema is stable and follows RFC 9457, allowing agents to implement durable control flow without tracking presentation changes.

Currently live for 1xxx errors; Cloudflare-generated 4xx and 5xx responses will adopt the same contract next.