OpenAPI Specification
Also called OpenAPI, OAS, Swagger
A standard, machine-readable format for describing a web API, so people and software, including AI agents, can see what it offers without reading its source code.
What is the OpenAPI Specification?
The OpenAPI Specification (OAS) is a standard way to describe a web API in a YAML or JSON file. The file lists each endpoint, the inputs it accepts, the responses it returns and how to authenticate. It was formerly known as the Swagger specification.
How does it work?
Because the description is machine-readable, tools can read it to generate documentation, client code and tests. It also gives AI systems a precise description of what an API can do. Many frameworks that turn APIs into tools for agents read an OpenAPI file and create the matching function definitions automatically.
What is a simple example?
A weather service publishes an OpenAPI file describing a "get forecast" endpoint that takes a city and returns a temperature. A developer, or an AI agent, can read that file and know exactly how to call the endpoint without any extra guesswork.
Why does it matter?
A clear, shared description makes APIs easier to use correctly, by people and by software. For AI agents it works as a ready-made instruction sheet for which actions are available and what each one needs.