Tasks
Tasks are the major phases of work needed to achieve a goal. A goal is decomposed into tasks, and each task is further broken down into specific actions.
6 min•By Priygop Team•Updated 2026
Goal to Tasks
The relationship:
Goal → Tasks → Subtasks → Actions
Goal: 'Prepare competitor analysis and send to CEO'
Task 1: Research competitors
Task 2: Analyse findings
Task 3: Write report
Task 4: Review and approve (human step)
Task 5: Deliver report
Each task is a logical group of work that produces an intermediate result. Tasks can be assigned to different agents in a multi-agent system.
Task Definition
Task Definition
# Task structure in a planning system
from dataclasses import dataclass, field
from typing import List, Optional
@dataclass
class Task:
id: str
title: str
description: str
depends_on: List[str] = field(default_factory=list) # Task IDs this task needs first
tools_needed: List[str] = field(default_factory=list)
estimated_steps: int = 1
requires_approval: bool = False
status: str = "pending" # pending | running | complete | failed
result: Optional[dict] = None
# Plan for competitor analysis goal
plan = [
Task("T1", "Identify competitors",
"Search for top project management SaaS competitors",
tools_needed=["web_search"],
estimated_steps=3),
Task("T2", "Research each competitor",
"Get product details, pricing, and features for each company",
depends_on=["T1"],
tools_needed=["web_search", "extract_data"],
estimated_steps=9), # 3 steps × 3 competitors
Task("T3", "Write analysis report",
"Summarise findings in structured format",
depends_on=["T2"],
tools_needed=["summarise"],
estimated_steps=1),
Task("T4", "Deliver to CEO",
"Email the completed report",
depends_on=["T3"],
tools_needed=["send_email"],
requires_approval=True,
estimated_steps=1),
]
for t in plan:
deps = f" (needs: {t.depends_on})" if t.depends_on else ""
print(f"{t.id}: {t.title}{deps} — ~{t.estimated_steps} steps")