{"command":{"effect":"write","timeoutSeconds":120,"inputSchema":{"type":"object","description":"Updates reusable environment configuration without returning confidential values. See [reusing a hosted setup](https://developers.openai.com/api/docs/guides/agents-api/tools#reuse-a-hosted-plugin-setup).","properties":{"path":{"type":"object","properties":{"environment_template_id":{"type":"string","minLength":0,"maxLength":1048576,"description":"The ID of the reusable environment template."}},"required":["environment_template_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/UpdateEnvironmentTemplateParams"}},"required":["path"],"additionalProperties":false,"definitions":{"UpdateEnvironmentTemplateParams":{"type":"object","properties":{"name":{"type":["string","null"],"minLength":1,"maxLength":256,"description":"A replacement human-readable display name, or `null` to clear the name."},"packages":{"anyOf":[{"$ref":"#/definitions/EnvironmentPackagesParam"},{"type":"null"}],"description":"Packages installed before the runtime network policy applies."},"setup_commands":{"type":["array","null"],"items":{"$ref":"#/definitions/SetupCommandParam"},"minItems":0,"maxItems":16,"description":"Replacement confidential setup commands, never included in returned resources."},"network":{"anyOf":[{"$ref":"#/definitions/NetworkPolicyParam"},{"type":"null"}],"description":"Network access available after setup completes. Omit to preserve the current policy, or pass `null` to reset to the default policy."},"desktop":{"anyOf":[{"$ref":"#/definitions/DesktopParam"},{"type":"null"}],"description":"Replacement desktop configuration, or null to disable the desktop."},"env":{"type":["object","null"],"additionalProperties":{"type":"string","minLength":0,"maxLength":1048576},"propertyNames":{"type":"string","minLength":1,"maxLength":256},"minProperties":0,"maxProperties":1024,"description":"Replacement confidential environment values."},"capability_directories":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"Directories that expose capabilities to the agent."},"skills":{"type":["array","null"],"items":{"$ref":"#/definitions/HostedSkillParam"},"minItems":0,"maxItems":200,"description":"Replacement skill configuration installed for each new session."},"plugins":{"type":["array","null"],"items":{"$ref":"#/definitions/HostedPluginParam"},"minItems":0,"maxItems":32,"description":"Replacement plugin configuration installed for each new session."},"files":{"type":["array","null"],"items":{"$ref":"#/definitions/HostedEnvironmentFileParam"},"minItems":0,"maxItems":50,"description":"Replacement file configuration materialized for each new session."}},"additionalProperties":false,"description":"Fields to replace on an existing reusable OpenAI-hosted environment template."},"EnvironmentPackagesParam":{"type":"object","properties":{"python":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"Python packages to install. Defaults to an empty list."},"system":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"System packages to install. Defaults to an empty list."},"npm":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"npm packages to install globally. Defaults to an empty list."}},"additionalProperties":false,"description":"Packages to install in an OpenAI-hosted environment."},"SetupCommandParam":{"type":"object","properties":{"command":{"type":"string","minLength":0,"maxLength":65536,"description":"The shell command to execute."},"cwd":{"type":["string","null"],"minLength":0,"maxLength":4096,"description":"The absolute working directory. Defaults to `/workspace`."}},"required":["command"],"additionalProperties":false,"description":"A confidential setup command executed before the hosted agent starts."},"NetworkPolicyParam":{"type":"object","properties":{"access":{"$ref":"#/definitions/NetworkAccessParam"},"allowed_domains":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"Domains the environment may access when network access is restricted."},"blocked_domains":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":100,"description":"Domains blocked for both executor and browser when access is restricted. A nonempty list requires `access: restricted` and cannot be combined with nonempty `allowed_domains`. Wildcard domains are not supported."}},"required":["access"],"additionalProperties":false,"description":"Network access for an OpenAI-hosted environment."},"DesktopParam":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether to provision the desktop and its browser proxy."}},"required":["enabled"],"additionalProperties":false,"description":"Desktop configuration for an OpenAI-hosted environment."},"HostedSkillParam":{"oneOf":[{"$ref":"#/definitions/HostedSkillParamSkillReference"},{"$ref":"#/definitions/HostedSkillParamInline"}],"description":"A skill installed in an OpenAI-hosted environment."},"HostedPluginParam":{"oneOf":[{"$ref":"#/definitions/HostedPluginParamInline"}],"description":"A plugin installed in an OpenAI-hosted environment."},"HostedEnvironmentFileParam":{"oneOf":[{"$ref":"#/definitions/HostedEnvironmentFileParamFileId"},{"$ref":"#/definitions/HostedEnvironmentFileParamInline"}],"description":"A file materialized in an OpenAI-hosted execution environment."},"NetworkAccessParam":{"type":"string","enum":["enabled","disabled","restricted"],"description":"The network access mode for an OpenAI-hosted environment."},"HostedSkillParamSkillReference":{"type":"object","properties":{"type":{"type":"string","enum":["skill_reference"],"default":"skill_reference","description":"The type of the object. Always `skill_reference`."},"skill_id":{"type":"string","minLength":1,"maxLength":64,"description":"The ID of the skill created through `/v1/skills`."},"version":{"type":["string","null"],"minLength":0,"maxLength":1048576,"description":"The skill version, a positive integer or `latest`; omission selects the default."}},"required":["type","skill_id"],"additionalProperties":false,"description":"References a skill uploaded through the Skills API."},"HostedSkillParamInline":{"type":"object","properties":{"type":{"type":"string","enum":["inline"],"default":"inline","description":"The type of the object. Always `inline`."},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The skill name declared in `SKILL.md`."},"description":{"type":"string","minLength":0,"maxLength":1048576,"description":"The skill description declared in `SKILL.md`."},"source":{"$ref":"#/definitions/InlineCapabilitySourceParam"}},"required":["type","name","description","source"],"additionalProperties":false,"description":"Supplies a skill ZIP directly in the session request."},"HostedPluginParamInline":{"type":"object","properties":{"type":{"type":"string","enum":["inline"],"default":"inline","description":"The type of the object. Always `inline`."},"name":{"type":"string","minLength":1,"maxLength":64,"description":"The plugin name declared in `.codex-plugin/plugin.json`."},"description":{"type":"string","minLength":0,"maxLength":1048576,"description":"The plugin description declared in `.codex-plugin/plugin.json`."},"source":{"$ref":"#/definitions/InlineCapabilitySourceParam"}},"required":["type","name","description","source"],"additionalProperties":false,"description":"Supplies a plugin ZIP directly in the session request."},"HostedEnvironmentFileParamFileId":{"type":"object","properties":{"type":{"type":"string","enum":["file_id"],"default":"file_id","description":"The type of the object. Always `file_id`."},"file_id":{"type":"string","minLength":1,"maxLength":256,"description":"The ID of the uploaded file."},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"The absolute destination path inside `/workspace`."}},"required":["type","file_id","path"],"additionalProperties":false,"description":"A file previously uploaded through the OpenAI Files API."},"HostedEnvironmentFileParamInline":{"type":"object","properties":{"type":{"type":"string","enum":["inline"],"default":"inline","description":"The type of the object. Always `inline`."},"data":{"type":"string","minLength":0,"maxLength":6990508,"description":"The standard-base64-encoded file contents."},"path":{"type":"string","minLength":1,"maxLength":4096,"description":"The absolute destination path inside `/workspace`."}},"required":["type","data","path"],"additionalProperties":false,"description":"A file supplied directly as standard-base64 data."},"InlineCapabilitySourceParam":{"oneOf":[{"$ref":"#/definitions/InlineCapabilitySourceParamBase64"}],"description":"The encoded ZIP archive for an inline skill or plugin."},"InlineCapabilitySourceParamBase64":{"type":"object","properties":{"type":{"type":"string","enum":["base64"],"default":"base64","description":"The type of the object. Always `base64`."},"media_type":{"type":"string","enum":["application/zip"],"default":"application/zip","description":"The archive media type, always `application/zip`."},"data":{"type":"string","minLength":1,"maxLength":70254592,"description":"Standard-base64 encoded ZIP archive bytes."}},"required":["type","media_type","data"],"additionalProperties":false,"description":"Provides ZIP bytes encoded with standard base64."}}},"name":"Update an agent environment template","id":"openai.updateagentenvironmenttemplate","example":{"path":{"environment_template_id":"example"}},"maxRequests":1,"summary":false}}