stealthDOCS
Getting started

Quickstart

A project API key, a first Agent run, and a first cloud browser — in Python, JavaScript or plain HTTP.

1. Create an API key

In the console, open Configuration → API keys and create a key with the read and execute scopes. The secret is shown once; store it outside source control.

Environment
export STEALTH_API_KEY="sk_…"          # the one-time secretexport STEALTH_API_URL="https://…"     # your deployment's origin, no trailing slash

Every request carries Authorization: Bearer $STEALTH_API_KEY. The key already selects its project. See Authentication for scopes and the permission matrix.

2. Install a client

The SDKs are workspace packages in the repository until the platform launch; publishing to npm and PyPI follows it.

# Put sdks/python on your path; standard library only, Python >= 3.10export PYTHONPATH="/path/to/stealth-browser/sdks/python:$PYTHONPATH"

3. Run your first Agent task

Create a run, wait for it, and read the result. judge: true asks a second model reading for a verdict once the agent reports done.

import osfrom stealth_browser import StealthBrowser client = StealthBrowser(os.environ["STEALTH_API_KEY"], base_url=os.environ["STEALTH_API_URL"]) run = client.run("Open https://example.com and report the page title.", judge=True,                 on_event=lambda event: print(event["type"]))print(run["status"], run["output"], run.get("judgment"), run["usage"])

A run's output is the agent's own account; judgment.verdict is pass, fail or uncertain. See Results and verdicts.

4. Drive a browser yourself

Create a browser, wait for running, navigate, observe the page, act by ref, stop.

browser = client.browsers.create({"settings": {"locale": "en-US"}})browser.ready()browser.navigate("https://example.com")state = browser.observe()                      # tree with [ref=eN], targets, tabs, dialogs, downloadslink = next((t for t in state["targets"] if t["role"] == "link"), None)if link:    browser.click(link["ref"])                 # observation frames are handled insideprint(browser.text(format="markdown")["text"])browser.stop()

The observation, refs and actions are described in Observe and act.

Next

  • Runs: every field a run accepts, events, cancellation and mid-run messages.
  • Browsers: settings, lifetime, idempotent creation, events.
  • Profiles to reuse a signed-in identity; network to route through a proxy.
  • Errors: the one error envelope and every code.