crewai
CrewAI framework for orchestrating multi-agent AI workflows
SKILL.mdconfig/skills/crewai/SKILL.md
GitHubCore Concepts
- Agents: Role-based autonomous entities with
role,goal,backstory,llm_config - Tasks: Atomic units of work assigned to agents with
description,expected_output,agent - Tools: Functions agents can call (
@tooldecorator orTool.from_function) for external actions - Process Flow:
Process.sequential(chain) orProcess.hierarchical(manager-agent routing) - Memory: Short-term, long-term, and entity memory between crew runs
- Custom Tools: Extend base
Toolclass or useTool.from_functionwith input schema
Common Patterns
Agent(role="Researcher", goal="Find information", backstory="...", llm=llm_config)Task(description="Analyze trends", expected_output="Report", agent=researcher)Crew(agents=[researcher, writer], tasks=[research, write], process=Process.sequential).kickoff()@tool("search_tool")decorator on functions agents can invokeTool.from_function(name="calculator", func=calc, description="Adds numbers")- Custom LLM:
config={"provider": "openai", "model": "gpt-4", "temperature": 0.7}
Best Practices
- Keep agent
goalspecific andbackstoryconcise for consistent behavior - Define
expected_outputclearly on every task to guide agent completion - Use
Process.hierarchicalonly when tasks require delegation decisions - Enable
memory=Trueon Crew for context persistence across iterations - Pin
crewaiandcrewai-toolsversions for reproducible agent behavior