Module 13
AI Agents: First Agent to Multi-Agent
Learn what makes a system an agent, when a simpler workflow is the better choice, and how to build the agent loop by hand before reaching for any framework. Give agents real tools (code, web search, databases, retrieval, even a browser), compose them with the five workflow patterns, and scale up to teams of agents that coordinate inside your app and across companies with A2A.
By the end of this module you can
- tell a workflow from an agent and decide, with numbers, when an agent is worth its cost
- write an agent loop in plain Python, then with the Claude tool runner and smolagents
- design safe tools for web search, databases and retrieval using least privilege and hard limits
- compose prompt chaining, routing, parallelisation, orchestrator-workers and evaluator-optimizer
- build a multi-agent team with briefs, memos and shared memory, and compare AutoGen and CrewAI
- explain A2A, spin up subagents, and sandbox a computer-use agent
Lessons
10 in this module- 01What is an AI agent?Explain the difference between a workflow and an agent, trace one request through the think-act-observe loop with its real cost, and decide when not to build an agent.
- 02Build your first agentWrite a working agent loop in plain Python with the Claude API, keep the message history correct, handle tool errors and step limits, then rebuild it with the SDK tool runner.
- 03smolagents and custom toolsBuild code agents and tool-calling agents with Hugging Face smolagents, write custom tools with @tool and Tool subclasses, and run model-written code safely.
- 04Web search and data access toolsGive an agent web search as a server or client tool and safe, read-only database access, and defend both against stale sources, floods and prompt injection.
- 05Agentic RAGTurn retrieval into a tool the model can call repeatedly, build a stateful search tool that skips seen passages and enforces a budget, and know when to hard-code mandatory lookups.
- 06Workflow patterns: chain, route, parallelise, orchestrate, evaluateRecognise and build the five workflow patterns from Anthropic's Building effective agents, and compose them instead of reaching for one giant agent.
- 07Multi-agent systemsBuild an orchestrator with specialist agents that each work in their own context, coordinate through briefs, memos and a shared board, and weigh the token cost.
- 08AutoGen and CrewAIBuild the same content team in AutoGen's group chat and CrewAI's role-and-task crew, map both to patterns you know, and choose a framework with its costs in view.
- 09The A2A protocol and spinning up subagentsExplain how A2A agent cards, tasks and artifacts let agents from different companies cooperate, how A2A differs from MCP, and how to spin up subagents safely inside your own app.
- 10Computer-use and browser agentsBuild a screenshot-to-action browser agent with Playwright and Claude, avoid coordinate and cost pitfalls, and contain the risks with sandboxing, allowlists and human approval.