Reference · AI Agents
The agent stack — one-page cheat sheet
Published
The one sentence: an AI agent is a stateless text-prediction
function, wrapped in a loop, given tools and a goal, run by ordinary code.
The two diagrams
REQUEST PATH THE LOOP (the engine) User ┌───────────────────┐ ↓ ▼ │ Agent (LLM+loop) OBSERVE ─▶ THINK ─▶ ACT─┘ ↓ (result) (LLM picks)(run tool) Tool (model asks, │ ↓ runtime runs) ▼ goal met? → DONE Billing Service else loop (to max-steps) ↓ Database
Definitions (compressed)
| LLM | Stateless text→text fn. No memory, no hands. |
| Tool | Typed fn the model may request (name+schema). |
| Tool calling | Model emits request; runtime runs it. |
| Agent | LLM + tools + loop + goal; model picks path. |
| Agent loop | Observe→Think→Act→Repeat. Reconcile intent. |
| Runtime | App server hosting loop; state, tools, limits. |
| Memory | What runtime reloads. RAM=context, disk=store. |
| Workflow | Dev hardcodes path. Predictable, cheap. |
| Agent vs WF | Model decides path. Flexible, costly. |
| MCP | Open standard to plug tools in. USB-C for AI. |
| MCP server | Exposes tools/data (the device). |
| MCP client | Connects from host app (the port). |
| Tool registry | Catalog advertised to model (svc discovery). |
| Single agent | One loop, one context. Monolith. |
| Multi-agent | Orchestrator + workers. Microservices. |
Mental models
LLM = Brain (no memory, no hands) Tool = Hands / a callable function Agent = Brain + Tools + Loop + Goal Runtime = App server that runs the loop + rules Memory = What runtime reloads (RAM vs disk) Workflow = Developer chooses the path Agent = Model chooses the path MCP = USB-C / JDBC for tools (server=device, client=port) Single = Monolith Multi = Microservices Archetype= Same engine + diff tools + diff job
Archetype = same engine, diff job
| Agent | = Employee | Tools |
|---|---|---|
| Coding | SW Engineer | files, shell, tests, git |
| Exec-asst | Exec Assistant | email, calendar, browser |
| Support | Support Rep | KB, tickets, account, refunds |
| SRE | SRE Engineer | metrics, logs, deploy, rollback |
| Billing | Billing Ops | invoices, payments, subs, refunds |
Three rules for the VP chair
- Default to workflows; pick agents only when the path can’t be predetermined.
- Start single-agent; split to multi-agent like microservices — reluctantly, with evidence.
- To judge a pitch, ignore the brand: what tools? what loop? what guardrails?
Buzzword → engineering translation
| Buzzword | What it actually is |
|---|---|
| LLM / foundation model | Stateless text→text endpoint |
| Function calling / tools | Typed RPC model requests, you run |
| Agentic / autonomous AI | LLM in a while-loop + tools + goal |
| Reasoning / thinking | The Think step — pick next action |
| Orchestration framework | The runtime (app server for the loop) |
| Context window | Bounded RAM, re-sent every call |
| Buzzword | What it actually is |
|---|---|
| Memory / RAG | External store + query injecting text |
| Workflow / chain | Hardcoded pipeline / DAG you wrote |
| MCP | Standard tool interface; N×M → N+M |
| Multi-agent / swarm | Orchestrator-worker microservices |
| Copilot / AI teammate | An archetype: engine + a role’s tools |
| Hallucination | Model predicted plausible-but-wrong text |
Ten memory rules (recite these)
- LLM — stateless text-prediction function; brain in a jar, no memory, no hands.
- Tool — a typed function the model requests but never runs; calling = model asks, runtime does.
- Agent — LLM + tools + loop + goal; the model picks the path.
- Loop — a K8s reconciliation loop for intent: observe, think, act, repeat.
- Runtime — the app server hosting the loop; holds state, runs tools, enforces guardrails.
- Memory — what the runtime reloads into the prompt; context is RAM, the store is disk.
- Workflow vs agent — you write the if/else vs the model writes it; choose by predictability.
- MCP — USB-C for tools; server = device, client = port, registry = catalog.
- Single vs multi — monolith vs microservices; split only when one context/role can’t cope.
- Archetypes — same engine + different tools + different job description.
5-minute review (weekly) & 30-minute deep dive (when stalled)
5-min: recall, don’t re-read — say the one sentence; draw both diagrams from memory; recite the ten rules; translate three buzzwords blind. 30-min: blank-page reconstruct all ten levels; then re-derive the chain of necessity (each layer forces the next: stateless LLM → tools → loop → runtime → memory → workflow/agent → MCP → single/multi → archetypes); then place one real product on the spectrum (workflow/agent? single/multi? which archetype? which tools?).