Flezi AgentBox

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
  • agentbox CLI 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:

bash
agentbox sandbox start --tier pro

This 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

  1. Open your dashboard at http://127.0.0.1:3000
  2. Navigate to Builder Lab and click New Agent
  3. 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 URL
  • sandbox_extract_text — Extract page text content
  • sandbox_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:

  1. CDP Browser — Launched a headless Chrome instance inside the sandbox
  2. Navigation — Used sandbox_navigate to load the target URL
  3. Extraction — Used sandbox_extract_text to pull page content
  4. 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