Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Agentic AI: Build AI Agents in Python with MCP, RAG & Evals
New

Agentic AI: Build AI Agents in Python with MCP, RAG & Evals

Write the agent loop by hand, then tool use, MCP, retrieval, trajectory evals, multi-agent cost - and when not to.
Created byReal Numbers
Last updated 11/2026
English
English

What you'll learn

  • Write an agent loop from scratch - reasoning, tool dispatch, typed results, repair and termination - with no framework involved
  • Decide between a single call, a fixed workflow and an autonomous agent, and defend choosing the simplest of the three
  • Build the four workflow patterns - chaining, routing, parallelisation, evaluator-optimizer - each with the stop rule it needs
  • Model work as a state machine and enforce it on a graph runtime, with checkpoints, resume and a human approval gate that cannot be bypassed
  • Design tools an agent can use well: task-shaped, typed, idempotent, sandboxed, and bounded by a budget rather than by a request in the prompt
  • Expose tools over MCP and consume them, and read a protocol revision date as a compatibility boundary instead of trusting a blog post
  • Make grounding a control-flow decision: retrieve, grade what came back, reformulate once, and abstain when the answer is not in the corpus
  • Evaluate an agent at response, step and trajectory level, and turn the graded set into a regression gate that runs in CI
  • Instrument a run with traces and spans and diagnose thrash, drift, premature stop and silent partial success from the trace alone
  • Build a supervised multi-agent system - and measure what it costs against one agent before recommending it to anyone

Course content

12 sections • 66 lectures • 8h 40m total length
  • Promo - Agentic AI1:57
    Build a card-dispute agent for an invented bank from a bare Python loop up to a supervised team of four - and measure every version against the single call it has to beat.
  • Welcome, and how to use this course4:13
    How the course is built, the offline harness every lab runs on, the optional live-model adapter, and which three sections are version-pinned and meant to be re-shot on their own.

Requirements

  • Comfortable writing Python - functions, classes, type hints, and reading someone else's hundred-line module
  • You have called an LLM API at least once and know what a prompt and a token are. Everything agentic is built from first principles here
  • A machine that runs Python 3.11 or later. No GPU, no cloud account, no cluster
  • No API key is needed for any lab. Every one runs offline against a recorded-fixture model by default; the live adapter is optional and reads its key from your environment
  • Course 34 on context engineering pairs with this one but is not required. Where this course reaches a context or memory design question, it names the boundary and points there rather than re-teaching it

Description

This course contains the use of artificial intelligence.
Agentic AI is the most hype-saturated subject on this platform, and the courses mostly teach you a framework's vocabulary. This one teaches the loop. You write it yourself, in plain Python, before any framework appears: a model that chooses its next step, tools that change something outside the model, and code that decides when to stop. Once you have written those hundred lines, every framework in the field becomes legible rather than magic, and so does every framework that replaces them.

The course opens by trying to talk you out of it. Section one builds the thing an agent has to beat: a single well-prompted call with a typed output schema, run over the same cases, with its cost and call count recorded. That baseline governs the rest of the course. You will see designs that beat it comfortably, and you will see one that does not and gets deleted on camera.

Everything is built on one problem, in one invented organisation: a bank's card-dispute desk. A customer disputes a transaction, a rulebook says whether it qualifies, a refund above a threshold needs a human, and an operations team is drowning. It is the right shape of problem for this material - branching, document-grounded, consequential, and with a natural approval boundary - and it is more honest than a toy that would work equally well as a script.

Then the patterns, in the order they should be reached for. Chaining, routing, parallelisation and the evaluator-optimizer loop each get the failure they exist for and a stop rule, because a critic loop without one either oscillates between two drafts or agrees with itself and bills you for both. Only after those does the course make control flow explicit: the dispute lifecycle as a state machine, run on a graph runtime, checkpointed, and halted at an approval gate the model cannot route around. A rule in a prompt is advice. A rule in a graph is enforced.

Tools get a full section on the engineering rather than the demo: tools shaped like the task instead of like your tables, error text written so a model can recover from it, idempotent writes that survive the retry after a timeout that had already succeeded, sandboxed code execution, and the budgets and kill switches that bound a bad run to a log line instead of an incident. Then the Model Context Protocol - the server, the client, the three primitives - and the part most courses skip: the protocol's own revision moved in 2026, and reading a revision date as a compatibility boundary is the skill that outlasts the revision.
Which framework should you use? The course builds the agent loop directly, so what you learn transfers to any of them. A dedicated lecture compares the current landscape on six axes — control flow, typed tools and output, durability, protocol support, debuggability and portability — including where CrewAI and AutoGen sit, what Microsoft Agent Framework replaced, and why this course deliberately builds on none of them. You finish able to choose, and to justify the choice.

Evaluation is treated as the core subject it is, not an appendix. Agents fail on the path while passing on the answer, so output-only scoring flatters them. You will score at three levels - response, step and trajectory - build the graded set out of real failures rather than invented ones, and wire it into a single command that exits non-zero on a structural regression. Then observability: traces and spans, the four failure signatures, and a lab where you diagnose a wrong refund from a shipped trace with nothing else to go on.

The course ends where the hype is loudest. You build a supervised multi-agent system, meet the coordination failures nobody warns you about, and then run the same task as one agent and as four over identical cases, with calls, tokens, spans and the longest dependent chain all counted. The honest lecture that follows is the one this catalogue always includes: what multi-agent actually costs in latency, tokens and debuggability, and the cases where a single call still wins.

Every lab runs offline, by default, with no API key. They run against a recorded-fixture model, so the control flow is deterministic and a lab cannot fail because a provider changed a model overnight. A live adapter is included and reads a key from your environment only - never a file, never a prompt - and everything it produces is printed and labelled, never asserted. Each lab runs top to bottom with no edits and no network, and exits 0 when every assertion passed, 1 on a failure and 2 when a dependency is missing, printing the exact install line.

What this course will not do. It will not quote you a success rate. Not an agent's task-completion figure, not a benchmark score, not a multi-agent improvement percentage. Those belong to a model, a prompt and a seed, and a course that publishes them is describing a model that has since been retired. What gets asserted in these labs is what is reproducible regardless of what the model says: the sequence of tool calls, that a schema-invalid call was repaired, that a guard held, that a gate was never bypassed, that the loop terminated, and that the accounting adds up.

One more piece of honesty, about the course itself. Three sections are version-pinned - the graph runtime, the protocol, and the framework comparison - and they are deliberately placed so they can be re-recorded without disturbing anything else. The course says on camera which section will date first. The loop, the patterns, the tool engineering, the evaluation and the multi-agent trade-offs will not.

Who this course is for:

  • Engineers asked to put an agent in production who want the loop, the failure modes and the evaluation rather than a framework walkthrough
  • Developers who have shipped an LLM feature and are now being asked to make it take actions
  • Technical leads who have to approve or reject an agentic design and want the cost and debuggability arguments in their own hands
  • Anyone who has built an impressive agent demo that fell over in week two and wants to know which part was the problem
  • Practitioners who suspect that most multi-agent architectures are org charts drawn as software, and want to be able to prove it either way