Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Browser Automation Plugin for elizaOS (Python)

Browser automation plugin enabling AI agents to browse websites, interact with elements, and extract data.

Features

  • Navigation: Navigate to URLs, go back/forward, refresh pages
  • AI-Powered Interactions: Click, type, and select elements using natural language
  • Data Extraction: Extract structured data from web pages
  • Screenshots: Capture page screenshots
  • CAPTCHA Solving: Automatic CAPTCHA solving (Turnstile, reCAPTCHA, hCaptcha)
  • Session Management: Handle multiple browser sessions
  • Security: URL validation, domain filtering, rate limiting

Installation

pip install elizaos-plugin-browser

Or with poetry:

poetry add elizaos-plugin-browser

Configuration

Environment variables:

# Optional - for cloud browser
BROWSERBASE_API_KEY=your_api_key
BROWSERBASE_PROJECT_ID=your_project_id

# Optional - for AI-powered interactions
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key

# Optional - for CAPTCHA solving
CAPSOLVER_API_KEY=your_capsolver_key

# Browser settings
BROWSER_HEADLESS=true
BROWSER_SERVER_PORT=3456

Usage

import asyncio
from elizaos_browser import BrowserPlugin, create_browser_plugin

async def main():
    # Create and initialize plugin
    plugin = create_browser_plugin()
    await plugin.init()

    try:
        # Navigate to a page
        result = await plugin.handle_action(
            "BROWSER_NAVIGATE",
            "Go to google.com"
        )
        print(f"Navigated: {result}")

        # Click on element
        result = await plugin.handle_action(
            "BROWSER_CLICK",
            "Click on the search button"
        )
        print(f"Clicked: {result}")

        # Type text
        result = await plugin.handle_action(
            "BROWSER_TYPE",
            'Type "hello world" in the search box'
        )
        print(f"Typed: {result}")

        # Extract data
        result = await plugin.handle_action(
            "BROWSER_EXTRACT",
            "Extract the main heading"
        )
        print(f"Extracted: {result}")

        # Take screenshot
        result = await plugin.handle_action(
            "BROWSER_SCREENSHOT",
            "Take a screenshot"
        )
        print(f"Screenshot: {result}")

        # Get browser state
        state = await plugin.get_provider("BROWSER_STATE")
        print(f"State: {state}")

    finally:
        await plugin.stop()

if __name__ == "__main__":
    asyncio.run(main())

Actions

Action Description Examples
BROWSER_NAVIGATE Navigate to URL "Go to google.com"
BROWSER_BACK Go back in history "Go back"
BROWSER_FORWARD Go forward "Go forward"
BROWSER_REFRESH Refresh page "Refresh the page"
BROWSER_CLICK Click element "Click the search button"
BROWSER_TYPE Type text "Type 'hello' in the search box"
BROWSER_SELECT Select option "Select 'US' from country dropdown"
BROWSER_EXTRACT Extract data "Extract the main heading"
BROWSER_SCREENSHOT Take screenshot "Take a screenshot"

Providers

Provider Description
BROWSER_STATE Current browser session state

API

BrowserService

class BrowserService:
    async def create_session(self, session_id: str) -> BrowserSession: ...
    async def get_session(self, session_id: str) -> BrowserSession | None: ...
    async def get_current_session(self) -> BrowserSession | None: ...
    async def destroy_session(self, session_id: str) -> None: ...

BrowserSession

@dataclass
class BrowserSession:
    id: str
    created_at: datetime
    url: str | None = None
    title: str | None = None

Development

# Install dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Type check
mypy elizaos_browser

# Lint
ruff check elizaos_browser

License

MIT

Metadata

Release files for elizaos-plugin-browser 2.0.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elizaos-plugin-browser 2.0.0a5
File Size Uploaded
elizaos_plugin_browser-2.0.0a5.tar.gz 22.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for elizaos-plugin-browser 2.0.0a5
File Interpreter ABI Platform
elizaos_plugin_browser-2.0.0a5-py3-none-any.whl Python 3 none any Details

Total release size: 49.2 kB

Release files / elizaos_plugin_browser-2.0.0a5.tar.gz

Download URL elizaos_plugin_browser-2.0.0a5.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
62464c0ef8372ae072cc9c3a66564dc14446e3b6180b60cbcf50ee408dbeb44e
BLAKE2b-256 checksum
How to use checksums
e442899bd2ec41f62c993abe26fb8e730518dc3183705f9f2e44d4216bf18351
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / elizaos_plugin_browser-2.0.0a5-py3-none-any.whl

Download URL elizaos_plugin_browser-2.0.0a5-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1391a174afe865c35d8cf07a2e309516992a69735c41259315cdee8163cb0a01
BLAKE2b-256 checksum
How to use checksums
382b0322ae8838d0d3a1d606a23883351377b1251c0a1e00e8dff1016335988a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

2.0.0a5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page