This directory contains examples demonstrating the CrewAI Flows pattern - a powerful orchestration framework for managing complex, multi-crew workflows with state management.
CrewAI Flows allow you to:
- Orchestrate multiple crews in sequence or parallel
- Manage state across different execution steps
- Implement conditional logic and routing
- Create human-in-the-loop workflows
- Build complex automation pipelines
Multi-crew content generation system that:
- Routes requests to specialized crews (Blog, LinkedIn, Research)
- Generates professional content across different formats
- Uses advanced orchestration with dynamic routing
- Demonstrates complex multi-agent workflows
Automated email monitoring and response generation system that:
- Monitors Gmail inbox at regular intervals
- Filters and categorizes incoming emails
- Generates appropriate draft responses
- Maintains state of processed emails
Lead qualification and outreach automation that:
- Processes leads from CSV files
- Scores and ranks leads based on criteria
- Implements human review for top candidates
- Generates personalized outreach emails
Meeting productivity automation that:
- Processes meeting transcripts and notes
- Extracts action items and decisions
- Creates tasks in Trello
- Sends notifications via Slack
Iterative content improvement system that:
- Generates content (e.g., social media posts)
- Self-evaluates against criteria
- Automatically refines based on feedback
- Implements retry logic with limits
Book creation automation that:
- Generates book outlines
- Writes chapters in parallel
- Maintains consistency across sections
- Compiles final manuscript
# Execute crews one after another
flow = Flow()
flow.add_crew(crew1)
flow.add_crew(crew2)# Execute multiple crews simultaneously
await flow.run_parallel([crew1, crew2, crew3])# Route based on previous results
@flow.router
def route_based_on_result(state):
if state.score > 0.8:
return "high_quality_path"
return "needs_improvement_path"# Pause for human input
human_feedback = flow.wait_for_input("Review these results")Each example includes:
- Complete working code
- Configuration files
- README with specific instructions
- Required dependencies
Choose an example that matches your use case and follow its README for setup instructions.