Skip to content
The AI Agent Factory

21.10 How today's tools realize it

Approved by
Panaversity ·
10 min read

The short boxes below name the products. Each carries its date, because product detail changes often. The full boxes, with every option, version and source, are on the companion page, Chapter 21 reference.

What you will learn. How today's products carry this chapter's ideas, what each one adds or leaves out, and which differences change a design decision.

Why it matters. Product details change often. The rules you own around them do not.

Is there a standard for agent SDKs?

No standard defines an agent SDK. The products below carry the same loop in different shapes. What is standard is around them: MCP for tools and servers, and OpenTelemetry (an open standard for traces) for traces.

Anthropic: the tool runner and the Claude Agent SDK (the first SDK)

As verified November 5, 2026.

  • Tool runner (21.1): in beta.1 thread: false keeps the conversation on your side (the default keeps it on the provider's side).
  • The run (21.3): "Claude Code as a library".2 query() streams messages, ending in a result with its cost.
  • Options (21.4 to 21.6): tools: [], allowedTools, permissionMode, the canUseTool callback, hooks (a failing hook lets the call go ahead unless set to block), maxTurns, maxBudgetUsd.3
  • Conversation and traces (21.7, 21.8): session files under the home folder by default, persistSession: false in TypeScript.4 No trace leaves unless you set its OpenTelemetry settings.
  • What stays yours (21.9): settingSources: [], strictMcpConfig, and env, which replaces the environment in TypeScript but adds to it in Python.5 Pre-1.0. Check its license terms before you ship.2
  • Sign-in: "Unless previously approved, Anthropic does not allow third party developers to offer claude.ai login or rate limits for their products."2

OpenAI: the Agents SDK (the second SDK)

As verified November 5, 2026.

  • The run (21.3): Agent and Runner, in your own process.6 The result has the output, history and usage, but no cost.
  • Options (21.4 to 21.6): needsApproval, result.interruptions, RunState7, output guardrails, maxTurns (10 if you set none).8
  • Conversation and traces (21.7, 21.8): store: false stops OpenAI storing the response, though its abuse-monitoring logs, the records it keeps to catch misuse, are kept up to 30 days.9 Tracing goes to OpenAI by default, even with a local model. Turn it off with setTracingDisabled(true).10
  • Sign-in: as of November 6, 2026, OpenAI's Sign in with ChatGPT lets open-source apps, and selected partner apps, use an eligible person's ChatGPT plan for AI requests, with no API key.11
  • The license: pre-1.0, MIT, a license that lets anyone use and change the code.8

Open source

As verified November 5, 2026.

  • Three different things. An open-source SDK (the Agents SDK itself, MIT)8. A self-hosted model (the lab's small model, served by Ollama on your own computer). An independently built runtime (such as OpenCode, a harness you can drive from code)12. The lab's port is the first two together.
  • No fair match for a hosted tool or a cost cap: on your own computer, every call is yours, and the limit that matters is time and compute, your computer's processing power.
  • Security. Keep a local model server on 127.0.0.1.13 A harness with a shell still belongs in a container. Treat a downloaded model as untrusted.

The comparison: only the differences that change a design decision

DecisionThe first SDK (Claude Agent SDK)The second SDK (OpenAI Agents SDK)Open source
Where can it run?A long-lived process with a disk, for its harness programAny process, including a short-lived oneRunner shape: any process. Harness shape: a long-lived host, a server you keep running or your own program (OpenCode 2's SDK)
What must you switch off?Built-in tools, settings files, auto memory (notes the harness keeps for later runs), other MCP servers, inherited environment, session filesTracing, and server-side storageRunner shape: tracing, if you use the OpenAI Agents SDK. Harness shape: what it loads and sends by default, as for the first SDK
How is a tool with an effect decided?Built for a callback that answers at once. A hook can also hand a call back, which the lab does not useBuilt for an approval: the run pauses and hands the call back, with a run state you can save and resume later7Runner shape: the call handed back, as the second SDK
What stops a runaway run?Turn limit and budget cap. Time is yoursTurn limit. Cost and time are yoursTurn limit. Time and compute are yours
Where does data leave your computer?Model calls, once the defaults are off (the harness also asks Anthropic for organization settings)Model calls, and traces by defaultNowhere, unless traces are left on

Do the two SDKs do the same things?

No parity is implied. The two SDKs do not have the same features in different words: one is built around a callback and has a budget cap, the other is built around a hand-back approval and has no cost cap. Each can do some of what the other does best, in a less central way, so the lab picks the shape each SDK is built for. And an open model on your own computer is not a drop-in equal (one you can swap in with no other change) of a large hosted model: expect weaker tool choice, more broken arguments and slower answers, and test before you rely on it.

The finished mapping table is on the companion page, Chapter 21 reference. Task 15 checks your own table against it.

What is the invariant?

An SDK may supply defaults for tools, limits, state and what counts as done. The owner of the system still chooses, checks and enforces the rules the business needs: which tools the worker may use, whose credentials it carries, what it may spend, where its data goes, and what a finished answer must contain. Replace any SDK, provider or open-source tool, and that stays true.

Agent SDKs: the Claude Agent SDK and the OpenAI Agents SDK

Question 1 / 10

0 answered

In the Claude Agent SDK, env replaces the environment in TypeScript. What does it do in Python?

  1. Tool runner, Anthropic.↑
  2. Agent SDK overview, Anthropic.↑↑2↑3
  3. Agent SDK reference: TypeScript, Anthropic.↑
Owner
Panaversity