A secure browser sandbox where agents can interact with the web.
Firecrawl Browser Sandbox gives your agents a secure browser environment where agents can interact with the web. Fill out forms, click buttons, authenticate, and more.
No local setup, no Chromium installs, no driver compatibility issues. Agent browser and playwright are pre-installed.Available via API, CLI (Bash / agent-browser, Python, Node), Node SDK, Python SDK, Vercel AI SDK, and MCP Server.To add browser support to an AI coding agent (Claude Code, Codex, Open Code, Cursor, etc.), install the Firecrawl skill:
Copy
npx -y firecrawl-cli@latest init --all --browser
Each session runs in an isolated, disposable or persistent sandbox that scales without managing infrastructure.
agent-browser is a headless browser CLI pre-installed in every sandbox. Instead of writing Playwright code, agents send simple bash commands. The CLI auto-injects --cdp so agent-browser connects to your active session automatically.
The fastest way to use browser. Both the shorthand and execute send commands to agent-browser automatically. The shorthand just skips execute and auto-launches a session if needed:
By default, each browser session starts with a clean slate. With profile, you can save and reuse browser state across sessions. This is useful for staying logged in and preserving preferences.To save or select a profile, use the profile parameter when creating a session.
A name for the persistent profile. Sessions with the same name share storage.
saveChanges
true
When true, browser state is saved back to the profile on close. Set to false to load existing data without writing — useful when you need multiple concurrent readers.
Only one session can save to a profile at a time. If another session is already saving, you’ll get a 409 error. You can still open the same profile with saveChanges: false, or try again later.
The browser session state only saves when the session is closed. So we recommend closing the browser session when you are done with it so it can be reused. Once a session is closed, its session ID is no longer valid — you cannot reuse it. Instead, create a new session with the same profile name and use the new session ID returned in the response. To save and close it:
Copy
import Firecrawl from '@mendable/firecrawl-js';const firecrawl = new Firecrawl({ apiKey: "fc-YOUR-API-KEY" });await firecrawl.deleteBrowser("YOUR_SESSION_ID");
Every session returns a liveViewUrl in the response that you can embed to watch the browser in real time. Useful for debugging, demos, or building browser-powered UIs.
The response also includes an interactiveLiveViewUrl. Unlike the standard live view which is view-only, the interactive live view allows users to click, type, and interact with the browser session directly through the embedded stream. This is useful for building user-facing browser UIs, collaborative debugging, or any scenario where the viewer needs to control the browser.
Every session exposes a CDP WebSocket URL. The execute API and --bash flag cover most use cases, but if you need full local control you can connect directly.