Run Agent
Browserbase
Browserbase
Run Agent
Run a Browserbase browser agent to complete a task using web search and browser tooling. Optionally pass agentId to run a custom agent. Returns a run in PENDING state; poll with get_agent_run until complete.
ActionAI Tool
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
task | text | Required | A natural language description of the task the agent should accomplish. |
agentId | text | Optional | Optionally run a specific custom agent by ID created with create_agent. |
resultSchema | object | Optional | Optional JSON Schema override for the result shape on this run only. |
properties | dynamic object | Optional | Schema properties keyed by output field name. Structure: properties.<field_name> = { type: 'string' | 'number' | 'integer' | 'object' | 'array', description: string, properties?: object, items?: object }. |
required | array of text | Optional | Names of required properties from resultSchema.properties. |
browserSettings | object | Optional | Browser configuration for the agent session. |
context | object | Optional | Browser context configuration |
id | text | Optional | The Context ID |
persist | yes/no | Optional | Whether to persist the context after browsing. Default: false. |
proxies | yes/no | Optional | Set true to route the session through the default proxy. |
verified | yes/no | Optional | Set true to enable Browserbase Verified for the session. |
variables | dynamic object | Optional | Optional named variables the agent can reference as placeholders (%variable%). Each entry has value and optional description. |
Outputs
| Name | Type | Description |
|---|---|---|
statusCode | number | HTTP status code (201 when run is created in PENDING state) |
body | object | Created agent run. Use body.runId with get_agent_run to poll for completion. |
runId | text | Unique identifier for the run |
agentId | text | The ID of the agent applied to this run, if any |
task | text | The original task description |
status | text | Current status: PENDING, RUNNING, COMPLETED, FAILED, STOPPED, or TIMED_OUT |
sessionId | text | The Browserbase session ID powering this run |
sandboxId | text | External sandbox identifier assigned by the runner |
resultSchema | object | Per-run JSON Schema override for the result shape |
result | object | Structured result when the run has finished |
summary | text | Natural-language summary of the completed task |
stepsTaken | number | Number of agent steps taken |
taskDuration | number | Task duration in milliseconds |
cause | object | Failure details when status is FAILED |
code | text | Structured failure code |
message | text | Human-readable failure detail |
startedAt | text | Run start timestamp (ISO 8601) |
endedAt | text | Run end timestamp (ISO 8601) |
createdAt | text | Creation timestamp (ISO 8601) |
updatedAt | text | Last update timestamp (ISO 8601) |