Skip to main content

Buyer guide

OpenAI Agents SDK Production Playbook

Pin the version and the model, decide where traces go, move sessions to shared storage, then test guardrails, approvals, and cost before users arrive.

Reading time
3 min read
Sources
28 cited

The SDK gives a team a small agent runtime, and the production work is the setup around it. Before an SDK agent serves users, follow this playbook to pin the version and model and decide where traces go. It also covers session storage, approvals and guardrails, rate limits, and cost controls.

When you need this

  • An agent built on the SDK is moving from a laptop to a service that other people's requests reach.
  • Prompts or tool results include customer data, or the organization runs under Zero Data Retention.
  • Agents run on more than one instance, or a run must wait for a person's approval.
  • A workflow built in Agent Builder must move to code before Agent Builder leaves the OpenAI platform on November 30, 2026.

Evaluation criteria

  1. Version and model

    Which SDK version and model does each agent run?

    Look forPin the package, because minor 0.Y.Z releases may break public interfaces. Set the model explicitly or through OPENAI_DEFAULT_MODEL or RunConfig: with none set, agents run gpt-5.6-luna with reasoning effort none and low verbosity.

  2. Trace destination

    Where do traces go, and what do they contain?

    Look forTracing is on by default and sends runs to OpenAI, with model and tool inputs and outputs included. add_trace_processor keeps OpenAI's exporter, and only set_trace_processors replaces it, as one builder on X warns. Organizations under Zero Data Retention cannot use the built-in tracing, and OpenAI's tracing and data-control pages state no retention period for traces.

  3. Trace delivery

    Do traces arrive from every worker?

    Look forBuilders report traces silently missing from long-running workers and whole batches dropped on HTTP 429. Call flush_traces after each trace in background workers, and check that a run in each worker type reaches the dashboard or your own backend.

  4. Session storage

    What happens to a conversation when its container stops?

    Look forSQLite sessions suit one process. One builder wrote a Redis store before OpenAI shipped RedisSession, and an open issue reports RedisSession failing on Redis Cluster. Pick SQLAlchemy, Redis, MongoDB, Dapr, or OpenAI Conversations sessions, and test resume after a restart.

  5. Approvals and guardrails

    Which tool calls wait for a person, and can a check stop them in time?

    Look forMark data-changing tools as needing approval and store RunState while a run waits. Guardrails run in parallel by default: one builder measured all 6 tool calls started before the tripwire fired in 30 of 30 runs. Use blocking guardrails where that matters, and bind approvals to their run, since an open issue shows one approval authorizing a call in another run. On 0.22.0 an approval resume could leave an orphaned tool output that failed every later turn, so test resume on the version you pin.

  6. Rate limits and errors

    Will the account's usage tier carry production traffic?

    Look forgpt-5.6-luna is not supported on the Free tier and starts at 5,000 RPM and 2,000,000 TPM on Build. OpenAI's status page logged elevated gpt-5.6-luna API errors on October 21, 2026 and Responses API errors on October 22, so plan retries and a fallback model.

  7. Latency and cost

    How long does a run take, and what does it cost?

    Look forMeasure a run of real length. Builders report agent calls that slowed from under 4 to over 11 seconds on GPT-4.1, nested agents as tools that never hit the prompt cache, and long tool loops that grew slower each turn. Set spend alerts and a hard spend limit at the organization or project level, since alerts alone never stop traffic.

  8. Other models

    Does the agent need a model outside OpenAI?

    Look forOther models run through the LiteLLM and Any-LLM adapters, which OpenAI calls best-effort beta, or the AI SDK adapter in TypeScript. Builders report a Gemini crash on cached tokens, truncated responses returned as success, and parallel tool calls failing on Gemini, so test each model end to end.

Questions to ask vendors

  1. Which SDK version and model does each agent pin, and who reads the release notes before an upgrade?
  2. Where do traces go, do they carry customer data, and have we confirmed they arrive from every worker?
  3. Which session store holds conversations, and has resume been tested after a restart?
  4. Which tools need approval, and which guardrails block before a tool runs?
  5. Which usage tier and monthly budget cover production traffic, and what happens when a limit is hit?

Red flags

  • Customer prompts flowing to OpenAI's trace dashboard because nobody replaced the default exporter.
  • Unpinned SDK versions in production on a pre-1.0 library.
  • SQLite sessions on a service that runs on several instances.
  • Data-changing tools with no approval step and guardrails left in parallel mode.
  • No monthly budget or rate-limit handling on traffic users can trigger.

Products in this piece

Sources

Official documentation
14
Public source
14
  1. Agents SDK docs (Python): Models (default model, OPENAI_DEFAULT_MODEL, LiteLLM and Any-LLM)Official documentationopenai.github.io
  2. Agents SDK docs (Python): Tracing (default exporter, processors, Zero Data Retention)Official documentationopenai.github.io
  3. Agents SDK docs (Python): SessionsOfficial documentationopenai.github.io
  4. Agents SDK docs (Python): Guardrails (parallel and blocking execution)Official documentationopenai.github.io
  5. Agents SDK docs (Python): Human in the loop (approvals and RunState)Official documentationopenai.github.io
  6. Agents SDK docs (Python): Release process (0.Y.Z versioning)Official documentationopenai.github.io
  7. OpenAI API docs: gpt-5.6-luna (price, context window, rate limits by usage tier)Official documentationdevelopers.openai.com
  8. OpenAI API docs: Pricing (per-token prices)Official documentationdevelopers.openai.com
  9. OpenAI Help Center: Troubleshooting API usage and spend limitsOfficial documentationhelp.openai.com
  10. OpenAI API docs: Rate limits and usage tiersOfficial documentationdevelopers.openai.com
  11. OpenAI API docs: Data controls in the OpenAI platform (Zero Data Retention, store behavior)Official documentationdevelopers.openai.com
  12. OpenAI status history (October 2026 incidents)Official documentationstatus.openai.com
  13. Agents SDK docs (TypeScript): AI SDK extension for other modelsOfficial documentationopenai.github.io
  14. Andrew (gocronk) on X: adding a trace processor does not turn off OpenAI's exporter (Oct 7, 2026)Public sourcex.com
  15. Agents SDK Python issue #2135: traces silently dropped in long-running workers (Nov 29, 2025)Public sourcegithub.com
  16. Agents SDK Python issue #5023: the trace exporter drops a whole batch on HTTP 429 (Sep 14, 2026)Public sourcegithub.com
  17. Hacker News post on openai-agents-redis, written after SQLite sessions failed to scale (Jul 22, 2025)Public sourcenews.ycombinator.com
  18. Agents SDK Python issue #5322: RedisSession fails on Redis Cluster (Oct 6, 2026)Public sourcegithub.com
  19. Agents SDK Python issue #5351: guardrail pattern verified on 0.23.1, with tool calls started before the tripwire (Oct 12, 2026)Public sourcegithub.com
  20. Agents SDK Python issue #5413: an approval decision transfers across runs (Oct 24, 2026)Public sourcegithub.com
  21. Agents SDK Python issue #4827: an approval resume on main after #4613 leaves an orphaned tool output (Sep 2, 2026)Public sourcegithub.com
  22. OpenAI: Introducing AgentKit, with the Jun 3, 2026 update retiring Agent Builder on Nov 30, 2026Official documentationopenai.com
  23. Agents SDK Python issue #1249: agent calls on GPT-4.1 slowed from under 4 to over 11 seconds (Jul 25, 2025)Public sourcegithub.com
  24. Agents SDK Python issue #5085: nested Agent.as_tool runs never hit the prompt cache (Sep 18, 2026)Public sourcegithub.com
  25. Agents SDK Python issue #5382: tool-calling runs get quadratically slower (Oct 16, 2026)Public sourcegithub.com
  26. Agents SDK Python issue #758: LiteLLM with Gemini 2.5 Pro crashes on cached tokens (May 26, 2025)Public sourcegithub.com
  27. Agents SDK Python issue #4885: Any-LLM and LiteLLM return truncated responses as success (Sep 6, 2026)Public sourcegithub.com
  28. Agents SDK TypeScript issue #2048: the AI SDK adapter breaks Gemini on parallel tool calls (Oct 8, 2026)Public sourcegithub.com