Skip to main content
This guide shows how to equip your Managed Agents with browser, search, and fetch tooling to navigate the web. The browse CLI powers your agents to run UI testing, conduct deep document research, fill web forms, and complex browser automations.

npm install browse

One CLI for skills, browser primitives, debugging, and cloud sessions, designed to be driven by AI Agents.

1. Create an environment

Create an environment with the browse npm package installed. For open-web browser agents, set networking to unrestricted. Use limited networking when you want to scope the agent to specific websites.
In the Anthropic Console, create a new Managed Agents environment. Add browse as a default npm package and set networking to Unrestricted.
Anthropic Managed Agents environment configured with the browse npm package and unrestricted networking
The browse CLI is designed for agents to inspect and operate webpages. It exposes commands like browse click, browse snapshot, browse screenshot, and browse network, and can drive local Chromium, any CDP connection, or Browserbase cloud sessions.

2. Create a credential vault

Create a credential vault so the agent can securely read your Browserbase API key without hardcoding it in prompts.
1

Choose the vault type

Create a vault that will hold an environment-variable credential.
Choose Environment variable as the credential vault type.
Anthropic credential vault type selection showing Environment variable
2

Add the Browserbase API key

Name the variable BROWSERBASE_API_KEY and set its value to your Browserbase API key. Use limited networking with *.browserbase.com as the allowed host.
Add BROWSERBASE_API_KEY, paste your Browserbase API key, and choose Limited networking with *.browserbase.com.
Anthropic credential vault configured with BROWSERBASE_API_KEY and limited networking for Browserbase

3. Create the agent

Create a Managed Agent that knows browse is available in the environment. Keep the system prompt short and let the CLI provide command details through browse --help.
name: browser agent
model:
  id: claude-opus-4-8
  speed: standard
description: Runs shell commands to check CLI tools and environment variables.
system: You are a browser agent. Use the `browse` CLI to operate a headless Chromium environment. Run `browse --help` to view the commands interface.
mcp_servers: []
tools:
  - configs:
      - name: web_fetch
        enabled: false
      - name: web_search
        enabled: false
    default_config:
      enabled: true
      permission_policy:
        type: always_allow
    type: agent_toolset_20260401
skills: []
metadata: {}
You can use this .yml to configure your agent. Optionally disable native web_fetch and web_search to harness Browserbase’s Fetch and Search APIs via the browse CLI.
Configure the agent with the browser-agent system prompt and shell tool access.
Anthropic Managed Agent configuration showing a browser agent system prompt

4. Start a session

Start a Managed Agents session, attach the environment and vault, then ask the agent to complete a browser task such as:
Please find the price of the Fellow Kettle on Target.com and add it to cart.
Find driving traffic time from SFO to Union Square.
Please run a full E2E test for UI regressions on this preview URL: https://example.com
Please check if Adam Smith is a licensed accountant in California.
Start a session from the Anthropic Console with the agent, environment, and Browserbase credential vault you created.
Anthropic Console agent page with the Start session menu item highlighted

5. Watch the browser session

When the Managed Agent uses Browserbase through browse, the browser session appears in the Browserbase sessions panel. Open the session to watch Live View, inspect logs, and review the recording after the run.
Browserbase sessions panel showing managed browser sessions

Tips

Ask it to run browse --help first. The CLI is designed for progressive disclosure, so the agent can inspect available commands before acting.
Confirm the credential vault exposes BROWSERBASE_API_KEY to the environment, and make sure the vault networking allows *.browserbase.com.
Use Unrestricted networking on the environment. Use Limited networking only when you know the exact hostnames the agent needs.
Use Browserbase Live View while the session is running, then use the session recording and logs in the Browserbase dashboard after it finishes.