Substructure vs. the OpenAI Agents SDK

Checked August 7, 2026

The OpenAI Agents SDK is a free, MIT-licensed library for Python and TypeScript: agents, handoffs, guardrails, sessions, tracing, and MCP tool calling, designed around the Responses API and OpenAI's hosted tools. It is the code-first center of OpenAI's agent stack, and after a year of churn it is the part you can rely on. The Assistants API shuts down in August 2026, and Agent Builder follows in November.

Substructure is an engine rather than a library. One file describes the agent; the engine runs the loop, answers in Slack, authorizes MCP servers, and streams to your clients. The file is a default agent, not a boundary: your webhook can build or override every single step of the loop, which is more customization than most agent SDKs expose, from any language.

The short answer

Pick the Agents SDK when you are building on OpenAI's models and want their hosted tools, web search, file search, code interpreter, computer use, as one-liners, with a chat UI from ChatKit. Pick Substructure when the agent is for your team rather than inside your product, when you want Slack and MCP auth and history handled, or when you want the freedom to run any model without your tooling degrading.

What you run

The SDK is in-process: you host it, scale it, and restart it. What it gives you is good library design. What it does not give you is a runtime. Sessions persist conversation history after each run completes, not execution: a process crash mid-run loses the run, and nothing replays it. OpenAI's own answer for durable execution is the Temporal integration, which is real and GA, and which means adopting a second distributed system with its own workers and determinism rules.

Substructure's engine saves every step before it runs and resumes on its own after a crash or a redeploy. That is table stakes for agent infrastructure, and here it is the default execution model rather than an integration you add. Your code, when you want it in the loop, is a stateless function behind an HTTP endpoint. Each decision arrives as JSON with the state it needs; you accept the step, rewrite the prompt, swap the model, run the tool yourself, or pause for a person, and the engine persists whatever you return. Every single step is overridable, from any language, with no SDK and nothing of yours to keep alive.

Models

The SDK can technically call non-OpenAI models, and the docs are upfront about the cost of doing so: tracing uploads still want an OpenAI API key, most providers drop you from the Responses API to Chat Completions, and the hosted tools are OpenAI-only. The stack is honest about what it is: a great way to run OpenAI models.

Substructure has no model of its own and no preference. You bring a key, the engine makes the calls, and swapping models is editing one line. Our guide to Slack bots on open models compares ten of them, with real prices per thread. If you want GPT-5 in one channel and an open model in another, that is two config lines, not two stacks.

Slack, MCP, and the UI

There is no first-party Slack story in the SDK. OpenAI's Slack presence is Workspace Agents inside ChatGPT, which is their product surface, not your deployed agent. MCP support in the SDK is real, but OAuth client registration and token refresh are your application's problem, and the managed Connector Registry is gated behind ChatGPT Enterprise admin. ChatKit is a genuinely nice embeddable chat UI, now paired with a backend you write.

In Substructure, Slack is a config section and subs slack connect. The engine handles MCP authorization and runs every tool call, so your code never holds a token. Clients speak AG-UI, the open protocol that assistant-ui and CopilotKit already support.

Pricing

The SDK is free and you pay per use, on several meters at once: tokens, hosted tool calls, storage, and credits for the ChatGPT-side products. Fair, but it moves with usage. Substructure is one flat price, you bring your own LLM key, and the bill does not change when your agents get busier. The self-hosted engine is open source and free forever.

Where OpenAI's stack is the right call

Frontier models, first. And the hosted tools are unmatched as one-liners: web search, file search, code interpreter, and computer use with no infrastructure on your side. Voice and realtime agents are well ahead of most of the field. ChatKit is polished and free. If your product is built on OpenAI and lives inside your own app, the Agents SDK is the natural choice, with Temporal underneath if you need hard durability.

But if what you want is an agent your team uses, on whatever model is best this month, with the loop yours to override over plain HTTP, that is Substructure. The quick start takes about five minutes.