The Agent Stack
Skip to the stack
From interface to model weights
Yours
The provider’s
Interface<br>Where people direct the agent and see its work.
Explore
The interface is where a person sees and directs the<br>agent. It captures a request, starts a run, and presents<br>progress and final output.
The same agent can appear inside an editor, terminal,<br>web chat, native app, or team chat. The client may also<br>expose approvals, cancellation, and other run controls.
Examples include Claude Code, Codex, and Slack.
Claude Code
zsh — agent<br>> fix the failing test<br>Bash(npm test)<br>2 passed, 0 failed
Codex
app.ts<br>- retry(3)<br>+ retry(5)<br>1 file changed
Nori in Slack
#engineering<br>Nori<br>APP<br>Opened PR #45<br>3 replies
Nori for Mac
Nori<br>Ship the release notes<br>Running…
One agent run
Context<br>The sources an agent can load for the current task.
Explore
Context is the material available to help the agent<br>understand its current task. It begins as sources,<br>rather than as one finished stream of tokens.
The harness selects instructions, conversation<br>history, workspace files, skills, retrieved records,<br>and tool results, then arranges them into the context<br>window sent to the model.
Examples include AGENTS.md, CLAUDE.md, and llms.txt.
workspace/<br>├─ AGENTS.md<br>├─ CLAUDE.md<br>├─ skills /<br>├─ src/<br>└─ docs/
Loaded by harness
Harness<br>The software loop that turns model calls into agent behavior.
Explore
The harness is the software that turns a model call<br>into an agent. It loads context, invokes the model,<br>interprets the response, and dispatches requested<br>tools.
Tool results return as new context and the loop repeats<br>until the model produces a final response. Harnesses<br>can also enforce approvals, limits, retries, and<br>guardrails.
Examples include Claude Agent SDK, Codex App Server, Pi Agent Core, and Nori Harness.
You
Tool
LLM
The model and its tools loop until there is an answer.
Tools<br>Capabilities the agent invokes to inspect or change the world.
Explore
Tools are capabilities the agent can ask software to<br>use. They let it inspect information, run calculations,<br>change files, browse the web, or act through connected<br>services.
Each tool is described with a name, instructions, and<br>an input shape. The model requests a structured call;<br>the harness or provider executes it and returns the<br>result for the next evaluation.
Examples include Model Context Protocol, Playwright MCP, and GitHub MCP.
Terminal run commands
Files / Edit read and write
Web Fetch retrieve a page
MCP Server connected tools
API<br>The network boundary between the agent and model provider.
Explore
The API is where the application hands a model request<br>to its provider. On the far side, most implementation<br>details are hidden from the agent developer.
This boundary defines HTTP request and response formats,<br>authentication, streaming, usage accounting, billing,<br>and rate limits.
An AI gateway stands in for the provider at this seam.<br>The provider key stays server-side and developers hold<br>gateway credentials instead, so usage can be attributed<br>per developer or team no matter which provider served the<br>request. Budgets, rate limits and audit logs move to one<br>place, and changing provider becomes a configuration<br>edit rather than a change on every machine.
The cost is that you now run the gateway. When a<br>provider ships something new, you cannot use it until<br>the gateway supports it too.
Example gateways include Cloudflare AI Gateway, LiteLLM, and Portkey.
Example provider APIs include the Anthropic Messages API, the OpenAI Responses API, and the Gemini API.
HTTP request messages + tools
Gateway auth · limits · billing
Provider event stream
Hyperscaler<br>Cloud infrastructure that supplies data centers and accelerators.
Explore
A hyperscaler operates computing infrastructure at<br>enormous scale. It supplies the physical capacity on<br>which model services run.
Regions contain data centers, networking, storage,<br>servers, and accelerator fleets. A model provider may<br>own that infrastructure, rent it from AWS, Google<br>Cloud, or Azure, or combine both approaches.
Examples include AWS, Google Cloud, and Microsoft Azure.
Region
Data center
Compute hall<br>Rack accelerator node
Caching Service<br>A service that reuses work from matching prompt prefixes.
Explore
The caching service avoids repeating work for the<br>unchanged beginning of a prompt. A matching request can<br>reuse previously processed prefix state.
Reuse can reduce latency, token cost, and pressure on<br>usage limits. Changes near the beginning invalidate<br>later cached content; lifetimes and pricing vary by<br>provider, with five-minute and one-hour windows common.
Examples include Anthropic prompt caching, OpenAI prompt caching, and LMCache.
First request X
Second request XY
Third request XYZ
reusedcomputed
Inference Service<br>The runtime that schedules requests and generates model output.
Explore
The inference service turns a submitted model request<br>into generated output. It routes and queues work,<br>selects model...