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 whenUse Substructure when
The agent is a feature of your appThe agent is a teammate in Slack
OpenAI models and hosted tools are the pointModel choice should stay open
Python or TypeScript is fineYour 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 SDKSubstructure
The agent isAn object in your processA file in your repo
LanguagePython or TypeScriptAny language, over HTTP
ModelsOpenAI firstAny provider, one line
SubagentsHandoffsOne config line
People in the loopYours to buildApproval in Slack

Running it

OpenAI Agents SDKSubstructure
Who hosts the loopYou doThe engine
Crash mid-runThe run is lostThe step resumes
Durable optionAdd TemporalBuilt in

Surfaces and price

OpenAI Agents SDKSubstructure
SlackYours to buildOne command
Chat UIChatKit, plus a backend you writeAG-UI, and Slack
MCP authYoursThe engine's
PriceTokens, tool calls, storageFlat, bring your own key

What you write

agent.py
agent = Agent(
    name="oncall",
    instructions="You are the on-call assistant.",
    tools=[WebSearchTool()],
)
result = await Runner.run(agent, "What broke?")
subs.toml
[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.