Build Your First Browser Agent
Create a browser-based agent in 5 minutes using a local sandbox
Build Your First Browser Agent
This tutorial walks you through creating a browser-enabled agent that navigates a website and extracts data — all running locally in a sandbox container.
This tutorial requires Docker and the Flezi AgentBox CLI. See the CLI Setup Guide if you haven't installed them yet.
Prerequisites
- Docker Desktop running
agentboxCLI installed- Flezi AgentBox services running (
agentbox start)
Steps
Start a Pro sandbox
The Pro tier includes browser support via Chrome DevTools Protocol. Open your terminal and run:
agentbox sandbox start --tier proThis pulls the sandbox image (first time only) and starts a container with:
- Jupyter at
http://127.0.0.1:8888 - VNC desktop at
http://127.0.0.1:6080 - CDP endpoint at
ws://127.0.0.1:9222
Create a new agent in Builder Lab
- Open your dashboard at
http://127.0.0.1:3000 - Navigate to Builder Lab and click New Agent
- Name your agent "Web Scraper Demo"
Configure the Discovery node
In the DAG editor, add a Discovery node with this prompt:
Navigate to https://example.com and extract the page title and all heading text.
Return the results as a JSON object with "title" and "headings" fields.
Add browser tools
In the agent's Tools panel, enable these sandbox tools:
sandbox_navigate— Navigate to a URLsandbox_extract_text— Extract page text contentsandbox_screenshot— Capture page screenshots
These tools are available automatically with Pro tier sandboxes.
Run the agent
Click Run Agent to open the Execution Sandbox. Enter any URL as input and press Send.
You'll see:
- Real-time streaming output as the agent processes
- Screenshots of the browser at each navigation step
- The final extracted data in structured format
View results
The agent's response includes:
- Text output — The extracted data
- Screenshots — Browser state at each step (visible in the sandbox panel)
- Execution log — Full trace of tool calls and responses
What Just Happened?
Your agent used these capabilities:
- CDP Browser — Launched a headless Chrome instance inside the sandbox
- Navigation — Used
sandbox_navigateto load the target URL - Extraction — Used
sandbox_extract_textto pull page content - Screenshot — Captured visual proof of the page state
All of this ran inside an isolated container with:
- 2 GB memory limit
- Non-root user execution
- Workspace-restricted file access
- Automatic cleanup on stop
Next Steps
- Sandbox Tiers — Compare Lite, Standard, and Pro capabilities
- Execution Sandbox — Keyboard shortcuts and environment profiles
- MCP Integration — Connect external tools via MCP
- Pipelines Guide — Chain multiple agents together