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.
Fetch one run by id. Use this to poll an async submission, review a historical run, or pull the full per-step event timeline for debugging.Documentation Index
Fetch the complete documentation index at: https://docs.pre.dev/llms.txt
Use this file to discover all available pages before exploring further.
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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Run id returned by POST /browser-agent (a 24-char Mongo ObjectId). |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
includeEvents | boolean | false | When true, includes the full per-step event timeline on each TaskResult (see events) and adds a top-level liveEvents field for tasks that are still running. Payloads can be large — screenshots inflate them fast. |
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:
| Type | When | Notable data fields |
|---|---|---|
navigation | Agent loaded a URL | url |
plan | Agent reasoned about next steps | reasoning, steps |
action | Agent performed an interaction | action (click/type/scroll/extract), selector |
screenshot | Frame captured | url (CDN link) |
validation | Output schema / success condition checked | passed, errors |
done | Task finished | status |
error | Task errored | message |
Status Codes
| Code | Meaning |
|---|---|
200 | Run found. Body is the BatchResult. |
400 | Malformed run id. |
401 | Missing or invalid bearer token. |
404 | Run not found, or not owned by this API key. |
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/playground (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".

