mirror of
https://github.com/crewAIInc/crewAI-examples.git
synced 2026-01-07 21:13:52 -05:00
Reorganize repo structure and upgrade to CrewAI 0.152.0 (#277)
* Reorganize repo structure and upgrade to CrewAI 0.152.0 * chore(gitignore): ignore Python bytecode and __pycache__ across templates * chore(gitignore): ignore Python bytecode and __pycache__ across templates; clean tracked artifacts * Update crews/instagram_post/pyproject.toml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
22
.gitignore
vendored
22
.gitignore
vendored
@@ -1,2 +1,22 @@
|
||||
.DS_Store
|
||||
.env
|
||||
.env
|
||||
.venv
|
||||
.claude
|
||||
|
||||
# Python bytecode
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
|
||||
# Build artifacts
|
||||
build/
|
||||
dist/
|
||||
*.egg-info/
|
||||
|
||||
# Caches
|
||||
.pytest_cache/
|
||||
.mypy_cache/
|
||||
.ruff_cache/
|
||||
|
||||
# Jupyter
|
||||
.ipynb_checkpoints/
|
||||
158
README.md
158
README.md
@@ -1,31 +1,141 @@
|
||||
# Examples for crewAI
|
||||
# CrewAI Full Examples
|
||||
|
||||
## Introduction
|
||||
crewAI is designed to facilitate the collaboration of role-playing AI agents.
|
||||
This is a collection of examples of different ways to use the crewAI framework to automate the processes.
|
||||
By [@joaomdmoura](https://x.com/joaomdmoura).
|
||||
Welcome to the official collection of **complete CrewAI applications**. This repository contains end-to-end implementations that showcase how to build real-world applications using CrewAI's framework for orchestrating AI agents.
|
||||
|
||||
**Note**: All examples have been standardized to use **CrewAI version 0.130.0** for consistency and compatibility.
|
||||
> **🍳 Looking for feature-specific tutorials?** Check out [CrewAI Cookbook](https://github.com/crewAIInc/crewAI-cookbook) for focused guides on specific CrewAI features and patterns.
|
||||
|
||||
## Examples
|
||||
- [Marketing Strategy](https://github.com/joaomdmoura/crewAI-examples/tree/main/marketing_strategy)
|
||||
- [Surprise Trip](https://github.com/joaomdmoura/crewAI-examples/tree/main/surprise_trip)
|
||||
- [Match to Proposal](https://github.com/joaomdmoura/crewAI-examples/tree/main/match_profile_to_positions)
|
||||
- [Find Job Candidades Demo](https://github.com/joaomdmoura/crewAI-examples/tree/main/recruitment)
|
||||
- [Create Job Posting](https://github.com/joaomdmoura/crewAI-examples/tree/main/job-posting)
|
||||
- [Game Generator](https://github.com/joaomdmoura/crewAI-examples/tree/main/game-builder-crew)
|
||||
## What You'll Find Here
|
||||
|
||||
## Old Examples, need to be updated
|
||||
These are **full applications** that demonstrate:
|
||||
- Complete project structures and organization
|
||||
- Real-world integration patterns (APIs, databases, external services)
|
||||
- Comprehensive code implementations with error handling
|
||||
- End-to-end workflows from input to output
|
||||
- Industry-specific implementations across various domains
|
||||
|
||||
### Basic Examples
|
||||
Each example is a standalone application you can run, modify, and deploy.
|
||||
|
||||
- [Trip Planner](https://github.com/joaomdmoura/crewAI-examples/tree/main/trip_planner)
|
||||
- [Create Instagram Post](https://github.com/joaomdmoura/crewAI-examples/tree/main/instagram_post)
|
||||
- [Markdown Validator](https://github.com/joaomdmoura/crewAI-examples/tree/main/markdown_validator)
|
||||
- [Using Azure OpenAI API](https://github.com/joaomdmoura/crewAI-examples/tree/main/azure_model)
|
||||
**Note**: All examples use **CrewAI version 0.152.0** and **UV package management** for optimal performance and developer experience.
|
||||
|
||||
Starting your own example
|
||||
- [Starter Template](https://github.com/joaomdmoura/crewAI-examples/tree/main//starter_template)
|
||||
### Advanced Examples
|
||||
- [Stock Analysis](https://github.com/joaomdmoura/crewAI-examples/tree/main/stock_analysis)
|
||||
- [Landing Page Generator](https://github.com/joaomdmoura/crewAI-examples/tree/main/landing_page_generator)
|
||||
- [CrewAI + LangGraph](https://github.com/joaomdmoura/crewAI-examples/tree/main/CrewAI-LangGraph)
|
||||
## 📁 Repository Structure
|
||||
|
||||
### 🌊 [Flows](/flows)
|
||||
Advanced orchestration examples using CrewAI Flows for complex workflows with state management.
|
||||
|
||||
- [Content Creator Flow](flows/content_creator_flow) - Multi-crew content generation system for blogs, LinkedIn posts, and research reports
|
||||
- [Email Auto Responder Flow](flows/email_auto_responder_flow) - Automated email monitoring and response generation
|
||||
- [Lead Score Flow](flows/lead-score-flow) - Lead qualification with human-in-the-loop review
|
||||
- [Meeting Assistant Flow](flows/meeting_assistant_flow) - Meeting notes processing with Trello/Slack integration
|
||||
- [Self Evaluation Loop Flow](flows/self_evaluation_loop_flow) - Iterative content improvement with self-review
|
||||
- [Write a Book with Flows](flows/write_a_book_with_flows) - Automated book writing with parallel chapter generation
|
||||
|
||||
### 👥 [Crews](/crews)
|
||||
Traditional CrewAI implementations showcasing multi-agent collaboration.
|
||||
|
||||
#### Content Creation & Marketing
|
||||
- [Game Builder Crew](crews/game-builder-crew) - Multi-agent team that designs and builds Python games
|
||||
- [Instagram Post](crews/instagram_post) - Creative social media content generation
|
||||
- [Landing Page Generator](crews/landing_page_generator) - Full landing page creation from concepts
|
||||
- [Marketing Strategy](crews/marketing_strategy) - Comprehensive marketing campaign development
|
||||
- [Screenplay Writer](crews/screenplay_writer) - Convert text/emails into screenplay format
|
||||
|
||||
#### Business & Productivity
|
||||
- [Job Posting](crews/job-posting) - Automated job description creation
|
||||
- [Prep for a Meeting](crews/prep-for-a-meeting) - Meeting preparation research and strategy
|
||||
- [Recruitment](crews/recruitment) - Automated candidate sourcing and evaluation
|
||||
- [Stock Analysis](crews/stock_analysis) - Financial analysis with SEC data integration
|
||||
|
||||
#### Data & Research
|
||||
- [Industry Agents](crews/industry-agents) - Industry-specific agent implementations
|
||||
- [Match Profile to Positions](crews/match_profile_to_positions) - CV-to-job matching with vector search
|
||||
- [Meta Quest Knowledge](crews/meta_quest_knowledge) - PDF-based Q&A system
|
||||
- [Markdown Validator](crews/markdown_validator) - Automated markdown validation and correction
|
||||
|
||||
#### Travel & Planning
|
||||
- [Surprise Trip](crews/surprise_trip) - Personalized surprise travel planning
|
||||
- [Trip Planner](crews/trip_planner) - Destination comparison and itinerary optimization
|
||||
|
||||
#### Templates
|
||||
- [Starter Template](crews/starter_template) - Basic template for new CrewAI projects
|
||||
|
||||
### 🔌 [Integrations](/integrations)
|
||||
Examples showing CrewAI integration with other platforms and services.
|
||||
|
||||
- [CrewAI-LangGraph](integrations/CrewAI-LangGraph) - Integration with LangGraph framework
|
||||
- [Azure Model](integrations/azure_model) - Using CrewAI with Azure OpenAI
|
||||
- [NVIDIA Models](integrations/nvidia_models) - Integration with NVIDIA's AI ecosystem
|
||||
|
||||
### 📓 [Notebooks](/Notebooks)
|
||||
Jupyter notebook examples for interactive exploration and learning.
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
1. **Clone the repository**
|
||||
```bash
|
||||
git clone https://github.com/crewAIInc/crewAI-examples.git
|
||||
cd crewAI-examples
|
||||
```
|
||||
|
||||
2. **Choose an example category**
|
||||
- For multi-crew orchestration → check `/flows`
|
||||
- For standard crews → check `/crews`
|
||||
- For platform integrations → check `/integrations`
|
||||
|
||||
3. **Navigate to specific example**
|
||||
```bash
|
||||
cd crews/marketing_strategy # or any other example
|
||||
```
|
||||
|
||||
4. **Install dependencies with UV**
|
||||
```bash
|
||||
uv sync # Installs all dependencies and creates virtual environment
|
||||
```
|
||||
|
||||
5. **Follow the example's README**
|
||||
Each example contains specific setup instructions and usage guides
|
||||
|
||||
## 📚 Learning Path
|
||||
|
||||
### Beginners
|
||||
Start with:
|
||||
1. [Starter Template](crews/starter_template) - Basic crew structure
|
||||
2. [Instagram Post](crews/instagram_post) - Simple content creation
|
||||
3. [Job Posting](crews/job-posting) - Straightforward business use case
|
||||
|
||||
### Intermediate
|
||||
Explore:
|
||||
1. [Marketing Strategy](crews/marketing_strategy) - Multi-agent collaboration
|
||||
2. [Self Evaluation Loop Flow](flows/self_evaluation_loop_flow) - Iterative workflows
|
||||
3. [Stock Analysis](crews/stock_analysis) - External API integration
|
||||
|
||||
### Advanced
|
||||
Deep dive into:
|
||||
1. [Content Creator Flow](flows/content_creator_flow) - Multi-crew orchestration with dynamic routing
|
||||
2. [Write a Book with Flows](flows/write_a_book_with_flows) - Complex parallel execution
|
||||
3. [Lead Score Flow](flows/lead-score-flow) - Human-in-the-loop patterns
|
||||
4. [CrewAI-LangGraph](integrations/CrewAI-LangGraph) - Framework integration
|
||||
|
||||
## 🛠 Common Patterns
|
||||
|
||||
- **Configuration**: Most examples use YAML files for agent/task definitions
|
||||
- **Tools**: Examples showcase integration with APIs, databases, and file systems
|
||||
- **Flows**: Advanced examples demonstrate state management and orchestration
|
||||
- **Training**: Several examples include agent training capabilities
|
||||
|
||||
## 📝 Contributing
|
||||
|
||||
We welcome contributions! Please feel free to submit examples showcasing new use cases or improvements to existing ones.
|
||||
|
||||
## 📄 License
|
||||
|
||||
This repository is maintained by the CrewAI team. Check individual examples for specific licensing information.
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Related Resources
|
||||
|
||||
- **[CrewAI Framework](https://github.com/crewAIInc/crewAI)** - Main CrewAI repository
|
||||
- **[CrewAI Cookbooks](https://github.com/crewAIInc/crewAI-cookbook)** - Feature-focused tutorials and guides
|
||||
- **[CrewAI Documentation](https://docs.crewai.com)** - Comprehensive documentation
|
||||
- **[CrewAI Community](https://community.crewai.com)** - Join our community discussions
|
||||
86
crews/README.md
Normal file
86
crews/README.md
Normal file
@@ -0,0 +1,86 @@
|
||||
# CrewAI Standard Crews Examples
|
||||
|
||||
This directory contains examples of traditional CrewAI implementations - autonomous agent teams working together to accomplish complex tasks.
|
||||
|
||||
## What are CrewAI Crews?
|
||||
|
||||
A CrewAI Crew is a team of AI agents, each with specific roles and goals, working together to complete tasks. Key components include:
|
||||
- **Agents**: Autonomous AI entities with specific roles and expertise
|
||||
- **Tasks**: Defined objectives that agents work to complete
|
||||
- **Tools**: Functions and integrations agents can use
|
||||
- **Process**: Sequential or hierarchical task execution
|
||||
|
||||
## Examples in this Directory
|
||||
|
||||
### Content Creation
|
||||
- **game-builder-crew**: Multi-agent team that designs and builds Python games
|
||||
- **instagram_post**: Creates engaging Instagram content with research and creativity
|
||||
- **landing_page_generator**: Builds complete landing pages from concepts
|
||||
- **marketing_strategy**: Develops comprehensive marketing campaigns
|
||||
- **screenplay_writer**: Converts text into professional screenplay format
|
||||
|
||||
### Business & Productivity
|
||||
- **job-posting**: Analyzes companies and creates tailored job descriptions
|
||||
- **prep-for-a-meeting**: Researches participants and prepares meeting strategies
|
||||
- **recruitment**: Automates candidate sourcing and evaluation
|
||||
- **stock_analysis**: Performs comprehensive financial analysis with SEC data
|
||||
|
||||
### Data & Matching
|
||||
- **match_profile_to_positions**: CV-to-job matching with vector search
|
||||
- **meta_quest_knowledge**: Q&A system using PDF documentation
|
||||
|
||||
### Travel & Planning
|
||||
- **surprise_trip**: Plans personalized surprise travel itineraries
|
||||
- **trip_planner**: Compares destinations and optimizes travel plans
|
||||
|
||||
### Template
|
||||
- **starter_template**: Basic template for creating new CrewAI projects
|
||||
|
||||
## Common Crew Patterns
|
||||
|
||||
### Agent Definition
|
||||
```yaml
|
||||
# agents.yaml
|
||||
researcher:
|
||||
role: "Senior Research Analyst"
|
||||
goal: "Uncover cutting-edge developments"
|
||||
backstory: "You're a seasoned researcher..."
|
||||
```
|
||||
|
||||
### Task Definition
|
||||
```yaml
|
||||
# tasks.yaml
|
||||
research_task:
|
||||
description: "Conduct comprehensive research on {topic}"
|
||||
agent: researcher
|
||||
expected_output: "Detailed research report"
|
||||
```
|
||||
|
||||
### Crew Assembly
|
||||
```python
|
||||
from crewai import Crew, Agent, Task
|
||||
|
||||
crew = Crew(
|
||||
agents=[researcher, writer],
|
||||
tasks=[research_task, writing_task],
|
||||
process="sequential" # or "hierarchical"
|
||||
)
|
||||
```
|
||||
|
||||
## Key Features Demonstrated
|
||||
|
||||
1. **Multi-Agent Collaboration**: Examples show 2-7 agents working together
|
||||
2. **Tool Integration**: Web search, APIs, file manipulation, databases
|
||||
3. **Custom Tools**: Many examples implement specialized tools
|
||||
4. **YAML Configuration**: Standardized agent/task definitions
|
||||
5. **Various Domains**: From creative writing to financial analysis
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Choose an example that matches your use case
|
||||
2. Navigate to its directory
|
||||
3. Follow the example-specific README
|
||||
4. Install dependencies (usually via `pip install -r requirements.txt` or `poetry install`)
|
||||
5. Run with `python main.py` or as specified
|
||||
|
||||
Each example is self-contained with all necessary configurations and can be used as a starting point for your own crews.
|
||||
@@ -1,13 +1,12 @@
|
||||
[tool.poetry]
|
||||
name = "game_builder_crew"
|
||||
[project]
|
||||
name = "game-builder-crew"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["Your Name <you@example.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.10.0,<3.12"
|
||||
crewai = "^0.130.0"
|
||||
python-dotenv = "1.0.0"
|
||||
requires-python = ">=3.10,<3.12"
|
||||
dependencies = [
|
||||
"crewai>=0.152.0",
|
||||
"python-dotenv==1.0.0",
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
|
||||
@@ -19,10 +18,6 @@ exclude = [".cache"]
|
||||
select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
|
||||
ignore = ['W291', 'W292', 'W293']
|
||||
|
||||
[tool.poetry.scripts]
|
||||
[project.scripts]
|
||||
game_builder_crew = "game_builder_crew.main:run"
|
||||
train = "game_builder_crew.main:train"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
2629
crews/game-builder-crew/uv.lock
generated
Normal file
2629
crews/game-builder-crew/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
crews/instagram_post/pyproject.toml
Normal file
24
crews/instagram_post/pyproject.toml
Normal file
@@ -0,0 +1,24 @@
|
||||
[project]
|
||||
name = "instagram-post-example"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
requires-python = ">=3.10,<3.12"
|
||||
dependencies = [
|
||||
"crewai>=0.152.0",
|
||||
"python-dotenv==1.0.0",
|
||||
"opencv-python==4.8.1.78",
|
||||
"google-search-results==2.4.2",
|
||||
"unstructured>=0.18.11",
|
||||
"langchain>=0.3.27",
|
||||
"langchain-community>=0.3.27",
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
|
||||
useLibraryCodeForTypes = true
|
||||
exclude = [".cache"]
|
||||
|
||||
[tool.ruff]
|
||||
# https://beta.ruff.rs/docs/configuration/
|
||||
select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
|
||||
ignore = ['W291', 'W292', 'W293']
|
||||
3320
crews/instagram_post/uv.lock
generated
Normal file
3320
crews/instagram_post/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
crews/job-posting/pyproject.toml
Normal file
15
crews/job-posting/pyproject.toml
Normal file
@@ -0,0 +1,15 @@
|
||||
[project]
|
||||
name = "job_posting"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = [{name = "Your Name", email = "you@example.com"}]
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.12,<=3.13"
|
||||
dependencies = [
|
||||
"crewai[tools]>=0.152.0",
|
||||
"python-dotenv>=1.0.1",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
job_posting = "job_posting.main:run"
|
||||
train = "job_posting.main:train"
|
||||
3564
crews/job-posting/uv.lock
generated
Normal file
3564
crews/job-posting/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,16 @@
|
||||
[tool.poetry]
|
||||
[project]
|
||||
name = "landing-page-crew"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["Your Name <you@example.com>"]
|
||||
authors = [{name = "Your Name", email = "you@example.com"}]
|
||||
requires-python = ">=3.10.0,<3.12"
|
||||
dependencies = [
|
||||
"python-dotenv==1.0.0",
|
||||
"crewai>=0.152.0",
|
||||
"unstructured>=0.16.4",
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.10.0,<3.12"
|
||||
python-dotenv = "1.0.0"
|
||||
crewai = "^0.130.0"
|
||||
unstructured = "^0.16.4"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
[project.scripts]
|
||||
landing_page_generator = "landing_page_generator.main:run"
|
||||
|
||||
[tool.pyright]
|
||||
@@ -23,6 +23,3 @@ exclude = [".cache"]
|
||||
select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
|
||||
ignore = ['W291', 'W292', 'W293']
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
3036
crews/landing_page_generator/uv.lock
generated
Normal file
3036
crews/landing_page_generator/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,22 @@
|
||||
[tool.poetry]
|
||||
[project]
|
||||
name = "markdown_validator"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = ["ITLackey <itlackey@gmail.com>"]
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.10.0,<3.12"
|
||||
crewai = "^0.130.0"
|
||||
python-dotenv = "1.0.0"
|
||||
markdown = "3.4.3"
|
||||
pymarkdownlnt = "0.9.15"
|
||||
authors = [{name = "ITLackey", email = "itlackey@gmail.com"}]
|
||||
requires-python = ">=3.10.0,<3.12"
|
||||
dependencies = [
|
||||
"crewai>=0.152.0",
|
||||
"python-dotenv==1.0.0",
|
||||
"markdown==3.4.3",
|
||||
"pymarkdownlnt==0.9.15",
|
||||
]
|
||||
|
||||
[tool.pyright]
|
||||
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md
|
||||
useLibraryCodeForTypes = true
|
||||
exclude = [".cache"]
|
||||
|
||||
[tool.poetry.scripts]
|
||||
[project.scripts]
|
||||
markdown_validator = "markdown_validator.main:run"
|
||||
train = "markdown_validator.main:train"
|
||||
[tool.ruff]
|
||||
@@ -23,6 +24,3 @@ train = "markdown_validator.main:train"
|
||||
select = ['E', 'W', 'F', 'I', 'B', 'C4', 'ARG', 'SIM']
|
||||
ignore = ['W291', 'W292', 'W293']
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
2737
crews/markdown_validator/uv.lock
generated
Normal file
2737
crews/markdown_validator/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,8 +7,8 @@ authors = [
|
||||
]
|
||||
requires-python = ">=3.10,<=3.13"
|
||||
dependencies = [
|
||||
"crewai[tools]==0.130.0",
|
||||
"crewai-tools>=0.4.6",
|
||||
"crewai[tools]>=0.152.0",
|
||||
"crewai-tools>=0.58.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
4584
crews/marketing_strategy/uv.lock
generated
Normal file
4584
crews/marketing_strategy/uv.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
crews/match_profile_to_positions/pyproject.toml
Normal file
14
crews/match_profile_to_positions/pyproject.toml
Normal file
@@ -0,0 +1,14 @@
|
||||
[project]
|
||||
name = "match_to_proposal"
|
||||
version = "0.1.0"
|
||||
description = "match_to_proposal using crewAI"
|
||||
authors = [{name = "Your Name", email = "you@example.com"}]
|
||||
requires-python = ">=3.10,<=3.13"
|
||||
dependencies = [
|
||||
"crewai[tools]>=0.152.0",
|
||||
"crewai-tools>=0.58.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
match_to_proposal = "match_to_proposal.main:run"
|
||||
train = "match_to_proposal.main:train"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user