## AI Task `client.Agent.Automate(ctx, body) (*AutomateEventUnion, error)` **post** `/automate` Execute AI-powered browser automation tasks using natural language with optional geotargeting. This endpoint **always streams** responses using Server-Sent Events (SSE). **Streaming Response:** - All responses are streamed using Server-Sent Events (`text/event-stream`) - Real-time progress updates and results as they're generated **Geotargeting:** - Optionally specify a country code for geotargeted browsing **Use Cases:** - Web scraping and data extraction - Form filling and interaction - Navigation and information gathering - Multi-step web workflows - Content analysis from web pages ### Parameters - `body AgentAutomateParams` - `Task param.Field[string]` The task description in natural language - `Data param.Field[any]` JSON data to provide context for form filling or complex tasks - `GeoTarget param.Field[AgentAutomateParamsGeoTarget]` Optional geotargeting parameters for proxy requests - `Country string` Country code using ISO 3166-1 alpha-2 standard (2 letters, e.g., "US", "GB", "JP"). See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - `Guardrails param.Field[string]` Safety constraints for execution - `Interactive param.Field[bool]` Enable interactive mode to allow human-in-the-loop input during task execution - `MaxIterations param.Field[int64]` Maximum task iterations - `MaxValidationAttempts param.Field[int64]` Maximum validation attempts - `URL param.Field[string]` Starting URL for the task ### Returns - `type AutomateEventUnion interface{…}` A Server-Sent Event from /v1/automate. Typed discriminated union keyed on event. - `type AutomateEventAgentAction struct{…}` Envelope for the "agent:action" event from /v1/automate. - `Data AutomateEventAgentActionData` Event data for action execution - `Action string` - `IterationID string` - `Timestamp float64` - `Ref string` - `Value string` - `Event AgentAction` - `const AgentActionAgentAction AgentAction = "agent:action"` - `type AutomateEventAgentExtracted struct{…}` Envelope for the "agent:extracted" event from /v1/automate. - `Data AutomateEventAgentExtractedData` Event data for extracted data - `ExtractedData string` - `IterationID string` - `Timestamp float64` - `Event AgentExtracted` - `const AgentExtractedAgentExtracted AgentExtracted = "agent:extracted"` - `type AutomateEventAgentProcessing struct{…}` Envelope for the "agent:processing" event from /v1/automate. - `Data AutomateEventAgentProcessingData` Event data for when the agent is waiting for model generation - `HasScreenshot bool` - `IterationID string` - `Operation string` - `Timestamp float64` - `Event AgentProcessing` - `const AgentProcessingAgentProcessing AgentProcessing = "agent:processing"` - `type AutomateEventAgentReasoned struct{…}` Envelope for the "agent:reasoned" event from /v1/automate. - `Data AutomateEventAgentReasonedData` Event data for agent reasoning - `IterationID string` - `Reasoning string` - `Timestamp float64` - `Event AgentReasoned` - `const AgentReasonedAgentReasoned AgentReasoned = "agent:reasoned"` - `type AutomateEventAgentStatus struct{…}` Envelope for the "agent:status" event from /v1/automate. - `Data AutomateEventAgentStatusData` Event data for status messages - `IterationID string` - `Message string` - `Timestamp float64` - `Event AgentStatus` - `const AgentStatusAgentStatus AgentStatus = "agent:status"` - `type AutomateEventAgentStep struct{…}` Envelope for the "agent:step" event from /v1/automate. - `Data AutomateEventAgentStepData` Event data for agent step tracking (each loop iteration) - `CurrentIteration float64` - `IterationID string` - `Timestamp float64` - `Event AgentStep` - `const AgentStepAgentStep AgentStep = "agent:step"` - `type AutomateEventAgentWaiting struct{…}` Envelope for the "agent:waiting" event from /v1/automate. - `Data AutomateEventAgentWaitingData` Event data for waiting notifications - `IterationID string` - `Seconds float64` - `Timestamp float64` - `Event AgentWaiting` - `const AgentWaitingAgentWaiting AgentWaiting = "agent:waiting"` - `type AutomateEventAIGeneration struct{…}` Envelope for the "ai:generation" event from /v1/automate. - `Data AutomateEventAIGenerationData` Event data when AI generation occurs - `FinishReason string` - `const AutomateEventAIGenerationDataFinishReasonStop AutomateEventAIGenerationDataFinishReason = "stop"` - `const AutomateEventAIGenerationDataFinishReasonLength AutomateEventAIGenerationDataFinishReason = "length"` - `const AutomateEventAIGenerationDataFinishReasonContentFilter AutomateEventAIGenerationDataFinishReason = "content-filter"` - `const AutomateEventAIGenerationDataFinishReasonToolCalls AutomateEventAIGenerationDataFinishReason = "tool-calls"` - `const AutomateEventAIGenerationDataFinishReasonError AutomateEventAIGenerationDataFinishReason = "error"` - `const AutomateEventAIGenerationDataFinishReasonOther AutomateEventAIGenerationDataFinishReason = "other"` - `IterationID string` - `Prompt string` - `Schema any` - `Timestamp float64` - `Usage AutomateEventAIGenerationDataUsage` - `InputTokens float64` - `OutputTokens float64` - `TotalTokens float64` - `Messages []AutomateEventAIGenerationDataMessageUnion` - `type AutomateEventAIGenerationDataMessageSystem struct{…}` A system message. It can contain system information. Note: using the "system" part of the prompt is strongly preferred to increase the resilience against prompt injection attacks, and because not all providers support several system messages. - `Content string` - `Role System` - `const SystemSystem System = "system"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageSystemProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageSystemProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageSystemProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageSystemProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageSystemProviderOptionArray []AutomateEventAIGenerationDataMessageSystemProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageSystemProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageUser struct{…}` A user message. It can contain text or a combination of text and images. - `Content AutomateEventAIGenerationDataMessageUserContentUnion` Content of a user message. It can be a string or an array of text and image parts. - `string` - `type AutomateEventAIGenerationDataMessageUserContentArray []AutomateEventAIGenerationDataMessageUserContentArrayItemUnion` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemText struct{…}` Text content part of a prompt. It contains a string of text. - `Text string` The text content. - `Type Text` - `const TextText Text = "text"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageUserContentArrayItemTextProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageUserContentArrayItemTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemTextProviderOptionArray []AutomateEventAIGenerationDataMessageUserContentArrayItemTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImage struct{…}` Image content part of a prompt. It contains an image. - `Image AutomateEventAIGenerationDataMessageUserContentArrayItemImageImageUnion` Image data. Can either be: - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer - URL: a URL that points to the image - `string` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImageImageObject struct{…}` - `Buffer AutomateEventAIGenerationDataMessageUserContentArrayItemImageImageObjectBuffer` - `ByteLength float64` - `ByteLength float64` - `ByteOffset float64` - `BytesPerElement float64` - `Length float64` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImageImageByteLength struct{…}` - `ByteLength float64` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImageImageV1GlobalBuffer struct{…}` - `Buffer AutomateEventAIGenerationDataMessageUserContentArrayItemImageImageV1GlobalBufferBuffer` - `ByteLength float64` - `ByteLength float64` - `ByteOffset float64` - `BytesPerElement float64` - `Length float64` - `Type Image` - `const ImageImage Image = "image"` - `MediaType string` Optional IANA media type of the image. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageUserContentArrayItemImageProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImageProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageUserContentArrayItemImageProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImageProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImageProviderOptionArray []AutomateEventAIGenerationDataMessageUserContentArrayItemImageProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemImageProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFile struct{…}` File content part of a prompt. It contains a file. - `Data AutomateEventAIGenerationDataMessageUserContentArrayItemFileDataUnion` File data. Can either be: - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer - URL: a URL that points to the image - `string` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFileDataObject struct{…}` - `Buffer AutomateEventAIGenerationDataMessageUserContentArrayItemFileDataObjectBuffer` - `ByteLength float64` - `ByteLength float64` - `ByteOffset float64` - `BytesPerElement float64` - `Length float64` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFileDataByteLength struct{…}` - `ByteLength float64` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFileDataV1GlobalBuffer struct{…}` - `Buffer AutomateEventAIGenerationDataMessageUserContentArrayItemFileDataV1GlobalBufferBuffer` - `ByteLength float64` - `ByteLength float64` - `ByteOffset float64` - `BytesPerElement float64` - `Length float64` - `MediaType string` IANA media type of the file. - `Type File` - `const FileFile File = "file"` - `Filename string` Optional filename of the file. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageUserContentArrayItemFileProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFileProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageUserContentArrayItemFileProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFileProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFileProviderOptionArray []AutomateEventAIGenerationDataMessageUserContentArrayItemFileProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserContentArrayItemFileProviderOptionArrayItemArray []any` - `Role User` - `const UserUser User = "user"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageUserProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageUserProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageUserProviderOptionArray []AutomateEventAIGenerationDataMessageUserProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageUserProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistant struct{…}` An assistant message. It can contain text, tool calls, or a combination of text and tool calls. - `Content AutomateEventAIGenerationDataMessageAssistantContentUnion` Content of an assistant message. It can be a string or an array of text, image, reasoning, redacted reasoning, and tool call parts. - `string` - `type AutomateEventAIGenerationDataMessageAssistantContentArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemUnion` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemText struct{…}` Text content part of a prompt. It contains a string of text. - `Text string` The text content. - `Type Text` - `const TextText Text = "text"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemTextProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemTextProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFile struct{…}` File content part of a prompt. It contains a file. - `Data AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileDataUnion` File data. Can either be: - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer - URL: a URL that points to the image - `string` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileDataObject struct{…}` - `Buffer AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileDataObjectBuffer` - `ByteLength float64` - `ByteLength float64` - `ByteOffset float64` - `BytesPerElement float64` - `Length float64` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileDataByteLength struct{…}` - `ByteLength float64` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileDataV1GlobalBuffer struct{…}` - `Buffer AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileDataV1GlobalBufferBuffer` - `ByteLength float64` - `ByteLength float64` - `ByteOffset float64` - `BytesPerElement float64` - `Length float64` - `MediaType string` IANA media type of the file. - `Type File` - `const FileFile File = "file"` - `Filename string` Optional filename of the file. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemFileProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoning struct{…}` Reasoning content part of a prompt. It contains a reasoning. - `Text string` The reasoning text. - `Type Reasoning` - `const ReasoningReasoning Reasoning = "reasoning"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoningProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoningProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoningProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoningProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoningProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoningProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemReasoningProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCall struct{…}` Tool call content part of a prompt. It contains a tool call (usually generated by the AI model). - `Input any` Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema. - `ToolCallID string` ID of the tool call. This ID is used to match the tool call with the tool result. - `ToolName string` Name of the tool that is being called. - `Type ToolCall` - `const ToolCallToolCall ToolCall = "tool-call"` - `ProviderExecuted bool` Whether the tool call was executed by the provider. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCallProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCallProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCallProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCallProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCallProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCallProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolCallProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResult struct{…}` Tool result content part of a prompt. It contains the result of the tool call with the matching ID. - `Output AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputUnion` Result of the tool call. This is a JSON-serializable object. - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputText struct{…}` - `Type Text` Text tool output that should be directly sent to the API. - `const TextText Text = "text"` - `Value string` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputTextProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputTextProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJson struct{…}` - `Type Json` - `const JsonJson Json = "json"` - `Value AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueUnion` A JSON value can be a string, number, boolean, object, array, or null. JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMap map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMapItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMapItemArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMapItemArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueMapItemArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonValueArrayItemArray []any` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputJsonProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDenied struct{…}` - `Type ExecutionDenied` Type when the user has denied the execution of the tool call. - `const ExecutionDeniedExecutionDenied ExecutionDenied = "execution-denied"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDeniedProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDeniedProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDeniedProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDeniedProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDeniedProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDeniedProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputExecutionDeniedProviderOptionArrayItemArray []any` - `Reason string` Optional reason for the execution denial. - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorText struct{…}` - `Type ErrorText` - `const ErrorTextErrorText ErrorText = "error-text"` - `Value string` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorTextProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorTextProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJson struct{…}` - `Type ErrorJson` - `const ErrorJsonErrorJson ErrorJson = "error-json"` - `Value AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueUnion` A JSON value can be a string, number, boolean, object, array, or null. JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMap map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMapItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMapItemArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMapItemArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueMapItemArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonValueArrayItemArray []any` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputErrorJsonProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContent struct{…}` - `Type Content` - `const ContentContent Content = "content"` - `Value []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueUnion` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueText struct{…}` - `Text string` Text content. - `Type Text` - `const TextText Text = "text"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueTextProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueTextProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueMedia struct{…}` - `Data string` - `MediaType string` - `Type Media` Deprecated. Use image-data or file-data instead. - `const MediaMedia Media = "media"` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileData struct{…}` - `Data string` Base-64 encoded media data. - `MediaType string` IANA media type. - `Type FileData` - `const FileDataFileData FileData = "file-data"` - `Filename string` Optional filename of the file. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileDataProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileDataProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileDataProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileDataProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileDataProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURL struct{…}` - `Type FileURL` - `const FileURLFileURL FileURL = "file-url"` - `URL string` URL of the file. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURLProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURLProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURLProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURLProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileURLProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileID struct{…}` - `FileID AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDFileIDUnion` ID of the file. If you use multiple providers, you need to specify the provider specific ids using the Record option. The key is the provider name, e.g. 'openai' or 'anthropic'. - `string` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDFileIDMap map[string, string]` - `Type FileID` - `const FileIDFileID FileID = "file-id"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueFileIDProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageData struct{…}` - `Data string` Base-64 encoded image data. - `MediaType string` IANA media type. - `Type ImageData` Images that are referenced using base64 encoded data. - `const ImageDataImageData ImageData = "image-data"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageDataProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageDataProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageDataProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageDataProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageDataProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURL struct{…}` - `Type ImageURL` Images that are referenced using a URL. - `const ImageURLImageURL ImageURL = "image-url"` - `URL string` URL of the image. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURLProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURLProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURLProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURLProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageURLProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileID struct{…}` - `FileID AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDFileIDUnion` Image that is referenced using a provider file id. If you use multiple providers, you need to specify the provider specific ids using the Record option. The key is the provider name, e.g. 'openai' or 'anthropic'. - `string` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDFileIDMap map[string, string]` - `Type ImageFileID` Images that are referenced using a provider file id. - `const ImageFileIDImageFileID ImageFileID = "image-file-id"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueImageFileIDProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustom struct{…}` - `Type Custom` Custom content part. This can be used to implement provider-specific content parts. - `const CustomCustom Custom = "custom"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustomProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustomProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustomProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustomProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustomProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustomProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultOutputContentValueCustomProviderOptionArrayItemArray []any` - `ToolCallID string` ID of the tool call that this result is associated with. - `ToolName string` Name of the tool that generated this result. - `Type ToolResult` - `const ToolResultToolResult ToolResult = "tool-result"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolResultProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantContentArrayItemToolApprovalRequest struct{…}` Tool approval request prompt part. - `ApprovalID string` ID of the tool approval. - `ToolCallID string` ID of the tool call that the approval request is for. - `Type ToolApprovalRequest` - `const ToolApprovalRequestToolApprovalRequest ToolApprovalRequest = "tool-approval-request"` - `Role Assistant` - `const AssistantAssistant Assistant = "assistant"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageAssistantProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageAssistantProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageAssistantProviderOptionArray []AutomateEventAIGenerationDataMessageAssistantProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageAssistantProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageTool struct{…}` A tool message. It contains the result of one or more tool calls. - `Content []AutomateEventAIGenerationDataMessageToolContentUnion` Content of a tool message. It is an array of tool result parts. - `type AutomateEventAIGenerationDataMessageToolContentToolResult struct{…}` Tool result content part of a prompt. It contains the result of the tool call with the matching ID. - `Output AutomateEventAIGenerationDataMessageToolContentToolResultOutputUnion` Result of the tool call. This is a JSON-serializable object. - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputText struct{…}` - `Type Text` Text tool output that should be directly sent to the API. - `const TextText Text = "text"` - `Value string` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputTextProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputTextProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJson struct{…}` - `Type Json` - `const JsonJson Json = "json"` - `Value AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueUnion` A JSON value can be a string, number, boolean, object, array, or null. JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMap map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMapItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMapItemArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMapItemArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueMapItemArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonValueArrayItemArray []any` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputJsonProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDenied struct{…}` - `Type ExecutionDenied` Type when the user has denied the execution of the tool call. - `const ExecutionDeniedExecutionDenied ExecutionDenied = "execution-denied"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDeniedProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDeniedProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDeniedProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDeniedProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDeniedProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDeniedProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputExecutionDeniedProviderOptionArrayItemArray []any` - `Reason string` Optional reason for the execution denial. - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorText struct{…}` - `Type ErrorText` - `const ErrorTextErrorText ErrorText = "error-text"` - `Value string` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorTextProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorTextProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJson struct{…}` - `Type ErrorJson` - `const ErrorJsonErrorJson ErrorJson = "error-json"` - `Value AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueUnion` A JSON value can be a string, number, boolean, object, array, or null. JSON values can be serialized and deserialized by the JSON.stringify and JSON.parse methods. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMap map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMapItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMapItemV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMapItemArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMapItemArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueMapItemArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonValueArrayItemArray []any` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputErrorJsonProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContent struct{…}` - `Type Content` - `const ContentContent Content = "content"` - `Value []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueUnion` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueText struct{…}` - `Text string` Text content. - `Type Text` - `const TextText Text = "text"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueTextProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueTextProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueTextProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueTextProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueTextProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueTextProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueMedia struct{…}` - `Data string` - `MediaType string` - `Type Media` Deprecated. Use image-data or file-data instead. - `const MediaMedia Media = "media"` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileData struct{…}` - `Data string` Base-64 encoded media data. - `MediaType string` IANA media type. - `Type FileData` - `const FileDataFileData FileData = "file-data"` - `Filename string` Optional filename of the file. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileDataProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileDataProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileDataProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileDataProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileDataProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURL struct{…}` - `Type FileURL` - `const FileURLFileURL FileURL = "file-url"` - `URL string` URL of the file. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURLProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURLProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURLProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURLProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileURLProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileID struct{…}` - `FileID AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDFileIDUnion` ID of the file. If you use multiple providers, you need to specify the provider specific ids using the Record option. The key is the provider name, e.g. 'openai' or 'anthropic'. - `string` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDFileIDMap map[string, string]` - `Type FileID` - `const FileIDFileID FileID = "file-id"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueFileIDProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageData struct{…}` - `Data string` Base-64 encoded image data. - `MediaType string` IANA media type. - `Type ImageData` Images that are referenced using base64 encoded data. - `const ImageDataImageData ImageData = "image-data"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageDataProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageDataProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageDataProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageDataProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageDataProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageDataProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURL struct{…}` - `Type ImageURL` Images that are referenced using a URL. - `const ImageURLImageURL ImageURL = "image-url"` - `URL string` URL of the image. - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURLProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURLProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURLProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURLProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURLProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageURLProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileID struct{…}` - `FileID AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDFileIDUnion` Image that is referenced using a provider file id. If you use multiple providers, you need to specify the provider specific ids using the Record option. The key is the provider name, e.g. 'openai' or 'anthropic'. - `string` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDFileIDMap map[string, string]` - `Type ImageFileID` Images that are referenced using a provider file id. - `const ImageFileIDImageFileID ImageFileID = "image-file-id"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueImageFileIDProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustom struct{…}` - `Type Custom` Custom content part. This can be used to implement provider-specific content parts. - `const CustomCustom Custom = "custom"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustomProviderOptionUnion]]` Provider-specific options. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustomProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustomProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustomProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustomProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustomProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultOutputContentValueCustomProviderOptionArrayItemArray []any` - `ToolCallID string` ID of the tool call that this result is associated with. - `ToolName string` Name of the tool that generated this result. - `Type ToolResult` - `const ToolResultToolResult ToolResult = "tool-result"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolContentToolResultProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolContentToolResultProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolResultProviderOptionArray []AutomateEventAIGenerationDataMessageToolContentToolResultProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolContentToolResultProviderOptionArrayItemArray []any` - `type AutomateEventAIGenerationDataMessageToolContentToolApprovalResponse struct{…}` Tool approval response prompt part. - `ApprovalID string` ID of the tool approval. - `Approved bool` Flag indicating whether the approval was granted or denied. - `Type ToolApprovalResponse` - `const ToolApprovalResponseToolApprovalResponse ToolApprovalResponse = "tool-approval-response"` - `ProviderExecuted bool` Flag indicating whether the tool call is provider-executed. Only provider-executed tool approval responses should be sent to the model. - `Reason string` Optional reason for the approval or denial. - `Role Tool` - `const ToolTool Tool = "tool"` - `ProviderOptions map[string, map[string, AutomateEventAIGenerationDataMessageToolProviderOptionUnion]]` Additional provider-specific metadata. They are passed through to the provider from the AI SDK and enable provider-specific functionality that can be fully encapsulated in the provider. - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolProviderOptionV1Alias922155206_411_476_922155206_0_129727 map[string, AutomateEventAIGenerationDataMessageToolProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemUnion]` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolProviderOptionV1Alias922155206_411_476_922155206_0_129727ItemArray []any` - `type AutomateEventAIGenerationDataMessageToolProviderOptionArray []AutomateEventAIGenerationDataMessageToolProviderOptionArrayItemUnion` - `string` - `float64` - `bool` - `type AutomateEventAIGenerationDataMessageToolProviderOptionArrayItemArray []any` - `Object any` - `ProviderMetadata map[string, any]` - `Temperature float64` - `Warnings []any` - `Event AIGeneration` - `const AIGenerationAIGeneration AIGeneration = "ai:generation"` - `type AutomateEventAIGenerationError struct{…}` Envelope for the "ai:generation:error" event from /v1/automate. - `Data AutomateEventAIGenerationErrorData` Event data when AI generation error occurs - `Error string` - `IterationID string` - `Prompt string` - `Schema any` - `Timestamp float64` - `Messages []any` - `Event AIGenerationError` - `const AIGenerationErrorAIGenerationError AIGenerationError = "ai:generation:error"` - `type AutomateEventBrowserActionCompleted struct{…}` Envelope for the "browser:action_completed" event from /v1/automate. - `Data AutomateEventBrowserActionCompletedData` Event data for action results - `IterationID string` - `Success bool` - `Timestamp float64` - `Error string` - `Event BrowserActionCompleted` - `const BrowserActionCompletedBrowserActionCompleted BrowserActionCompleted = "browser:action_completed"` - `type AutomateEventBrowserActionStarted struct{…}` Envelope for the "browser:action_started" event from /v1/automate. - `Data AutomateEventBrowserActionStartedData` Event data for action execution - `Action string` - `IterationID string` - `Timestamp float64` - `Ref string` - `Value string` - `Event BrowserActionStarted` - `const BrowserActionStartedBrowserActionStarted BrowserActionStarted = "browser:action_started"` - `type AutomateEventBrowserNavigated struct{…}` Envelope for the "browser:navigated" event from /v1/automate. - `Data AutomateEventBrowserNavigatedData` Event data when navigating to a page - `IterationID string` - `Timestamp float64` - `Title string` - `URL string` - `Event BrowserNavigated` - `const BrowserNavigatedBrowserNavigated BrowserNavigated = "browser:navigated"` - `type AutomateEventBrowserReconnected struct{…}` Envelope for the "browser:reconnected" event from /v1/automate. - `Data AutomateEventBrowserReconnectedData` Event data when the browser reconnects after a mid-task disconnect - `EndpointIndex float64` 1-based index of the CDP endpoint now in use - `IterationID string` - `StartingURL string` The original starting URL the agent is restarting execution from - `Timestamp float64` - `Total float64` Total number of configured CDP endpoints - `Event BrowserReconnected` - `const BrowserReconnectedBrowserReconnected BrowserReconnected = "browser:reconnected"` - `type AutomateEventBrowserScreenshotCaptured struct{…}` Envelope for the "browser:screenshot_captured" event from /v1/automate. - `Data AutomateEventBrowserScreenshotCapturedData` Event data for screenshot capture - `Format string` - `const AutomateEventBrowserScreenshotCapturedDataFormatJpeg AutomateEventBrowserScreenshotCapturedDataFormat = "jpeg"` - `const AutomateEventBrowserScreenshotCapturedDataFormatPng AutomateEventBrowserScreenshotCapturedDataFormat = "png"` - `IterationID string` - `Size float64` - `Timestamp float64` - `Event BrowserScreenshotCaptured` - `const BrowserScreenshotCapturedBrowserScreenshotCaptured BrowserScreenshotCaptured = "browser:screenshot_captured"` - `type AutomateEventBrowserScreenshotCapturedImage struct{…}` Envelope for the "browser:screenshot_captured_image" event from /v1/automate. - `Data AutomateEventBrowserScreenshotCapturedImageData` Event data for screenshot image capture with full image data This event contains the complete screenshot and can be very large - `Image string` - `IterationID string` - `MediaType string` - `const AutomateEventBrowserScreenshotCapturedImageDataMediaTypeImageJpeg AutomateEventBrowserScreenshotCapturedImageDataMediaType = "image/jpeg"` - `const AutomateEventBrowserScreenshotCapturedImageDataMediaTypeImagePng AutomateEventBrowserScreenshotCapturedImageDataMediaType = "image/png"` - `Timestamp float64` - `Event BrowserScreenshotCapturedImage` - `const BrowserScreenshotCapturedImageBrowserScreenshotCapturedImage BrowserScreenshotCapturedImage = "browser:screenshot_captured_image"` - `type AutomateEventCdpEndpointConnected struct{…}` Envelope for the "cdp:endpoint_connected" event from /v1/automate. - `Data AutomateEventCdpEndpointConnectedData` Event data when a CDP endpoint is successfully connected to - `EndpointIndex float64` 1-based index of the endpoint that connected - `IterationID string` - `Timestamp float64` - `Total float64` Total number of configured CDP endpoints - `Event CdpEndpointConnected` - `const CdpEndpointConnectedCdpEndpointConnected CdpEndpointConnected = "cdp:endpoint_connected"` - `type AutomateEventCdpEndpointCycle struct{…}` Envelope for the "cdp:endpoint_cycle" event from /v1/automate. - `Data AutomateEventCdpEndpointCycleData` Event data when a CDP endpoint fails and the next one is being tried - `Attempt float64` 1-based index of the endpoint attempt that failed - `Error string` Sanitized error identifier from the failed connection attempt (error.name, not error.message — full messages may contain endpoint URLs) - `IterationID string` - `Timestamp float64` - `Total float64` Total number of configured CDP endpoints - `Event CdpEndpointCycle` - `const CdpEndpointCycleCdpEndpointCycle CdpEndpointCycle = "cdp:endpoint_cycle"` - `type AutomateEventComplete struct{…}` Envelope for the "complete" event from /v1/automate. - `Data AutomateEventCompleteData` Payload for the `complete` stream event. Structurally identical to TaskExecutionResult from webAgent.ts — the `complete` event's data is the agent's final TaskExecutionResult, stringified onto the SSE stream. - `FinalAnswer string` Final answer or result from the agent - `Stats AutomateEventCompleteDataStats` Execution statistics - `Actions float64` - `DurationMs float64` - `EndTime float64` - `Iterations float64` - `StartTime float64` - `Success bool` Whether the task completed successfully - `Error AutomateEventCompleteDataError` Structured error information for failed tasks - `Code string` Error codes for task failures - `const AutomateEventCompleteDataErrorCodeTaskAborted AutomateEventCompleteDataErrorCode = "TASK_ABORTED"` - `const AutomateEventCompleteDataErrorCodeMaxIterations AutomateEventCompleteDataErrorCode = "MAX_ITERATIONS"` - `const AutomateEventCompleteDataErrorCodeMaxErrors AutomateEventCompleteDataErrorCode = "MAX_ERRORS"` - `const AutomateEventCompleteDataErrorCodeTaskFailed AutomateEventCompleteDataErrorCode = "TASK_FAILED"` - `Message string` Human-readable error message - `Event Complete` - `const CompleteComplete Complete = "complete"` - `type AutomateEventDone struct{…}` Envelope for the "done" event from /v1/automate. - `Data map[string, any]` Payload for the `done` stream terminator event. Empty today; reserved for future metadata. - `Event Done` - `const DoneDone Done = "done"` - `type AutomateEventError struct{…}` Envelope for the "error" event from /v1/automate. - `Data AutomateEventErrorData` Payload for the top-level `error` stream event. Emitted when an uncaught error escapes the task runner. Mirrors `ErrorResponse` from the server package's `taskRunner.ts` — kept structurally aligned so schema and runtime stay consistent. Distinct from agent-level error events like `ai:generation:error` and `task:validation_error`, which are emitted through the normal event emitter during the agent loop. - `Error AutomateEventErrorDataError` - `Code string` - `Message string` - `Timestamp string` ISO-8601 timestamp - `Success bool` - `const AutomateEventErrorDataSuccessFalse AutomateEventErrorDataSuccess = false` - `Event Error` - `const ErrorError Error = "error"` - `type AutomateEventInteractiveFormDataError struct{…}` Envelope for the "interactive:form_data:error" event from /v1/automate. - `Data AutomateEventInteractiveFormDataErrorData` Event data when form validation fails and the agent re-requests data. Carries both the error context and the fields that need new values. Callers respond to this the same way as a request event. - `FieldErrors map[string, string]` Per-field error messages from validation (field ref -> error text) - `Fields []AutomateEventInteractiveFormDataErrorDataField` - `FieldType string` Semantic field type - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeText AutomateEventInteractiveFormDataErrorDataFieldFieldType = "text"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeEmail AutomateEventInteractiveFormDataErrorDataFieldFieldType = "email"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypePhone AutomateEventInteractiveFormDataErrorDataFieldFieldType = "phone"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeDate AutomateEventInteractiveFormDataErrorDataFieldFieldType = "date"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeNumber AutomateEventInteractiveFormDataErrorDataFieldFieldType = "number"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeSelect AutomateEventInteractiveFormDataErrorDataFieldFieldType = "select"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeCheckbox AutomateEventInteractiveFormDataErrorDataFieldFieldType = "checkbox"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeRadio AutomateEventInteractiveFormDataErrorDataFieldFieldType = "radio"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeTextarea AutomateEventInteractiveFormDataErrorDataFieldFieldType = "textarea"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypePassword AutomateEventInteractiveFormDataErrorDataFieldFieldType = "password"` - `const AutomateEventInteractiveFormDataErrorDataFieldFieldTypeOther AutomateEventInteractiveFormDataErrorDataFieldFieldType = "other"` - `Label string` The field's visible label - `Ref string` Element ref from the accessibility tree (e.g., "E42") - `Required bool` Whether this field must be filled - `CurrentValue string` Current value if already partially filled - `Description string` Additional context (e.g., validation error message on re-request) - `Options []string` Available options for select/radio fields - `FormDescription string` - `IterationID string` - `PageTitle string` - `PageURL string` - `RequestID string` - `Timestamp float64` - `Event InteractiveFormDataError` - `const InteractiveFormDataErrorInteractiveFormDataError InteractiveFormDataError = "interactive:form_data:error"` - `type AutomateEventInteractiveFormDataRequest struct{…}` Envelope for the "interactive:form_data:request" event from /v1/automate. - `Data AutomateEventInteractiveFormDataRequestData` Event data when the agent requests user data for form fields - `Fields []AutomateEventInteractiveFormDataRequestDataField` - `FieldType string` Semantic field type - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeText AutomateEventInteractiveFormDataRequestDataFieldFieldType = "text"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeEmail AutomateEventInteractiveFormDataRequestDataFieldFieldType = "email"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypePhone AutomateEventInteractiveFormDataRequestDataFieldFieldType = "phone"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeDate AutomateEventInteractiveFormDataRequestDataFieldFieldType = "date"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeNumber AutomateEventInteractiveFormDataRequestDataFieldFieldType = "number"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeSelect AutomateEventInteractiveFormDataRequestDataFieldFieldType = "select"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeCheckbox AutomateEventInteractiveFormDataRequestDataFieldFieldType = "checkbox"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeRadio AutomateEventInteractiveFormDataRequestDataFieldFieldType = "radio"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeTextarea AutomateEventInteractiveFormDataRequestDataFieldFieldType = "textarea"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypePassword AutomateEventInteractiveFormDataRequestDataFieldFieldType = "password"` - `const AutomateEventInteractiveFormDataRequestDataFieldFieldTypeOther AutomateEventInteractiveFormDataRequestDataFieldFieldType = "other"` - `Label string` The field's visible label - `Ref string` Element ref from the accessibility tree (e.g., "E42") - `Required bool` Whether this field must be filled - `CurrentValue string` Current value if already partially filled - `Description string` Additional context (e.g., validation error message on re-request) - `Options []string` Available options for select/radio fields - `FormDescription string` - `IterationID string` - `PageTitle string` - `PageURL string` - `RequestID string` - `Timestamp float64` - `Event InteractiveFormDataRequest` - `const InteractiveFormDataRequestInteractiveFormDataRequest InteractiveFormDataRequest = "interactive:form_data:request"` - `type AutomateEventSystemDebugCompression struct{…}` Envelope for the "system:debug_compression" event from /v1/automate. - `Data AutomateEventSystemDebugCompressionData` Event data for compression debug info - `CompressedSize float64` - `CompressionPercent float64` - `IterationID string` - `OriginalSize float64` - `Timestamp float64` - `Event SystemDebugCompression` - `const SystemDebugCompressionSystemDebugCompression SystemDebugCompression = "system:debug_compression"` - `type AutomateEventSystemDebugMessage struct{…}` Envelope for the "system:debug_message" event from /v1/automate. - `Data AutomateEventSystemDebugMessageData` Event data for message debug info - `IterationID string` - `Messages []any` - `Timestamp float64` - `Event SystemDebugMessage` - `const SystemDebugMessageSystemDebugMessage SystemDebugMessage = "system:debug_message"` - `type AutomateEventTaskAborted struct{…}` Envelope for the "task:aborted" event from /v1/automate. - `Data AutomateEventTaskAbortedData` Event data when a task is aborted - `FinalAnswer string` - `IterationID string` - `Reason string` - `Timestamp float64` - `Event TaskAborted` - `const TaskAbortedTaskAborted TaskAborted = "task:aborted"` - `type AutomateEventTaskCompleted struct{…}` Envelope for the "task:completed" event from /v1/automate. - `Data AutomateEventTaskCompletedData` Event data when a task is completed - `FinalAnswer string` - `IterationID string` - `Timestamp float64` - `Success bool` - `Event TaskCompleted` - `const TaskCompletedTaskCompleted TaskCompleted = "task:completed"` - `type AutomateEventTaskMetrics struct{…}` Envelope for the "task:metrics" event from /v1/automate. - `Data AutomateEventTaskMetricsData` - `AIGenerationCount float64` - `AIGenerationErrorCount float64` - `EventCounts map[string, float64]` - `IterationID string` - `StepCount float64` - `Timestamp float64` - `TotalInputTokens float64` - `TotalOutputTokens float64` - `Event TaskMetrics` - `const TaskMetricsTaskMetrics TaskMetrics = "task:metrics"` - `type AutomateEventTaskMetricsIncremental struct{…}` Envelope for the "task:metrics_incremental" event from /v1/automate. - `Data AutomateEventTaskMetricsIncrementalData` - `AIGenerationCount float64` - `AIGenerationErrorCount float64` - `EventCounts map[string, float64]` - `IterationID string` - `StepCount float64` - `Timestamp float64` - `TotalInputTokens float64` - `TotalOutputTokens float64` - `Event TaskMetricsIncremental` - `const TaskMetricsIncrementalTaskMetricsIncremental TaskMetricsIncremental = "task:metrics_incremental"` - `type AutomateEventTaskSetup struct{…}` Envelope for the "task:setup" event from /v1/automate. - `Data AutomateEventTaskSetupData` Event data when a task is setup - `BrowserName string` - `IterationID string` - `Task string` - `Timestamp float64` - `Data any` - `Guardrails string` - `HasAPIKey bool` - `KeySource string` - `const AutomateEventTaskSetupDataKeySourceGlobal AutomateEventTaskSetupDataKeySource = "global"` - `const AutomateEventTaskSetupDataKeySourceEnv AutomateEventTaskSetupDataKeySource = "env"` - `const AutomateEventTaskSetupDataKeySourceNotSet AutomateEventTaskSetupDataKeySource = "not_set"` - `Model string` - `Provider string` - `Proxy string` - `PwCdpEndpoint string` - `PwCdpEndpointCount float64` Total number of CDP endpoints configured (index, not URLs) - `PwCdpEndpoints []string` - `PwEndpoint string` - `URL string` - `Vision bool` - `Event TaskSetup` - `const TaskSetupTaskSetup TaskSetup = "task:setup"` - `type AutomateEventTaskStarted struct{…}` Envelope for the "task:started" event from /v1/automate. - `Data AutomateEventTaskStartedData` Event data when a task is started - `IterationID string` - `Plan string` - `SuccessCriteria string` - `Task string` - `Timestamp float64` - `URL string` - `ActionItems []string` - `Event TaskStarted` - `const TaskStartedTaskStarted TaskStarted = "task:started"` - `type AutomateEventTaskTraceContext struct{…}` Envelope for the "task:trace_context" event from /v1/automate. - `Data AutomateEventTaskTraceContextData` Payload for the task:trace_context event. Carries the OpenTelemetry trace ID for this /v1/automate request so consumers can deep-link to distributed-tracing UIs (e.g. Cloud Trace, Cloud Logging) for the run. - `TraceID string` W3C trace ID — 32-character lowercase hexadecimal string. - `Event TaskTraceContext` - `const TaskTraceContextTaskTraceContext TaskTraceContext = "task:trace_context"` - `type AutomateEventTaskValidated struct{…}` Envelope for the "task:validated" event from /v1/automate. - `Data AutomateEventTaskValidatedData` Event data for task validation - `CompletionQuality string` - `const AutomateEventTaskValidatedDataCompletionQualityFailed AutomateEventTaskValidatedDataCompletionQuality = "failed"` - `const AutomateEventTaskValidatedDataCompletionQualityPartial AutomateEventTaskValidatedDataCompletionQuality = "partial"` - `const AutomateEventTaskValidatedDataCompletionQualityComplete AutomateEventTaskValidatedDataCompletionQuality = "complete"` - `const AutomateEventTaskValidatedDataCompletionQualityExcellent AutomateEventTaskValidatedDataCompletionQuality = "excellent"` - `FinalAnswer string` - `IterationID string` - `Observation string` - `Timestamp float64` - `Feedback string` - `Event TaskValidated` - `const TaskValidatedTaskValidated TaskValidated = "task:validated"` - `type AutomateEventTaskValidationError struct{…}` Envelope for the "task:validation_error" event from /v1/automate. - `Data AutomateEventTaskValidationErrorData` Event data for validation errors during action response processing - `Errors []string` - `IterationID string` - `RawResponse any` - `RetryCount float64` - `Timestamp float64` - `Event TaskValidationError` - `const TaskValidationErrorTaskValidationError TaskValidationError = "task:validation_error"` ### Example ```go package main import ( "context" "fmt" "github.com/stainless-sdks/tabstack-go" "github.com/stainless-sdks/tabstack-go/option" ) func main() { client := tabstack.NewClient( option.WithAPIKey("My API Key"), ) stream := client.Agent.AutomateStreaming(context.TODO(), tabstack.AgentAutomateParams{ Task: "Find the top 3 trending repositories and extract their names, descriptions, and star counts", Guardrails: tabstack.String("browse and extract only, don't interact with repositories"), URL: tabstack.String("https://github.com/trending"), }) for stream.Next() { fmt.Printf("%+v\n", stream.Current()) } err := stream.Err() if err != nil { panic(err.Error()) } } ``` #### Response ```json event: start data: {"task": "Find the top 3 trending repositories", "url": "https://github.com/trending"} event: agent:processing data: {"operation": "Creating task plan", "hasScreenshot": false} event: browser:navigated data: {"title": "Trending - GitHub", "url": "https://github.com/trending"} event: agent:extracted data: {"extractedData": "[{\"name\": \"awesome-ai\", \"stars\": \"45.2k\"}]"} event: task:completed data: {"success": true, "finalAnswer": "Top 3 trending repos extracted"} event: complete data: {"success": true} event: done data: {} ```