Task Status
Fetch the status and results of a browser-agent task submission by id. Works for in-progress and completed submissions. Opt into the full per-step event timeline with includeEvents=true.
Overview
- Method:
GET - Path:
/browser-agent/{id} - Auth: same
Authorization: Bearer YOUR_API_KEYas Run a Task - Scope: you can only fetch runs created with your own API key.
Path Parameters
Query Parameters
Response
Returns the sameBatchResult shape produced by POST /browser-agent. See Run a Task → Response Schemas for the field-by-field breakdown.
In-progress runs
Whilestatus === "processing":
results[i]holds a completed task when taskihas finished, otherwise a synthesized pending stub with{ url, instruction, input, status: "PENDING" }so your UI can always render the task row.completedcounts how many tasks have a real result (not stubs).- When
includeEvents=true,liveEvents[i]holds the in-flight event stream for each still-running task. Completed tasks getliveEvents[i] = [].
Completed runs
Whenstatus === "completed" (or "failed"):
- Every
results[i]is a realTaskResult. liveEventsis omitted (all timelines live onresults[i].eventswhenincludeEvents=true).completedAtis populated.
Example — polling an async run
Example — full timeline for one task
TaskResult now carries an events array, and while any task is still running liveEvents is populated too.
Event timeline
Theevents array records every step the agent took. Each event is { type, data, ts? }. Event types you’ll see:
Status Codes
Polling Patterns
Python — poll until done
Node.js — poll with exponential backoff
Next: List Tasks
Authorizations
API key for authentication. Get your API key from https://pre.dev/projects/key (Solo) or https://pre.dev/enterprise/dashboard?page=api (Enterprise). Use format: Bearer YOUR_API_KEY
Path Parameters
Run id (24-char Mongo ObjectId).
Query Parameters
Include per-step event timelines. Payloads can be large — screenshots inflate them fast.
Response
Run result.
Run summary. The schema is named BatchResult for backwards compatibility with older clients.
Run id (24-char Mongo ObjectId).
Total tasks in the run.
Number of tasks that have finished (any status).
Per-task results aligned by taskIndex. In-progress runs return PENDING stubs for tasks that haven't started; the stub has only url, instruction, input, and status: "PENDING".
Sum of credits billed across all tasks in the run.
processing, completed, failed Populated once status !== "processing".
Only present when includeEvents=true on GET /:id. Per-task in-flight event streams for tasks that haven't yet finished. Aligned by index with results; completed tasks get an empty array.
Set only when status === "failed".

