Even AI agents need contextual information about how and when to use or not an API/endpoint. Pure API references are utterly boring and have very low readability. Readers, whether they’re humans (developers, project managers, etc) or AI agents, crave for stories and narratives in general. API documentation that doesn’t provide that is totally useless.
“When an agent starts a task, it has to answer a few questions before it writes any code. Which product fits the task? Is there a newer version of the API than the one in its training data? What mistakes do developers commonly make with this API? Where’s the guide that has the details?
Regular docs answer these questions, but the answers are spread across overviews, migration guides, troubleshooting pages, and release notes. The quick reference puts the answers on one page, in sections that are each short enough to fit in a chunk.
A few details about the format probably matter more for retrieval than they appear to. For example, every heading repeats the product name, as in “Places API (New): common mistakes.” The repetition looks redundant to a human reader. However, as I described in Chunking your content for agent readability, a chunk can arrive without the headings above it, so the section heading might be the only text that identifies which product the chunk describes.
The “don’t use when” list is also something that regular docs rarely include. Product docs generally describe what a product does, and they don’t often tell you to go use a different product. For an agent that is choosing between the web service, the Android SDK, the iOS SDK, and the JavaScript API, the “don’t use when” list could be the most useful part of the page. Being explicit about negative boundaries might be one of those conventions we embrace when writing for agents.”
https://idratherbewriting.com/blog/quick-reference-agent-intelligence
#TechnicalWriting #APIs #APIDocumentation #AI #AIAgents #References #SoftwareDocumentation
@remixtures i'd test those 'don't use when' notes with pairs of near-identical tasks: one needs the REST API, another should use the SDK. if an agent picks the same tool for both, the negative guidance isn't affecting its choice. seems like a useful docs regression test beyond checking whether RAG retrieved the page.