Skip to content
Get started

Automation Events

Complete reference for all Server-Sent Event (SSE) types emitted by the /v1/automate endpoint.

The /v1/automate endpoint streams responses using Server-Sent Events (SSE). Each event follows this format:

event: <type>
data: <JSON>

This reference documents all event types, their data structures, and when they are emitted.


Emitted when the task is initialized.

{
task: string; // Task description
url: string; // Target URL
}

Emitted during the task configuration and setup phase. No data payload.

Emitted when task execution begins.

{
task: string; // Task description
url: string; // Target URL
}

Emitted when the task finishes successfully.

{
success: true;
finalAnswer: string; // Human-readable result summary
}

Emitted when the task is terminated early. No data payload.

Emitted when task completion validation passes. No data payload.

Emitted when validation fails. No data payload.


Emitted when the agent is thinking or planning.

{
operation: string; // e.g., "Creating task plan", "Analyzing page content"
hasScreenshot: boolean; // Whether a screenshot is being analyzed
}

Emitted for status updates and plans.

{
message: string; // Status message, e.g., "Task plan created"
plan: string; // Description of the plan
}

Emitted for processing step iterations.

{
iterationId: string; // Unique iteration identifier
currentIteration: number; // Current step number (0-indexed)
}

Emitted when actions are being performed.

{
action: string; // Action type, e.g., "extract"
value: string; // Action description
}

Emitted for agent reasoning output. No data payload.

Emitted when data extraction completes.

{
extractedData: string; // JSON string of extracted data
}

Emitted when the agent is waiting for operations to complete. No data payload.


Emitted when page navigation occurs.

{
title: string; // Page title
url: string; // Current URL
}

Emitted when a browser action is initiated. No data payload.

Emitted when a browser action finishes. No data payload.

Emitted when a screenshot is taken. No data payload.


Emitted for debug compression information. Used for internal diagnostics.

Emitted for debug messages. Used for internal diagnostics.


Emitted at the end of the stream with final results.

{
success: boolean;
result: {
finalAnswer: string; // Human-readable result
};
stats: {
actions: number; // Total number of actions performed
};
}

Emitted as the stream termination signal.

{}

Emitted when an error occurs during task execution.

{
error: string; // Error message
code?: string; // Error code (if available)
}