Autonomous agents fail when they attempt to solve a "Macro Goal" in a single step. In this lesson, we learn the technical logic of Task Decompositionβthe process of breaking a complex objective into atomic, executable units.
### macro_goal
Deploy an automated lead scoring system for a Real Estate client.
### decomposition_logic
1. Parse the 'Leads' CSV for incomplete phone numbers.
2. Enrich verified emails using the Abstract API.
3. Score each lead (1-10) based on their company's estimated revenue.
4. Flag leads with a score > 8 for immediate human follow-up.
### constraints
Execute Step 1 and Step 2 in parallel. Step 3 depends on the output of Step 2.
Simple agents use linear decomposition. Advanced swarms use Recursive Decomposition, where an agent evaluates if a task is "too complex" and automatically spawns sub-agents to handle the smaller parts.
Design a decomposition logic for an agent that "Auto-Fixes Python Import Errors." Define exactly what the agent should check first, second, and third.