🚀 Quick Start Guide

Get up and running with Browser AI Agent in just 5 minutes. This guide will walk you through installation, configuration, and your first automation task.

Prerequisites

  • Python 3.11 or higher
  • DeepSeek API key (Get one here)
  • Basic familiarity with Python
💡 New to DeepSeek? DeepSeek R1 is a powerful AI model that provides the reasoning capabilities for Browser AI Agent. You can get a free API key at platform.deepseek.com.

Installation

1Download Browser AI Agent

Download the complete package from our website:

# Download the package
wget https://browser-ai-agent.com/browser_ai_agent_complete.tar.gz

# Extract the files
tar -xzf browser_ai_agent_complete.tar.gz
cd browser_ai_agent

2Run Automated Setup

Our setup script will install all dependencies and configure the environment:

python setup.py
⚠️ Linux Users: You may need to install additional system dependencies for Playwright:
sudo apt-get install -y libnss3 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libxss1 libasound2

3Configure API Key

Set up your DeepSeek API key in the environment file:

# Edit the .env file
nano .env

# Add your API key:
DEEPSEEK_API_KEY=your_actual_api_key_here
BROWSER_HEADLESS=false
AGENT_DEBUG_MODE=true

4Test Installation

Verify everything is working correctly:

python test_basic.py
✅ Success! If all tests pass, you're ready to start automating!

Your First Task

Let's create a simple automation task. Create a new file called my_first_task.py:

import asyncio
from src.agent import execute_browser_task

async def main():
    # Simple web search automation
    result = await execute_browser_task(
        task_description="Go to Google and search for 'Python programming'",
        headless=False,  # Set to True to hide browser window
        debug=True       # Shows detailed logs
    )
    
    print(f"✅ Task completed: {result['success']}")
    print(f"📊 Steps executed: {result['steps_executed']}")
    print(f"📸 Screenshot saved: {result['final_screenshot']}")

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

Run your first task:

python my_first_task.py

Configuration Options

Customize Browser AI Agent by editing the .env file:

# Browser Settings
BROWSER_HEADLESS=true          # Run without GUI (true/false)
BROWSER_TYPE=chromium          # chromium, firefox, webkit
BROWSER_TIMEOUT=30             # Page load timeout in seconds

# AI Settings  
DEEPSEEK_TEMPERATURE=0.6       # AI creativity (0.0-1.0)
DEEPSEEK_MAX_TOKENS=4000       # Maximum response length
DEEPSEEK_MODEL=deepseek-r1     # AI model to use

# Agent Settings
AGENT_MAX_RETRIES=3            # Retry failed operations
AGENT_DEBUG_MODE=true          # Detailed logging (true/false)
AGENT_SCREENSHOT_ON_ERROR=true # Save screenshots on errors

Common Use Cases

Form Filling

import asyncio
from src.agent import BrowserAIAgent

async def fill_form_example():
    async with BrowserAIAgent(headless=False) as agent:
        await agent.navigate_to("https://httpbin.org/forms/post")
        
        result = await agent.execute_task("""
        Fill out the form with:
        - Customer name: John Doe
        - Email: john@example.com
        - Size: Medium
        Then submit the form.
        """)
        
        print(f"Form filled: {result['success']}")

asyncio.run(fill_form_example())

Data Extraction

import asyncio
from src.agent import BrowserAIAgent

async def extract_data_example():
    async with BrowserAIAgent() as agent:
        result = await agent.execute_task("""
        Go to Hacker News and extract the titles 
        and links of the top 5 stories.
        """)
        
        if result['success']:
            print("✅ Data extracted successfully!")
            print("📄 Results:", result['extracted_data'])

asyncio.run(extract_data_example())

Troubleshooting

"API key required" error

  • Make sure you've set DEEPSEEK_API_KEY in the .env file
  • Verify your API key is valid at DeepSeek Platform
  • Check that the .env file is in the same directory as your script

"Browser not found" error

  • Run: playwright install
  • On Linux, install system dependencies (see warning box above)
  • Try switching browser type in .env: BROWSER_TYPE=firefox

Import errors

  • Run: pip install -r requirements.txt
  • Make sure you're in the correct directory
  • Check Python version: python --version (should be 3.11+)

Task execution fails

  • Enable debug mode: AGENT_DEBUG_MODE=true
  • Run with visible browser: BROWSER_HEADLESS=false
  • Check the logs for specific error messages
  • Try increasing timeout: BROWSER_TIMEOUT=60

Next Steps

🎉 Congratulations! You've successfully set up Browser AI Agent. Here's what to explore next:

Getting Help

Need assistance? We're here to help:

Ready to automate?

Start building powerful browser automation workflows today!

View More Examples