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

# Managed browsers

> Understand browser sessions, lifecycle, capabilities, resources, and inspection across Webcompute surfaces.

A managed browser is the runtime behind Webcompute agent runs, SDK workflows, MCP tools, REST calls, quick actions, and CDP attachments.

It gives browser work concrete handles:

* Lifecycle: create, inspect, stop, resume, close.
* Capabilities: Debug UI URL, CDP URL, recording support, CAPTCHA status, and other runtime affordances.
* Policy: domain boundaries and runtime configuration.
* Visibility: Debug UI, recordings, status, and events.
* Resources: files, downloads, dialogs, and permissions.
* Control: agent runs, deterministic execution, or CDP attachment.

Most users meet managed browsers through `web agent` or `web.agent()`. You only need direct browser lifecycle APIs when your application owns the orchestration.

```ts theme={null}
const browser = await web.browser.create({
  recording: true,
  policy: { allowedDomains: ["sec.gov"] },
});

await browser.close();
```

## Lifecycle map

| Operation   | CLI                                       | SDK                                   | MCP                                                   | REST                                                            |
| ----------- | ----------------------------------------- | ------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------------- |
| Create      | `web browser create`                      | `web.browser.create()`                | `manage_browsers` with `action: "create"`             | `POST /v1/browsers`                                             |
| List        | `web browser list`                        | `web.browser.list()`                  | `manage_browsers` with `action: "list"`               | `GET /v1/browsers`                                              |
| Inspect     | `web browser get`                         | `web.browser.get()`                   | `manage_browsers` with `action: "get"`                | `GET /v1/browsers/{id}`                                         |
| Status      | `web browser status`                      | `browser.status()`                    | `manage_browsers` with `action: "status"`             | `GET /v1/browsers/{id}/status`                                  |
| Stop/resume | `web browser stop` / `web browser resume` | `browser.stop()` / `browser.resume()` | `manage_browsers` with `action: "stop"` or `"resume"` | `POST /v1/browsers/{id}/stop` / `POST /v1/browsers/{id}/resume` |
| Close       | `web browser close`                       | `browser.close()`                     | `manage_browsers` with `action: "close"`              | `DELETE /v1/browsers/{id}`                                      |

## Capabilities

Browser capabilities are signed runtime affordances such as Debug UI and CDP URLs. Treat them like credentials because anyone with the URL can inspect or control the browser within that capability's scope.

Use the SDK methods `browser.debugUrl()` and `browser.cdpUrl()`, the CLI commands `web browser debug` and `web browser cdp`, or MCP `manage_browsers` actions `debug_url` and `cdp_url` when you need those capabilities.

Next: [browser lifecycle](/runtime-concepts/browser-lifecycle), [browser control](/runtime-concepts/browser-control), and [observe and debug](/observe-and-debug/overview).
