Chapter 12 · Tools, agents and harnesses
Planning and subagents
Agents break big goals into steps and can hand parts to helper agents with their own context.
Chapter 12 · Tools, agents and harnesses
Agents break big goals into steps and can hand parts to helper agents with their own context.
One big goal is too much to hold in one go.
Planning means splitting a goal into smaller tasks. Subagents are helpers that each work on one branch and report back a short summary.
“Plan a trip” is too vague to act on. An agent first writes a plan: a list of smaller tasks it can do one at a time.
Goal: plan a class trip to a museum. Give each task to Main, Helper A or Helper B. Each agent does one task at a time, and a task waits for its dependencies. One agent can hold only 10 units of context.
An agent’s context is overfull, so it would start to lose track. Share some tasks with another agent.
Numbers on the bars are task numbers in the list. Each delegated task also adds 1 unit to Main’s context for the summary it returns. A simplified model.
Why give a branch to a subagent?
Which two tasks can run at the same time?
What does a subagent send back?