Breaking Down Tasks (Task Decomposition) › Guiding the Agent's Decomposition
Michael BrenndoerferJuly 19, 20251 min read
AI Agent HandbookAll chapters Part 9 of 15Planning - Agents with a Plan
Breaking Down Tasks (Task Decomposition) › Guiding the Agent's DecompositionOne section · Sections in this chapter6 / 12 ↓
Sections in this chapter12
The way you prompt the agent significantly affects the quality of its task breakdown. Here are a few techniques that work well:
Be Explicit About What You Want
Tell the agent to decompose the task. Don't assume it will do so automatically.
In[8]:
Code## Good: Explicit instruction
prompt = """Break this request into specific, actionable subtasks:
{user_request}
List each subtask on a new line."""
## Less effective: Vague prompt
prompt = "Help me with this: {user_request}"Ask for Ordering and Dependencies
Encourage the agent to think about sequence:
In[9]:
Codeprompt = """Break down this task into ordered steps.
Arrange them so that each step can build on previous steps.
Task: {user_request}
Provide a numbered list."""Specify the Level of Detail
Sometimes you want high-level subtasks; sometimes you want very granular steps. Make this clear:
In[10]:
Code## For high-level decomposition
prompt = "Break this into 3-5 major steps: {user_request}"
## For detailed decomposition
prompt = "Break this into detailed, specific subtasks, aiming for 8-10 items: {user_request}"