Back to the list
  • AI & Automation

The Claude Agent SDK Builds the Agent. Someone Still Has to Run It.

What the Claude Agent SDK ships, what it leaves you to host and run yourself, what Claude Managed Agents costs on top, and whether to build it or hire it out.

Written byMaximilien Grolier · Founder & CEO
Published
Reading time
15 min
Close-up of colorful Python code on a dark computer screen
Contents · 6
  1. 01What is the Claude Agent SDK, exactly?
  2. 02Claude Code and the Claude Agent SDK Are Built for Different Jobs
  3. 03What does the Claude Agent SDK not give you?
  4. 04Claude Agent SDK and Managed Agents Trade Control for Speed
  5. 05What does it actually cost to build and run something on the Claude Agent SDK?
  6. 06When should a Cambodian business build on the Claude Agent SDK, and when should it hire that out?

If you searched "Claude Agent SDK," the question behind it is probably not "what is this library." It is closer to "does this let us stop paying an agency, or does it just move the same work in-house." The honest answer sits between those two. The Claude Agent SDK gives a team the exact engine that runs Claude Code: the planning loop, the built-in tools, the permission system, wrapped in a library you call from Python or TypeScript. What it does not give you is a place to run that engine, a way to keep it alive when it crashes at 2 a.m., or anyone to answer for it when a customer's KHQR payment gets reconciled wrong. This piece works through what the SDK actually ships, what Claude Managed Agents adds on top of it and what that costs, and where, in our own AI agent builds for businesses in Cambodia, we would reach for the SDK ourselves versus tell a client to pay someone else to run it.

What is the Claude Agent SDK, exactly?

The Claude Agent SDK is Anthropic's Python and TypeScript library for embedding Claude Code's own agent loop, built-in tools and context management inside an application you host and run yourself. It is not a new product built on top of Claude: it is Claude Code itself, repackaged as a library instead of a terminal app, so a team can call the same planning-tool-checking loop from their own code instead of typing into a CLI.

The name is recent. Anthropic shipped the underlying engine as the Claude Code SDK first, then renamed it on September 29, 2025, once it became clear teams were building things with it that had nothing to do with writing software. "The agent harness that powers Claude Code (the Claude Code SDK) can power many other types of agents, too," Anthropic's engineering team wrote at the time, framing the rename as recognition of a broader use than the coding tool it grew out of (Anthropic, September 2025).

What ships inside the package, per Anthropic's own documentation, is the full Claude Code capability set: built-in tools for reading, writing and editing files, running shell commands and searching the web; hooks that run custom code at points in the agent's lifecycle; subagents that spawn specialized Claudes for a focused subtask; the Model Context Protocol (MCP), which lets an agent call an external tool or data source without custom integration code for each one; a permissions layer deciding which tool calls run automatically and which need a human to approve; and sessions that persist context across exchanges and can be resumed or forked later (Anthropic, accessed October 2026). Skills, slash commands and memory load the same way they do in Claude Code, from a project's .claude/ folder.

That puts the Agent SDK in the same general category as AI agent frameworks like LangChain, CrewAI or AutoGen: a toolkit for assembling an agent's reasoning loop and tool calls in code, rather than a finished product a non-technical buyer installs. The difference is that the Agent SDK is not generic. Every primitive in it, subagents, hooks, the permission system, was built and tested inside Claude Code first, then exposed as a library, which is why a team reaches for it specifically when it wants Claude's own harness rather than assembling one from a general-purpose framework. In our own definition of an AI agent, it is software that plans, acts and checks its own work in a loop; the Agent SDK is Anthropic's packaged version of exactly that loop, nothing more and nothing less.

Anthropic documentation page listing the Claude Agent SDK capabilities: built-in tools, hooks, subagents, MCP, permissions and sessions
The Claude Agent SDK capabilities table, from Anthropic's own documentation, October 2026. Screenshot: code.claude.com

Claude Code and the Claude Agent SDK Are Built for Different Jobs

Claude Code is the interactive product: a person opens a terminal or the desktop app, starts a session, watches Claude plan and act, and approves or corrects it along the way. The Claude Agent SDK is the same engine with the terminal removed, so a developer wires the loop into a script, a scheduled job or someone else's product, and no person needs to be watching when it runs. We cover a Claude Code seat and who should buy one in a separate piece; the short version is that a seat is for a person who is still in the loop, and the SDK is for when the task has outgrown a person being in the loop at all.

Apple is the clearest public proof the distinction matters in practice. It shipped the Agent SDK inside Xcode in February 2026, letting the editor iterate on a feature autonomously and check its own work against live previews, rather than waiting for a developer to approve every step (Anthropic, February 2026). That is a product Apple built and shipped under its own name, using Anthropic's engine underneath.

That "underneath" part has a rule attached that most write-ups skip. Anthropic's own documentation is explicit that a product built on the Agent SDK may not present itself as Claude Code or "Claude Code Agent," and should keep its own branding rather than appear to be an Anthropic product; "Claude Agent" or "{YourAgentName} Powered by Claude" are the permitted forms (Anthropic, accessed October 2026). Authentication has two paths, not one. A business can run the SDK on a standard API key, billed at the same per-token rate a direct Claude API call would use, or, since June 2026, on an OAuth token tied to a Claude Pro, Max or Team subscription, generated with claude login, in which case usage draws against that plan's own included credit rather than metered API billing. If a business is picturing either path as a way to resell a Claude Code subscription under a different name, that is explicitly not the deal on offer.

What does carry over cleanly is quality. An agent built on the SDK reasons and uses tools exactly as well as Claude Code does, because it is the same model-and-harness pairing underneath, not a lighter version cut down for API use.

What does the Claude Agent SDK not give you?

The Claude Agent SDK gives you the reasoning engine and the tools. It does not give you a server to run that engine on, a way to recover a session that crashes mid-task, a safe place to store the API keys and credentials it needs, or anyone watching the process at 2 a.m. when something goes wrong. All of that is infrastructure, and it sits entirely outside the npm package or the pip install.

Anthropic says as much itself, in the post announcing its own hosted alternative: "shipping a production agent requires sandboxed code execution, checkpointing, credential management, scoped permissions, and end-to-end tracing. That's months of infrastructure work before you ship anything users see" (Anthropic, Claude Managed Agents launch, April 2026). That sentence describes exactly the gap between an SDK demo that works on a laptop and an agent a business can actually depend on, and it is Anthropic's own team naming the cost of the SDK path, not a competitor's. The same discipline we describe in a reliable agent harness applies here directly: the harness, not the model, is what determines whether an agent keeps working when something goes wrong.

Subagents make the same point from a different angle. The SDK gives you the primitive: a Claude session can spawn specialized subagents to split a task. What it does not give you is the ceiling on how many you can run at once, because that ceiling is set by whatever orchestration layer, state store and observability you build around it, not by the SDK itself. Boris Cherny, who leads Claude Code at Anthropic, put a number on what that looks like at the far end.

"This morning I was managing maybe a few hundred. Some days it's... thousands, or tens of thousands. You have a Claude Code, but it has subagents that are other Claudes." Boris Cherny, Claude Code lead, Anthropic (Fortune, June 2026)

Anthropic's own internal tooling for watching and coordinating that many concurrent sessions is not something the SDK ships; it is infrastructure Anthropic built for itself, the same category of work a business adopting the SDK has to plan for at whatever scale it actually needs, even if that scale is five agents, not five thousand.

Most teams evaluating the Claude Agent SDK underestimate that gap. A working demo on a developer's laptop and an agent that survives a crash with a customer's KHQR payment half-reconciled are not the same project, and the second one does not get cheaper because the first one was free to build. We have watched that exact gap close for real money-touching automation before, just not on the Agent SDK itself. On the Kretz Club account, our more than 170 n8n workflows wired into Stripe, Pennylane and Qonto only became dependable once each one met a fixed bar: tested, documented, monitored, errors alerting a named person, and an end-to-end test of the payment funnel every four hours (Kretz Club). None of that shows up in a laptop demo. It is what "production" costs once an agent touches money, on the Agent SDK or on any other stack.

In our own process, that gap closes in a fixed order, not whichever part is most interesting to build first. Permission scoping comes first: deciding, line by line, which tool calls the agent may run unattended before a single production message goes out. The audit log comes second, because a team cannot debug or defend a decision it did not record. A kill switch that someone on the client's side, not just our engineer, can trip without writing code comes third. Only after those three is there any point tuning the agent's prompts or tool choices for speed or cost. The teams who get into trouble are almost always the ones who did that in the opposite order: a fast, well-tuned demo with no kill switch and no audit trail, which is exactly the setup that turns a crash at 2 a.m. into a customer-facing incident instead of a quiet restart.

Even Anthropic's own pricing for this layer is still moving. In June 2026, it announced that Agent SDK and claude -p usage on subscription plans would move to a separate, capped monthly credit, then reversed the plan the same day it was due to take effect, leaving subscription-plan usage on the limits it already had (The New Stack, June 2026). If the vendor itself has not settled how to price the gap between "the SDK" and "a production agent," a business evaluating the two should not assume that gap is small.

Claude Agent SDK and Managed Agents Trade Control for Speed

The short rule: choose the Claude Agent SDK when the team already has, or is buying, engineering capacity to run infrastructure, and choose Claude Managed Agents when the priority is shipping fast and the data the agent touches can sit in a cloud sandbox Anthropic operates. Most Cambodian SMEs we talk to are closer to the first case than the second, for a reason that has nothing to do with the SDK itself: the engineering capacity usually needs to be bought in, not grown internally.

On one side, the Claude Agent SDK runs inside a process your team, or whoever you hire, controls end to end. You pay standard Claude API token pricing, Claude Opus 5 at 5 US dollars per million input tokens and 25 per million output, Claude Sonnet 5 at 2 and 10 (Anthropic, accessed October 2026), and nothing else beyond whatever server or container you run it on. Data stays wherever you put that server, which matters if a sovereign or private-cloud hosting requirement is already on the table, the kind of build that adds four to eight weeks to a project timeline in our own process. Nobody hosts it for you, which is the whole trade.

On the other side, Claude Managed Agents, in public beta since April 8, 2026, is a hosted REST API: Anthropic runs the agent loop and a per-session sandbox, in its own cloud or in a self-hosted sandbox you register with it, and your application just sends events and reads results back (Anthropic, accessed October 2026). It adds 0.08 US dollars per session-hour on top of standard token pricing, billed only while a session is actively running, not while it sits idle (Anthropic, reported by SiliconANGLE, April 2026), and Notion, Rakuten and Asana are already running it in production (SiliconANGLE, April 2026). Those are large platforms with their own security and compliance teams vetting that sandbox before anything customer-facing touched it.

For a Cambodian SME whose agent will touch KHQR transaction records, a customer's phone number or anything a regulator would ask about later, we would not default to Claude Managed Agents yet, even though it is the faster path to a working demo. The Anthropic-managed cloud sandbox is still a third party holding that data in transit, and a self-hosted Agent SDK build, paired with the sovereign or private-cloud hosting we already scope for AI agent clients, is the more defensible default until a specific, tested reason says otherwise. That changes the day a client specifically needs Managed Agents' self-hosted sandbox option, which keeps execution on infrastructure the client already controls while still getting its session handling; that is a narrower, newer option and worth a real evaluation on its own, not a default.

What does it actually cost to build and run something on the Claude Agent SDK?

Two numbers answer this, not one: what the model tokens cost, and what it costs to build and keep running the thing that calls them. We make the same point for AI agents generally in our piece on AI agent cost in Cambodia; the Claude Agent SDK is where that split is easiest to see in actual numbers, because the token side is genuinely cheap and the build side is where almost all of the real spend sits.

Take a Telegram support agent handling roughly 50 conversations a day, a realistic load for a small Phnom Penh retailer or a Siem Reap guesthouse. At around 3,000 input tokens and 600 output tokens per conversation, call it 1,500 conversations a month, that is 4.5 million input tokens and 900,000 output tokens monthly. On Claude Sonnet 5 pricing, 2 US dollars per million input tokens and 10 per million output (Anthropic, accessed October 2026), that lands at roughly 18 US dollars a month in model tokens, cheaper than a single Claude Code seat. A small VM or container to run the process adds perhaps 20 to 40 US dollars more. Neither number is the part that costs real money.

The real cost is the build: scoping which tool calls the agent is allowed to make unattended, wiring the permission layer so it cannot touch a payment record without approval, writing the hooks that log every action for an audit trail, and testing it against the exception cases a demo never hits, the shipment missing a signature, the duplicate booking, the message that does not match any known intent. In our own AI agent process, that is a free 1 to 2 hour process-mapping audit, a costed action plan within 5 days, then 24 to 48 hours to ship a narrow "AI skill" or 1 to 4 weeks for a fuller autonomous agent, orchestrated with n8n and routed through OpenRouter across Claude, GPT, Mistral and Llama so a client is never locked to one model's pricing or uptime. Inside that 1 to 4 week window, the hours split roughly three ways regardless of the use case: about a third on the integration itself (the CRM calls, the payment API, the Telegram webhook), a third on permission scoping and the audit trail, and a third on testing the exception cases a demo never hits. That split is why a narrower scope, not a faster model, is the lever that actually shortens the timeline.

Time to deploy an AI build, upper bound (days)
Chart: TechFlow Agency. Data: TechFlow Agency build timelines, 2026

That gap between the token bill and the build cost is also why global SME adoption numbers can look encouraging while still understating the real barrier. The OECD's 2026 survey of more than 2,000 SMEs across 12 member countries found 61 percent already using at least one AI-enabled application, with maintenance cost and lack of time for training as the two most cited barriers to going further (OECD, April 2026), the build side of the ledger, not the token side. A May 2026 study of 168 Cambodian respondents across SMEs, large firms and multinationals found the same pattern sharper still: moderate individual AI use, but organizational AI maturity still early-stage in strategy, governance and process integration, and rising with firm size (Journal of Accounting, Finance, Economics and Social Sciences, May 2026), evidence that the gap the Agent SDK leaves open is exactly where Cambodian SMEs are currently thinnest. CDRI projects Cambodia's own ICT skills demand growing 30 percent a year, with ICT graduates already commanding a 10 percent wage premium over other graduates (CDRI, 2026), which is the build-side capacity a business is actually paying for when it chooses to own the infrastructure work itself rather than hand it to Managed Agents or to us.

When should a Cambodian business build on the Claude Agent SDK, and when should it hire that out?

Build it, or have us build it, when the agent is narrow enough that one engineer can own it end to end; hire it out specifically when the agent will keep changing shape as the business grows, because that is engineering ownership a business without a developer on staff cannot sustain past the first version. None of the public write-ups currently ranking for "Claude Agent SDK" frame it this way; they stop at how the primitives work, not at who should actually be the one running them. That gap between a developer tutorial and a buy-or-build decision is the one we are filling here.

Three real shapes make the difference concrete. A Phnom Penh freight-forwarding office checking customs paperwork against a checklist before it reaches a broker is a narrow, high-value, mostly static task, a good candidate for a contained SDK build that a single engineer can scope and ship in one to two weeks and then leave mostly alone. A multi-branch retailer running a Telegram and Messenger triage agent that also writes back into a CRM is the opposite: the CRM schema changes, the product catalog changes, new branches get added, and someone has to own those changes going forward, which is exactly the kind of build we would scope through a process-mapping audit rather than hand over as a one-off script. A Siem Reap boutique hotel wanting its KHQR payments reconciled against bookings each night is small enough to be a 24 to 48 hour "AI skill" rather than a full agent, cheap enough to try in-house first if someone on staff already runs Claude Code day to day.

We would not recommend buying a seat and calling it done for anything in the second category. The moment an agent sends a message, touches a payment record or writes to a CRM on its own, it needs an engineering owner with a name attached, on the client's payroll or on ours, not a subscription nobody is watching. If a business is already talking to vendors about this kind of build, the nine questions worth asking an AI agent development company before signing are the right next read.

Here is what we would actually do this week, in the reader's place. First, write down the one task under consideration in one sentence, the way you would brief an employee: what it reads, what it is allowed to touch, what "done" looks like. Second, decide out loud who owns it if it breaks at 2 a.m., before anyone writes a line of code, not after. Third, check whether that task touches money, a customer channel or anything a regulator would ask about, because that answer decides whether a cloud sandbox is acceptable or whether it needs to run on infrastructure you control. Fourth, price both numbers separately, the model tokens and the build, before comparing anything to a Claude Code seat's 20 dollars a month; they are not the same line item, and conflating them is how a pilot gets approved for the wrong reasons.

If that task clears those four checks and still looks worth building, book the process-mapping audit and we will scope it with you: SDK, Managed Agents or neither, whichever actually fits what the agent needs to touch.

Prefer to chat? Message our founder directly on Telegram (@maxgrolier), or book a call with the team.

Share

Written by

Maximilien Grolier

Founder & CEO

LinkedIn ↗

Have a project in mind?

Free · No commitment · 30 minutes