Tasks
A Task is a concrete assignment for an Agent: what to do and what “done” looks like. The Crew’s Process decides whether tasks run in list order or are assigned by a manager agent.
Required and common fields
max_retries is deprecated; use guardrail_max_retries.
In sequential crews, later tasks usually see earlier outputs. Use context to make that dependency explicit.
Tasks in JSONC
The tasks array in crew.jsonc is execution order when process is "sequential":
context may only name already defined tasks — no forward references. Conditional tasks use "type": "ConditionalTask" plus condition (see official Tasks docs).
TaskOutput
After a run, read task.output. Common attributes: raw (default), pydantic, json_dict (only if you configured those output models), agent, messages. CrewOutput.tasks_output lists every task.
A sharp expected_output beats a longer description — the model treats it as the acceptance test. For fixed JSON, use output_pydantic; do not only say “please output JSON” in the prompt.
How execution relates to Process
- Sequential: list order; prior output becomes later context.
- Hierarchical: a manager assigns work; the Crew needs
manager_llmormanager_agent. See Crews and Processes.
Human-in-the-loop: task-level human_input=True, or Flow-level @human_feedback from the official docs (CrewAI ≥ 1.8.0). Do not invent decorator names that are not in the docs.