· 4 min read
OpenAI's Agents SDK: The Framework Built by the People Selling You the Tokens
The cleanest agent framework in the category, and the one with the most baked-in gravity. Both things are true.
OpenAI's Agents SDK is the cleanest agent framework I've used this year, and that fact is the most uncomfortable part of evaluating it. The primitives are well-shaped, the documentation is honest, the trace viewer is the best in the category, and the whole package feels like the SDK the rest of the ecosystem has been trying to ship for two years. That's the problem. A framework written by the company selling you the tokens has incentives baked into every default, and the question isn't whether the tool is good. The question is where the gravity pulls you when you're not paying attention.
The shape of the thing is straightforward, which makes sense given the genealogy. Agents SDK is the production-grade descendant of Swarm, the experimental framework OpenAI shipped in late 2024 to demonstrate handoffs as a multi-agent primitive. Swarm was a teaching toy. Agents SDK is what happens when the same idea gets a real engineering team, structured outputs, hosted tools, and a managed trace pipeline. An Agent is a class with instructions, a model identifier, a list of tools, optional guardrails, an output type, and the ability to hand off to other agents. A Runner executes the agent loop, threading tool calls, handoffs, and structured outputs through to completion. Tools are Python functions decorated with @function_tool, with type hints generating the schema and the docstring becoming the description the model reads. Sessions handle memory. Handoffs are first-class primitives, not a pattern bolted on top. Both the Python and TypeScript packages are production-ready, and the surface area is small enough that a competent engineer reads the entire SDK in an afternoon and is shipping by the end of it.
The hosted-tool catalog is where the SDK separates itself from the open-source pack. WebSearchTool, FileSearchTool, CodeInterpreterTool, and ComputerTool give you retrieval, file-grounded RAG, sandboxed code execution, and computer-use capability without writing a line of integration code. Each one is billed at OpenAI's hosted-tool rates on top of the underlying token costs, which is fine for what it is, and worth pricing in before you assume the SDK itself is free. The trace dashboard at platform.openai.com captures every model call, tool invocation, handoff, and guardrail evaluation, with timing and cost broken out per span. Voice agent support routes through the Realtime API, which is the lowest-friction path to a working voice surface in production today. None of this is small. If you're committed to OpenAI as the model layer, the integration tax of using the SDK is genuinely zero because the SDK is the integration.
The leak-through starts the moment you try to leave that path. The hosted tools only work when the underlying model is served by the Responses API on OpenAI infrastructure. The SDK supports LiteLLM as the escape hatch for using Claude, Gemini, or open models, which technically delivers on model-agnosticism. In practice, the moment you switch models, the WebSearchTool, FileSearchTool, CodeInterpreterTool, and ComputerTool stop working. You're back to wiring up Tavily or Exa for search, your own vector store for retrieval, a sandboxed runtime for code, and Anthropic's computer use API for the desktop surface. That's not a framework problem, exactly. That's the architecture of the category. The framework is the cleanest expression of OpenAI's product strategy, and the hosted-tool moat dissolves when the model isn't theirs.
Tracing has the same shape. By default, every agent execution ships telemetry to the OpenAI dashboard, including tool inputs, tool outputs, and handoff payloads. Disabling tracing or routing to a custom OTLP collector is supported, configurable, and documented. The default is what matters. From the vendor's perspective, "your agent's runtime data lands in our dashboard" is exactly the right default. It's the default you should consciously turn off if anything in those payloads has compliance weight, and that's a knob most teams forget about until the first time someone in legal asks where the data is going.
The way to think about all of this is to stop calling it a framework. OpenAI's Agents SDK is a vendor SDK in the original sense, the way Boto is the AWS SDK. Primitives bundled with the cleanest path through the vendor's products. The reframe matters because it changes what you compare it against. LangGraph is what you pick when you want a framework abstraction with explicit state machines and graph control flow. Pydantic AI is what you pick when you want type-first ergonomics and full model neutrality. OpenAI's Agents SDK is what you pick when you've already decided OpenAI is the model layer and you want the cleanest cement between the model, the hosted tools, the structured outputs, and the trace UI.
Used that way, it earns its place. If your production stack is gpt-5-mini for routing, gpt-5 for hard reasoning, WebSearchTool and FileSearchTool as your retrieval surface, and a Realtime API voice agent on top, nothing else in the category will get you there with less ceremony. The handoff model maps cleanly to how you'd structure a multi-agent system from scratch with no framework inertia. The guardrails are first-class, not a wrapper. Structured outputs through Pydantic types parse and validate without the half-finished schema bridges that other frameworks ship. The trace dashboard sees every primitive natively, which is a meaningful debugging advantage when an agent run goes off the rails at 2am and you need to find the bad span in under a minute.
What you should not do is pick the SDK because it looks like the framework that won. It didn't win. It launched, with OpenAI's distribution and OpenAI's documentation team behind it, and the result is a product that looks much further along than it actually is in the broader landscape. The comparison most teams want to run, OpenAI Agents SDK against LangGraph against Pydantic AI against CrewAI, collapses into one prior question. Are you committed to OpenAI as the model layer for the next eighteen months? If yes, the SDK is the cleanest expression of that commitment, and the hosted tools and trace UI are real differentiators worth paying for. If no, the model-agnostic mode is technically supported and practically a downgrade from anything else in the category.
Frameworks written by model vendors are doing useful work. They should not be mistaken for neutral infrastructure. OpenAI's Agents SDK is the best version of the category, and the category itself is a vendor SDK with primitives, optimized for the cleanest path through that vendor's product surface. Use it where you already pay them. Pick something else where you don't, or where you might not in eighteen months, because the gravity is real, and the cost of pulling out of it later isn't in the SDK. It's in every line of glue code, every tool reimplementation, and every dashboard you wired around it.