
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
What you will build in this course, how the sections connect, and how to use the code and cheat sheet.
The difference between a chatbot and an agent, and the loop of think, act and observe that every agent follows.
Real examples of where agents deliver value, where they fail, and why tools make the difference.
Install Python, set up the project, choose a model, and load the sample data used across the course
Hands-on lab: run the agent loop step by step and watch it think.
How system, user and assistant messages form a request, and how tokens drive limits and cost.
Write a single Python client that can switch between model providers without changing your agent code.
The core prompt patterns behind reliable agents: clear roles, step-by-step reasoning, examples and output rules.
Get the model to return JSON and validate it with Pydantic so your code can trust the result.
Detect broken or invalid model output and repair it automatically before it reaches the rest of the agent.
Stream responses token by token and measure the token usage and cost of every call.
Hands-on lab: break the LLM client, then repair it.
Why keyword search and meaning-based search each miss different questions, and why you need both.
Build BM25 keyword scoring step by step in plain Python and see how it ranks documents.
How embeddings turn text into vectors so that similar meanings sit close together.
Build a small vector store in NumPy and run top-k search with cosine similarity.
How vector databases trade a little accuracy for large gains in speed using approximate nearest neighbour search.
Combine keyword and vector results with reciprocal rank fusion to get the best of both.
Hands-on lab: compare keyword search and meaning search on real queries.
Walk through the full RAG pipeline from documents to a grounded answer.
Load local documents with the doc loader and split them into chunks sized for retrieval.
Run chunk-size experiments and see how chunk size and overlap change retrieval quality.
Assemble the prompt with retrieved chunks and require citations in the answer.
Rerank the top retrieved results to put the most useful chunks first.
Rewrite weak queries and retrieve with multiple query variants for better recall.
Diagnose whether a wrong answer came from retrieval or from generation.
Ground answers in sources and say I don't know when they are not covered.
Hands-on lab: run the full RAG pipeline end to end.
See how tool calling really works under the hood: structured text in, actions out.
Generate tool schemas from Python functions so the model can call them.
Parse the model's actions and run tools safely with validation.
Walk the ReAct agent loop line by line: thought, action, observation.
Build real tools: a safe database reader, a calculator and policy search.
Use native tool calling with the Claude API instead of hand-rolled parsing.
Handle tool errors, stop runaway loops and set step limits.
Give the agent search as a tool and let it decide when to retrieve.
Hands-on lab: trace a ReAct agent step by step.
Understand the Model Context Protocol and why the industry adopted it.
Build an MCP server that exposes Kestrel's finance data as tools.
Build an MCP client and connect it into the agent kit.
Expose resources and prompts from your server, not just tools.
Connect your MCP server to Claude Desktop and Claude Code.
Apply MCP security: trust boundaries, permissions and tool poisoning risks.
Hands-on lab: speak the MCP protocol between server and client.
Manage short-term memory so the context window stays useful.
Save and recall facts with long-term memory across sessions.
Split work into a planner and an executor for longer tasks.
Add a reflection step so the agent checks and improves its own work.
Compare multi-agent patterns: router, supervisor and hand-off.
Build a supervisor agent coordinating two specialist agents.
Rebuild the supervisor-with-specialists agent system from the previous lectures as a LangGraph graph.
Decide when a single agent is enough and when a task benefits from multiple agents, before coordinating a team in the lab.
Hands-on lab: give agents memory and coordinate a small team.
Understand why agents need evaluations and what to measure.
Build a test set from real questions with expected answers.
Combine deterministic checks with LLM-as-judge scoring.
Evaluate RAG quality: retrieval recall, faithfulness and the judge itself.
Trace every step of an agent run to debug its behavior.
Add regression tests that rerun the eval set on every change.
Hands-on lab: break an agent on purpose and catch it with evals.
Attack your own agent with prompt injection and see what breaks.
Defend the agent with input screening, spotlighting and least privilege.
Gate risky agent actions behind human approval, completing the defence stack from input screening and least privilege to human oversight.
Control cost and latency with caching, budgets and model routing.
Hands-on lab: attack your agent, then stack defences.
This course contains the use of artificial intelligence.
AI agents are moving from demos into real products. This course shows you how to build them properly.
You will build AI agents in Python using LangGraph, the framework for stateful agent workflows, and connect them to real tools through the Model Context Protocol (MCP). We start with a simple tool-calling agent and build up, one step at a time, to retrieval-augmented (RAG) agents and multi-agent systems that work together on a task.
Every concept comes with code. You will see why an agent picks a tool, how state moves through a graph, how to keep the agent's answers grounded in your own documents, and how to split a large job across several specialised agents.
What you will build
A tool-calling agent that decides when to search, calculate or call an API
A RAG agent that answers questions from your own documents with retrieved context
An MCP server that exposes your own tools to any MCP-compatible client
A multi-agent system in which a supervisor routes work to specialist agents
How the course works
Short, focused video lectures with captions
Complete source code for every project
Quizzes at the end of each section to check your understanding
Hands-on assignments so you write the code yourself
Who this course is for
This course is for Python developers, data scientists and ML engineers who already know the basics of LLMs and want to build agents that do real work. If you have called an LLM API before and want to go further, this course is for you.
By the end, you will be able to design, build and debug your own agent workflows with LangGraph and MCP.