Browse documentation

Inspect and stop an agent browser

beta

Check an agent's assigned browser and stop its runtime after automated work while preserving saved browser storage.

Inspect an agent's assigned browser before automated work, then stop that browser after the task finishes. These operations return browser metadata and preserve saved browser storage. Use the generated OpenAPI contract for exact request paths, fields, and response schemas.

These saved-browser operations apply to agents with Browser controls. They do not manage the desktop browser shown under Computer. For that view, use the workspace Internet settings.

Who can do this

Use a workspace API key created by a current workspace administrator. That administrator must also have permission to run the agent. The saved browser must have one exclusive grant to that agent and its home project.

Configure browser access and grants in the app before using automation. Ordinary workspace API keys cannot change browser access, start a private browser, or edit profile grants. Those operations require an interactive user token and the corresponding workspace permissions. A key with the agents:configure scope can change an agent's browser access and link browser credentials to its home project, as its creator. See Authentication and API keys.

Use the browser tool's navigate action with exactly one of url or urls. A single url returns bounded page evidence. Use urls for 2–20 known independent HTTPS destinations when only visits, final URLs, or titles are needed. URLs in the list cannot contain credentials.

The optional summary field accepts a short activity description. Navigation details show destinations, available page titles, and status.

{"action": "navigate", "urls": ["https://example.com/alpha", "https://example.com/beta"]}

The list runs in order and returns visit receipts without page contents. Each destination needs browser access. Approval, private control, cancellation, or an action failure stops later visits. Completed visits remain in the result and activity history.

Navigate and read each page separately when the task needs page contents, dependent decisions, forms, or approvals.

Control browser JavaScript

Browser access includes page JavaScript and authenticated page requests by default. The evaluate action can extract table data or run an asynchronous fetch() using the page's existing sign-in. Normal website cookie and CORS rules apply. Application-specific authorization headers are not supplied automatically.

JavaScript has normal page authority, including writes and reading page fields. Keep the agent's task permissions appropriate for the website. Browser Off, permitted websites, profile grants, and private control still apply.

Linked credential values are masked when they appear directly in browser text results. This does not guarantee credential secrecy from page JavaScript. After control returns to the agent, JavaScript can read values exposed by the website and return them in another form. Use accounts suitable for the agent's access.

A workspace administrator can opt out through the existing browser-access policy API by setting javascript_enabled to false. This change requires an interactive user token. Read the current policy and preserve its other fields when updating it. Omit javascript_enabled to keep its saved value, or set it to true to enable JavaScript again. Use the generated OpenAPI contract and SDK for exact request and response fields. The setting has no separate control in the app.

Evaluation accepts at most 64,000 source characters. Inline text is limited to 8,000 characters and shows an explicit truncation notice when needed. Use output: "file" to save a complete text result within the browser file limit. Request only the data your task requires. Evaluation does not add an automatic page snapshot.

After JavaScript runs, switching to private control restarts the browser before you can enter private information. Saved sign-ins and website storage remain available. A website can still expire its own sign-in. An interrupted evaluation is not repeated automatically; inspect the browser before deciding whether another action is safe.

Inspect requests and work with files

Browser files can be up to 100 MiB each. One action can transfer up to 5 files and 200 MiB in total.

Use the network_requests action to list requests observed by the browser. Use the network_request action with the returned index to inspect one request. Request response-body content explicitly when needed. Credential-bearing headers, such as cookies, authorization, and API keys, are redacted. Recognized credential fields in textual JSON and form bodies are also masked. Binary response files keep their original bytes. These actions inspect requests; they do not repeat them.

A completed website download returns a retained file reference, its size, and its checksum. The agent copies the retained file into the current coding workspace. Use the returned path for analysis. Retained browser files do not appear in Files. Ask the agent to save a file when you want it there. A failed export or missing file is not evidence that the website action did not run.

If workspace delivery fails, use browser with action: "restore_file" and the returned version_id. This copies the retained file without repeating the website action. The file must belong to the current conversation and remain available. Restoring it requires current permission to run work in that conversation.

For uploads, open the website’s file chooser, then use the upload action with paths from the current coding workspace. Browser profile files and paths outside that workspace are refused. Complete the website’s save or submit step within five minutes and check its result. Staged bytes remain available until that limit or a browser control generation change. File selection alone does not prove that the website saved the upload.

For a large evaluation or request response, use output: "file". The result includes a short preview and a complete result file. Text files contain the complete MCP response in a JSON envelope. Binary response files keep their original bytes. Inline output can be truncated. Oversized files, incomplete downloads, and partial delivery receive an explicit failure notice. Check the returned file list before treating an export as complete.

Screenshots, page reads, uploads, downloads, and complete text results remain available after linked sign-in. Linked values are masked in text results, including saved text results and network inspection. Screenshots and downloaded documents can contain account information; they are not guaranteed to hide credentials. If the browser asks for an update, stop and restart it before trying the text export again. Private control, browser grants, permitted websites, and the JavaScript setting continue to apply. Use a suitable account and ask an administrator to check access when a transfer is refused.

1. Inspect the assigned browser

Read the agent's browser runtime metadata through the operation in OpenAPI. Confirm the agent, conversation, saved browser, and ownership before submitting work. Keep the conversation ID and current browser metadata with your task record.

The response contains metadata without page content or credential values. Browser credential links include their names, permitted origins, field types, and current availability. Check that each required link is available for the website before submitting work. Command-only credentials and links for other projects are excluded. Availability can change after inspection; a successful check does not guarantee a later sign-in.

An idle agent alone does not establish that its browser is available. A person can hold private control or deliberately pause the browser. Inspect both the conversation and browser state.

2. Wait for the task to finish

Set the optional tool-call ceiling when submitting the task. It limits tool execution for the run. Use OpenAPI for the exact request field and supported limits. Keep the source turn ID returned for the task. Wait for that exact task to finish or cancel it and confirm that it has settled. Do not use another conversation or an unrelated task as cleanup authority.

Read the browser metadata again after settlement. Use the current browser state when requesting Stop. If that state changed, inspect it again before deciding which task owns the browser.

3. Request Stop and confirm the result

Submit the stop operation with the conversation ID, source turn ID, and current browser state. Read the result and confirm that the browser is stopped. An accepted request or a lost response alone does not confirm shutdown.

Stop preserves saved browser storage. It does not delete the profile or change the agent's browser grants. Keep the task record until you have confirmed the final state.

If the operation fails

A changed browser state, another conversation, private control, or a deliberate pause prevents cleanup. Inspect the current state after a conflict. Do not repeat Stop without checking which task owns the current browser.

If administrator access or the agent's run permission changed, restore the required access through the app. If exclusive browser access is missing, review its grants there. Preserve the saved browser while resolving the conflict.

Last reviewed
No results yet

Try a product noun such as agent, automation, project, or connector.