agents/apiTHE ENCYCLOPEDIA
Production

Agent security & credential boundaries

Map application keys, executor keys, network access, and approval checks to the correct trust boundary.

User authorization
Application server
Restricted tools
Isolated environment

Keep the application key on your server

Session operations require api.agents.read and api.agents.write; inference requires api.responses.write. Vault management needs its corresponding permissions. Do not expose this key in client JavaScript or in the agent sandbox.

Executor keys have a different job

The self-hosted executor uses an environment key as CODEX_API_KEY. It only permits environment connections. Agent-generated code can read environment credentials, which is why the application key belongs outside this compute boundary.

Tools are authority boundaries

Validate function inputs and enforce authorization inside the function or downstream service. Use separate environments for workloads that must not share data. Restrict network destinations and use credential brokers where possible. Require human approval in your application before high-impact actions.

Check data controls separately

The documented Agents API data controls currently support US data residency and do not support Zero Data Retention. Choosing a self-hosted sandbox does not make the managed service ZDR-eligible. Verify current endpoint-specific retention requirements for your workload.

Read the official reference

Check the source for current API fields, account requirements, and service limits.

OpenAI: security Agents API data controls

23 matching topics

What is the OpenAI Agents API?FoundationsAgents API vs Agents SDK vs Responses APIComparisonsAgents API quickstartGetting startedSessions, turns & durable stateCore conceptsHosted vs self-hosted sandboxesInfrastructureConnect MCP servers to Agents APITools & integrationsFunction calling & application toolsTools & integrationsMulti-agent orchestrationCore conceptsStreaming, webhooks & event handlingIntegration guidesFiles, outputs & published artifactsCore conceptsVaults & MCP authenticationTools & integrationsAgent security & credential boundariesProductionTracing, usage & debuggingProductionAgents API pricing & cost planningProductionOpenAI Agents API with PythonGetting startedAgents API with TypeScript & Next.jsIntegration guidesWhat is the OpenAI Agents SDK?FoundationsResponses API in the agent stackFoundationsAgent Skills & SKILL.mdTools & integrationsProgrammatic Tool CallingTools & integrationsRAG, file search & vector storesTools & integrationsWeb search & source citationsTools & integrationsChatKit & Agent BuilderIntegration guides
K to open Esc to close