Skip to content

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
tasktextRequiredA natural language description of the task the agent should accomplish.
agentIdtextOptionalOptionally run a specific custom agent by ID created with create_agent.
resultSchemaobjectOptionalOptional JSON Schema override for the result shape on this run only.
propertiesdynamic objectOptionalSchema properties keyed by output field name. Structure: properties.<field_name> = { type: 'string' | 'number' | 'integer' | 'object' | 'array', description: string, properties?: object, items?: object }.
requiredarray of textOptionalNames of required properties from resultSchema.properties.
browserSettingsobjectOptionalBrowser configuration for the agent session.
contextobjectOptionalBrowser context configuration
idtextOptionalThe Context ID
persistyes/noOptionalWhether to persist the context after browsing. Default: false.
proxiesyes/noOptionalSet true to route the session through the default proxy.
verifiedyes/noOptionalSet true to enable Browserbase Verified for the session.
variablesdynamic objectOptionalOptional named variables the agent can reference as placeholders (%variable%). Each entry has value and optional description.

Outputs

Name Type Description
statusCodenumberHTTP status code (201 when run is created in PENDING state)
bodyobjectCreated agent run. Use body.runId with get_agent_run to poll for completion.
runIdtextUnique identifier for the run
agentIdtextThe ID of the agent applied to this run, if any
tasktextThe original task description
statustextCurrent status: PENDING, RUNNING, COMPLETED, FAILED, STOPPED, or TIMED_OUT
sessionIdtextThe Browserbase session ID powering this run
sandboxIdtextExternal sandbox identifier assigned by the runner
resultSchemaobjectPer-run JSON Schema override for the result shape
resultobjectStructured result when the run has finished
summarytextNatural-language summary of the completed task
stepsTakennumberNumber of agent steps taken
taskDurationnumberTask duration in milliseconds
causeobjectFailure details when status is FAILED
codetextStructured failure code
messagetextHuman-readable failure detail
startedAttextRun start timestamp (ISO 8601)
endedAttextRun end timestamp (ISO 8601)
createdAttextCreation timestamp (ISO 8601)
updatedAttextLast update timestamp (ISO 8601)