Skip to content
The AI Agent Factory

35.2 How today's tools realize it

Approved by
Panaversity ·
6 min read

In everyday life. Two flats on the same street: one furnished, one empty. The furnished one has a bed, a table and a fridge you did not choose. The empty one has nothing, and everything you put in it is yours.

What you will learn. For each of the three jobs, what each foundation gives you and what it leaves to you.

Why it matters. You should build only what your foundation does not already give you, and know which parts you build.

Checked on Sunday, 29 November 2026. Products change; check each line before you rely on it.

Claude Managed Agents

Manage the workers. Agents are defined with versions, and run in environments you configure, with sessions that Anthropic hosts. You saw this in Chapter 23. A registry of your workers, for your clients, with assignments and per-worker accounting, is still yours to build, in your own database.

Choose the models. Claude models only. You choose between Claude models per agent, which Chapter 29 used to cut cost. Routing across providers is not available.

Set the boundaries. Permission settings decide which tools need confirmation, and environments limit network access. A role contract for a client, with payment limits and approved processes, is still checked in your own tool code.

OpenAI Agents SDK

Manage the workers. None. The SDK is a library for one agent loop. A registry, lifecycle and accounting are yours.

Choose the models. It can call models from several providers. Choosing between them for each activity, with prices, scores and data rules, is yours.

Set the boundaries. Guardrails check inputs and outputs, and handoffs pass work between agents. These help, but they run around the model's behaviour. Limits on what a tool may do still belong in the tool.

The open stack

Manage the workers. You build it: a small API on Workers, with tables in Neon. This chapter does that.

Choose the models. Pi Durable calls models through pi-ai, Pi's model library, which on Cloudflare reaches Workers AI (models Cloudflare runs itself), AI Gateway routes (named settings that send a call to one provider and model) and the AI Gateway catalog (the providers AI Gateway can reach). AI Gateway adds logging, caching, rate limits and fallbacks between providers. The router that decides which model each activity uses, with your registry and data rules, is yours. One caution from Chapter 32: not every economy model is reachable this way yet, and each new route must be tested before you depend on it.

Set the boundaries. You build them, in the tools, in the Workflows and in the control plane.

Side by side

JobClaude Managed AgentsOpenAI Agents SDKOpen stack
Registry, lifecycle, accounting per clientPartly given; client registry yoursYoursYours
Model choice per activityClaude models onlyYours, many providersYours, many providers, through AI Gateway
Tool permissionsPermission settings, plus your codeGuardrails, plus your codeYour code
Role contract per clientYour codeYour codeYour code

Look at the last row. On every foundation, the rules of a worker's job for one client are checked in code that you write. Moving to the open stack adds the first three rows to your work. It does not add the last one, because it was always yours.

The invariant. A foundation can give you places to put rules. Only you can write the rules of your client's business.

Check yourself. A team says, "We will stay on Claude Managed Agents so we don't have to build governance." What is right and what is wrong in that? (Right: Anthropic provides agent versions, environments and tool permission settings. Wrong: the client's role contract, its payment limits and its tenant rules must still be checked in the team's own code.)

Owner
Panaversity