mission://guides/claude-ai-worker/choose-how-to-build-it
Book a call

Chapter 02 · 7 min read

Choose how to build it

A single call, a workflow or an agent; the four ways to build an agent on Claude; and which model to start with.

Everything you build on Claude goes through one endpoint, POST /v1/messages. Tools, structured output and thinking are options on that one request, not separate products. What changes between approaches is who runs the loop and who hosts it.

Start with the simplest tier

You needBuild
Classify, summarise, extract or answer one questionA single call
Fixed steps where your code decides the orderA workflow: your code calls Claude at the right step
An open-ended job where the model chooses the stepsAn agent: Claude plus tools in a loop

Four ways to build an agent

Two questions separate them: who writes the loop, and who hosts it.

ApproachYou writeLoop and hostingChoose it when
Manual loop (Messages API)The loop: call, run tools, send results, repeatYou build the loop and host itYou want to own every step, or need a control flow nothing else fits
Tool runner (in the Anthropic SDK)Just your tool functionsThe SDK runs the loop; you host itMost custom workers. This guide uses it
Managed Agents (beta)An agent configuration and your tool resultsAnthropic runs the loop and hosts a sandbox for each sessionLong-running or scheduled agents, with files, code execution and versioned configurations
Claude Agent SDKA prompt and optionsClaude Code's full loop and built-in tools as a library; you host itA coding or file-handling agent with read, write, edit, bash and search already built

Two of these are easy to confuse. The tool runner is a helper in the regular anthropic package: it loops over tools you define and has no built-in tools. The Claude Agent SDK (claude-agent-sdk) is a separate package that brings Claude Code's own tools and loop. Both run on your own servers; only Managed Agents is hosted by Anthropic.

This guide builds with the tool runner, and shows Managed Agents in the production chapter. For the Claude Agent SDK, which is a different product with its own built-in tools, see its documentation at code.claude.com/docs/en/agent-sdk.

Which model

Start with the most capable model that fits your budget, get the worker right, then measure whether a smaller one holds the same quality. Prices are per million tokens, input and output.

ModelIDPrice (in / out)Good for
Claude Opus 5.5claude-opus-5-5$4 / $20The default: agents, judgement, multi-step tool use
Claude Sonnet 5.5claude-sonnet-5-5$2 / $10High-volume everyday work at speed
Claude Haiku 5.5claude-haiku-5-5$0.10 / $0.50Simple, fast steps: routing, classification, short extraction
Claude Fable 5.2claude-fable-5-2$8 / $40The hardest long-running reasoning, when cost matters less

Use the model IDs exactly as written. Haiku 5.5's price applies to prompts up to 100K tokens. All of these have a context window of one million tokens.

One model, tuned, before many

A common mistake is building a cascade of models (a cheap one first, an expensive one when it fails) on day one. On the current models, the capable model at a lower effort setting (covered in the chapter on cost) often matches a bigger setting for less money, and one model keeps prompt caching simple. Measure first; split later if the numbers say so.

Want this built for you?

I build AI workers on Claude for businesses in the UK, US and UAE.

Book a free call