
Welcome to AI Agents Explained. Key ideas: Agents are already in the tools you use; Understanding beats button-clicking; Analogy, diagram, example, misconception, recap; No code needed, just curiosity.
People use the word agent for almost anything with AI inside. Key ideas: Chatbot: one question, one answer; Workflow: fixed steps designed by a developer; Agent: the model chooses the steps in a loop; Many great products are workflows, not agents.
When people say an agent is autonomous, they rarely say how autonomous. Key ideas: Autonomy is a ladder: suggest, assist, delegate, autonomous; Match the level to the cost of mistakes; Earn autonomy with evidence; Different actions can have different levels.
Before we dive into how language models work, let me show you how to get the most out of this course in just a couple of minutes. Key ideas: Watch in order, then use the cheat sheets; Quizzes check understanding, not memory; The design canvas is your final project.
Before we can understand agents, we need to understand their brain: the large language model. Key ideas: Models read tokens, not words or letters; About 4 characters, or 0.75 words, per token; Cost, speed and limits are all measured in tokens; Agents use many tokens per task.
Every large language model, from the smallest to the most powerful, is built on one trick: predicting the next token. Key ideas: LLMs predict the next token, again and again; Knowledge comes from training on huge text; Predictions, not database lookups; Agents are built on this same trick.
If tokens are the model's alphabet, the context window is its working memory. Key ideas: The context window is the model's working memory; It holds prompt, history, documents and tool results; Bigger is not the same as better; Good agents curate their context.
We saw that the model scores every possible next token. Key ideas: Sampling picks one token from the scores; Low temperature: focused and repeatable; High temperature: varied and creative; Agents usually run cool for reliability.
Language models sometimes produce answers that sound perfectly confident but are simply false. Key ideas: Hallucination: fluent but false output; Caused by likely text, not verified text; Grounding, tools and citations reduce it; Always verify important facts.
A newer family of models has changed what agents can do. Key ideas: Reasoning models think before answering; Slower and costlier, but better at hard tasks; Effort levels trade cost for accuracy; Mix models by task difficulty.
There are dozens of models to choose from, and new ones every month. Key ideas: Small, mid-size and frontier tiers; Ask: quality, speed, cost and context; Route each step to the right model; Decide with your own evals.
In the last section we studied the brain, the language model. Key ideas: Agents combine model, instructions, tools and memory; A loop keeps the agent working; Guardrails and humans keep it safe; The whole system is the agent.
Every agent has a heartbeat. Key ideas: The loop: perceive, think, act, observe; Each observation improves the next decision; Context grows with every round; The loop ends with a final answer.
In twenty twenty two, researchers from Princeton and Google published a pattern called ReAct, short for reasoning and acting. Key ideas: ReAct: thought, action, observation, repeat; Reasoning guides every action; Traces make agents easier to debug; Still the core of most agents today.
An agent loop that never stops is not just useless, it is expensive and potentially dangerous. Key ideas: Agents stop on a final answer or a goal check; Add max steps, tokens, time and cost limits; Runaway loops grow costs fast; Stop gracefully and report progress.
Agents fail in surprisingly predictable ways. Key ideas: Loops, wrong tools, bad arguments; Lost goals and false success; Find the first wrong step in the trace; Verify independently.
In this walkthrough, we will follow one agent run from start to finish, step by step. Key ideas: A real run is just the loop, repeated; Tools provide the facts; Checkpoints guard risky actions; Traces explain every decision.
A language model on its own can only write text. Key ideas: A tool: name, description and parameters; The model requests; your code executes; Read tools are safer than write tools; Tools connect models to the real world.
Function calling is the mechanism that makes tools work. Key ideas: Define tools, get a call, run it, return the result; The model writes structured requests; Calls can be parallel or sequential; Always validate and return clear errors.
When you debug an agent, you will spend a lot of time reading tool calls. Key ideas: Definitions describe names, types and required inputs; Calls carry an id, a name and arguments; Results and errors link back by id; Helpful errors let agents recover.
When an agent has ten or fifty tools, how does it decide which one to use? Key ideas: The model picks tools by reading descriptions; Write when and when-not to use each tool; Too many tools lowers accuracy; Group, route, or split to stay focused.
Agents can act on the world in four main ways: through A P Is, through code, through a web browser, and by using a whole computer like a person does. Key ideas: APIs: fastest and most reliable; Code: exact logic, in a sandbox; Browser and computer use: flexible but slow; Prefer the most structured option.
Many agent problems are really tool problems in disguise. Key ideas: One job, clear names, strict parameters; Small results and helpful errors; Safe by default, with logging; Better tools often beat better prompts.
Here is a surprise for many people. Key ideas: Models are stateless between calls; Apps resend history every time; Limits force history to be trimmed; Memory is built in layers around the model.
The simplest kind of memory is the conversation itself. Key ideas: Short-term memory is the message history; Roles: system, user, assistant and tool; Cost grows as history is resent; Trim noise, pin facts, and cache stable text.
Trimming throws information away. Key ideas: Compaction replaces old history with a summary; Keep goals, decisions, state and key facts; Summaries are lossy, so protect rules; Keep full logs outside the context.
Short term memory ends when the conversation ends. Key ideas: Long-term memory lives outside the model; Write, store, search and inject; Profiles are loaded; large stores are searched; Let users see, edit and delete memories.
Not everything deserves to be remembered. Key ideas: Ask: useful, stable, accurate and safe?; Corrections and preferences are most valuable; Give memories a lifetime; Update or delete stale memories.
Memory makes agents more helpful, but it also makes them a target. Key ideas: Memory can leak, surprise or be misused; Collect less and never store secrets; Isolate, encrypt and distrust outside content; Give users visibility and control.
A language model only knows what was in its training data, up to a certain date. Key ideas: Models lack private, fresh and precise knowledge; RAG: retrieve, add to prompt, answer with sources; Easier to update than fine-tuning; Scales beyond any context window.
How can a computer find passages that mean the same thing as your question, even when they use completely different words? Key ideas: Embeddings turn meaning into numbers; Similar meanings land close together; Similarity scores rank closeness; They find paraphrases that keywords miss.
Once every passage has an embedding, retrieval becomes a geometry problem: find the passages whose addresses are closest to the question's address. Key ideas: Index once: embed and store every chunk; Query: embed the question, return nearest chunks; Approximate indexes make it fast; Use metadata filters for relevance and access.
Before documents can be embedded and searched, they must be cut into pieces called chunks. Key ideas: Chunks must hold one complete idea; Prefer structure-aware chunks with overlap; Add contextual headers to each chunk; Keep source links for citations.
Neither keyword search nor vector search is perfect on its own. Key ideas: Keyword and vector search have opposite strengths; Hybrid search runs both and merges; Rerankers pick the truly relevant passages; Rewrite queries for better retrieval.
Classic RAG retrieves once, then answers. Key ideas: Agentic RAG makes retrieval a tool; The agent plans, retrieves, judges and repeats; Handles multi-hop questions and weak results; Use budgets to control cost and time.
When a RAG system gives a wrong answer, people often blame the model. Key ideas: Failures: documents, chunking, retrieval, generation; Diagnose by checking what was retrieved; Match each failure to its fix; Measure every stage with a test set.
Big goals are hard for agents, just as they are for people. Key ideas: Break big goals into small, concrete tasks; Good tasks are checkable and ordered; Track tasks in a visible list; Revise the list as you learn.
In the basic agent loop, the model decides one step at a time. Key ideas: Plan first, then execute step by step; Check results and re-plan when needed; Strong planner, cheaper executor; Store plans as data to track progress.
Good writers revise their drafts. Key ideas: Draft, critique, revise, check; Use specific criteria; Combine self-critique with external checks; Limit rounds: returns diminish fast.
One of the most important decisions in AI system design is whether you need an agent at all, or whether a workflow will do. Key ideas: Workflow: code decides; agent: model decides; It is a spectrum, not a switch; Workflows for known, high-volume steps; Agents for varied, open-ended tasks.
Agents are exciting, and that excitement leads many teams to use them where they do not belong. Key ideas: Avoid agents for fixed, exact or instant tasks; Let code do math and rules; Try simpler options first; Use agents where paths truly vary.
Even the best agents make mistakes, and some mistakes cannot be undone. Key ideas: Pause before irreversible, costly or public actions; Show clear, editable previews; Target checkpoints to avoid fatigue; Increase autonomy as trust is earned.
Agents are only as useful as the systems they can reach: your files, your calendar, your database, your company's tools. Key ideas: Custom integrations do not scale; MCP is an open standard for connections; Build a server once; any app can use it; It supplies tools; safety is still your job.
M C P has three roles: the host, the client and the server. Key ideas: Host: the AI app with the model; Client: one connection per server; Server: exposes tools and data; The host stays in control.
An M C P server can offer three kinds of things: tools, resources and prompts. Key ideas: Tools: model-controlled actions; Resources: app-controlled data; Prompts: user-controlled templates; Choose the primitive that fits the job.
An M C P server can run in two places: on your own computer, next to the app, or on the internet, as a remote service. Key ideas: Local: on your machine, via stdin and stdout; Remote: on the internet, via HTTP and OAuth; Local for files and privacy; remote for cloud services; Trust and permissions matter for both.
M C P gives an agent access to tools. Key ideas: Skills package how-to instructions; Loaded on demand to save context; Skills teach; MCP connects; Review skills like code.
Every connector you add gives your agent new power: to read your email, change your files, or post as you. Key ideas: Connectors are keys: grant the smallest one; Treat tool content as data, not commands; Review servers; watch for tool poisoning; Approve risky actions and log everything.
So far, we have mostly studied a single agent working alone. Key ideas: Teams bring specialization and parallel work; Sub-agents keep contexts clean; Teams cost more tokens and add failure modes; Start with one agent; split for clear reasons.
The most common way to organize agent teams is the supervisor pattern, sometimes called orchestrator and workers. Key ideas: A supervisor plans, delegates and combines; Precise delegation: task, format and limits; Strong supervisor, cheaper workers; Scale the team to the task.
Not every team needs a manager. Key ideas: Pipelines: stages in a line, structured handovers; Errors compound, so check between stages; Handoffs: pass control to a specialist; A good summary makes a good handoff.
We saw that an agent reviewing its own work has blind spots. Key ideas: Separate reviewers catch what authors miss; Use rubrics, fresh context and diverse models; Debate surfaces trade-offs for a judge; Ground reviews in tests and evidence.
When several agents work on one goal, they need to share information. Key ideas: Messages are simple; shared state is one truth; Store goals, tasks, findings and decisions; Pass artifacts by reference; Clear ownership prevents conflicts.
Agent teams can be impressive, but they are not free. Key ideas: Teams can use many times more tokens; Watch for loops, lost context and bad merges; Use limits, cheaper workers and tracing; Choose a team only when it clearly pays off.
Welcome to the section on evaluating and improving agents. Key ideas: Agents vary, so measure them; Evals are fixed, repeatable tests; Break results down by difficulty; Evaluate, fix one thing, evaluate again.
The most important question in any eval is simple: did the agent do the job? Key ideas: Check real outcomes, not agent claims; Prefer programmatic checks; rubrics for open work; Track cost, steps and interventions; Measure consistency across runs.
An agent can reach the right answer in a terrible way: by luck, with wasted steps, or by doing something risky along the way. Key ideas: A trajectory is the agent's full work, step by step; Check tools, steps, safety and grounding; Trajectories explain failures; Check rules, not one exact path.
Some outputs cannot be checked with simple code: a helpful reply, a clear summary, a polite tone. Key ideas: Judges grade what code cannot; Use rubrics, references and structured output; Watch for position, length and self bias; Calibrate against humans.
A brilliant agent that takes ten minutes and costs a dollar per answer may be useless for a support chat. Key ideas: Cost = steps x context x price; Latency = sequential steps plus tools; Trim context, cache and parallelize; Estimate before you launch.
Once an agent is live, you need to see what it is doing. Key ideas: A trace records every step of a run; Log steps, tools, cost, time and errors; Dashboards and alerts catch problems early; Turn failed traces into eval cases.
You do not need thousands of test cases to start. Key ideas: Start with 20 to 50 real cases; Cover common, edge, hard and adversarial; Include "must not" rules and a baseline; Run it on every change; grow it from failures.
This course contains the use of artificial intelligence.
AI agents are everywhere: in coding tools, customer support, research assistants, office apps and personal assistants that book, write, search and act for you. Every company is talking about agentic AI, yet most people, including many professionals who use these tools every day, cannot explain what actually happens inside an agent. What is a tool call? Where does the memory live? Why do agents sometimes go off the rails, cost too much, or get tricked by a web page? This course answers those questions clearly, visually and without code.
AI Agents Explained is a slide-based, concept-first course taught by a software engineer who builds with AI every day. Instead of chasing the newest app, we open the hood. Every lecture uses clean animated diagrams to show how modern agents work step by step: the language model at the center, the loop that lets it think and act, the tools it calls, the memory it keeps, the knowledge it retrieves, the plans it makes, and the guardrails that keep it safe.
You will start with the foundations. You will see how large language models read tokens, predict the next word, use a context window and why they hallucinate. You will learn what reasoning models do differently and how to think about model size, speed and cost. With that base, you will learn the agent loop itself: perceive, think, act and observe, and the ReAct pattern that powers many real agents. We will trace a real agent run together, decision by decision, so the idea becomes concrete.
Next, you will understand the building blocks that make agents useful. You will read an annotated tool call and see exactly how a model chooses and uses a tool, from simple APIs to browser and computer use. You will learn the difference between short-term and long-term memory, how summaries and context compaction work, and what an agent should never remember. You will see embeddings and vector search visually, learn how retrieval-augmented generation (RAG) grounds an agent in your own documents, and learn the most common ways RAG fails and how teams fix them.
Then we go deeper than other introductory courses. You will learn how agents plan: breaking goals into tasks, plan-and-execute, reflection and self-critique, and, just as important, when a simple workflow is better than an agent. You will understand the Model Context Protocol (MCP), the open standard that connects agents to apps and data, including hosts, clients, servers, tools, resources and prompts. You will learn the main multi-agent patterns, such as supervisor, pipeline, handoff and reviewer, and the hidden costs of agent teams.
Most beginner courses stop there. This one does not. You will learn how professionals evaluate agents: task success, trajectory evaluation, LLM-as-judge, latency and cost math, observability and building a small eval set. You will learn the security side that every manager and builder must understand: prompt injection, least privilege, sandboxing, human-in-the-loop approvals and governance. Finally, you will break down real-world case studies, including a coding agent, a research agent and a customer support agent, and use the agent design canvas to plan an agent for your own work.
Every section ends with a short quiz, and the course includes a full practice test so you can check your understanding. You also get downloadable cheat sheets for every section, a glossary of agent terms, the agent design canvas, an agent-worthy task checklist and a risk checklist you can use at work.
Why learn from this course? Because it is built to last. We teach the patterns and principles behind every agent product rather than button clicks that change every month. When you finish, you will be able to read any AI announcement, product page or architecture diagram and understand what it really means. You will be able to talk confidently with engineers, evaluate vendors, spot risky designs, and decide where agents can genuinely help your team.
Here is what makes the learning stick. The course runs over four hours across seventy lectures. Each lecture is focused and usually three to five minutes long, so you can learn on a commute or between meetings. Each concept is introduced with a simple everyday analogy, then shown as an animated diagram, then connected to a real product you already know. Ideas build on each other in a deliberate order, so by the final section you can draw a complete agent architecture from memory and explain every box and arrow. The quizzes are written to test understanding, not memorization, and every answer comes with an explanation. If a concept still feels unclear, ask in the Q&A: questions are answered by the instructor, and common questions become new lectures or updates, so the course keeps improving with its students.
No coding is required. If you can use a web browser and you are curious about how AI really works, you are ready. Developers are welcome too: this course gives you the mental model before you pick a framework, so you learn LangGraph, the OpenAI Agents SDK, CrewAI or n8n much faster afterwards.
A note on how this course was made: the narration uses an AI-generated voice, and AI tools helped with drafting and visuals. All content was planned, written, reviewed and fact-checked by the instructor, Maisha Farzana Taki, a software engineer, and every example reflects her own experience building with AI.
What is inside, section by section: (1) Welcome and the big picture, where you learn the difference between a chatbot, a workflow and an agent, and the levels of autonomy. (2) How LLMs work, in plain terms: tokens, next-token prediction, context windows, temperature, hallucinations, reasoning models and choosing a model. (3) The agent loop: anatomy of an agent, perceive-think-act-observe, ReAct, stopping conditions and why loops fail. (4) Tool calling: function calling, reading a tool call as JSON, how models choose tools, and browser and computer use. (5) Memory: short-term, long-term and profile memory, compaction and privacy. (6) RAG and knowledge: embeddings, vector search, chunking, hybrid search, reranking and agentic RAG. (7) Planning and reasoning. (8) MCP. (9) Multi-agent systems. (10) Evaluation, cost and reliability. (11) Safety, guardrails, real-world case studies and the future of agents. Each section has its own quiz and a one-page cheat sheet you can download and keep.
Enroll today and finally understand how modern AI agents work, from the first token to a safe, evaluated, multi-agent system.