2 minute readNewAgent-ready
Agents can report "the buyer accepted" without looking up an id
On the local MCP server and in the tools packages, report_outcome can leave out usage_event_id and report the last price compute_price returned on that connection, once.
Reporting whether a price was used is what learned pricing learns from, and it now takes one argument. After compute_price, an agent that hears the buyer accepted or turned the price down can call report_outcome with just outcome.
- Works on the local (stdio) MCP server and in the tools packages for LangChain, the AI SDK and the Agents SDK (
reportLastOutcomeandlastUsageEventIdon the client). A completedpricing_conversationcounts as the last price too. - In the tools packages the memory belongs to the client behind the tools. If one server answers many buyers' conversations, use a client per conversation or pass the id. Any
pricing_conversationcall that does not complete forgets the previous price. - The remembered price is reported once. A second report without an id is refused, so an outcome never lands on the wrong price twice.
- A failed
compute_priceforgets the previous price, and an answer from the public demo is never remembered. - Pass
usage_event_idwhenever you priced more than one thing. The hosted endpoint remembers nothing between calls, so it still needs the id.