Skip to content

Deploy autonomous multi-agent AI teams to research, code, and solve tasks

License

Notifications You must be signed in to change notification settings

DataForScience/CrewAI

Repository files navigation

GitHub Twitter @data4sci GitHub top language GitHub repo size GitHub last commit

Graphs For Science Data Science Briefing

CrewAI for Production-Ready Multi‑Agent Systems

Code + slides to accompany the O’Reilly Live Training, CrewAI for Production‑Ready Multi‑Agent Systems by Data For Science, Inc.

Want the complete Gumroad package? Get the full course materials here: Purchase on Gumroad.

This live training will take developers beyond the basics of LLM interaction into the realm of building sophisticated, autonomous multi-agent systems. While Large Language Models are powerful on their own, their true potential is unlocked when they are orchestrated into teams that can plan, execute, and review complex tasks. CrewAI is quickly becoming state of the art in AI agent development and orchestration.

This live training will help master the CrewAI framework through hand-on examples. We start by building a simple "Hello World" research agent, then quickly advance to constructing a team of financial analysts equipped with custom tools. We then explore advanced concepts like hierarchical delegation—where a manager agent supervises a team—and implement long-term memory so agents "learn" from past executions. Finally, we cover essential production patterns, including human-in-the-loop approval flows for sensitive tasks (like writing code) and separating agent logic from configuration for maintainable software.

Course Structure

1. Foundations of Autonomous Agents

  • Core Concepts
  • Roles
  • Goals
  • Backstories

2. Tools and Sequential Crews

  • Use Search and APIs
  • Develop Custom Tools
  • Understand Context

3. Orchestration & Memory

  • Hierarchical Process
  • Managers and Task delegation
  • RAG
  • Vector Databases

4. Human-in-the-Loop (HITL)

  • Files
  • Code development
  • HITL Workflows

5. Production Patterns

  • Extensible configurations
  • Supporting multiple LLMs
  • Error Handling
  • Best Practices

What you’ll get (and how to use it)

  • 5 hands-on notebooks: start simple, then level up into tools, orchestration, memory/RAG, HITL, and production patterns.
  • Slides: Detailed PDF slide deck

Start here

Setup

1) Install dependencies (recommended: uv)

  1. Install uv (if needed):
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create an environment and install dependencies:
git clone https://github.com/DataForScience/CrewAI.git
cd CrewAI
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv sync

2) Add API keys

You'll need accounts with the following services. All offer free tiers or pay-as-you-go pricing:

Service Used in Where to get it
Anthropic All notebooks console.anthropic.com
Serper Modules 2–5 serper.dev
VoyageAI Module 3 (RAG) dash.voyageai.com (optional)

Once you have your keys, create a .env file in the root of the project:

ANTHROPIC_API_KEY=sk-ant-...
SERPER_API_KEY=...
VOYAGE_API_KEY=...  

3) Launch notebooks

jupyter notebook

Repository Structure

CrewAI/
├── 1. Foundations.ipynb                 # Module 1: Agent basics
├── 2. Tools, Sequential, Crews.ipynb    # Module 2: Tools + workflows
├── 3. Orchestration and Memory.ipynb    # Module 3: Orchestration + memory + RAG
├── 4. Human in the Loop.ipynb           # Module 4: HITL patterns
├── 5. Production Patterns.ipynb         # Module 5: Production best practices
├── slides/                               # Slides
│   └── CrewAI.pdf
├── data/                                 # Logos + author image assets
├── config/                               # YAML agent/task config (Module 5)
├── d4sci.mplstyle                        # Custom matplotlib style
├── pyproject.toml                        # Dependency manifest (for `uv sync`)
├── requirements.txt                      # Alternative install path (pip/uv pip)
└── .env                                  # API keys (create this file; do not commit)

Suggested learning path

  • Start with Module 1 and run the notebooks in order (1 → 5).
  • If you only want the deck, open slides/CrewAI.pdf.
File Topic
1. Foundations.ipynb Agents, roles, goals
2. Tools, Sequential, Crews.ipynb Tools, multi-agent workflows
3. Orchestration and Memory.ipynb Hierarchical crews, memory, RAG
4. Human in the Loop.ipynb Approval flows, safety patterns
5. Production Patterns.ipynb Config, retries, monitoring

Estimated API Costs

Running through all notebooks end-to-end costs roughly $1–3 in API calls, depending on how much you re-run cells. The biggest spend is Module 4 (Human in the Loop), which generates longer outputs during the multi-stage workflow examples.


Questions?

Reach out at info@data4sci.com or open an issue if something isn't working.

Author

Bruno Gonçalves

Bruno Gonçalves

Data For Science, Inc.

Web: www.data4sci.com
Twitter/X: @bgoncalves
LinkedIn: @bmtgoncalves
Email: info@data4sci.com
Schedule a Call: data4sci.com/call

About

Deploy autonomous multi-agent AI teams to research, code, and solve tasks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published