Choosing an agent when a workflow is not a fixed script
In-depth guideAn agent is useful when the next step depends on interpreted context. A fixed sequence remains simpler when the process is predictable.
Read the guide ↗
Design tool-using workflows with clear permissions and recovery.
Worked examples, decision tables and troubleshooting to help you apply the ideas.
An agent is useful when the next step depends on interpreted context. A fixed sequence remains simpler when the process is predictable.
Read the guide ↗A tool contract should make inputs, effects and failure states explicit. Clear boundaries reduce ambiguity for both the model and the developer.
Read the guide ↗Give an agent only the access needed for its approved workflow. Narrow permissions reduce the consequences of mistakes and malicious inputs.
Read the guide ↗Retries can repeat a successful action when the response was lost. Design writes so the system can recognize an already-completed request.
Read the guide ↗Retrieved text can contain instructions that conflict with the user's task. Treat it as evidence to inspect, not authority to control tools.
Read the guide ↗A useful approval screen lets a person understand exactly what will happen. Approval without context adds friction without meaningful control.
Read the guide ↗An audit trail should explain decisions and actions while minimizing unnecessary sensitive data. Record enough to investigate outcomes, not every available detail.
Read the guide ↗An agent needs clear stopping conditions. Without limits, repeated tool use can consume resources without moving the task forward.
Read the guide ↗Recovery requires durable state about completed and pending actions. A fresh run should not guess what happened before interruption.
Read the guide ↗An agent's reliability depends on how it handles failures, not only successful tool calls. Test timeouts, invalid responses and partial completion deliberately.
Read the guide ↗A plan is a proposal, not proof that work happened. Keep execution results distinct so the system can explain progress accurately.
Read the guide ↗Some cases require judgment, authority or context that the agent does not have. A good handoff preserves useful work without pretending resolution.
Read the guide ↗A structured format makes processing easier but does not guarantee the values are correct. Validate both syntax and business rules before using the result.
Read the guide ↗Start autonomy with actions that can be inspected and undone. Increase scope only after evidence shows reliable behavior under realistic conditions.
Read the guide ↗A test environment should reproduce important behaviors without exposing production data or consequences. Its limitations need to be documented.
Read the guide ↗Secrets belong in controlled server-side mechanisms, not prompts or public client code. The model should request a capability without seeing unnecessary credentials.
Read the guide ↗Memory should serve a defined task and respect the user's context. Persisting everything can create stale assumptions and unnecessary exposure.
Read the guide ↗An agent can make individually correct tool calls and still fail the overall objective. Evaluate the end state and side effects, not just intermediate steps.
Read the guide ↗Names and descriptions can be ambiguous. Resolve the intended record before performing a write, especially when multiple entities look similar.
Read the guide ↗A production agent needs a human-readable response plan for failures. The runbook should explain how to pause, inspect and recover the workflow.
Read the guide ↗