Task Decomposition
Task decomposition is the process of breaking a complex goal into smaller, manageable pieces. It is the most important planning skill for building agents that can handle real-world complexity.
8 min•By Priygop Team•Updated 2026
Decomposition Strategies
- Sequential decomposition: break the goal into steps that must happen in order, where each step depends on the previous
- Parallel decomposition: identify steps that can run simultaneously to save time
- Divide and conquer: split a large dataset into chunks, process each chunk, then combine results
- Hierarchical decomposition: break goals into tasks, tasks into subtasks, subtasks into actions
- Checklist decomposition: for well-understood workflows, create a fixed list of steps to execute in order
Decomposition Example
Decomposition Example
# Decompose a complex business goal
def decompose_goal(goal: str) -> dict:
"""
Full task decomposition for a competitor analysis goal.
Returns a structured plan with phases, tasks, and dependencies.
"""
plan = {
"goal": goal,
"phases": [
{
"phase": 1,
"name": "Discovery",
"tasks": [
{
"id": "P1T1",
"action": "web_search",
"description": "Find top competitors",
"args": {"query": "top project management SaaS tools 2024"},
"expected_output": "List of 5-10 competitor names",
"depends_on": [],
}
]
},
{
"phase": 2,
"name": "Research",
"description": "Research each competitor found in phase 1",
"tasks": [
# Generated dynamically based on phase 1 results
# Each competitor → (search → extract → validate) subtasks
],
"depends_on_phase": 1
},
{
"phase": 3,
"name": "Analysis",
"tasks": [
{
"id": "P3T1",
"action": "analyse_and_compare",
"description": "Compare all competitors across pricing, features, target market",
"depends_on": ["phase_2_complete"],
}
]
},
{
"phase": 4,
"name": "Delivery",
"tasks": [
{
"id": "P4T1",
"action": "write_report",
"description": "Create structured analysis document",
"depends_on": ["P3T1"],
},
{
"id": "P4T2",
"action": "send_email",
"description": "Email report to CEO",
"depends_on": ["P4T1"],
"requires_approval": True,
}
]
}
]
}
return plan
plan = decompose_goal("Competitor analysis report for CEO")
print(f"Plan has {len(plan['phases'])} phases")
for phase in plan["phases"]:
print(f" Phase {phase['phase']}: {phase['name']}")Key Takeaways
- Task decomposition is the process of breaking a complex goal into smaller, manageable pieces.
- Sequential decomposition: break the goal into steps that must happen in order, where each step depends on the previous
- Parallel decomposition: identify steps that can run simultaneously to save time
- Divide and conquer: split a large dataset into chunks, process each chunk, then combine results