The Agents API enables developers to create and operate cloud agents utilizing the same framework and infrastructure that supports Codex, all under the management of OpenAI. By making a simple API request, users can establish a fully operational agent by defining the specific task, model, tools, and environment, with OpenAI overseeing the agent's infrastructure. Developers have the flexibility to select where their agents are deployed: whether in an OpenAI-managed sandbox, on personal servers, or via authorized sandbox partners. The OpenAI-managed sandboxes offer secure environments for agents to execute code, interact with files, utilize packages, skills, and plugins, and generate outputs. Designed for tasks that require extended operation, the API features automatic context compaction to retain pertinent information across multiple context windows within sessions. Additionally, the tool search function efficiently loads relevant definitions only as needed, while programmatic tool invocation allows agents to execute calls simultaneously, chain related tasks, and filter or merge results seamlessly in code. This comprehensive approach not only enhances efficiency but also empowers developers to create more sophisticated applications.