{"command":{"effect":"write","timeoutSeconds":120,"inputSchema":{"type":"object","description":"Updates a reusable agent. See [agent configuration](https://developers.openai.com/api/docs/guides/agents-api/configuration).","properties":{"path":{"type":"object","properties":{"agent_id":{"type":"string","minLength":0,"maxLength":1048576,"description":"The ID of the reusable agent."}},"required":["agent_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/UpdateAgentParams"}},"required":["path"],"additionalProperties":false,"definitions":{"UpdateAgentParams":{"type":"object","properties":{"experimental":{"allOf":[{"$ref":"#/definitions/ExperimentalConfigOverridesParam"},{"default":{}}]},"model":{"type":"string","minLength":0,"maxLength":1048576,"description":"The model to use for the agent. The requested model name is preserved."},"reasoning":{"anyOf":[{"$ref":"#/definitions/ReasoningParam"},{"type":"null"}],"description":"Configuration for model reasoning. Omit to keep the current settings; pass `null` to reset to the model's default effort."},"text":{"anyOf":[{"$ref":"#/definitions/TextParam"},{"type":"null"}],"description":"Configuration for text generated by the agent."},"service_tier":{"anyOf":[{"$ref":"#/definitions/ServiceTierParam"},{"type":"null"}],"description":"The service tier used for model requests."},"instructions":{"type":["string","null"],"minLength":0,"maxLength":1048576,"description":"Additional instructions appended to the agent's default base instructions. Omit to leave unchanged."},"multi_agent":{"anyOf":[{"$ref":"#/definitions/MultiAgentConfigCurrentParam"},{"type":"null"}],"description":"Configuration for creating and coordinating subagents."},"compaction":{"anyOf":[{"$ref":"#/definitions/CompactionParam"},{"type":"null"}],"description":"Context compaction settings. Omit to keep the current settings. A supplied object replaces the settings; null or an empty object enables background compaction."},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string","minLength":0,"maxLength":512},"propertyNames":{"type":"string","minLength":1,"maxLength":64},"minProperties":0,"maxProperties":16,"description":"Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it. Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters."},"name":{"type":["string","null"],"minLength":0,"maxLength":128,"description":"A replacement name. Omit to leave unchanged, or pass null to clear it."},"tools":{"type":["array","null"],"items":{"$ref":"#/definitions/PersistedAgentToolConfigParam"},"minItems":0,"maxItems":2000,"description":"Replaces the tool list. Omit to leave it unchanged, or pass null to clear it. The replacement must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON."}},"additionalProperties":false,"description":"Fields to replace on an existing reusable agent."},"ExperimentalConfigOverridesParam":{"type":"object","properties":{"time_awareness":{"type":"boolean","description":"Whether to give the model periodic current-time reminders. Omit to keep the current setting."}},"additionalProperties":false,"description":"Experimental settings to update. Omitted settings keep their current values."},"ReasoningParam":{"type":"object","properties":{"effort":{"anyOf":[{"$ref":"#/definitions/ReasoningEffortParam"},{"type":"null"}],"description":"The amount of reasoning effort the model should use. Omission lets the model select it."},"summary":{"anyOf":[{"$ref":"#/definitions/ReasoningSummaryParam"},{"type":"null"}],"description":"Controls whether the response includes a reasoning summary."}},"additionalProperties":false,"description":"Reasoning configuration for the agent."},"TextParam":{"type":"object","properties":{"format":{"anyOf":[{"$ref":"#/definitions/TextFormatParam"},{"type":"null"}],"description":"The output format. Omission uses ordinary text (`{\"type\": \"text\"}`)."},"verbosity":{"anyOf":[{"$ref":"#/definitions/VerbosityParam"},{"type":"null"}],"description":"The amount of text the model should produce. Defaults to `medium`, matching Responses."}},"additionalProperties":false,"description":"Configuration for text generated by the agent."},"ServiceTierParam":{"type":"string","enum":["auto","default","flex","priority","fast","ultrafast"],"description":"The service tier used for model requests."},"MultiAgentConfigCurrentParam":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether subagent tools are enabled."},"max_concurrent_subagents":{"type":"integer","minimum":1,"maximum":4294967295,"description":"Maximum number of subagents that may run concurrently. Defaults to 6."}},"required":["enabled"],"additionalProperties":false,"description":"Explicit configuration for creating and coordinating subagents."},"CompactionParam":{"type":"object","properties":{"async":{"type":["boolean","null"],"description":"Whether to compact context in the background. Omission or null defaults to true. Set to false to use blocking compaction. Background compaction may increase token usage."}},"additionalProperties":false,"description":"Settings for compacting the agent's context."},"PersistedAgentToolConfigParam":{"oneOf":[{"$ref":"#/definitions/PersistedAgentToolConfigParamFunction"},{"$ref":"#/definitions/PersistedAgentToolConfigParamToolSearch"},{"$ref":"#/definitions/PersistedAgentToolConfigParamProgrammaticToolCalling"},{"$ref":"#/definitions/PersistedAgentToolConfigParamMcp"},{"$ref":"#/definitions/PersistedAgentToolConfigParamWebSearch"},{"$ref":"#/definitions/PersistedAgentToolConfigParamComputerUse"},{"$ref":"#/definitions/PersistedAgentToolConfigParamAutomations"}],"description":"A tool that can be stored on a reusable agent without session credentials."},"ReasoningEffortParam":{"type":"string","enum":["none","minimal","low","medium","high","xhigh","max"],"description":"The amount of reasoning effort the model should use."},"ReasoningSummaryParam":{"type":"string","enum":["concise","detailed","auto"],"description":"The reasoning summary format requested from the model."},"TextFormatParam":{"oneOf":[{"$ref":"#/definitions/TextFormatParamText"},{"$ref":"#/definitions/TextFormatParamJsonSchema"}],"description":"The output format for generated text."},"VerbosityParam":{"type":"string","enum":["low","medium","high"],"description":"The amount of text the model should produce."},"PersistedAgentToolConfigParamFunction":{"type":"object","properties":{"type":{"type":"string","enum":["function"],"default":"function","description":"The type of the object. Always `function`."},"name":{"type":"string","minLength":0,"maxLength":1048576,"description":"The name of the function."},"description":{"type":"string","minLength":0,"maxLength":1048576,"description":"A description of what the function does."},"parameters":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string","minLength":1,"maxLength":256},"minProperties":0,"maxProperties":1024,"description":"A JSON Schema object describing the function's arguments."},"defer_loading":{"type":"boolean","default":false,"description":"Whether this function is deferred and discovered through tool search. Defaults to `false`."}},"required":["type","name","description","parameters"],"additionalProperties":false,"description":"A function defined by the application."},"PersistedAgentToolConfigParamToolSearch":{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"],"default":"tool_search","description":"The type of the object. Always `tool_search`."}},"required":["type"],"additionalProperties":false,"description":"Discovers deferred function tools and loads them into the model context."},"PersistedAgentToolConfigParamProgrammaticToolCalling":{"type":"object","properties":{"type":{"type":"string","enum":["programmatic_tool_calling"],"default":"programmatic_tool_calling","description":"The type of the object. Always `programmatic_tool_calling`."},"enabled":{"type":"boolean","default":true,"description":"Whether tools can be called from model-generated code. Defaults to `true`."}},"required":["type"],"additionalProperties":false,"description":"Enables calling tools from model-generated code."},"PersistedAgentToolConfigParamMcp":{"type":"object","properties":{"type":{"type":"string","enum":["mcp"],"default":"mcp","description":"The type of the object. Always `mcp`."},"server_label":{"type":"string","minLength":0,"maxLength":1048576,"description":"A label used to identify the MCP server in tool calls."},"credential_id":{"type":["string","null"],"minLength":0,"maxLength":1048576,"description":"The vault credential selected for this MCP server. Optional when exactly one attached credential matches the server URL."},"transport":{"$ref":"#/definitions/PersistedMcpTransportConfigParam"},"request_metadata":{"type":["object","null"],"additionalProperties":{},"propertyNames":{"type":"string","minLength":1,"maxLength":256},"minProperties":0,"maxProperties":1024,"description":"Metadata included with requests to this MCP server."},"allowed_tools":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"The MCP tools the agent may call. All server tools are allowed when omitted."},"required":{"type":"boolean","default":false,"description":"Whether this MCP server must initialize before the first turn. Defaults to `false`."},"connection_origin":{"anyOf":[{"$ref":"#/definitions/McpConnectionOriginParam"},{"type":"null"}],"description":"Selects where outbound MCP HTTP connections originate."}},"required":["type","server_label","transport"],"additionalProperties":false,"description":"Tools provided by a remote MCP server without stored credentials."},"PersistedAgentToolConfigParamWebSearch":{"type":"object","properties":{"type":{"type":"string","enum":["web_search"],"default":"web_search","description":"The type of the object. Always `web_search`."},"mode":{"anyOf":[{"$ref":"#/definitions/WebSearchModeParam"},{"type":"null"}],"description":"The source used for web search results. Defaults to `live`."},"context_size":{"anyOf":[{"$ref":"#/definitions/WebSearchContextSizeParam"},{"type":"null"}],"description":"The amount of search context made available to the model. Defaults to `medium`."},"allowed_domains":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"Domains the search may include."},"location":{"anyOf":[{"$ref":"#/definitions/WebSearchLocationParam"},{"type":"null"}],"description":"Approximate location used to localize search results."}},"required":["type"],"additionalProperties":false,"description":"Web search."},"PersistedAgentToolConfigParamComputerUse":{"type":"object","properties":{"type":{"type":"string","enum":["computer_use"],"default":"computer_use","description":"The type of the object. Always `computer_use`."},"include_screenshots":{"type":"boolean","default":false,"description":"Whether computer tool outputs include screenshots. Defaults to `false`."}},"required":["type"],"additionalProperties":false,"description":"Browser use in an OpenAI-hosted session."},"PersistedAgentToolConfigParamAutomations":{"type":"object","properties":{"type":{"type":"string","enum":["automations"],"default":"automations","description":"The type of the object. Always `automations`."}},"required":["type"],"additionalProperties":false,"description":"Lets the agent manage its own scheduled wakeups."},"TextFormatParamText":{"type":"object","properties":{"type":{"type":"string","enum":["text"],"default":"text","description":"The type of the object. Always `text`."}},"required":["type"],"additionalProperties":false,"description":"Generates ordinary text without a structured-output constraint."},"TextFormatParamJsonSchema":{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"],"default":"json_schema","description":"The type of the object. Always `json_schema`."},"schema":{"type":"object","additionalProperties":{},"propertyNames":{"type":"string","minLength":1,"maxLength":256},"minProperties":0,"maxProperties":1024,"description":"The JSON Schema that generated text must match."}},"required":["type","schema"],"additionalProperties":false,"description":"Constrains generated text to a JSON Schema."},"PersistedMcpTransportConfigParam":{"oneOf":[{"$ref":"#/definitions/PersistedMcpTransportConfigParamHttp"},{"$ref":"#/definitions/PersistedMcpTransportConfigParamStdio"}],"description":"A credential-free transport used to connect to an MCP server."},"McpConnectionOriginParam":{"type":"string","enum":["service","environment"],"description":"Where outbound MCP HTTP connections originate."},"WebSearchModeParam":{"type":"string","enum":["disabled","cached","live"],"description":"The source used for web search results."},"WebSearchContextSizeParam":{"type":"string","enum":["low","medium","high"],"description":"The amount of web search context made available to the model."},"WebSearchLocationParam":{"type":"object","properties":{"country":{"type":["string","null"],"minLength":0,"maxLength":1048576,"description":"The two-letter ISO country code, such as `US`."},"region":{"type":["string","null"],"minLength":0,"maxLength":1048576,"description":"The region or state name."},"city":{"type":["string","null"],"minLength":0,"maxLength":1048576,"description":"The city name."},"timezone":{"type":["string","null"],"minLength":0,"maxLength":1048576,"description":"The IANA timezone, such as `America/Los_Angeles`."}},"additionalProperties":false,"description":"Approximate user location used to localize web search results."},"PersistedMcpTransportConfigParamHttp":{"type":"object","properties":{"type":{"type":"string","enum":["http"],"default":"http","description":"The type of the object. Always `http`."},"server_url":{"type":"string","minLength":0,"maxLength":1048576,"description":"The URL of the MCP server."},"headers":{"type":["object","null"],"additionalProperties":{"type":"string","minLength":0,"maxLength":1048576},"propertyNames":{"type":"string","minLength":1,"maxLength":256},"minProperties":0,"maxProperties":1024,"description":"Non-secret HTTP headers sent to the MCP server."}},"required":["type","server_url"],"additionalProperties":false,"description":"Connects to an MCP server over HTTP."},"PersistedMcpTransportConfigParamStdio":{"type":"object","properties":{"type":{"type":"string","enum":["stdio"],"default":"stdio","description":"The type of the object. Always `stdio`."},"command":{"type":"string","minLength":0,"maxLength":1048576,"description":"The command used to start the MCP server."},"args":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"Arguments passed to the MCP server command."},"cwd":{"type":"string","minLength":0,"maxLength":1048576,"description":"The working directory used to start the MCP server."},"env_vars":{"type":["array","null"],"items":{"type":"string","minLength":0,"maxLength":1048576},"minItems":0,"maxItems":16384,"description":"Environment variable names to inherit from the selected execution environment."}},"required":["type","command","cwd"],"additionalProperties":false,"description":"Starts an MCP server as a local process."}}},"name":"Update an agent","id":"openai.updateagent","example":{"path":{"agent_id":"example"}},"maxRequests":1,"summary":false}}