Serverless API
Streaming
When running browser agent tasks through the Index API, you can receive real-time updates as the agent executes rather than waiting for the entire task to complete. This is particularly useful for:
- Providing immediate feedback to users
- Showing progress indicators for long-running tasks
- Enabling early termination if needed
- Debugging agent behavior in real-time
Streaming Mode
To receive real-time updates as the browser agent executes:
Chunk Types
When streaming browser agent output, you’ll receive different types of chunks that represent various aspects of the agent’s execution:
Chunk Type | Description |
---|---|
step | A step taken by the agent during execution (e.g., navigating to a page, clicking a button) |
finalOutput | The final result of the agent’s execution |