Skip to content

Comprehensive CrewAI tutorial with 7 modules covering basics to advanced topics. Learn multi-agent AI systems, LLM integration, observability, and production patterns. Perfect for AI agent development.

Notifications You must be signed in to change notification settings

bhanuchaddha/CrewAI-Crash-Course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CrewAI Crash Course πŸš€

A comprehensive, hands-on tutorial and learning resource for CrewAI - the powerful framework for building multi-agent AI systems. This repository contains practical examples, step-by-step guides, and real-world implementations covering all aspects of CrewAI development.

πŸ“‹ Overview

CrewAI Crash Course is your complete guide to mastering CrewAI, featuring:

  • βœ… 7 comprehensive modules covering everything from basics to advanced topics
  • βœ… Hands-on examples with real code you can run immediately
  • βœ… Best practices and production-ready patterns
  • βœ… Observability integration with LangTrace
  • βœ… Knowledge management techniques
  • βœ… LLM integration (OpenAI, Anthropic Claude, local LLMs with Ollama)

🎯 What is CrewAI?

CrewAI is a cutting-edge framework for orchestrating role-playing, autonomous AI agents. It enables you to build sophisticated multi-agent systems where agents collaborate to solve complex tasks.

✨ Features

πŸ“š Module 1: Basics

  • Create crews programmatically
  • Configure crews using YAML
  • Agent and task management

πŸ“‹ Module 2: Tasks

  • Access task outputs (Pydantic & JSON)
  • Task dependencies and chaining
  • Task callbacks
  • Guardrail validations

πŸ‘₯ Module 3: Crew Management

  • Access crew outputs
  • Crew orchestration patterns

πŸ› οΈ Module 4: Tools Integration

  • Using tools with tasks
  • Custom tool development

πŸ“– Module 5: Knowledge Management

  • Reading files as knowledge
  • Knowledge base integration

πŸ€– Module 6: LLM Integration

  • Local LLM setup with Ollama
  • Anthropic Claude integration
  • Any LLM provider support

πŸ“Š Module 7: Observability

  • Tracing with LangTrace
  • Performance monitoring
  • Debugging and logging

πŸ—οΈ Project Structure

CrewAI-Crash-Course/
β”œβ”€β”€ knowledge/                      # Sample knowledge files
β”‚   β”œβ”€β”€ customer.json
β”‚   β”œβ”€β”€ products.txt
β”‚   └── transactions.xlsx
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ 1_basics/                  # Basic crew creation
β”‚   β”œβ”€β”€ 2_tasks/                   # Task management
β”‚   β”œβ”€β”€ 3_crew/                    # Crew operations
β”‚   β”œβ”€β”€ 4_tools/                   # Tool integration
β”‚   β”œβ”€β”€ 5_knowledge/               # Knowledge management
β”‚   β”œβ”€β”€ 6_llm/                     # LLM integrations
β”‚   └── 7_observability/           # Monitoring & tracing
└── pyproject.toml

πŸš€ Getting Started

Prerequisites

  • Python 3.8+
  • pip or uv package manager
  • (Optional) OpenAI API key or Anthropic API key for cloud LLMs
  • (Optional) Ollama for local LLM support

Installation

  1. Clone the repository:
git clone https://github.com/bhanuchaddha/CrewAI-Crash-Course.git
cd CrewAI-Crash-Course
  1. Create virtual environment:
uv venv
# or
python -m venv venv
  1. Activate virtual environment:
source venv/bin/activate  # On macOS/Linux
# or
venv\Scripts\activate  # On Windows
  1. Install dependencies:
uv pip install -e .
# or
pip install -e .

Quick Start Example

from crewai import Agent, Crew, Task

# Create an agent
agent = Agent(
    name="Researcher",
    role="Research Analyst",
    goal="Provide accurate research",
    backstory="Expert researcher with attention to detail"
)

# Create a task
task = Task(
    description="Research the latest AI trends",
    expected_output="A comprehensive report on AI trends",
    agent=agent
)

# Create and run crew
crew = Crew(agents=[agent], tasks=[task])
result = crew.kickoff()
print(result)

πŸ“– Module Guide

Module 1: Basics

Learn how to create crews both programmatically and using YAML configuration files.

Module 2: Tasks

Master task management including dependencies, callbacks, and output handling.

Module 3: Crew Management

Understand crew orchestration and output management.

Module 4: Tools

Integrate custom tools and external APIs with your agents.

Module 5: Knowledge

Feed your agents with structured knowledge from files and databases.

Module 6: LLM Integration

Configure different LLM providers and optimize for cost and performance.

Module 7: Observability

Monitor, trace, and debug your AI agent systems.

πŸ”§ Configuration

Environment Variables

Create a .env file for API keys:

OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here

YAML Configuration

Example agents.yaml:

agents:
  - name: Researcher
    role: Research Analyst
    goal: Provide accurate research

πŸ“ Examples

Each module contains multiple examples demonstrating different aspects of CrewAI. Navigate to the specific module directory and run the examples:

cd src/1_basics
python 1_create_crew_programmatically.py

πŸŽ“ Learning Path

  1. Start with Module 1 - Understand the basics
  2. Move to Module 2 - Learn task management
  3. Explore Modules 3-4 - Advanced crew features
  4. Integrate knowledge - Module 5
  5. Configure LLMs - Module 6
  6. Add observability - Module 7

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is open source and available for educational purposes.

πŸ”— Resources

🌟 Star History

If you find this repository helpful, please consider giving it a star! ⭐


Built with ❀️ for the AI agent community

About

Comprehensive CrewAI tutorial with 7 modules covering basics to advanced topics. Learn multi-agent AI systems, LLM integration, observability, and production patterns. Perfect for AI agent development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages