The platform in three layers
The Claude Platform is Anthropic's infrastructure for building with Claude programmatically — a REST API, SDKs, CLIs, and a Console (keys, usage, managed agents, prompt testing). Instead of chatting in a browser, you send structured requests and get structured responses, controlling the model, token budget, tools, and system instructions.
Key concept · Build with primitives, scale on infrastructure, run with control
Picture three stacked layers: Primitives — the building blocks you call (Messages API, tool use, files, web search, code execution, MCP servers, skills). Infrastructure — what carries you past a prototype (managed agents, retries, queues, observability). Controls — running in production (dashboards, evals). A single messages.create call already gives full control: model (which model handles it), max_tokens (response cap), system (the role/instructions), and messages (the conversation). That's enough to wire Claude into an existing feature — the platform takes you from "ask Claude a question" to "Claude is part of my product."
The agent loop, tool use, and thinking
A single API call returns one response. To automate a workflow, Claude must act, look at the result, decide what's next, and continue — that's an agent: Claude running both sides of the loop with no human in the middle.
Key concept · The loop: send tools → run tool → feed back → repeat
The loop: (1) send a message with tools available (each a name, description, and JSON input schema); (2) Claude responds with a final answer or a tool-use request; (3) your code runs that tool; (4) you send the result back; (5) repeat until the stop_reason is end_turn. You own the loop and the tools; Claude owns the reasoning. Tool use is how Claude reaches your code and the world; thinking (extended reasoning) lets it work through a hard problem before answering. And choosing the model matters: reach for a larger model (Opus/Sonnet) for hard reasoning and a smaller one (Haiku) for simple, high-volume tasks like drafting.
Extending an agent — and letting Anthropic run it
Beyond your own tools, the platform extends an agent with built-in tools (web search, code execution), skills, MCP servers, and context management for long-running work. Then the final move: hand the loop off.
Key concept · Managed agents run the loop for you
Claude Managed Agents is a suite of APIs that runs the same agent loop on Anthropic's infrastructure, inside an isolated container with file system, bash, and web search. You fire sessions from your app against environments you configure (packages, network controls); tool calls stream back in real time. The building blocks: agents (definitions with tools/personas), sessions, environments, tools, MCP, memory (read before, write after — so runs build on each other), outcomes (rubrics and separate graders that define and check "done"), and multi-agent coordination (a coordinator delegating to specialists). Finally, building with Claude Code: its built-in /claude-api skill writes integration code for you — stub the file, delegate, review the diff.
Chapter 18 quiz
Fifteen questions on the platform, the agent loop, and managed agents. Answer first, then expand Show answer.
Part A · Multiple choice
The Claude Platform's three layers are:
- A Primitives, infrastructure, controls
- B Free, Pro, Max
- C Frontend, backend, database
- D Chat, Cowork, Code
Show answer
A. Build with primitives, scale on infrastructure, run with control.
Which parameter sets the role/instructions in a messages.create call?
- A system
- B max_tokens
- C model
- D messages
Show answer
A — system.
An agent is best described as:
- A Claude running both sides of the loop without a human in the middle
- B A single API call
- C A database query
- D A browser tab
Show answer
A. Observe, decide, act, repeat.
The agent loop stops when the stop_reason is:
- A end_turn
- B tool_use
- C max_tokens
- D error
Show answer
A — end_turn. tool_use means run a tool and continue.
In the loop, who owns what?
- A You own the loop and tools; Claude owns the reasoning
- B Claude owns everything
- C You own the reasoning
- D Neither owns anything
Show answer
A.
Each tool you define includes:
- A A name, a description, and a JSON input schema
- B A password
- C A model version
- D A price
Show answer
A.
For a simple, high-volume drafting task, a good model choice is:
- A A smaller/faster model (e.g. Haiku)
- B Always the largest model
- C No model
- D A fine-tuned model only
Show answer
A. Match the model to the task.
What does Claude Managed Agents do?
- A Runs the agent loop for you on Anthropic's infrastructure
- B Replaces the Messages API
- C Only stores keys
- D Nothing
Show answer
A. In an isolated container with FS, bash, and web search.
In managed agents, what defines and checks "done"?
- A Outcomes — rubrics and separate graders
- B The system prompt only
- C A timer
- D Nothing
Show answer
A. Claude iterates until it meets them.
Part B · True or false
The Console is where infrastructure and control layers live (keys, managed agents, analytics).
Show answer
True.
Memory lets a managed agent build on what it found in previous runs.
Show answer
True. It reads before starting and writes when done.
Managed-agent sessions can run in parallel and stream tool calls back to your app.
Show answer
True.
Claude Code's built-in Claude API skill can write your integration code for you.
Show answer
True. Invoke with /claude-api or it loads when it detects the SDK.
Part C · Short answer
Name the five steps of the agent loop.
Show answer
Send messages with tools → Claude answers or requests a tool → run the tool → send the result back → repeat until end_turn.
Name four building blocks of managed agents.
Show answer
Any four: agents, sessions, environments, tools, MCP, memory, outcomes (rubrics/graders), multi-agent coordination.