Substructure vs. the OpenAI Agents SDK
Checked August 7, 2026
The OpenAI Agents SDK is for products built on OpenAI: a free MIT library for Python and TypeScript with agents, handoffs, guardrails, sessions, tracing, and the hosted tools one line away. Substructure is for agents your team uses: config in git, running in Slack, on any model, with every step of the loop open to your code.
| Use the Agents SDK when | Use Substructure when |
|---|---|
| The agent is a feature of your app | The agent is a teammate in Slack |
| OpenAI models and hosted tools are the point | Model choice should stay open |
| Python or TypeScript is fine | Your code is Go, Ruby, or anything on HTTP |
What Substructure does that the Agents SDK does not
- Answers in Slack from the config file. The SDK has no Slack story. OpenAI's Slack product is Workspace Agents in ChatGPT, which is their agent, not yours.
- Survives a crash. Sessions store history after a run ends, not execution. A crash mid-run loses the run.
- Holds the MCP credentials. With the SDK, OAuth registration and token refresh are your application's job.
- Treats every model the same. The SDK can call other providers, but tracing still wants an OpenAI key, most providers drop you to Chat Completions, and the hosted tools stay OpenAI only.
- Charges one flat price. The SDK is free, and the meters around it are tokens, hosted tool calls, and storage.
Side by side
Building the agent
| OpenAI Agents SDK | Substructure | |
|---|---|---|
| The agent is | An object in your process | A file in your repo |
| Language | Python or TypeScript | Any language, over HTTP |
| Models | OpenAI first | Any provider, one line |
| Subagents | Handoffs | One config line |
| People in the loop | Yours to build | Approval in Slack |
Running it
| OpenAI Agents SDK | Substructure | |
|---|---|---|
| Who hosts the loop | You do | The engine |
| Crash mid-run | The run is lost | The step resumes |
| Durable option | Add Temporal | Built in |
Surfaces and price
| OpenAI Agents SDK | Substructure | |
|---|---|---|
| Slack | Yours to build | One command |
| Chat UI | ChatKit, plus a backend you write | AG-UI, and Slack |
| MCP auth | Yours | The engine's |
| Price | Tokens, tool calls, storage | Flat, bring your own key |
What you write
agent = Agent(
name="oncall",
instructions="You are the on-call assistant.",
tools=[WebSearchTool()],
)
result = await Runner.run(agent, "What broke?")[llm.openai]
type = "openai"
[agent.oncall]
llm = "openai"
model = "gpt-5"
system = "You are the on-call assistant."
mcp = [{ id = "sentry", tools = { read_only = true } }]
[agent.oncall.slack]
name = "Oncall"Add a worker URL to that file and the engine sends every decision to your
endpoint as JSON, one step at a time.
Where OpenAI's stack is the better choice
- Frontier models, with hosted tools that need no infrastructure from you.
- Voice and realtime agents, ahead of most of the field.
- ChatKit, which is polished and free.
- One vendor for the model, the tools, and the tracing.
Questions
Can I still use GPT-5? Yes. Name it in the config, or in one channel and a different model in another.
What about the deprecations? The Assistants API ends in August 2026 and Agent Builder follows in November. The Agents SDK is the part that stays.
Can I use both? Yes. A worker can call the SDK inside your own service.
The quick start takes about five minutes.