Run UI task
run_taskRun multi-step UI checks with an agent that drives the browser and returns a structured report covering success, summary, and issues like console errors and failed requests.
Instructions
Delegates a multi-step UI task to a fast built-in browser agent, which drives the session itself and reports back. Use it for goal-shaped work ("log in as demo@example.com and check the dashboard loads", "walk the checkout flow and report anything broken") rather than driving each click yourself.
Returns a structured report: a success flag, a summary, and findings — each with a severity, what is wrong, where, and the evidence observed. Findings come from two places: what the agent noticed, and what the harness itself recorded (console errors, failed requests, dialogs), so problems are reported even when the agent does not mention them or runs out of steps. The session is left on whatever page the agent ended on, so you can inspect it further with the browser_* tools.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Override the model for this call, as "provider:modelId" — e.g. "google:gemini-flash-lite-latest" or "anthropic:claude-haiku-4-5". | |
| maxSteps | No | Step budget for the agent loop (default 20). | |
| sessionId | Yes | Session id returned by browser_start. | |
| expectation | No | What a successful outcome looks like, if it is worth stating. | |
| instruction | Yes | What the agent should accomplish. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| steps | Yes | ||
| success | Yes | Whether the task was accomplished; "unknown" if the agent never reported. | |
| summary | Yes | What the agent did and observed. | |
| finalUrl | Yes | ||
| findings | Yes | Everything worth reporting from the run. | |
| finalTitle | Yes | ||
| totalTokens | No | ||
| stoppedEarly | Yes | True if the step limit was hit before finishing. | |
| consoleErrors | Yes | Console errors seen during the run. |