Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Build an AI Agent Product with Mistral: OCR, RAG, MCP, Evals
New

Build an AI Agent Product with Mistral: OCR, RAG, MCP, Evals

Unofficial guide for Python devs: OCR invoices, RAG with sources, agent handoffs, guardrails, LLM-as-judge, rollback
Created byThanh Vũ
Last updated 11/2026
English
English

What you'll learn

  • - Turn free-text emails into validated JSON with Mistral structured output, field validators and retries
  • - Read invoices and bills of lading with Mistral OCR and catch extraction errors with business checks
  • - Answer from your own documents with sources, and choose the smallest model that still passes your tests
  • - Build agents that hand work to specialists with the Mistral Agents API, and delete every agent they create
  • - Put a human approval step in front of every action, and enforce the final rule on your server, also over MCP
  • - Defend an agent against prompt injection hidden in tool results, and measure the defence over repeated runs
  • - Score an agent with a 30-case scorecard, judges and trajectory checks, and catch regressions before release
  • - Run Voxtral speech-to-text and text-to-speech in a pipeline with a latency budget per stage
  • - Ship with token budgets, timeouts, idempotent retries, agent versions and one-line rollback
  • - Build and deploy a full agent web app with Claude Code, tests first, from plan to production

Course content

12 sections • 32 lectures • 3h 44m total length
  • Meet Dock: production AI agents with Mistral3:58
  • Get your Mistral API key3:20

Requirements

  • Python basics: functions, classes, pip or uv, and running a Jupyter notebook
  • A Mistral account and API key. The setup lecture shows how, including the free Experiment plan and a spending cap
  • Optional for the capstone: Node.js, a GitHub account, a Vercel account and Claude Code

Description

Unofficial course, not affiliated with or endorsed by Mistral AI or Anthropic. Adapted from the Mistral AI Cookbook (MIT license), with new production material written for this course.

You can call an LLM API. Your demo works. Then real work starts. An invoice scan has the wrong total. An email names a shipment the model cannot find. A tracking note tells your agent to email the whole customer list to a stranger, and with no approval step it obeys in five runs out of five. Most tutorials stop before this point.

This course builds one agent, step by step, until it holds up in production. The agent is Dock, the operations assistant of a made-up freight company. Every section starts from a real failure of Dock, shows how Mistral's tools solve it, and measures the fix with numbers from real runs.

What you build

  • Structured output you can trust: JSON schemas, validators and retries that turn emails into clean data.
  • Document AI: Mistral OCR on invoices and bills of lading, with checks that catch a wrong total even at 99.9% OCR confidence.
  • Answers with sources: a handbook assistant that cites its sections and says "not found" when it should, and the smallest model that still passes.
  • Agents and handoffs: triage, tracking and billing agents with the Agents API, a routing rule improved from 17 to 19 out of 20.
  • Human approval and an MCP server: every email waits for a person, and the server refuses non-customers even when someone approves.
  • Multi-agent designs: one agent against parallel workers, compared on quality, time, retries and tokens.
  • Guardrails: moderation plus your own business rules, and a judge that quotes the sentence that broke them.
  • Evals: a 30-case scorecard that catches the regression a cheaper model hides.
  • Voice: Voxtral transcription, notes checked against the truth, spoken replies and a latency budget.
  • Production operations: token budgets, timeouts with a handover to a person, idempotent retries, agent versions and a one-line rollback.

Then the capstone. A real Claude Code session builds Dock Console, a Next.js and FastAPI web app with every capability, tests first, and ships it to GitHub and Vercel. Every lesson ends with a demo, an honest review of what is weak, and one prompt that fixes it.

What is inside

  • 12 sections and 32 lectures (about 3 hours 45 minutes), all with English captions.
  • Every section: a diagram explainer, then live code from zero, then a quiz with explanations and a hands-on notebook lab with a solution.
  • The course project with its data (customers, shipments, invoices, PDFs and voicemails), ready to run.
  • The capstone's step-by-step guides with every prompt, the reference tests and the public repo (dock-console on GitHub, by thtv231).

By the end you will have an agent you can show to a team: it reads real documents, asks before it acts, is screened and scored, and you can prove each of those claims with numbers.

Harbor Freight Co., its customers and all course data are made up for this course. Mistral AI, Le Chat, Voxtral and Codestral are trademarks of Mistral AI. Claude and Claude Code are products of Anthropic. Other names belong to their owners.

Who this course is for:

  • Python developers who can call an LLM API and want agents that hold up in production
  • AI engineers who want a hands-on tour of Mistral's OCR, Agents, moderation and Voxtral APIs
  • Teams evaluating Mistral for document, support or operations workflows who need numbers, not demos
  • Developers who want to see a real, tested agent app built end to end with Claude Code