Troubleshooting
Supported environments
Section titled “Supported environments”The OpenAI Agents SDK is supported on the following server environments:
- Node.js 22+
- Deno 2.35+
- Bun 1.2.5+
Limited support
Section titled “Limited support”- Cloudflare Workers: The Agents SDK can be used in Cloudflare Workers, but currently comes with some limitations:
- The SDK current requires
nodejs_compat
to be enabled - The SDK can currently only be imported using dynamic imports
await import('@openai/agents')
- Due to Cloudflare Workers’ limited support for
AsyncLocalStorage
some traces might not be accurate
- The SDK current requires
- Browsers:
- Tracing is currently not supported in browsers
- v8 isolates:
- While you should be able to bundle the SDK for v8 isolates if you use a bundler with the right browser polyfills, tracing will not work
- v8 isolates have not been extensively tested
Debug logging
Section titled “Debug logging”If you are running into problems with the SDK, you can enable debug logging to get more information about what is happening.
Enable debug logging by setting the DEBUG
environment variable to openai-agents:*
.
DEBUG=openai-agents:*
Alternatively, you can scope the debugging to specific parts of the SDK:
openai-agents:core
— for the main execution logic of the SDKopenai-agents:openai
— for the OpenAI API callsopenai-agents:realtime
— for the Realtime Agents components