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
- Launch: Browser starts when needed (headless by default)
- Navigate: Open URLs and wait for page load
- Interact: Click, type, scroll, execute JavaScript
- Extract: Scrape data, take screenshots, save content
- 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
Element Interaction
Element Interaction
- Click buttons and links
- Fill input fields and text areas
- Select dropdown options
- Check/uncheck checkboxes
- Submit forms
- Hover over elements
Data Extraction
Data Extraction
- Extract text content
- Parse HTML structure
- Extract links and images
- Scrape tables and lists
- Get element attributes
- Access page metadata
JavaScript Execution
JavaScript Execution
- Run custom JavaScript
- Inject scripts into pages
- Access window and document objects
- Interact with page JavaScript
- Return values from executed scripts
Screenshots
Screenshots
- Capture full page screenshots
- Screenshot specific elements
- Save as PNG or JPEG
- Different viewport sizes
- Mobile and desktop views
Session Management
Session Management
- 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
Wait for Content to Load
Wait for Content to Load
Handle Pagination Correctly
Handle Pagination Correctly
Be Specific About Selectors
Be Specific About Selectors
Error Handling
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
Integration with Other Primitives
With File System
Save scraped data to files:With Computer
Use programming tools with browser automation:With Web Search
Combine search with browsing:With Sessions
Maintain browser state across requests: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
Cookie and Session Management
Handling Popups and Alerts
Mobile Emulation
Proxy and Network Control
Troubleshooting
Page Not Loading
Page Not Loading
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
Element Not Found
Element Not Found
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
JavaScript Errors
JavaScript Errors
Problem: Page JavaScript errors affect functionalitySolutions:
- Check browser console for errors
- Try different approach
- Use direct JavaScript execution
Timeout Errors
Timeout Errors
Problem: Operations timing outSolutions:
- Increase wait time
- Check network connection
- Simplify task
Anti-Scraping Measures
Anti-Scraping Measures
Problem: Website blocking automationSolutions:
- Add delays between requests
- Use realistic user agent
- Respect rate limits
- Consider alternative data sources
Browser vs Web Search
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
Related Primitives
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