How It Works
from crewai import Agent, Task, Crew
researcher = Agent(
role="Senior Researcher",
goal="Find the latest AI trends",
tools=[search_tool, web_scraper],
)
writer = Agent(
role="Content Writer",
goal="Write engaging articles based on research",
)
research_task = Task(description="Research AI trends for 2025", agent=researcher)
write_task = Task(description="Write a blog post from the research", agent=writer)
crew = Crew(agents=[researcher, writer], tasks=[research_task, write_task])
result = crew.kickoff()Key Features
- Role-based agents with distinct personalities and tools
- Sequential & parallel task execution
- Human-in-the-loop for critical decisions
- Memory for cross-task context retention
- 30+ built-in tools (search, scrape, file I/O, etc.)