Skip to main content
Agentbase provides agents with full Chrome browser capabilities for navigating websites, interacting with web applications, extracting data, and automating web workflows.

Overview

The Browser primitive gives agents access to a full Google Chrome browser running within their execution environment. This enables sophisticated web automation, data extraction, and testing capabilities without any additional setup:
  • Web Navigation: Visit any website and navigate through pages
  • Element Interaction: Click buttons, fill forms, submit data
  • Data Extraction: Scrape content, tables, images, and structured data
  • JavaScript Execution: Run custom JavaScript in the browser context
  • Screenshots: Capture full pages or specific elements
  • Session Management: Handle cookies, authentication, and multi-page workflows

Full Chrome Browser

Google Chrome 140.0.7339.127 with complete rendering and JavaScript support

Headless & GUI Modes

Run browser invisibly for automation or with display for debugging

Automation Tools

Built-in support for Selenium, Playwright, and Puppeteer

Internet Access

Full access to the web with cookies, sessions, and authentication

How Browser Automation Works

Agents use browser capabilities automatically when you request web-based tasks:

Browser Lifecycle

  1. Launch: Browser starts when needed (headless by default)
  2. Navigate: Open URLs and wait for page load
  3. Interact: Click, type, scroll, execute JavaScript
  4. Extract: Scrape data, take screenshots, save content
  5. Close: Browser closes automatically after task completion

Browser Specifications

Software Details

  • Browser: Google Chrome 140.0.7339.127 (Official Build) (64-bit)
  • ChromeDriver: Compatible version for Selenium automation
  • Rendering Engine: Chromium Blink
  • JavaScript: V8 engine with full ES6+ support
  • Modes: Headless (default) and GUI available

Capabilities

  • Click buttons and links
  • Fill input fields and text areas
  • Select dropdown options
  • Check/uncheck checkboxes
  • Submit forms
  • Hover over elements
  • Extract text content
  • Parse HTML structure
  • Extract links and images
  • Scrape tables and lists
  • Get element attributes
  • Access page metadata
  • Run custom JavaScript
  • Inject scripts into pages
  • Access window and document objects
  • Interact with page JavaScript
  • Return values from executed scripts
  • Capture full page screenshots
  • Screenshot specific elements
  • Save as PNG or JPEG
  • Different viewport sizes
  • Mobile and desktop views
  • Handle cookies
  • Maintain authentication
  • Session persistence
  • Local storage access
  • Cache management

Code Examples

Basic Web Navigation

Web Scraping

Form Interaction

Screenshots and Visual Testing

JavaScript Execution

Use Cases

1. Competitive Intelligence

Monitor competitor websites:

2. Web Testing

Automated UI and functionality testing:

3. Data Collection

Gather data from multiple sources:

4. Research and Monitoring

Track information over time:

5. Form Automation

Automate repetitive form submissions:

6. Content Verification

Verify website content and links:

Best Practices

Reliable Web Scraping

Error Handling

Graceful Failures: Instruct agents to handle common web issues like timeouts, missing elements, and navigation errors.

Performance Optimization

Minimize Page Loads

Extract all needed data in one visit when possible

Use Headless Mode

Headless is faster - use GUI only for debugging

Parallel Scraping

Scrape multiple pages concurrently when appropriate

Cache Responses

Save scraped data to avoid re-scraping

Ethical Considerations

Respect Robots.txt: Always respect website terms of service and robots.txt. Be mindful of scraping frequency and server load.

Integration with Other Primitives

With File System

Save scraped data to files:
Learn more: File System Primitive

With Computer

Use programming tools with browser automation:
Learn more: Computer Primitive Combine search with browsing:
Learn more: Web Search Extension

With Sessions

Maintain browser state across requests:
Learn more: Sessions Primitive

Performance Considerations

Browser Startup

  • Cold Start: First browser launch ~2-3 seconds
  • Warm Start: Subsequent pages in same session are faster
  • Headless Mode: 20-30% faster than GUI mode

Page Load Times

  • Simple Pages: 1-3 seconds
  • Complex SPAs: 3-10 seconds
  • Heavy Content: 10+ seconds

Optimization Tips

Resource Usage

  • Memory: 200-500MB per browser instance
  • CPU: Varies with page complexity
  • Network: Depends on page size and requests

Advanced Techniques

Handling Dynamic Content

Handling Popups and Alerts

Mobile Emulation

Proxy and Network Control

Troubleshooting

Problem: Browser cannot load the pageSolutions:
  • Check URL is correct and accessible
  • Wait longer for page load
  • Check for JavaScript errors
  • Try different user agent
Problem: Cannot find element to interact withSolutions:
  • Wait for element to appear
  • Check selector is correct
  • Verify element is visible
  • Check if it’s in an iframe
Problem: Page JavaScript errors affect functionalitySolutions:
  • Check browser console for errors
  • Try different approach
  • Use direct JavaScript execution
Problem: Operations timing outSolutions:
  • Increase wait time
  • Check network connection
  • Simplify task
Problem: Website blocking automationSolutions:
  • Add delays between requests
  • Use realistic user agent
  • Respect rate limits
  • Consider alternative data sources
When to use Browser vs Web Search extension:

Use Browser When

  • Need to interact with page elements
  • Extracting structured data from specific sites
  • Filling forms or logging in
  • Taking screenshots
  • Testing web applications
  • Navigating multi-step workflows

Use Web Search When

  • Finding information across the web
  • Need current events or recent data
  • Quick fact-checking
  • Discovering relevant URLs
  • Broad research topics
  • Multiple source aggregation

Sandbox

Isolated environment hosting the browser

Computer

Install browser automation tools

File System

Save scraped data and screenshots

Web Search

Search web for information

Additional Resources

Tools Reference

Browser tools documentation

API Reference

Complete API documentation
Remember: Browser capabilities are available automatically when you describe web-based tasks. Agents handle browser management, navigation, and data extraction for you.