Back to Curriculum

Task Decomposition Logic: The Anatomy of Complex Execution

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.

πŸ—οΈ The Decomposition Hierarchy

  1. The Objective: "Generate a 10-page technical SEO report."
  2. The Tasks (Level 1):
    • Task A: Crawl the homepage for metadata.
    • Task B: Fetch PageSpeed Insights (PSI) data.
    • Task C: Analyze competitor backlink profile.
  3. The Sub-Tasks (Level 2):
    • Task A.1: Identify missing H1 tags.
    • Task A.2: Check for alt-text on all images.

πŸ› οΈ Technical Snippet: The Decomposition Orchestrator Prompt

### 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.

πŸ” Nuance: Linear vs. Recursive Decomposition

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.


⚑ Practice Lab: The Goal Breaker

  1. Input Goal: "Build a complete Instagram content strategy for a week."
  2. Decompose: Break this into 10 atomic tasks. (e.g., Task 1: Research 5 trending hashtags in Karachi).
  3. Validate: Ensure each task has a clear Input, Logic, and Output.

πŸ“ Homework: The Agent Blueprint

Design a decomposition logic for an agent that "Auto-Fixes Python Import Errors." Define exactly what the agent should check first, second, and third.