> ## Documentation Index
> Fetch the complete documentation index at: https://docs.boxd.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Notte

> Give an agent on an isolated boxd machine a hosted Notte browser for the web.

![The Notte mark and wordmark inside the boxd card.](https://mintcdn.com/azin/9aQ4hGVfDzlIUWSr/images/boxd-x-notte.png?fit=max\&auto=format\&n=9aQ4hGVfDzlIUWSr\&q=85\&s=e729a4368d21a7f3a181543a28d8b2bf)

[Notte](https://notte.cc) runs cloud browsers for AI agents, with stealth, captcha solving and proxies built in. You drive a session from its Python SDK, its CLI or Playwright.

Here the agent runs on an isolated boxd machine and uses a Notte browser for the web. Every boxd machine also has [its own browser](https://docs.boxd.sh/guides/launch-a-browser.md). Use Notte when you want a hosted browser with proxies and captcha solving.

## Set up

**1. On your computer**

With Python 3.11 or later:

```bash theme={"theme":"github-dark"}
pip install boxd
boxd auth keys create notte-agent --org <your-org>
export BOXD_API_KEY=bxd_...
export NOTTE_API_KEY=...
```

Get the Notte key from the [Notte console](https://console.notte.cc). Machines are created and billed in the boxd key's organization.

**2. Write the agent**

This runs on the machine. Save it as `agent.py`:

```python agent.py theme={"theme":"github-dark"}
from notte_sdk import NotteClient

client = NotteClient()  # reads NOTTE_API_KEY

# The with block stops the browser session when it ends, also after an error.
with client.Session() as session:
    print("session:", session.session_id)
    session.execute(type="goto", url="https://example.com")
    text = session.scrape(only_main_content=True)
    print("page says:", text.splitlines()[0])

print("session status:", session.response.status)
```

**3. Run it on a machine**

Save this as `run_agent.py`, next to `agent.py`. It creates an isolated machine, installs the Notte SDK there, runs the agent and deletes the machine:

```python run_agent.py theme={"theme":"github-dark"}
import os
from pathlib import Path
from uuid import uuid4

from boxd import Boxd

boxd = Boxd()  # reads BOXD_API_KEY
machine = boxd.machines.create(f"notte-agent-{uuid4().hex[:8]}", isolated=True)
print("machine:", machine.id)


def run(command: str, env: dict[str, str] | None = None) -> None:
    result = boxd.machines.exec(machine.id, command, env=env, cwd="/home/boxd", timeout=300)
    print(result.stdout, end="")
    if result.exit_code != 0:
        raise RuntimeError(f"{command!r} exited with {result.exit_code}: {result.stderr}")


try:
    boxd.machines.wait_until_ready(machine.id)
    boxd.machines.files.upload(machine.id, "/home/boxd/agent.py", Path("agent.py").read_text())
    run("uv venv -q && uv pip install -q notte-sdk")
    # The Notte key goes with this one command. It is not written to the machine.
    run(".venv/bin/python agent.py", env={"NOTTE_API_KEY": os.environ["NOTTE_API_KEY"]})
finally:
    boxd.machines.delete(machine.id)
    print("machine deleted")
```

```bash theme={"theme":"github-dark"}
python run_agent.py
```

Our run on 24 November 2026, with `notte-sdk` 1.10.16 and `boxd` 0.3.5:

```text theme={"theme":"github-dark"}
machine: <machine-id>
session: <session-id>
page says: This domain is for use in documentation examples without needing permission.
session status: closed
machine deleted
```

## Or use the Notte CLI

An agent on the machine can also drive the browser from the shell. Pass `NOTTE_API_KEY` with each command, as `run_agent.py` does:

```bash theme={"theme":"github-dark"}
curl -fsSL https://notte.cc/install-cli.sh | sh
notte sessions start
notte page goto https://example.com
notte page scrape --only-main-content
notte sessions stop --yes
```

```text theme={"theme":"github-dark"}
Started session <session-id> in 693ms
  Browser   chromium, headless · proxies · captcha solving
  Stops     after 3 min idle, 15 min max
Navigated to 'https://example.com' in current tab
This domain is for use in documentation examples without needing permission.
Stopped session <session-id>
```

Stop the session in a `trap` or `finally`, so it also stops when a step fails.

## How it works

* **The machine runs the agent.** It is created with `isolated=True`: off your organization's private network, with no boxd CLI and no connected integrations. See [sandboxes](https://docs.boxd.sh/use-cases/sandboxes.md#cut-off-from-your-fleet-by-design).
* **Notte runs the browser.** The SDK on the machine calls Notte's API, and the browser runs on Notte's side.
* **The key goes with the command.** `env=` sets `NOTTE_API_KEY` for one `exec`. In our run, no later command saw it and no file held it.
* **Both are cleaned up.** The `with` block stops the session and the `finally` block deletes the machine, also when a step fails.

## Limits

* **Session length.** A Notte session stops after 3 minutes idle or 15 minutes in all. Change it with `idle_timeout_minutes` and `max_duration_minutes` ([session configuration](https://docs.notte.cc/features/sessions/configuration)).
* **The key.** Code on the machine can read the key while its command runs. Use a Notte key you can revoke.
* **A killed script.** If `run_agent.py` dies before `finally`, the machine stays. Remove it with `boxd machine remove <name> -y`, or set a [delete timer](https://docs.boxd.sh/guides/delete-after.md) when you create it.

## Read more

* [Sessions](https://docs.notte.cc/concepts/sessions) and the [CLI reference](https://docs.notte.cc/cli-reference/sessions) in Notte's docs
* [Notte on GitHub](https://github.com/nottelabs/notte)
* [Launch a browser](https://docs.boxd.sh/guides/launch-a-browser.md): the browser on every boxd machine


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.