mirror of
https://github.com/magnus919/agent-skills.git
synced 2026-09-16 22:16:52 +03:00
Greenfield SkillOpt: 3 epochs for CrewAI skill. Role/Goal/Backstory agent model, sequential/hierarchical processes. 11 files: SKILL.md, 6 references, 3 templates, 1 script.
1.6 KiB
1.6 KiB
CrewAI Task Design
Task Parameters
| Parameter | Required | Description |
|---|---|---|
description |
Yes | Clear description of what to do |
expected_output |
Yes | Description of what success looks like |
agent |
Yes | The agent assigned to this task |
tools |
No | Task-specific tools (overrides agent defaults) |
context |
No | List of tasks whose outputs are passed as context |
callback |
No | Function called after task completion |
human_input |
No | Request human input before marking done |
Task Examples
from crewai import Task
research = Task(
description="Research the topic thoroughly. Find at least 5 sources.",
expected_output="A comprehensive research brief with key findings and source citations.",
agent=researcher,
)
write_report = Task(
description="Write a detailed report based on the research provided.",
expected_output="A well-structured markdown report with executive summary.",
agent=writer,
context=[research], # Pass research output as context
)
Task Context Passing
Pass outputs from earlier tasks to later tasks using context:
task1 = Task(description="Research", expected_output="Research brief", agent=researcher)
task2 = Task(description="Write", expected_output="Report", agent=writer, context=[task1])
# task2 receives task1's output automatically when the crew runs
Human Input
feedback_task = Task(
description="Review the generated report",
expected_output="Approved or revised report",
agent=reviewer,
human_input=True, # Pause and ask for human input
)