Agents with docs get the same results on REST and RPC APIs
Without docs, agents made about 10 incorrect calls on REST and about 28 on RPC, and then stopped.
A test team made Binstock, a new API for an inventory, in 3 styles: REST, POST only and RPC. In RPC, each endpoint (the path for one task) has the name of a task, for example updateBin. In 1,356 tests with 6 models from 2 vendors, agents that had the docs got the same rate of correct results in all 3 styles. The cost in incorrect calls and tokens (units of text) was the same.
How the test worked
The team gave one API in 3 styles with the same data. A mock tool sent a 404 error for each path that a style did not have. A script then checked that the data had the wanted change and no other change.
The numbers
With docs, all styles gave the same result. REST used about 1% less tokens. Without docs, agents on RPC made about 28 incorrect calls and then stopped. On REST they made about 10.
For each correct result, REST cost about 80,000 tokens and POST only about 230,000. RPC did not give a correct result.
What is not known
The tasks were short, and the API was new. In a test with more steps, a docs page in the project was sufficient. All tests gave a correct result.
Insight: Cost for each test hides agents that stop after a short time
Without docs, RPC tests used a small number of tokens because agents stopped after a short time. In November 2026, researchers wrote that agent records must include retries and stopped sessions. Data sets keep only the last patch. Measure the cost for each correct result, because a cost for each test helps an agent that stops. A group that compares only test cost can select the incorrect agent.
Sources
- Do AI coding agents struggle with non-REST APIs?devblogs.microsoft.com
Posted