> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-tools/browser-and-computer/browser-navigation.md).

# Browser Navigation

Let an agent complete a task in a browser, such as locating information or downloading a document from a website. Describe the intended result and where the agent should stop.

## Before you start

Browser Navigation must be available in your environment. You need access to the target website; sign-in or other human interaction may be required.

## Run a browser task

1. Enter the website and task in **Task Prompt**. Specify the information to return, any files to download, and whether the task should stop before submitting a change.
2. Choose **Session** if the task needs saved browser context. Use **Sandbox ID** only to continue work in an existing browser environment.
3. Choose the available **Model** and set **Max Steps**. Run the tool and use the browser view if it requests human action.
4. Check **Status**, **Success**, and **Result**. Review **New Files Created** for downloads and **Error** for a failed task.

<figure><img src="https://1957915746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQ1Sgy933krTyK0S4JpP%2Fuploads%2FAUgdgi6zBTyesPL0nYy8%2Fbrowser-navigation.png?alt=media" alt="Browser navigation controls in StackAI" width="800"><figcaption><p>Task Prompt states what the browser should accomplish. Session selects saved browser session context when required. Model selects the available navigation model, and Max Steps limits the number of navigation steps. A step limit is not a timeout or a guarantee that the task will finish. Check the result before starting a dependent action.</p></figcaption></figure>

**Result:** A completed task returns a result or summary. A task that needs human action must be continued before dependent work can rely on it.

## Behavior and troubleshooting

A saved session and an active sandbox are different: a session preserves browser context, while a sandbox identifies a running environment. Check **Session Restored** and **Session Saved** when continuity matters. **Max Steps** limits navigation steps; it is not a timeout or a completion guarantee. Downloads support PDF, PNG, JPG/JPEG, GIF, WEBP, DOCX, XLSX, PPTX, UTF-8 CSV, and BAI2 files up to 30 MB. Legacy XLS and other unsupported formats are not returned. Check the destination before repeating an interrupted task that changes records.

## Inputs

| Field                  | Parameter      | Description                                                                                    |
| ---------------------- | -------------- | ---------------------------------------------------------------------------------------------- |
| Task Prompt (required) | `prompt`       | The task description for the browser agent to execute.                                         |
| Sandbox ID             | `sandbox_id`   | Optional sandbox ID to reuse an existing browser session.                                      |
| Session                | `session`      | Optional persisted browser session to restore before the run and save back after it completes. |
| Session Name           | `session_name` | Name for a new persisted browser session.                                                      |
| Model                  | `model`        | The AI model to use for browser navigation.                                                    |
| Max Steps              | `max_steps`    | Maximum number of steps the browser agent can take.                                            |

## Configuration

| Field                       | Parameter                     | Description                                                                                        |
| --------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------- |
| Browser Navigation Settings | `browser_navigation_settings` | Advanced browser settings. Leave the default configuration unless the interface requires a change. |

## Outputs

| Field               | Parameter             | Description                                                                                                                                                                                       |
| ------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Success             | `success`             | Whether the browser agent completed the task successfully.                                                                                                                                        |
| Result              | `result`              | The result or summary from the browser agent.                                                                                                                                                     |
| Steps Taken         | `steps`               | Number of steps the agent took to complete the task.                                                                                                                                              |
| Error               | `error`               | Error message if the task failed.                                                                                                                                                                 |
| Sandbox ID          | `sandbox_id`          | The ID of the sandbox used for this operation.                                                                                                                                                    |
| Stream URL          | `stream_url`          | The URL for viewing the browser session.                                                                                                                                                          |
| Session Saved       | `session_saved`       | Whether the browser session was saved to persistent storage.                                                                                                                                      |
| Session Restored    | `session_restored`    | Whether a saved browser session was restored before the run started.                                                                                                                              |
| Active Session Name | `active_session_name` | Resolved display name of the active browser session used for persistence.                                                                                                                         |
| New Files Created   | `new_files`           | List of new files created during task execution.                                                                                                                                                  |
| Screenshots         | `screenshots`         | Screenshots the browser agent took because the task prompt asked it to capture one at a certain point (for example, as evidence of a finding). Empty if the task did not ask for any screenshots. |
| Status              | `status`              | The status of the task.                                                                                                                                                                           |
| Event Type          | `event_type`          | Type of streaming event (thinking, action, result, step, done, error).                                                                                                                            |
| Event Data          | `event_data`          | Typed event data payload for the current streaming event.                                                                                                                                         |
| Needs Human Action  | `needs_human_action`  | Whether the task requires human intervention to proceed.                                                                                                                                          |
| Takeover Reason     | `takeover_reason`     | Reason why human action is needed, if applicable.                                                                                                                                                 |

## Related guidance

[Tool Results, Errors, and Agent Continuation](https://docs.stackai.com/technical-reference/models-agents-and-skills/tool-results-errors-and-agent-continuation.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-tools/browser-and-computer/browser-navigation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
