An inline execution environment or a reference to an environment template.
An existing OpenAI-hosted environment or new inline/template-based hosted configuration.
Directories that contain capabilities exposed to the agent. Defaults to an empty list.
The hosted container size. Omission selects the medium tier.
Desktop provisioning. Omission or null inherits the template setting, or defaults to disabled.
An existing prewarmed environment. Cannot be combined with a template or inline configuration.
A reusable hosted template applied before inline session configuration. Omitted fields inherit the template; network overrides cannot broaden its policy.
Files available before the agent starts. Defaults to an empty list.
Network access policy for the environment. If omitted, the API version determines whether network access is enabled or disabled.
Packages to install in the environment. Defaults to empty package lists.
Plugins provided as inline ZIP archives. Defaults to an empty list.
Skills referenced by ID or provided as inline ZIP archives. Defaults to an empty list.
Agent configuration. With agent_id, supplied fields override the saved agent for this session. Without agent_id, model is required.
Context compaction settings. Omit to keep the current settings. A supplied object replaces the settings; null or an empty object enables background compaction.
Experimental settings to merge by key. Omitted settings keep their current values.
Additional instructions appended to the agent’s default base instructions. Omit to leave unchanged.
The model to use for the agent. The requested model name is preserved.
Configuration for model reasoning. Omit to keep the current settings; pass null to reset to the model’s default effort.
The service tier used for model requests.
auto - Selects the service tier automatically.default - Uses the default service tier.flex - Uses the flex service tier.priority - Uses the priority service tier.fast - Uses the fast service tier.ultrafast - Uses the ultrafast service tier.Configuration for text generated by the agent.
Tools available to the agent. Omit to inherit, or pass null to clear them. The resolved tool list must fit within 3 MiB (3,145,728 bytes) of compact UTF-8 JSON.
A function defined by the application.
Discovers deferred function tools and loads them into the model context.
Enables calling tools from model-generated code.
Tools provided by a remote MCP server.
A label used to identify the MCP server in tool calls.
The transport used to connect to the MCP server.
Connects to an MCP server over HTTP.
The MCP tools the agent may call. All server tools are allowed when omitted.
Selects where outbound MCP HTTP connections originate. Omitted or service uses the Managed Agents service network; environment uses the session’s selected environment.
The attached vault credential used to authenticate this MCP server. Optional when exactly one attached credential matches the server URL.
Web search.
The ID of a saved reusable agent. Omit agent to use its configuration unchanged.
Initial input to submit when the session is created. A string is shorthand for a single user message. Required when environment.type is none, or when stream is true for an environment that is not self_hosted; optional for self-hosted and non-streaming execution environments.
Up to 16 string key-value pairs, with keys up to 64 and values up to 512 characters. Omission or null defaults to an empty map.