- Python 3.10+ (3.11 or 3.12 recommended)
- pip (included with Python)
- An Anthropic API key (optional — all exercises work in mock mode without one)
git clone https://github.com/achankra/agentic-ai-workshop.git
cd agentic-ai-workshoppython3 -m venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activatepip install -r requirements.txtThis installs the core packages: anthropic, pydantic, click, rich, and test tools.
python3 -m pytest tests/ -vAll 15 tests should pass — they use mock mode and require no API key.
# Exercise 1: Diagnostic Agent with Tool Use
python3 -m agents.diagnostic.agent logs/sample.log
# Exercise 2: Quality Gates with Structured Outputs
python3 -m agents.release_readiness.agent --simulate good
# Exercise 3: Multi-Agent Orchestration
python3 -m agents.multi_agent.orchestrator --scenario balanced
# Exercise 4: Developer Portal
python3 -m agents.portal.agent --project notification-serviceTo use real Claude API calls instead of mock responses:
Option A: Environment variable
export ANTHROPIC_API_KEY=sk-ant-api03-...Option B: .env file
Create a .env file in the project root:
ANTHROPIC_API_KEY=sk-ant-api03-...
The client auto-detects the key and switches from mock to Anthropic.
Option C: Force mock mode (even with a key present)
export USE_MOCK_AI=trueBy default, the client uses claude-sonnet-4-5-20250929. Override via environment variable:
# Use Haiku (cheapest — ~$0.07/exercise run)
export ANTHROPIC_MODEL=claude-haiku-4-5-20251001
# Use Opus (most capable — ~$0.35/exercise run)
export ANTHROPIC_MODEL=claude-opus-4-5-20251101| Model | Input | Output | Est. Total |
|---|---|---|---|
| Haiku 4.5 | $1/M tokens | $5/M tokens | ~$0.69 |
| Sonnet 4.5 | $3/M tokens | $15/M tokens | ~$2.07 |
| Opus 4.5 | $5/M tokens | $25/M tokens | ~$3.45 |
ModuleNotFoundError: No module named 'core'
Make sure you're running from the repo root and using the -m flag:
cd agentic-ai-workshop
python3 -m agents.diagnostic.agent logs/sample.loganthropic.AuthenticationError
Your API key is invalid or expired. Check with echo $ANTHROPIC_API_KEY. Or use mock mode: export USE_MOCK_AI=true.
pydantic import errors
Ensure you have Pydantic v2+: pip install 'pydantic>=2.5.0'
Tests fail with import errors
Run from the repo root: cd agentic-ai-workshop && python3 -m pytest tests/ -v