In this post
The loop
- Receive a goal and the current state.
- Ask the model to choose the next step: answer, or call a tool.
- Run the tool (search, query, code, an API) under strict limits.
- Feed the result back and repeat, or stop.
What makes it work in production
- Narrow tools. Give the agent a few well-described actions rather than open access.
- Limits. Cap steps, time, spend and permissions.
- Human checkpoints for actions that are costly or hard to undo.
- Logging of every step, so a failure can be reconstructed.
Where agents fail
Agents compound small errors: a wrong early step leads the rest astray. They can also follow instructions hidden in the content they read. Treat anything the agent reads from outside as untrusted input, and never give it more authority than the task needs.
When not to use one
If the steps are known in advance, write a normal workflow and call the model only where judgement is needed. It is cheaper, faster and easier to test. Reach for an agent when the path genuinely depends on what is found along the way.
Sources and further reading
- Anthropic. “Building effective agents.” anthropic.com/engineering/building-effective-agents.
IICTP is a new independent credential and is not ISO/IEC 17024 accredited.