metacareerguide.com
Agentic AI & Platforms · Module 02

The agent blueprint

Every agent, from a fifty-line script to a production system, is made of the same five parts. You design four of them. Knowing which is which turns “it is not working” into a question you can actually answer.

Module 01 described the loop. This one takes the machine apart and names the pieces, because almost every design decision you will make later is a decision about one of five components.

The kitchen

A restaurant kitchen has a head chef who decides what happens next, a printed ticket rail holding the current orders, a shelf of equipment, a stack of reference recipes, and a pass where finished plates go out. Take away any one of them and service collapses in a specific, predictable way.

Lose the chef and nothing gets decided. Lose the ticket rail and orders are forgotten mid-service. Lose the equipment and you can only serve what needs no cooking. Lose the recipes and every dish is improvised. Lose the pass and food is made but never delivered.

An agent has the same five parts, and it fails in the same five ways.

Figure 1 — the five components
1 · The modelDecides what to do next. The chef. Usually the only part you do not build.
2 · ContextWhat the model can currently see: goal, history, tool results. The ticket rail.
3 · ToolsEverything it can do to the outside world. The equipment.
4 · InstructionsThe standing rules — role, constraints, procedure. The recipes.
5 · The runtimeYour code, running the loop and enforcing limits. The pass, and the kitchen manager.
component 0 of 5

Four of these five are yours to design. Only the model is bought in.

1 · The model

The reasoning engine. You will change this least often and think about it least, which is appropriate — most agent problems are not model problems.

The one decision worth making deliberately is capability against cost. A stronger model reasons better about which tool to use and recovers from confusion more gracefully. A cheaper, faster one is often perfectly adequate for a narrow task with three tools and a clear procedure. Mixing them within one system is common and sensible: a strong model coordinating, cheaper models doing bounded subtasks.

2 · Context

Everything the model can see at this instant. It is not memory in any persistent sense — it is a working set that you reconstruct on every single call.

This is the component that most often causes trouble, and module 03 is devoted to it. For now, hold one fact: the model has no memory between calls. If something needs to be known at turn nine, something in your code put it there.

3 · Tools

A tool is a function you expose, described in words the model can read. A description, a set of parameters, and code that runs when the model asks for it.

Tools are chosen by their descriptions

The model cannot inspect your code. It selects a tool by reading its name and description, so those are the interface. Two tools described similarly will be confused with each other — and the failure looks like the model being stupid when it is actually your documentation being ambiguous. Module 04 covers this properly.

4 · Instructions

The standing brief: who the agent is, what it must always do, what it must never do, how to handle the ambiguous cases. Sent with every request, because there is no memory to hold it.

The instinct is to write more. Resist it. Instructions compete with everything else in context for the model’s attention, and a three-page brief means each rule holds a smaller share of it. Fewer, sharper rules outperform exhaustive ones, and a rule the model can actually follow beats three it will average across.

5 · The runtime

Your code. The part nobody demonstrates and everybody needs.

What the runtime is responsible for

Running the loop — call, read the response, execute tools, append results, call again.

Enforcing limits — maximum iterations, maximum spend, timeouts. An agent without a ceiling is a bill without a ceiling.

Validating tool requests — the model asked; the runtime decides. Checking arguments, permissions, and scope happens here or nowhere.

Handling failure — when a tool errors, does the agent see the error and retry, or does the whole task stop? Both are valid. Choosing by accident is not.

Logging — every decision and every action. When an agent does something surprising, the log is the only way to find out why.

Diagnosing by component

The practical value of this decomposition is that it turns “the agent is not working” into a question with five candidate answers.

It picks the wrong tool. Tools or instructions — usually ambiguous descriptions, not a weak model.
It forgets a constraint you stated. Context. The constraint is either absent from later calls or buried in the middle of a long one.
It loops without progressing. Runtime. It needs an iteration cap and a way to recognize that it is stuck.
It stops at the first error. Runtime. Your error handling ends the task instead of returning the error as an observation.
It reasons poorly about a genuinely hard tradeoff. Model. This is the one case where reaching for a stronger model is the right instinct.

Try it — 15 minutes

1. Pick a task you would want an agent for. Something real: triaging your inbox, checking whether a set of links still work, drafting weekly status from a task list.
2. Write down the five components for it on one page. Which model. What has to be in context every turn. What tools — name each and write its one-line description. What the standing instructions are. What limits the runtime enforces.
3. Now try to break it. For each tool, ask: could this be confused with another one? For each instruction, ask: what happens if the model ignores it? For the runtime, ask: what is the worst this can cost if it loops?
4. Optional but instructive: paste your five-component plan into an assistant and ask it to identify the weakest part. It is reasonably good at spotting ambiguous tool descriptions, which is the most common flaw.

What to take away

Model, context, tools, instructions, runtime. You design four of the five. When an agent misbehaves, name the component before you change anything — most teams reach for a better model when the actual fault is a tool description or a missing limit.

Check yourself

1. Your agent has two tools: search_docs (“search the documentation”) and find_article (“find an article”). It uses them interchangeably and unpredictably. What should you change first?

Fix the descriptions. Those two are genuinely indistinguishable — a stronger model would guess more confidently, not more correctly. Merging is a legitimate option if they truly overlap, but it discards a distinction you presumably wanted; do it deliberately rather than as a workaround for unclear writing.

2. Which component is responsible for stopping an agent that has run twenty iterations without progress?

The runtime. Both wrong answers ask the model to police itself, and it is the thing that decided to loop in the first place — asking it to notice is asking the fault to detect itself. Instructions like “do not loop unnecessarily” help at the margins and are not a control. A limit enforced in code is.

3. An agent correctly gathers three pieces of information, then produces a final answer contradicting the second one. Which component would you examine first?

Context, and specifically position within it. The middle of a long context is where attention is thinnest — exactly the “lost in the middle” effect from the first course. Bad tool data is worth ruling out and the log will tell you in seconds, which is why it is the reasonable first guess. But an agent that used a result correctly at the time and contradicts it later is describing an attention problem, not a data problem.
← Module 01 Course outline Module 03 — in production