Chapter 17: An Agent Is Just Another Tool
Lecture
Chapter principle
Key takeaways
- An agent can be exposed through the same invocation contract as a tool.
- Agent-tools differ operationally: their path, cost, latency and failures can vary.
- Delegated autonomy should include explicit budgets and permissions.
- Structured failure allows the parent to retain control.
- Delegation is also context engineering and a security boundary.
- Nested traces should expose the work hidden behind parent calls.
Experiments
Every experiment in the book is small, runnable and printed with its real output. In the Lab you can replay a recorded real run of each one, with no programming, and watch what the model and the agent do.
Experiment 31: Agent as tool
What happens when one agent hands part of its job to another agent?
A parent agent must find a value X in company reports, then calculate X × 1.10. It has a calculator and a researcher. The researcher is a complete second agent with its own model, a search tool and a limit of 5 steps, and the parent calls it like any tool. This happens three times: the reports contain X; the reports contain nothing; each report only points to the next one. This is a recorded run of real models. A new run may search differently.
All the code for this chapter: github.com/agentic-engineering-book/code
Download the bookBrowse all chapters