Learn AI compute, then follow the market
← Back to Compute College

Compute College

The agent stack: model, instructions, tools, harness, and environment

Map the components that make an AI agent work and the boundary each component owns.

Plain-English definition

The agent stack is the set of components around a model: instructions define behavior, tools provide actions or information, the harness controls the loop, state carries relevant history, and the environment contains the systems being observed or changed. Separating these components makes ownership and failure analysis clearer.

Memory trick: The model chooses; the stack constrains.

Why it matters

When everything is called “the agent,” teams cannot tell whether a problem came from model judgment, a tool schema, stale state, an authorization check, or orchestration code. Component boundaries also make cost and latency measurable.

  • The design makes a hidden tradeoff measurable before it reaches users.
  • A clear boundary reduces retries, unsafe actions, or unnecessary capacity.
  • The operating choice should be tested against the workload rather than assumed from a demo.

Simple example

A ticket agent uses a model to classify intent, a retrieval tool to read policy, a harness to limit steps, a state store for the current ticket, and a write tool that requires approval. Each component has its own logs and tests.

  • The example names the input, decision, and expected boundary.
  • A deterministic or human checkpoint owns the part a model should not guess.
  • The result can be measured with quality, latency, safety, and cost metrics.

Example figures are illustrative calculations, not current quoted market prices.

Current example

Primary reference

This source explains the method or risk boundary. It does not replace testing the actual model, data, provider, and workload conditions in production.

Anthropic: Building effective agents

Primary guidance on simple workflows, tool use, orchestration, and adding autonomy only when it creates measured value.

Source discipline: examples on this page are illustrative; measure the real workload before making a release or capacity decision.

Common mistake

Permissions and stopping rules do not belong in the prompt alone. Critical boundaries need to live in the harness and tool layer where code can enforce them.

Practical takeaway

What you can do with this

Create a component map for one agent. Name each input, output, owner, permission, failure response, and metric.

  • Start with a narrow workflow and explicit failure boundary.
  • Instrument the path before optimizing it.
  • Review the design whenever model, tool, traffic, or policy changes.

Decision check: if the model is wrong, can the surrounding stack prevent an unauthorized or irreversible result?

Compute College learning path

AI Engineering

Step 29 of 48: The agent stack: model, instructions, tools, harness, and environment