🦙 Open Source Track

Building AI Agents with
Mistral-7B & Ollama

The complete agent development curriculum — same concepts, same depth, zero API costs. Run everything locally with Ollama or for free on Groq.

🔍 Search the Course  ·  💬 Ask the Course (works offline)

24Track Modules
$0API Cost
100%Local / Private
~55hEst. Learning Time

On a phone or tablet? Try the mobile-optimized versions — condensed cards and pseudocode for learning on the go.

View Mobile Versions ›
🛠️

Start Here — Dev Environment Setup

Before starting any hands-on module, complete the Dev Environment Setup module. It walks you through installing Python, VS Code or PyCharm, creating a virtual environment, installing the openai package, and getting Ollama + Mistral-7B running locally. Ends with a working verification script. Takes 30–40 minutes and only needs to be done once.

Quick Setup (do this once)

# 1. Install Ollama curl -fsSL https://ollama.ai/install.sh | sh # macOS/Linux # Windows: download from https://ollama.ai # 2. Pull Mistral-7B (5 GB, one-time download) ollama pull mistral # 3. Install Python dependencies pip install openai # OpenAI SDK — works with Ollama pip install chromadb sentence-transformers # for RAG modules (M09, M10, M11) pip install deepeval ragas langsmith # for eval modules (M18, M19, M20) # 4. Install Node.js dependencies npm install openai # same SDK for Node.js # 5. Verify Ollama is running ollama serve & curl http://localhost:11434/api/tags # should list "mistral"

Alternatively, get a free Groq API key at console.groq.com — same OpenAI-compatible API, 500 req/day free, no GPU needed. Set GROQ_API_KEY and use base_url="https://api.groq.com/openai/v1".

Supported Providers (drop-in swap — one line change)
Ollama local (recommended)
Groq (cloud, free tier)
Together AI
LM Studio (Windows GUI)
Any OpenAI-compatible server
What changes vs. the main course
✕ Main Course (Claude / Anthropic API)
from anthropic import Anthropic client = Anthropic() resp = client.messages.create( model="claude-sonnet-4-6", max_tokens=1024, system="You are helpful.", messages=[{"role":"user", "content":"Hello"}] ) text = resp.content[0].text
✓ This Track (Mistral / Ollama)
from openai import OpenAI client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama") resp = client.chat.completions.create( model="mistral", messages=[ {"role":"system","content":"You are helpful."}, {"role":"user","content":"Hello"}] ) text = resp.choices[0].message.content

Everything else — agent architectures, RAG pipelines, guardrails, multi-agent patterns — is identical. The concepts are model-agnostic.

Track Modules — Learning Path

STEP 0 — START HERE

STEP 0B — HELLO WORLD

TRACK 1 — FOUNDATIONS

TRACK 2 — TOOL USE

TRACK 3 — MEMORY & CONTEXT

TRACK 4 — AGENT ARCHITECTURES

TRACK 5 — GUARDRAILS & SAFETY

TRACK 6 — EVAL & OBSERVABILITY

TRACK 7 — PRODUCTION

M21 · 22 of 26

API Design & Deployment

Wrap your Mistral agent as a FastAPI service. Request queuing, async execution, streaming responses, health checks. Deploy with Docker — no vendor lock-in.

~70 min Intermediate → Advanced FastAPI · Docker
M22 · 23 of 26

Cost Optimization

Model selection (7B vs 13B vs 70B trade-offs), quantization (Q4 vs Q8), batch inference, prompt caching patterns, token budgeting. Minimize cost without sacrificing quality.

~55 min Advanced Ollama · llama.cpp
M21B · 24 of 26

Cloud Deployment for Local Models

Deploy Ollama to GPU cloud VMs on GCP, AWS, and Azure. Cloud-hosted open source alternatives: Amazon Bedrock (Llama), Vertex AI Model Garden, Together AI, Groq. Build a provider-agnostic wrapper — swap local for cloud with one env var.

~65 min Advanced GCP · AWS · Azure · Groq
M21C · BONUS

Headless Agents

Run agents with no UI and no human in the loop — driven by cron, CI, or a webhook and consumed by another program. The headless contract (JSON on stdout, logs on stderr, meaningful exit codes), guardrails that replace the human circuit-breaker, and Unix-pipeline composition.

~55 min Advanced cron · CI · Ollama
M23 · 25 of 26

Agentic Coding Workflows & Quality Gates

Engineering scaffolding that makes an agent a safe contributor: reusable workflow files, a spec→generate→verify framework, structural linting (ruff, bandit, ast-grep) that beats regex, and pre-commit + CI gates that turn a failing check into a correction loop the agent fixes itself.

~60 min Advanced pre-commit · ast-grep · Ollama

TRACK 8 — WHAT'S NEXT

What this track doesn't cover (Anthropic-only features)

M25–M27: Cert Prep Claude-specific — hooks, sessions, Agent SDK. These are Anthropic platform features with no open source equivalent.
M07: MCP Protocol MCP is an open protocol — covered in the separate MCP Track. Mistral can use MCP servers as tool sources with the mcp Python SDK.
M15B: Agent SDK Lab The claude-agent-sdk is Anthropic-only. Use M11–M13 to build the same patterns manually, or use CrewAI (Capstone C4).
Extended Thinking Claude-specific reasoning mode. For deep multi-step reasoning with open source models, use DeepSeek-R1 via Ollama (ollama pull deepseek-r1).

After This Track

Once you've completed all 26 modules, you'll understand the core agent development loop end-to-end. If you want to progress to Claude-specific features (prompt caching, extended thinking, hooks, the Agent SDK), the main Claude Agents course builds directly on this foundation — your agent code is compatible, just swap the client back.

Continue to the Claude Agents course →

Choose Your Learning Path

Three curated paths through the 26-module curriculum. All paths use Ollama/Mistral locally — zero API cost.

Want to continue to Claude-specific features after this track? The main Claude Agents course builds directly on this foundation — your agent code is compatible, just swap the client.

Capstone Projects

3 progressive capstones across 2 industry domains. Complete the prerequisite track modules before starting each one. All run 100% locally on Ollama — no API cost.

Domains: A — Healthcare (CPT/ICD codes, clinical criteria) C — Public Records (UCC liens, entity resolution)
Capstone C3 — Autonomous ReAct Agent (after Track 3 + Track 4)
Capstone C4 — Multi-Agent RAG Pipeline (after Track 4 + Track 5)
CAPSTONE-C4 / DOMAIN-A Healthcare

Multi-Agent RAG Pipeline

After M13 + M16 + M17 · 4–5 hours · CrewAI · Coming soon

Capstone C5 — Eval-Driven Development (after Track 5 + Track 6)
CAPSTONE-C5 / OPEN DOMAIN Any Domain

Eval-Driven Agent Development

After M16 + M18 · 4–5 hours · DeepEval · Coming soon

Comparing to the Main Course

The main Claude Agents course has 7 capstone tiers × 3 domains = 19 capstone labs. This open source track has 3 capstones covering the same progression (autonomous agent → multi-agent → eval-driven) but adapted for Ollama/Mistral and open-source frameworks (CrewAI, DeepEval). Capstone 7 of the main course (spec-driven via Claude Code) has no open-source equivalent.

Prerequisites Map

Module dependencies — complete prerequisites before moving on.

ModuleRequiresUnlocks
M00 — Dev SetupNoneM00B, M01
M00B — Hello World (Three Approaches)M00M01 (concepts)
M01 — LLM Mental ModelM00M02, M03
M03 — PromptsM01M03B, M04
M04 — Structured OutputM03M05
M02 — Tokens & Context LimitsM01M22 (Cost)
M03B — Context EngineeringM03M04, M08
M05 — Function CallingM04M06, CAPSTONE-C3
M06 — Multi-Tool OrchestrationM05M07, M08, M12
M07 — MCP & Rich OutputM05, M06M08, M12
M15 — Code Execution SandboxM06M12
M08 — Conversation ManagementM06M09
M09 — RAG FundamentalsM08M10, CAPSTONE-C3
M10 — Advanced RAG PatternsM09M11
M11 — Multi-Layer MemoryM10M12, CAPSTONE-C3
M12 — The ReAct Agent LoopM06, M11M13, CAPSTONE-C3
M13 — Planning & Task DecompositionM12M14
M14 — Multi-Agent SystemsM13M16, CAPSTONE-C4
M16 — Input GuardrailsM14M17, CAPSTONE-C4
M17 — Output Guardrails & HITLM16M18
M18 — Evaluation & TestingM17M19, CAPSTONE-C4, C5
M19 — Tracing & LoggingM18M20
M20 — Monitoring & CIM19M21
M21 — API Design & DeploymentM20M22
M22 — Cost OptimizationM02, M21M21B
M21B — Cloud DeploymentM22M23
M23 — Agentic Coding WorkflowsM15, M20M24
M24 — The OS AI FrontierM21B, M23Course complete
CAPSTONE-C3 — Entity Resolution AgentM11, M12CAPSTONE-C4
CAPSTONE-C4 — Multi-Agent RAGM13, M16, M17CAPSTONE-C5
CAPSTONE-C5 — Eval-Driven DevM16, M18Course complete