Agents in products
Use a fixed workflow when the steps are known. Cap every agent run, ask before acts that cannot be undone, keep a full trace and survive restarts.
- Required 2
- Recommended 8
Required
Stop every agent run at fixed limits set in code
AIF-71Enforce a step limit, a time limit and a spend limit on every agent run in code. Examples are 10 steps, 2 minutes and 1 dollar. Add a daily spend limit per user. The model can never raise them.
Ask a person before an agent does what cannot be undone
AIF-70List every tool that spends money, deletes data, sends a message to other people or changes access. An agent may run one only after the user approves that exact action in your own interface.
Recommended
Use a fixed workflow when the steps are known
AIF-52Build a fixed sequence of model calls and code when the steps of a task are known in advance. Use an agent loop, where the model picks the next tool, only when they are not.
End every agent run with a known status
AIF-53End every agent run in one of a fixed set of statuses and show it to the user. Examples are done, waiting for approval, approval expired, step limit, time limit, budget limit and failed.
Record every step of every run
AIF-54Store each step of an agent run with its tool name, arguments, a short result, the time and the cost. Let support and the user see what the agent did.
Let runs pause and resume
AIF-55Save an agent run's state after every step, so it can wait for approval and survive a restart. Expire pending approvals after a set time, such as 24 hours.
Test agents by the end state
AIF-56Test an agent with scenarios that check the final state and the actions it must never take, not the exact sequence of steps.
Give each sub-agent no more power than the agent that started it
AIF-72When one agent hands work to another, pass on the user and the run's remaining steps and budget. Pass a tool list that is a subset of its own. Record the parent run ID on every step.
Connect product agents only to tools and servers on a reviewed list
AIF-73Let an agent in your product call only tools and MCP servers on a list in version control, each pinned to a version. Call them with the signed-in user's own token, never a shared admin key.
Run browser and computer-use agents in a throwaway session
AIF-74Run each browser or computer-use agent in a fresh, isolated browser profile or virtual machine with no saved logins. Limit it to listed domains, and ask the user before it submits a purchase, a message or terms.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ai-features/agents-in-products">Agent Wranglers AI features playbook</a>. In code you write, add a comment next to it with the same link.