One of the following:
SessionInputParamAgentSessionInputComputerUseApprovalRequestResult { request_id, response, type }

Responds to a pending Computer Use approval request.

request_id: string

The registered request ID from the required action.

minLength0
maxLength1048576
response: AgentBrowserAuthenticationSubmitParam { action, fields, type, selected_option } | AgentBrowserAuthenticationCancelParam { action, type } | AgentBrowserOriginAccessParam { decision, type }

The response for this request type.

One of the following:
AgentBrowserAuthenticationSubmitParam { action, fields, type, selected_option }
action: "submit"
fields: Array<Field>

Values for up to six active fields in the required action. The submitted field-value mapping and selected option must fit within 120 KiB of JSON.

minItems0
maxItems6
field_id: string

The field ID from the required action.

minLength0
maxLength1048576
value: string

The value to enter into the registered control.

minLength0
maxLength16384
type: "browser_authentication"
selected_option?: string | null

The chosen method. Required when the required action contains options.

minLength0
maxLength1048576
AgentBrowserAuthenticationCancelParam { action, type }
action: "cancel"
type: "browser_authentication"
AgentBrowserOriginAccessParam { decision, type }
decision: "approve" | "deny" | "cancel"

Whether to allow, deny, or cancel the requested origin access.

One of the following:
"approve"

Allow the browser to access this origin.

"deny"

Deny access to this origin.

"cancel"

Dismiss this request without approving access.

type: "browser_origin_access"
type: "agent.session.input.computer_use_approval_request_result"

The type of the object. Always agent.session.input.computer_use_approval_request_result.

SessionInputParamAgentSessionInputMessage { input, type }

Adds one or more user messages and starts a turn.

input: Array<AgentSessionInputMessageParam { content, role, type } >

The user messages to add to the session.

minItems0
maxItems16384
content: Array<InputContentParam>

The content of the message.

minItems0
maxItems16384
One of the following:
InputContentParamInputText { text, type }

Text input to the model.

text: string

The text sent to the model.

minLength0
maxLength1048576
type: "input_text"

The type of the object. Always input_text.

InputContentParamInputImage { 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"

The type of the object. Always input_image.

role: "user"

The role of the message author. Always user.

type?: "message"

The type of the input item. Always message.

type: "agent.session.input.message"

The type of the object. Always agent.session.input.message.

SessionInputParamAgentSessionInputCancel { type }

Cancels the session’s active turn.

type: "agent.session.input.cancel"

The type of the object. Always agent.session.input.cancel.

SessionInputParamAgentSessionInputToolResult { call_id, success, turn_id, 3 more }

Submits the result of a function call.

call_id: string

The ID of the function call.

minLength0
maxLength1048576
success: boolean

Whether the function call succeeded.

turn_id: string

The ID of the turn that requested the function call.

minLength0
maxLength1048576
type: "agent.session.input.tool_result"

The type of the object. Always agent.session.input.tool_result.

error?: string | null

The error message when the call failed.

minLength0
maxLength1048576

The function result when the call succeeded.