Skip to main content

AI Task

POST 

/v1/automate

Execute AI-powered browser automation tasks using natural language. 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

Use Cases:

  • Web scraping and data extraction
  • Form filling and interaction
  • Navigation and information gathering
  • Multi-step web workflows
  • Content analysis from web pages

Request

Responses

Task executed successfully (always streaming)

Streaming Response using Server-Sent Events: All responses from the automate endpoint are streamed using Server-Sent Events.

Event Format:

  • Each event starts with event: <type> followed by data: <JSON>
  • Empty lines separate events

Event Types:

Task Events:

  • start: Task initialization
  • task:setup: Task configuration
  • task:started: Task execution begins
  • task:completed: Task finished successfully
  • task:aborted: Task was terminated
  • task:validated: Task completion validation
  • task:validation_error: Validation failed

Agent Events:

  • agent:processing: Agent thinking/planning
  • agent:status: Status updates and plans
  • agent:step: Processing step iterations
  • agent:action: Actions being performed
  • agent:reasoned: Agent reasoning output
  • agent:extracted: Data extraction results
  • agent:waiting: Agent waiting for operations

Browser Events:

  • browser:navigated: Page navigation events
  • browser:action_started: Browser action initiated
  • browser:action_completed: Browser action finished
  • browser:screenshot_captured: Screenshot taken

System Events:

  • system:debug_compression: Debug compression info
  • system:debug_message: Debug messages

Stream Control:

  • complete: End of stream with results
  • done: Stream termination
  • error: Error occurred