Agentic systems, tools & MCP
P11.applied-llm-systems.01 · Audience: guest, it-ml, language-pro · Prerequisites: RAG & groundedness
An agent is a loop, not a bigger prompt: plan → act (call a tool) → observe
→ repeat, under a step budget. The model proposes actions; tools do them;
the boundary (MCP) type-checks every call before any side effect. Most agent
bugs live at that boundary, not in the model. Every run below executes live on a
mock clinic backend. The cost and design trade-offs behind agents like this —
tokens as the unit of cost, tools vs skills, and choosing a model per task — are
covered in P11.applied-llm-systems.05.
A plain LLM answers. An agent acts: it runs a bounded plan → act → observe loop, calling tools to change the world and reading back the result. The step budget is what stops it spinning forever.
🎯 An agent is a loop under a step budget — not one giant prompt.
⚡ Interview Ref — the quick-scan Reference face
- Agent = bounded plan→act→observe loop calling tools, under a step budget. Not a bigger prompt.
- MCP boundary: typed schema check per call (unknown tool / missing param / wrong type / extra param) before any side effect. Most bugs live here.
- Control loop: plan once → execute each call under step budget + per-step re-validation; unroutable goal escalates with an empty trace.
- Writes on retry: a lost response → client retries → without a key the write runs twice (double-booking). Reads are safe; writes aren't.
- Idempotency: same key on original + retry → server dedups, returns the original.
- Observability: trace every step; deterministic replay (no hidden randomness) makes it debuggable offline.
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
Try it yourself
A scratch console for this page's ideas — ungraded, nothing you run here is recorded.
Scratch console
A scratch console with the scientific stack (pandas, numpy, scikit-learn). Runs on the server — no network, resource-limited and measured.
Output appears here.
Where next?
Later in Applied LLM Systems & Agents
This module unlocks