More and more of the calls hitting an API are not made by a developer who read the docs. They are made by an agent that was handed a goal, a handful of tools, and whatever context it could scrape together. When that agent gets your API wrong, it usually isn’t because the API is broken. It’s because nobody told the agent how the API is meant to be used, what it should never do, and when it should stop and ask a human.
The API Commons element for this is the Agent Prompt: “a prompt designed for autonomous agents — instructions, context, and guardrails for driving the API as a tool inside an agentic workflow.” It is the provider writing down, once and on purpose, the instructions they would otherwise leave every agent builder to guess at.
It sits next to a few elements that are easy to confuse with it. A Prompt is a reusable prompt that helps a human or an agent accomplish a task. A Prompt Template is a parameterized version of that. Agent Skills package instructions and tools together, and llms.txt is a map of your content for AI tools. The Agent Prompt is narrower than all of them: it is the standing instructions for an agent operating your API on its own, with the guardrails spelled out. I’ll be honest that the lines between these blur, and a provider publishing a good set of Agent Skills may well have folded their agent prompt inside it. I’d still rather see it called out as its own thing, because the guardrails are the part people skip.
What it looks like
In an APIs.json file, the Agent Prompt is a property on the API, pointing at wherever the prompt lives:
- type: AgentPrompt
url: https://developers.example.com/agent-prompt
That URL usually lands in the developer portal, next to the documentation and any AI or agent section, as a plain text or Markdown page that can be read by a person and fetched by a machine without any rendering getting in the way.
Why it matters
For consumers, an Agent Prompt is a head start. Anyone wiring your API into an agent has to write this prompt anyway. If you publish one, they begin from the provider’s understanding of the API rather than their own reading of the reference docs, and the result is fewer surprised support tickets about things the agent did that no human would have.
For agents, it is the difference between inferring intent and being told it. An OpenAPI document tells an agent what operations exist and what shapes they take. It doesn’t say which operation is the normal path and which is the dangerous one, that a delete can’t be undone, that a list should be paginated rather than pulled whole, or that a payment should never be retried without checking whether the first one went through. Those are exactly the things an agent needs to hear, and exactly the things that don’t fit in a schema.
It also matters for the provider. A published Agent Prompt is a statement of how you expect your API to be used by machines. When something goes wrong, there is something to point to, and something to improve.
Getting it right
- Lead with guardrails, not marketing. Say what the agent must not do, what needs human confirmation, and what is irreversible. A prompt that only describes how great the API is gives an agent nothing to act on.
- Point at the machine-readable truth. Reference your OpenAPI, your authentication flow and your rate limits rather than restating them, so the prompt doesn’t quietly drift away from the API as it changes.
- Keep it plain and fetchable. Plain text or Markdown at a stable URL, no login wall, no JavaScript required to read it. If an agent can’t fetch it, it doesn’t exist.
- Version it with the API. When operations change, the prompt changes. Treat it like documentation that ships with a release, not a blog post written once.
This is still a rarely published element. Most providers have not written one, and many who have bury it inside a skill or a tutorial. That makes it an easy place to get ahead: a page of honest instructions and limits is cheap to write and does real work every time an agent picks up your API.
You can find the element at apicommons.org/common/agent-prompt. If the definition is missing something, or you think it overlaps too much with Prompt or Agent Skills, suggest a change at github.com/api-commons/api-commons.