Workflow-Shaped Tools
In this article
- Count the actions a model must choose on a raw API path and name the places where that path goes wrong.
- Combine the steps of one task into a workflow-shaped tool that runs the checks in code and keeps the approval wait and the step results visible.
- Spot a mega-tool whose action field hides a read and a write.
- Decide from failure traces which endpoints to combine, keep as they are or hide from the model.
- Terms defined here: workflow-shaped tool.
Overview
Your backend already has an endpoint for every operation: read an order, create a refund, change an address. Handing each one to a model as a tool feels like the honest, complete design. Then you read the logs and find refunds paid without anyone reading the order first, refunds paid twice, and one refund paid in two halves. Each call was valid on its own. The order of the calls was the problem.
So which steps should the model choose, and which should your code run? Next you will count the choices a raw path leaves to the model, combine one task's steps into a single tool without hiding the approval or the evidence, spot the one-tool-does-everything trap, and decide from real failures which endpoints to combine, keep or hide.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Four choices for one refund
- Where the raw path breaks
- One call, checks in code
- Keeping the wait visible
- The mega-tool trap
- Combine, keep or hide
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions