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.
- Core Concepts
- Roles
- Goals
- Backstories
- Use Search and APIs
- Develop Custom Tools
- Understand Context
- Hierarchical Process
- Managers and Task delegation
- RAG
- Vector Databases
- Files
- Code development
- HITL Workflows
- Extensible configurations
- Supporting multiple LLMs
- Error Handling
- Best Practices
- 5 hands-on notebooks: start simple, then level up into tools, orchestration, memory/RAG, HITL, and production patterns.
- Slides: Detailed PDF slide deck
- Module 1:
1. Foundations.ipynb - Module 2:
2. Tools, Sequential, Crews.ipynb - Module 3:
3. Orchestration and Memory.ipynb - Module 4:
4. Human in the Loop.ipynb - Module 5:
5. Production Patterns.ipynb - Slides (PDF):
slides/CrewAI.pdf
- Install
uv(if needed):
curl -LsSf https://astral.sh/uv/install.sh | sh- 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 syncYou'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=...
jupyter notebookCrewAI/
├── 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)
- 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 |
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.
Reach out at info@data4sci.com or open an issue if something isn't working.
|
Web: www.data4sci.com |
