A production-ready template for building AI crews using CrewAI - the cutting-edge framework for orchestrating collaborative AI agents.
- π€ Multi-Agent Collaboration: Watch AI agents work together like a real team
- π§ Production-Ready: Docker containerization, proper logging, and error handling
- π Rich Reporting: Automatic report generation with structured outputs
- π οΈ Extensible Tools: Easy-to-add custom tools for any domain
- β‘ Latest CrewAI: Always updated to the newest CrewAI version (0.134.0+)
- π― Real Examples: Working examples that demonstrate powerful AI workflows
- Clone and Setup:
git clone https://github.com/scotthavird/crewai-template
cd crewai-template
./setup.sh your_project_name- Configure Environment:
cp .env.example .env
# Add your OpenAI API key to .env- Launch Your AI Crew:
docker compose up --buildWatch your AI agents collaborate in real-time! π¬
This template can be adapted for various exciting use cases:
- Market Research: Agents gather data, analyze trends, create reports
- Academic Research: Literature review, data analysis, paper writing
- Competitive Intelligence: Monitor competitors, analyze strategies
- Financial Analysis: Data collection, trend analysis, investment recommendations
- Product Development: Market research, feature analysis, roadmap planning
- Risk Assessment: Data gathering, risk modeling, mitigation strategies
- Blog Writing: Research topics, write articles, optimize for SEO
- Social Media: Content planning, post creation, engagement analysis
- Marketing Campaigns: Strategy development, content creation, performance tracking
- Code Review: Analyze codebases, identify issues, suggest improvements
- Documentation: Generate technical docs, API references, tutorials
- System Analysis: Architecture review, performance optimization
src/your_project_name/
βββ main.py # π― Entry point & configuration
βββ crew.py # π€ Agent & crew definitions
βββ config/
β βββ agents.yaml # π₯ Agent personalities & roles
β βββ tasks.yaml # π Task definitions & workflows
βββ tools/
βββ custom_tool.py # π οΈ Your custom tools
βββ web_scraper.py # π Web scraping capabilities
βββ data_analyzer.py # π Data analysis tools
βββ file_manager.py # π File operations
Our template includes pre-configured agent archetypes:
- π Senior Researcher: Deep analysis, fact-checking, comprehensive investigation
- π Reporting Analyst: Data synthesis, clear communication, structured reporting
- π¨ Creative Writer: Engaging content, storytelling, audience adaptation
- π§ Technical Expert: Code analysis, system design, best practices
The template comes with powerful tools out of the box:
- π Web Research Tool: Intelligent web scraping and data extraction
- π Data Analysis Tool: Statistical analysis and visualization
- π File Management Tool: Read, write, and organize files
- π Search Tool: Advanced search capabilities across multiple sources
- π Reporting Tool: Generate professional reports in multiple formats
# Define complex multi-step workflows
workflow = Crew(
agents=[researcher, analyst, writer],
tasks=[research_task, analysis_task, writing_task],
process=Process.sequential, # or Process.hierarchical
verbose=True
)- Live agent status updates
- Task progress tracking
- Performance metrics
- Error handling and recovery
- Markdown reports
- JSON data exports
- PDF generation
- Interactive dashboards
# agents.yaml
researcher:
role: "AI Research Specialist"
goal: "Discover cutting-edge developments in {topic}"
backstory: "Expert in finding and analyzing the latest innovations"# tasks.yaml
market_analysis:
description: "Analyze market trends for {product}"
expected_output: "Comprehensive market analysis with actionable insights"
agent: market_analystWant to see it in action? Check out these example runs:
- Interactive Demo:
docker compose run --rm crew python demo.py - Business Analysis:
docker compose run --rm crew python examples/business_analysis_example.py - Default Research:
docker compose up(OpenCV research)
docker compose run --rm crew python -c "
from src.crewai_template.crew import CrewaiTemplate
crew = CrewaiTemplate().crew()
result = crew.kickoff(inputs={
'topic': 'Electric Vehicle Market 2025',
'industry': 'Automotive',
'region': 'North America'
})
"docker compose run --rm crew python -c "
from src.crewai_template.crew import CrewaiTemplate
crew = CrewaiTemplate().crew()
result = crew.kickoff(inputs={
'topic': 'Kubernetes Security Best Practices',
'depth': 'comprehensive',
'audience': 'DevOps Engineers'
})
"docker compose run --rm crew python -c "
from src.crewai_template.crew import CrewaiTemplate
crew = CrewaiTemplate().crew()
result = crew.kickoff(inputs={
'topic': 'AI in Healthcare',
'format': 'blog series',
'target_audience': 'healthcare professionals'
})
"All development happens inside Docker containers:
# Interactive demo with menu
docker compose run --rm crew python demo.py
# Run specific examples
docker compose run --rm crew python examples/business_analysis_example.py
# Interactive Python shell
docker compose run --rm crew python
# Shell access for debugging
docker compose run --rm crew bash
# Check installed packages
docker compose run --rm crew pip list
# Run tests
docker compose run --rm crew python -m pytest- Add to pyproject.toml:
dependencies = [
"crewai[tools]>=0.134.0,<1.0.0",
"requests>=2.31.0",
"your-new-package>=1.0.0",
]- Rebuild container:
docker compose build- Test new dependency:
docker compose run --rm crew python -c "import your_new_package; print('Success!')"- Customize Your Agents: Edit
config/agents.yamlto define unique personalities - Design Your Workflow: Modify
config/tasks.yamlfor your specific use case - Add Custom Tools: Extend functionality in the
tools/directory - Scale Your Crew: Add more agents for complex workflows
- Deploy to Production: Use the included Docker setup for deployment
We love contributions! Whether it's:
- π Bug fixes
- β¨ New features
- π Documentation improvements
- π― New use case examples
Ready to build the future with AI agents? π Start your journey today!