Stopping the LLM from calling the same tool twice (and other things it shouldn't)
A user gave one of our agents this query: "Get the products from our catalog, summarize them in a nice doc, share the doc with X, and send them an email asking for feedback." The agent called create_doc seven times. Seven empty Google Docs showed up in the user's Drive. No catalog summary. No sharing. No email. The trace looked roughly like this: [ { "role": "assistant", "tool_call": { "name": "create_doc", "arguments": { "title": "Product Catalog Summary" } } }, { "role": "tool", "tool
