Provider-aligned agent runtime

OpenAI Agents SDK

An open-source agent runtime for tool loops, handoffs, sessions, guardrails, human approval, and tracing around model calls.

Editorial verdict

Choose OpenAI Agents SDK when an OpenAI-aligned application genuinely needs its runtime-managed turns, tools, approvals, sessions, or handoffs. Keep deterministic workflows for predictable processes and treat tracing as a separate sensitive-data decision.123

Best for

  • OpenAI-aligned agent applications needing a focused runtime
  • Tool loops with explicit handoffs, sessions, or approval interruptions
  • Teams that can govern trace data and model usage
123

Not ideal for

  • Deterministic workflows that do not need model-directed control
  • Teams requiring a provider-neutral state graph
  • Organizations whose ZDR or sensitive-data rules conflict with tracing defaults
123
Main trade-off

A focused runtime removes agent-loop plumbing while adding SDK, model, tool-safety, session, tracing-data, and provider dependencies.123

Product boundary

Whether a focused OpenAI-aligned agent runtime is justified instead of a direct Responses loop, deterministic workflow, or broader state graph.

The Agents SDK orchestrates model calls, tools, handoffs, sessions, guardrails, and traces. It does not supply business authorization, safe tools, durable infrastructure, evaluation quality, model usage, or data-policy compliance by itself.123

For: Teams aligned with OpenAI that have evidence for an agent loop and need its runtime primitives

  • A direct model-and-tool loop is sufficient
  • Durable state graphs or provider-neutral orchestration are required
  • Trace or session data cannot meet the application's policy boundary

Why teams consider OpenAI Agents SDK

  • Focused primitivesAgents, tools, handoffs, guardrails, sessions, and human approval form a smaller runtime surface than a broad workflow platform.123
  • Usage visibilityThe SDK tracks per-run and per-request model usage for application monitoring.123
  • Tracing integrationBuilt-in tracing records generations, tools, handoffs, guardrails, and custom spans when enabled.123

Pricing

The open-source SDK has no separate software fee. Model tokens, hosted tools, storage, tracing destination, sandboxing, application infrastructure, and operational work create total cost.3

Current decision boundary

Open-source SDK plus provider usage

Verified 2026-07-27: the SDK is open source; OpenAI API model and tool pricing remains separate, and no free-SDK statement should be presented as zero agent cost.3

Framework fee
No separate open-source SDK fee3
Primary cost
Model, tool, storage, sandbox, and application runtime usage3
Policy boundary
OpenAI tracing is unavailable under ZDR arrangements3
Pricing checked View official pricing

OpenAI Agents SDK vs alternatives

LangGraph

Choose when
Long-running stateful agent workflows
Avoid when
Simple model-and-tool loops
Compared with OpenAI Agents SDK
Explicit graph state improves control and recovery while increasing graph design, checkpoint, schema migration, idempotency, deployment, and observability responsibilities.567

CrewAI

Choose when
Python teams testing role-based agent collaboration
Avoid when
Tasks solved reliably by one model call or deterministic workflow
Compared with OpenAI Agents SDK
Role-oriented composition can accelerate multi-agent experiments while increasing token use, latency, nondeterminism, delegation failure, tracing, and platform complexity.8910

Mastra

Choose when
TypeScript agent products needing integrated workflows and memory
Avoid when
Bounded model-and-tool loops
Compared with OpenAI Agents SDK
An integrated TypeScript framework reduces assembly work while adding framework, storage, memory, tracing, gateway, managed-platform, and upgrade dependencies.111213

Resources and sources

Official product, pricing, policy, and lifecycle sources

  • OpenAI Agents SDK
    Open
  • OpenAI Agents SDK tracing
    Open
  • OpenAI Agents SDK license
    Open
  1. 1
    OpenAI Agents SDK

    OpenAI · Accessed Official

  2. 2
    OpenAI Agents SDK tracing

    OpenAI · Accessed Official

  3. 3
    OpenAI Agents SDK license

    OpenAI · Accessed Official

  4. 4
    OpenAI API pricing

    OpenAI · Accessed Official

  5. 5
    LangGraph overview

    LangChain · Accessed Official

  6. 6
    LangGraph persistence

    LangChain · Accessed Official

  7. 7
    LangGraph license

    LangChain · Accessed Official

  8. 8
    CrewAI documentation

    CrewAI · Accessed Official

  9. 9
    CrewAI framework license

    CrewAI · Accessed Official

  10. 10
    CrewAI pricing

    CrewAI · Accessed Official

  11. 11
    Mastra agents

    Mastra · Accessed Official

  12. 12
    Mastra workflow suspend and resume

    Mastra · Accessed Official

  13. 13
    Mastra pricing

    Mastra · Accessed Official