Automations
Create an automation
POST
/agents/automationsDelete an automation
DELETE
/agents/automations/{automation_id}List automations
GET
/agents/automationsPause an automation
POST
/agents/automations/{automation_id}/pauseResume an automation
POST
/agents/automations/{automation_id}/resumeGet an automation
GET
/agents/automations/{automation_id}Update an automation
POST
/agents/automations/{automation_id}Models
Automation = PeriodicAutomation { id, created_at, created_by, 9 more } or OneTimeAutomation { id, created_at, created_by, 8 more } A saved automation and its schedule.
Automation = PeriodicAutomation { id, created_at, created_by, 9 more } or OneTimeAutomation { id, created_at, created_by, 8 more }
A saved automation and its schedule.
One of the following: PeriodicAutomation { id, created_at, created_by, 9 more } Fields shared by periodic and one-time automations.
id: string The automation ID.
minLength0 created_at: integer The creation time as a Unix timestamp in seconds.
formatint64 created_by: AutomationCreatedBy Service-recorded provenance; callers cannot supply this field.
expression: string The cron expression determining scheduled occurrences.
minLength0 metadata: map[string] Custom string key-value pairs attached to the automation.
name: string The automation’s display name.
minLength0 object: "agent.automation" (default: "agent.automation") Always agent.automation.
status: "active" or "paused" Whether scheduled delivery is active or paused.
One of the following: "active" "paused" target: AutomationTarget The session configuration or existing session receiving invocations.
timezone: string The timezone used to interpret the expression.
minLength0 type: "periodic" (default: "periodic") The type of the object. Always periodic.
pause_reason: optional "target_session_failed" or null (default: "target_session_failed") Why the service paused this schedule, or null for other schedules.
OneTimeAutomation { id, created_at, created_by, 8 more } Fields shared by periodic and one-time automations.
id: string The automation ID.
minLength0 created_at: integer The creation time as a Unix timestamp in seconds.
formatint64 created_by: AutomationCreatedBy Service-recorded provenance; callers cannot supply this field.
metadata: map[string] Custom string key-value pairs attached to the automation.
name: string The automation’s display name.
minLength0 object: "agent.automation" (default: "agent.automation") Always agent.automation.
run_at: integer The Unix timestamp, in seconds, of the scheduled occurrence.
formatint64 status: "active" or "paused" or "completed" Completion means the schedule has finished, not the agent’s work.
One of the following: "active" "paused" "completed" target: AutomationTarget The session configuration or existing session receiving invocations.
type: "once" (default: "once") The type of the object. Always once.
pause_reason: optional "target_session_failed" or null (default: "target_session_failed") Why the service paused this schedule, or null for other schedules.
AutomationAgentConfig object { instructions, model, multi_agent, 6 more } Inline agent configuration without a generated session-local identity.
AutomationAgentConfig object { instructions, model, multi_agent, 6 more }
Inline agent configuration without a generated session-local identity.
instructions: string or null Custom instructions, or null when absent.
minLength0 model: string The requested model name.
minLength0 multi_agent: MultiAgentConfig { enabled, max_concurrent_subagents } The configuration for creating and coordinating subagents.
reasoning: AgentReasoning { effort, summary } The configured reasoning policy.
service_tier: "auto" or "default" or "flex" or 3 more The configured service-tier policy.
One of the following: "auto" "default" "flex" "priority" "fast" "ultrafast" text: AgentText { format, verbosity } The configured output format and verbosity.
tools: array of AgentTool Configured tools, excluding confidential credentials.
minItems0 maxItems2000 One of the following: Function { defer_loading, description, name, 3 more } A function defined by the application.
defer_loading: boolean Whether the function is deferred and discovered through tool search.
description: string A description of what the function does.
minLength0 name: string The name of the function.
minLength0 parameters: map[unknown] A JSON Schema object describing the function’s arguments.
type: "function" (default: "function") The type of the object. Always function.
async: optional boolean Whether the agent continues without waiting for the function result.
ProgrammaticToolCalling { enabled, type } Enables calling tools from model-generated code.
enabled: boolean Whether tools can be called from model-generated code.
type: "programmatic_tool_calling" (default: "programmatic_tool_calling") The type of the object. Always programmatic_tool_calling.
Mcp { allowed_tools, connection_origin, credential_id, 5 more } Tools provided by a remote MCP server.
allowed_tools: array of string or null The MCP tools the agent may call.
minItems0 maxItems2000 connection_origin: "service" or "environment" Where outbound MCP HTTP connections originate.
One of the following: "service" "environment" credential_id: string or null The attached vault credential selected for this MCP server, if any. Optional when exactly one attached credential matches the server URL.
minLength0 request_metadata: map[unknown] Metadata included with requests to this MCP server.
required: boolean Whether this MCP server must initialize before the first turn.
server_label: string A label used to identify the MCP server in tool calls.
minLength0 transport: McpTransport The transport used to connect to the MCP server.
type: "mcp" (default: "mcp") The type of the object. Always mcp.
WebSearch { allowed_domains, context_size, location, 2 more } Web search.
allowed_domains: array of string or null Allowed search domains, or null when the search is unrestricted.
minItems0 maxItems2000 context_size: "low" or "medium" or "high" The amount of search context made available to the model. Defaults to medium.
One of the following: "low" "medium" "high" location: object or null Approximate location used to localize search results, if provided.
city: string or null The city name.
minLength0 country: string or null The two-letter ISO country code, such as US.
minLength0 region: string or null The region or state name.
minLength0 timezone: string or null The IANA timezone, such as America/Los_Angeles.
minLength0 mode: "disabled" or "cached" or "live" The source used for web search results.
One of the following: "disabled" "cached" "live" type: "web_search" (default: "web_search") The type of the object. Always web_search.
ComputerUse { include_screenshots, type } Browser use in an OpenAI-hosted session.
include_screenshots: boolean Whether computer tool outputs include screenshots.
type: "computer_use" (default: "computer_use") The type of the object. Always computer_use.
Automations { type } Lets the agent manage its own scheduled wakeups.
type: "automations" (default: "automations") The type of the object. Always automations.
compaction: optional { async } The effective context compaction settings.
async: boolean Whether context is compacted in the background. Defaults to false.
experimental: optional { time_awareness } The effective experimental settings for the agent.
time_awareness: boolean Whether the model receives periodic current-time reminders.
AutomationCreatedBy = Developer { type } or Agent { session_id, tool_call_id, type } How the automation was created, independently of how an invocation started.
AutomationCreatedBy = Developer { type } or Agent { session_id, tool_call_id, type }
How the automation was created, independently of how an invocation started.
One of the following: Developer { type } type: "developer" (default: "developer") The type of the object. Always developer.
Agent { session_id, tool_call_id, type } session_id: string The creator session, which is also the automation’s target.
minLength0 tool_call_id: string The tool call that created the automation.
minLength0 type: "agent" (default: "agent") The type of the object. Always agent.
AutomationEnvironment = None { type } or OpenAIHosted { capability_directories, container_size, desktop, 8 more } or SelfHosted { capability_directories, environment_id, type, workspace_directory } Environment selection saved before an invocation creates its session.
AutomationEnvironment = None { type } or OpenAIHosted { capability_directories, container_size, desktop, 8 more } or SelfHosted { capability_directories, environment_id, type, workspace_directory }
Environment selection saved before an invocation creates its session.
One of the following: None { type } type: "none" (default: "none") The type of the object. Always none.
OpenAIHosted { capability_directories, container_size, desktop, 8 more } Hosted environment selection with confidential setup commands and variables omitted.
capability_directories: array of string or null Directory overrides, or null to inherit the template or creation default.
minItems0 maxItems2000 container_size: "small" or "medium" or "large" or null The configured container size, or null to use the creation default.
One of the following: "small" "medium" "large" desktop: object or null Desktop overrides, or null to inherit the template or creation default.
enabled: boolean Whether the environment provisions a desktop and browser proxy.
environment_id: string or null An existing environment reference, or null when provisioning a new environment.
minLength0 environment_template_id: string or null A template reference, or null when no template is selected.
minLength0 files: array of FileID or Inline or null File overrides, excluding contents, or null to inherit.
minItems0 maxItems2000 One of the following: FileID { file_id, path, type } A project-scoped Files API reference resolved separately for each session.
file_id: string The ID of the uploaded file.
minLength0 path: string The file’s absolute path inside the environment.
minLength0 type: "file_id" (default: "file_id") The type of the object. Always file_id.
Inline { path, size_bytes, type } Metadata for confidential inline file contents.
path: string The file’s absolute path inside the environment.
minLength0 size_bytes: integer The decoded size of the inline file in bytes.
formatint64 minimum0 type: "inline" (default: "inline") The type of the object. Always inline.
network: object or null Network overrides, or null to inherit the template or creation default.
access: "enabled" or "disabled" or "restricted" The environment’s network access mode.
One of the following: "enabled" Allows unrestricted network access.
"disabled" Disables network access.
"restricted" Applies the configured domain restrictions.
allowed_domains: array of string Domains the environment may access when network access is restricted.
minItems0 maxItems2000 packages: object or null Package overrides, or null to inherit the template or creation default.
npm: array of string npm packages installed globally in the environment.
minItems0 maxItems16384 python: array of string Python packages installed in the environment.
minItems0 maxItems16384 system: array of string System packages installed in the environment.
minItems0 maxItems16384 plugins: array of HostedPlugin or null Plugin overrides, excluding archive contents, or null to inherit.
minItems0 maxItems2000 description: string The installed plugin description.
minLength0 name: string The installed plugin name.
minLength0 type: "inline" (default: "inline") The type of the object. Always inline.
skills: array of SkillReference or Inline or null Skill overrides, excluding archive contents, or null to inherit.
minItems0 maxItems2000 One of the following: SkillReference { skill_id, type, version } A skill resolved afresh from the Skills API whenever a session starts.
skill_id: string The referenced skill ID.
minLength0 type: "skill_reference" (default: "skill_reference") The type of the object. Always skill_reference.
version: string or null The requested version selector, including latest.
minLength0 Inline { description, name, type } Safe metadata for an inline skill archive.
description: string The skill description declared in SKILL.md.
minLength0 name: string The skill name declared in SKILL.md.
minLength0 type: "inline" (default: "inline") The type of the object. Always inline.
type: "openai_hosted" (default: "openai_hosted") The type of the object. Always openai_hosted.
SelfHosted { capability_directories, environment_id, type, workspace_directory } capability_directories: array of string Directories that expose capabilities to the agent.
minItems0 maxItems2000 environment_id: string or null An existing registration, or null to create a session-owned environment.
minLength0 type: "self_hosted" (default: "self_hosted") The type of the object. Always self_hosted.
workspace_directory: string The absolute project directory in the environment.
minLength0
AutomationScheduleParam = Periodic { expression, name, target, 3 more } or Once { name, run_at, target, 2 more } Creates an automation without invoking it immediately.
AutomationScheduleParam = Periodic { expression, name, target, 3 more } or Once { name, run_at, target, 2 more }
Creates an automation without invoking it immediately.
One of the following: Periodic { expression, name, target, 3 more } expression: string A standard five-field cron expression defining scheduled occurrences.
minLength1 maxLength256 name: string A human-readable name for the automation.
minLength1 maxLength256 target: AutomationTargetParam The session an automation invocation targets.
timezone: string The IANA timezone used to interpret the cron expression.
minLength1 maxLength128 type: "periodic" (default: "periodic") The type of the object. Always periodic.
metadata: optional map[string] Once { name, run_at, target, 2 more } name: string A human-readable name for the automation.
minLength1 maxLength256 run_at: integer A future Unix timestamp in seconds.
formatint64 target: AutomationTargetParam The session an automation invocation targets.
type: "once" (default: "once") The type of the object. Always once.
metadata: optional map[string]
AutomationTarget = NewSession { agent, agent_id, environment, 4 more } or ExistingSession { instructions, session_id, type } Saved target configuration, excluding confidential request-only values.
AutomationTarget = NewSession { agent, agent_id, environment, 4 more } or ExistingSession { instructions, session_id, type }
Saved target configuration, excluding confidential request-only values.
One of the following: NewSession { agent, agent_id, environment, 4 more } agent: AutomationAgentConfig or null The inline agent configuration, or null when agent_id is configured.
agent_id: string or null The saved agent reference, or null when an inline agent is configured.
minLength0 environment: AutomationEnvironment Configuration or references used to select the execution environment.
input: array of { content, role, type } Initial input delivered to each new session.
minItems0 maxItems2000 content: array of InputContent The content of the message.
minItems0 maxItems2000 One of the following: InputText { text, type } Text input recorded in a session item.
text: string The text supplied to the agent.
minLength0 type: "input_text" (default: "input_text") The type of the object. Always input_text.
InputImage { image_url, type } Image input recorded in a session item.
image_url: string The URL of the image supplied to the agent, which may be a base64-encoded data URL.
minLength0 type: "input_image" (default: "input_image") The type of the object. Always input_image.
role: "user" (default: "user") The role of the message author. Always user.
type: "message" (default: "message") The type of the input item. Always message.
metadata: map[string] Metadata attached to each new session.
type: "new_session" (default: "new_session") The type of the object. Always new_session.
vault_ids: array of string Vaults made available to each new session.
minItems0 maxItems2000 ExistingSession { instructions, session_id, type } instructions: string Saved instructions delivered as an automation notification.
minLength0 session_id: string The session receiving each invocation.
minLength0 type: "existing_session" (default: "existing_session") The type of the object. Always existing_session.
AutomationTargetParam = NewSession { environment, input, type, 4 more } or ExistingSession { instructions, session_id, type } The session an automation invocation targets.
AutomationTargetParam = NewSession { environment, input, type, 4 more } or ExistingSession { instructions, session_id, type }
The session an automation invocation targets.
One of the following: NewSession { environment, input, type, 4 more } Create a session for each invocation.
environment: EnvironmentParam The execution environment for each new session.
input: array of AgentSessionInputMessageParam { content, role, type } Initial user messages submitted with each new session.
minItems0 maxItems16384 content: array of InputContentParam The content of the message.
minItems0 maxItems16384 One of the following: InputText { text, type } Text input to the model.
text: string The text sent to the model.
minLength0 maxLength1048576 type: "input_text" (default: "input_text") The type of the object. Always input_text.
InputImage { image_url, type } Image input to the model.
image_url: string The URL of the image sent to the model.
minLength0 maxLength1048576 type: "input_image" (default: "input_image") The type of the object. Always input_image.
role: "user" (default: "user") The role of the message author. Always user.
type: optional "message" (default: "message") The type of the input item. Always message.
type: "new_session" (default: "new_session") The type of the object. Always new_session.
agent: optional { compaction, experimental, instructions, 6 more } Inline agent configuration. Provide exactly one of agent and agent_id.
compaction: optional object or null Context compaction settings. Omit to keep the current settings. A supplied object replaces the settings; null or an empty object uses blocking compaction.
async: optional boolean or null Whether to compact context in the background. Omission or null defaults to false. Set to true to enable background compaction. Background compaction may increase token usage.
experimental: optional { time_awareness } (default: {}) Experimental settings to merge by key. Omitted settings keep their current values.
time_awareness: optional boolean Whether to give the model periodic current-time reminders. Omit to keep the current setting.
instructions: optional string or null Additional instructions appended to the agent’s default base instructions. Omit to leave unchanged.
minLength0 maxLength1048576 model: optional string The model to use for the agent. The requested model name is preserved.
minLength0 maxLength1048576 multi_agent: optional MultiAgentConfigParam or null Configuration for creating and coordinating subagents.
reasoning: optional AgentReasoningParam or null Configuration for model reasoning. Omit to keep the current settings; pass null to reset to the model’s default effort.
service_tier: optional "auto" or "default" or "flex" or 3 more or null The service tier used for model requests.
One of the following: "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.
text: optional AgentTextParam or null Configuration for text generated by the agent.
tools: optional array of AgentToolParam or null 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.
minItems0 maxItems16384 One of the following: Function { description, name, parameters, 3 more } A function defined by the application.
description: string A description of what the function does.
minLength0 maxLength1048576 name: string The name of the function.
minLength0 maxLength1048576 parameters: map[unknown] A JSON Schema object describing the function’s arguments.
type: "function" (default: "function") The type of the object. Always function.
async: optional boolean (default: false) Whether the agent continues without waiting for the function result. Defaults to false.
defer_loading: optional boolean (default: false) Whether this function is deferred and discovered through tool search. Defaults to false.
ToolSearch { type } Discovers deferred function tools and loads them into the model context.
type: "tool_search" (default: "tool_search") The type of the object. Always tool_search.
ProgrammaticToolCalling { type, enabled } Enables calling tools from model-generated code.
type: "programmatic_tool_calling" (default: "programmatic_tool_calling") The type of the object. Always programmatic_tool_calling.
enabled: optional boolean (default: true) Whether tools can be called from model-generated code. Defaults to true.
Mcp { server_label, transport, type, 5 more } Tools provided by a remote MCP server.
server_label: string A label used to identify the MCP server in tool calls.
minLength0 maxLength1048576 transport: McpTransportParam The transport used to connect to the MCP server.
type: "mcp" (default: "mcp") The type of the object. Always mcp.
allowed_tools: optional array of string or null The MCP tools the agent may call. All server tools are allowed when omitted.
minItems0 maxItems16384 connection_origin: optional "service" or "environment" or null Selects where outbound MCP HTTP connections originate. Omitted or service uses the Managed Agents service network; environment uses the session’s selected environment.
One of the following: "service" Uses the Managed Agents service network.
"environment" Uses the session’s execution environment.
credential_id: optional string or null The attached vault credential used to authenticate this MCP server. Optional when exactly one attached credential matches the server URL.
minLength0 maxLength1048576 request_metadata: optional map[unknown] or null Metadata included with requests to this MCP server.
required: optional boolean (default: false) Whether this MCP server must initialize before the first turn. Defaults to false.
WebSearch { type, allowed_domains, context_size, 2 more } Web search.
type: "web_search" (default: "web_search") The type of the object. Always web_search.
allowed_domains: optional array of string or null Domains the search may include.
minItems0 maxItems16384 context_size: optional "low" or "medium" or "high" or null The amount of search context made available to the model. Defaults to medium.
One of the following: "low" "medium" "high" location: optional object or null Approximate location used to localize search results.
city: optional string or null The city name.
minLength0 maxLength1048576 country: optional string or null The two-letter ISO country code, such as US.
minLength0 maxLength1048576 region: optional string or null The region or state name.
minLength0 maxLength1048576 timezone: optional string or null The IANA timezone, such as America/Los_Angeles.
minLength0 maxLength1048576 mode: optional "disabled" or "cached" or "live" or null The source used for web search results. Defaults to live.
One of the following: "disabled" Disables web search.
"cached" Uses cached search results.
"live" Searches the live web.
ComputerUse { type, include_screenshots } Browser use in an OpenAI-hosted session.
type: "computer_use" (default: "computer_use") The type of the object. Always computer_use.
include_screenshots: optional boolean (default: false) Whether computer tool outputs include screenshots. Defaults to false.
Automations { type } Lets the agent manage its own scheduled wakeups.
type: "automations" (default: "automations") The type of the object. Always automations.
agent_id: optional string A saved agent ID. Provide exactly one of agent and agent_id.
minLength0 maxLength64 metadata: optional map[string] or null Metadata attached to each new session.
vault_ids: optional array of string or null The IDs of vaults made available to each new session.
minItems0 maxItems16384 ExistingSession { instructions, session_id, type } Deliver instructions to an existing session.
instructions: string Instructions delivered as an automation notification.
minLength0 maxLength1048576 session_id: string The session receiving each invocation.
minLength0 maxLength1048576 type: "existing_session" (default: "existing_session") The type of the object. Always existing_session.
OneTimeAutomation object { id, created_at, created_by, 8 more } Fields shared by periodic and one-time automations.
OneTimeAutomation object { id, created_at, created_by, 8 more }
Fields shared by periodic and one-time automations.
id: string The automation ID.
minLength0 created_at: integer The creation time as a Unix timestamp in seconds.
formatint64 created_by: AutomationCreatedBy Service-recorded provenance; callers cannot supply this field.
metadata: map[string] Custom string key-value pairs attached to the automation.
name: string The automation’s display name.
minLength0 object: "agent.automation" (default: "agent.automation") Always agent.automation.
run_at: integer The Unix timestamp, in seconds, of the scheduled occurrence.
formatint64 status: "active" or "paused" or "completed" Completion means the schedule has finished, not the agent’s work.
One of the following: "active" "paused" "completed" target: AutomationTarget The session configuration or existing session receiving invocations.
type: "once" (default: "once") The type of the object. Always once.
pause_reason: optional "target_session_failed" or null (default: "target_session_failed") Why the service paused this schedule, or null for other schedules.
PeriodicAutomation object { id, created_at, created_by, 9 more } Fields shared by periodic and one-time automations.
PeriodicAutomation object { id, created_at, created_by, 9 more }
Fields shared by periodic and one-time automations.
id: string The automation ID.
minLength0 created_at: integer The creation time as a Unix timestamp in seconds.
formatint64 created_by: AutomationCreatedBy Service-recorded provenance; callers cannot supply this field.
expression: string The cron expression determining scheduled occurrences.
minLength0 metadata: map[string] Custom string key-value pairs attached to the automation.
name: string The automation’s display name.
minLength0 object: "agent.automation" (default: "agent.automation") Always agent.automation.
status: "active" or "paused" Whether scheduled delivery is active or paused.
One of the following: "active" "paused" target: AutomationTarget The session configuration or existing session receiving invocations.
timezone: string The timezone used to interpret the expression.
minLength0 type: "periodic" (default: "periodic") The type of the object. Always periodic.
pause_reason: optional "target_session_failed" or null (default: "target_session_failed") Why the service paused this schedule, or null for other schedules.
AutomationsInvocations
Invoke an automation
POST
/agents/automations/{automation_id}/invocationsList automation invocations
GET
/agents/automations/{automation_id}/invocationsGet an automation invocation
GET
/agents/automations/{automation_id}/invocations/{invocation_id}Models
AutomationInvocation object { id, automation_id, created_at, 7 more } One attempted delivery by an automation.
AutomationInvocation object { id, automation_id, created_at, 7 more }
One attempted delivery by an automation.
id: string The invocation ID.
minLength0 automation_id: string The automation that owns the invocation.
minLength0 created_at: integer The creation time as a Unix timestamp in seconds.
formatint64 error: object or null The permanent delivery failure, or null when no failure occurred.
code: string A machine-readable error code.
minLength0 message: string A public explanation of the delivery failure.
minLength0 object: "agent.automation.invocation" (default: "agent.automation.invocation") Always agent.automation.invocation.
scheduled_at: integer or null The intended occurrence as a Unix timestamp in seconds, or null for manual runs.
formatint64 session_id: string or null The target or newly created session ID, or null before one is available.
minLength0 skip_reason: "pending_delivery" or null (default: "pending_delivery") Why an occurrence was skipped, or null when it was not skipped.
source: AutomationInvocationSource Whether the invocation was manual or scheduled.
status: "queued" or "completed" or "failed" or "skipped" Delivery status; completed does not mean the agent’s work has finished.
One of the following: "queued" "completed" "failed" "skipped"
AutomationInvocationSource = Manual { type } or Automation { automation, type }
AutomationInvocationSource = Manual { type } or Automation { automation, type }
One of the following: Manual { type } type: "manual" (default: "manual") The type of the object. Always manual.
Automation { automation, type } automation: Automation The automation snapshot for this occurrence, excluding confidential values.
type: "automation" (default: "automation") The type of the object. Always automation.