The Agent Layer, Mapped: What Runs Between a Request and the 400th Tool Call
An AI agent looks simple from outside: you ask for something, and some minutes later it is done. Inside, a model has called tools hundreds of times, run code in isolated computers, opened browsers, read and written files, remembered what it learned, asked permission, recovered from crashes and spent many times the tokens of a chat. This series follows the infrastructure that makes that possible, the newest layer of the AI factory. Part 1 maps it end to end.
1. Case file
2. The loop
Every agent, from a coding assistant to a customer-service bot, runs the same basic loop: the model reads the goal and the context, decides on an action (usually a tool call), the runtime executes it, the result goes back into the context, and the loop repeats until the model decides it is done or something stops it. Our earlier articles cover the loop as a design pattern (the agentic loop, harness engineering) and the frameworks that implement it (ML Layer Part 8). This series is about what it takes to run that loop millions of times a day, safely, for hours at a time.
3. The eight components
The agent layer, top to bottom
Tap a component for its job, typical tools and the part of this series that covers it.
4. One request, traced
"Fix the failing test in my repo and open a pull request"
A composite of how coding agents work. Press Play. Timings are illustrative.
5. Why agents are expensive
Anthropic reported that in its data, agents typically use about 4 times the tokens of a chat interaction, and multi-agent systems about 15 times. In its multi-agent research system, token usage alone explained about 80% of the variance in performance, which is why spending more tokens often buys better results, and why multi-agent designs only pay off for valuable tasks.
Price a task
Our model: chat-sized tokens ร multiplier ร price. Change the inputs.
Multiply that across an industry and agents become a major driver of inference demand, the shift our compute series calls the Great Flip. Part 7 covers how teams track and control agent costs.
6. Who builds what
Gartner forecast in June 2025 that over 40% of agentic AI projects would be cancelled by the end of 2027 because of cost, unclear value and weak risk controls, and warned of "agent washing". Much of what separates a demo from a dependable agent is the infrastructure in this series.
7. Where it sits in the factory
On our site plan of an AI factory, agents run in Data Hall B alongside inference and evaluation: the model calls go to the inference fleet, while sandboxes, browsers and tool gateways run on ordinary CPU servers next to it. In the cutaway view, agents are the top floor. The same machinery also runs inside training: RL environments are agent sandboxes used to generate training data (Part 8).
8. The series
Inside the Agent Layer: eight parts
9. Reading the numbers
- Primary / widely confirmed
- Agents ~4ร chat tokens; multi-agent ~15ร; token usage explains ~80% of variance; multi-agent beat single agent by 90%+ on Anthropic's internal research eval (Anthropic engineering, Jun 2025). MCP 10,000+ active public servers, 97M+ monthly SDK downloads (Anthropic, 9 Dec 2025). Gartner forecast (Jun 2025).
- Reported โ ๏ธ
- Start-up funding rounds and valuations (press and aggregator reports; E2B totals and Daytona dates differ across sources).
- Our illustrations
- Component list, request trace and timings, token calculator.
- Sources
- Anthropic: How we built our multi-agent research system
- MCP adoption statistics (citing Anthropic's Dec 2025 update)
- Gartner forecast on agentic AI projects
- E2B and Browserbase report ยท Daytona Series B
- On this site
- ML Layer Part 8: agent runtimes ยท Production agent architecture ยท Harness production engineering