Week 2 · Day 6 of 10
Agents: multi-step work with real actions
Students can build a bounded agent that takes real actions with tools, including one reached through MCP, and argue when a fixed workflow is the better design.
1LearnTool loops, MCP and when to stop
Multi-step tool loops, stopping conditions, reading an agent's trace, and when a fixed workflow beats an agent. The Model Context Protocol as the standard way to plug in outside systems: connecting to an existing MCP server, and keeping its permissions narrow because its output is untrusted.
How an agent works in a loop
- A goal
Try it live
Try it live
An agent loop you can watch
The agent can search this course and use a calculator, deciding each step itself. It has to stop within 5 steps.
Check your understanding
What makes something an agent rather than a workflow?
Why does every agent loop need a stopping condition?
Before connecting a third-party MCP server, what should you check?
2BuildResearch, draft and save, in one agent
An agent that finishes a multi-step task (research, draft, save) using your tools and one existing MCP server, and stops at a set limit.
Done when: an agent finishes a task in several steps, uses an MCP server, and stops at a set limit.
3CapstoneOne real multi-step flow, or why not
One multi-step flow that takes a real action for your user, or a written case for why a fixed workflow is better.
4HomeworkAnnotate an agent's trace
Read one agent's trace step by step and annotate each decision it made.
For teachers: the day 6 teaching kit.