Skip to main content
The OpenAI Agents SDK is built on the OpenAI client, so pointing it at Mesh is a base-URL change. Mesh serves both the Responses API and chat completions, so either path works — unlike most OpenAI-compatible gateways, you do not have to force the SDK off its default.

Install

Connect

Mesh serves POST /v1/responses, so the SDK’s native path works. A model without Responses support returns 400 model_capability_not_supported; auto resolves to one that supports it.
Call set_tracing_disabled(True), or set OPENAI_AGENTS_DISABLE_TRACING=1.The SDK uploads traces to OpenAI’s own backend by default, authenticated with OPENAI_API_KEY. Pointing the SDK at Mesh does not redirect tracing. Left on without an OpenAI key it logs export errors on every run; left on with one, it ships your agents’ prompts and tool calls to OpenAI.

Tool calling

result.new_items carries the ToolCallItem and ToolCallOutputItem entries if you need to inspect the tool exchange. Handoffs and guardrails work unchanged — they are SDK-side features and never reach the model API.

Caveats

Everything in Caveats that apply to every framework applies here.