Microsoft Benchmark Finds AI Coding Agents Match REST With Non-REST APIs Only When Docs Exist
Microsoft's 1,356-run benchmark finds AI coding agents handle REST, POST-only and RPC APIs alike when docs exist, but REST wins without them.
Listen
Microsoft's developer team has published a benchmark showing that AI coding agents succeeded as often against REST, POST-only and RPC-style APIs when the agent could read documentation. The test covered six models from two vendors across 1,356 runs, and it bears directly on how teams should expose APIs to agents: the outcome turned on documentation, not on how endpoints were named.
The usual worry is that a non-REST design makes an agent work harder. The benchmark suggests that worry targets the wrong variable. Where documentation is missing, REST has a clear advantage, and that gap matters more for a team's roadmap than the purity of its verb usage.
What the AI coding agents were asked to do
Microsoft's developer team compared three API styles. The first was a conventional REST interface. The second was a POST-only variant that keeps REST resource paths but restricts the API to GET and POST. The third was an RPC-style interface whose endpoints are named after actions, such as the operation performed rather than the resource acted on.
The API under test was a fictional inventory service, so no model could have memorised it. The study used 15 tasks. Each run was graded by checking the final state of the service against the expected result, not the route the agent took, which means any valid sequence of calls that produced the right state counted as a pass.
One task was built as a trap. The request was to change a single field, and a full replace of the record would have wiped the other fields. Grading checked that the final state equalled the seed data plus only the intended change. Wrong guesses showed up as 404 responses in the proxy log, so failure modes were visible in the logs rather than inferred from the agent's output.
Documentation moves the result more than API style
With documentation available, the three styles produced essentially the same success rates. The cost in failed calls and tokens did not differ between them either. In this setup, the presence of documentation was the variable that changed outcomes, while the choice between REST, POST-only and RPC made little difference.
Without documentation the picture reverses. REST won by a wide margin. The reason is that agents can infer REST paths and HTTP methods from convention, and convention also shows what an RPC endpoint is called. An agent that has never seen a service has a reasonable chance of guessing GET /orders/{id}, but no realistic chance of guessing the name a team chose for a refund action.
For API owners, this moves the design question. Choosing a style for agent consumption is less about URL purity and more about whether the reference an agent reads is complete, current and easy to search. The benchmark's own framing makes the same point: the condition with documentation is the one most favourable to non-REST styles, so a team that ships thin docs should expect the REST advantage to appear.
Why the test separated method limits from naming
Non-REST designs usually change two things together. They restrict the API to GET and POST, and they replace resource paths with verb-named endpoints. The POST-only variant pulls those apart. Set against REST, it isolates the effect of the restricted HTTP methods. Set against the RPC interface, it isolates the effect of verb naming. That split is what allows the study to say that method restriction alone did not decide outcomes when documentation was present.
The design also reflects a practical point about how teams evaluate agents. A pass or fail judged by final state rewards any correct route, which is closer to how a developer would judge the result than a check on the exact endpoint called. The tradeoff is that the grading cannot tell an agent that stumbled into the right answer from one that reasoned its way there, so the pass rate measures outcomes rather than reliability over repeated runs.
The case for caution: scale, messy docs and endpoint counts
The evidence is narrow. It covers one fictional API, six models and 15 tasks. Microsoft set its decision rules before the first run. Two API styles counted as equivalent only if the 95 per cent confidence interval on the difference in success rate stayed within 10 percentage points, and a general claim needed agreement across at least three models. Those are sound safeguards for a small study, but a small study cannot establish how the result holds for a large production service.
The study's authors point to that gap themselves. A production API with inconsistent or partly stale documentation may give an agent less dependable guidance than a clean mock, and the benchmark does not measure that condition.
A second counter-position comes from outside Microsoft. A WSO2 platform guide, which we read as a vendor argument rather than independent measurement, contends that raw endpoints are the wrong interface for agents at scale. Its reasoning is that exposing each endpoint as a separate tool forces the model to compare numerous possible calls and map out the order of steps on its own, which burns extra tokens and creates more openings for poor selections. The same guide notes that most deployments place an MCP server beside an existing REST API rather than replacing it. That argument concerns how many tools an agent must choose among, a factor the 15-task benchmark does not vary, so the two findings answer different questions.
The WSO2 guide also describes a cost that sits outside the API style debate altogether. Every API has its own authentication method, paging approach and error layout, so linking multiple agents to multiple APIs requires a separate adapter for each combination; the guide labels this the M×N problem. Documentation can describe those differences, but it cannot remove the adapter work, so a team with many internal services should budget for that effort whichever style it picks. The guide also reports that authorization varies by service, with one API using an API key, another a client-credentials token and a third mTLS, which means an agent's documentation has to cover credentials as well as endpoints.
What the agent pipeline implies for documentation
Microsoft's own AX series describes how a coding agent reaches an API. The harness assembles a context window from the system prompt, tool descriptions, workspace files and the developer's prompt, and the model then decides whether to call a tool or rely on what it already knows. In that series, the team warns that when a tool returns a large volume of documentation where a short excerpt would be enough, it crowds out other useful context from the window. The same walkthrough describes the same tension from the other side: a reference that is too long can be skimmed and misread.
Put the two results together and the implication is a tension. The benchmark says documentation is what lets an agent succeed with an unfamiliar, non-REST API. The AX series says that documentation consumes the same scarce context that the agent needs for the task. The useful documentation is therefore concise, task-oriented and searchable, not simply complete. The AX stack article frames the same problem as four checks: discovery, selection, quality and composition. Documentation touches selection and quality most directly, and the benchmark's result shows why those two checks can decide the outcome when naming does not.
Error output is the other half of that loop. The AX series notes that an agent takes error messages literally and may iterate in the wrong direction for many turns when a message is vague, such as a bare operation failure. In our reading, the 404 responses that the benchmark logged are a useful model for what a clear failure looks like: a specific signal that tells the agent its guess was wrong. A team that documents its endpoints but returns opaque errors on a verb-named route would lose much of the benefit the study measured, because the agent would have no way to recover from a wrong guess.
Legacy estates are where this matters most. A team with an RPC-style service that already has complete documentation sits close to the benchmark's most favourable condition, while a team with a POST-only service and no reference sits close to its least favourable one. The difference between those two teams is a documentation task measured in days, not a redesign measured in quarters, and that asymmetry is the practical core of the study.
For buyers of agent tooling, the benchmark gives a concrete test to run. Ask whether an agent can reach the correct final state using the documentation the product actually ships, not a curated version. A vendor that says REST is required for agent compatibility is making a claim that this evidence does not support when documentation is supplied.
The verdict is clear for teams that already own a REST API with good documentation: keep it, and spend the effort on making the reference easy for an agent to search. For teams with an RPC or POST-only interface and thin docs, the benchmark points to a concrete gap that documentation work can close before any redesign. We would not treat the result as a green light for every non-REST design at production scale until a test with a larger API, messier docs and more tasks is published. The next data point to watch is whether Microsoft extends the 15-task set or runs the same comparison on a production-style service.
Related Articles
- IBM and Artificial Analysis Debut ITBench-AA to Test AI Agents on Enterprise IT Tasks
- AI coding agents check less when an upgrade says patch
- Microsoft's MAI Code 2 Models Bring In-House Coding AI to Copilot
✔Human Verified
Researched and cross-referenced against primary sources by the bytevyte editorial team. This article was generated with the assistance of artificial intelligence and reviewed by the bytevyte editorial team.