# The gap between an interface and an agent experience OpenAPI documents endpoints, request and response schemas, auth schemes, and response codes. That makes it a necessary foundation. It does not make an API ready for autonomous agents.
Agents ask operational questions OpenAPI wasn't designed to carry: Can I discover this API? Can I authenticate by myself? What does this operation actually do? How should I recover if it fails? Can I trust claims about the API?
# A concrete payments example
- The API returns "status": "pending" — is that a 2-second delay, hours, or an error? The spec doesn't say.
- The agent retries POST /payments after a timeout and creates a duplicate payment because the operation wasn't idempotent.
# The structural gap: what layers agents need Agent Readiness is a stack of machine-readable layers that build on OpenAPI. Missing any layer creates a failure point for autonomous usage.
- Discovery: make APIs findable by agents (examples include llms.txt or.well-known endpoints). Without discovery, an agent might never locate the API.
- Authentication metadata: provide machine-readable OAuth/OIDC flows and token endpoints so an agent can obtain credentials without human intervention.
- Semantics: declare side effects, idempotency, safety classifications, and preconditions for operations so agents know when and how to act.
- Examples: include concrete request/response pairs for every operation to reduce guessing that leads to 400s.
- Evidence: publish verifiable, machine-readable proofs for claims about the API (uptime, SLA, agent-readiness badges) rather than marketing statements.
# Why smarter models don't solve this A more capable model does not magically know idempotency, business rules, or allowed state transitions if those facts are not exposed in machine-readable form. The limitation is structural: the knowledge must be published in a format the agent can parse and act on.
# Practical implications for API teams If you expect autonomous agents to use your API, treat OpenAPI as the base layer, not the whole solution. Add explicit, machine-readable documentation for discovery and auth flows. Annotate operations with semantic metadata (is this action billing, reversible, idempotent?). Return structured errors with recovery guidance. Provide concrete examples. Finally, publish verifiable evidence that those layers are present and tested.
# A checklist to improve agent readiness
- Publish a discovery endpoint so agents can find the API automatically.
- Provide machine-readable auth metadata (token endpoints, scopes, grant types).
- Annotate operations with idempotency and side-effect metadata.
- Return structured error objects with actionable recovery hints.
- Ship request/response examples for every operation.
- Produce verifiable evidence (tests, badge, or proof endpoints) showing the readiness layers are implemented.
These steps reduce the mismatch between the interface OpenAPI describes and the operational reality an autonomous agent needs to act safely and reliably.