Bytebot Documentation

repository·main·Indexed 27 days ago

https://github.com/bytebot-ai/bytebot

Bytebot is an open-source AI desktop agent that operates within a virtual Ubuntu Linux environment to automate multi-step workflows across desktop applications and web interfaces. It features a Tasks API for programmatic task creation and a Computer Use API for direct desktop actions like mouse movement, clicking, and typing. Deployment options include Docker Compose and Kubernetes via Helm charts, with support for Anthropic, OpenAI, and Gemini API keys.

Tokens
33.7K
Snippets
87
Records
199
Agent score
91%

What's inside Bytebot

  1. Overview of Bytebot AI Desktop Agent

    main
    Bytebot is an open-source AI agent designed to control a computer desktop to automate tasks using natural language. It runs in Docker containers on your own infrastructure, providing a virtual assistant capable of using desktop applications (browsers, email, office tools), processing uploaded files (PDFs, spreadsheets), and handling complex workflows across multiple applications without human supervision.
  2. Explore Bytebot REST API Endpoints

    main

    The Bytebot REST API is categorized into several functional areas:

    • Computer Use: Execute desktop automation actions such as mouse movements, clicks, keyboard input, and screenshots.
    • Input Tracking: Control and stream keyboard and mouse events from the desktop.
    • Usage Examples: Access code examples and snippets for common automation scenarios.
  3. Compare Bytebot vs Traditional RPA

    main

    Bytebot differs from traditional RPA by using visual intelligence and natural language instead of brittle element mapping and complex scripting.

    MetricTraditional RPABytebot
    Implementation Time3-6 months1-2 weeks
    Developer RequirementRPA specialistsAny technical user
    Maintenance Effort40% of dev timeNear zero
    Handling UI ChangesBreaks immediatelyAdapts automatically
    Error RecoveryPre-scripted onlyIntelligent adaptation
    New Process AdditionWeeks of developmentMinutes to describe
    Cost$100k+ annuallySelf-hosted on your infrastructure
  4. Understand Bytebot System Architecture

    main

    Bytebot is a modular, self-hosted AI desktop agent composed of four primary components:

    1. Bytebot Desktop Container: A virtual Ubuntu 22.04 LTS Linux desktop running XFCE4. It uses the bytebotd daemon (built on nutjs) to execute computer actions and provides remote access via noVNC. It is accessible via a REST API on port 9990 and has an MCP SSE endpoint at /mcp.
    2. AI Agent Service: A NestJS-based backend that orchestrates tasks. It integrates with LLMs (Anthropic Claude, OpenAI GPT, Google Gemini), manages task state via Prisma ORM, and communicates with the desktop via a Computer Use API Client.
    3. Web Task Interface: A Next.js 15 application used to create tasks, manage history, and view the desktop in real-time via an embedded VNC viewer.
    4. PostgreSQL Database: Provides persistent storage for the Tasks table (details and status) and the Messages table (AI conversation history).
  5. Secure the Bytebot Desktop Environment

    main

    The default configuration prioritizes ease of use. For production environments, implement these security hardening steps:

    1. Change Default Passwords: Use passwd bytebot to set a new user password.
    2. Limit Network Access: Use environment variables to whitelist domains or restrict port access to specific IP ranges (e.g., 10.0.0.0/8).
  6. Deploy Bytebot on Kubernetes with Helm

    main

    For enterprise deployments, you can install Bytebot on Kubernetes using Helm. You must provide an AI provider API key via the --set flag.

    # Clone the repository
    git clone https://github.com/bytebot-ai/bytebot.git
    cd bytebot
    
    # Install with Helm
    helm install bytebot ./helm \
      --set agent.env.ANTHROPIC_API_KEY=sk-ant-...
  7. Set up 1Password for automated authentication

    main

    Bytebot can automatically fill passwords and handle 2FA (TOTP) if you install a password manager extension via the Desktop view. 1Password is the recommended option.

    Setup Steps:

    1. Install Extension: In the Bytebot UI, go to the Desktop tab, open Firefox, and install the 1Password extension from the Firefox Add-ons store. Sign in to your account.
    2. Configure Vaults: In your 1Password admin panel, create a vault (e.g., Bytebot Automation), add the necessary credentials, and share it with Bytebot's account using read-only permissions.
    3. Enable Auto-fill: The extension will then automatically detect login forms, fill credentials, handle 2FA codes, and submit forms during tasks.
  8. Best practices for Takeover Mode

    main

    To ensure Bytebot learns effectively from your manual interventions, follow these best practices:

    Do's ✅

    • Use Chat While Taking Over: Type messages in the chat to explain what you are doing and why.
    • Explain Your Clicks: Provide context about UI elements and their purpose.
    • Return Control Before Leaving: Always release control before exiting the task detail view to prevent the task from getting stuck.
    • Test Understanding: Ask Bytebot to summarize what it learned from your demonstration.

    Don'ts ❌

    • Enter Sensitive Data: Important: Screenshots are taken for every action during takeover mode. Do not enter any data you do not want captured in screenshots.
    • Skip Chat Explanations: Context is critical for Bytebot to learn patterns.
    • Leave Task View While in Control: This will leave the task stuck in takeover mode.
    • Assume Knowledge: Always explain application-specific workflows explicitly.
  9. Use the Desktop tab for unrecorded desktop access

    main

    The Desktop tab on the main page provides free-ranging access to the desktop environment outside of specific tasks.

    Key characteristics:

    • No Recording: Unlike Takeover Mode, nothing is recorded in this mode.
    • Use Cases: Ideal for installing programs, logging into apps/websites, or general desktop maintenance and setup.
  10. Self-host Bytebot with Docker Compose

    main

    You can self-host the full Bytebot stack using Docker Compose.

    Prerequisites:

    • Docker ≥ 20.10
    • Docker Compose
    • 4GB+ RAM
    • An API key from Anthropic, OpenAI, or Google.

    Setup Steps:

    1. Clone the repository and enter the directory:
      git clone https://github.com/bytebot-ai/bytebot.git
      cd bytebot
    2. Configure your AI provider by creating a .env file in the docker/ directory (choose one):
      echo "ANTHROPIC_API_KEY=your_api_key_here" > docker/.env
      # OR
      echo "OPENAI_API_KEY=your_api_key_here" > docker/.env
      # OR
      echo "GEMINI_API_KEY=your_api_key_here" > docker/.env
    3. Start the stack:
      docker-compose -f docker/docker-compose.yml up -d
    4. Access the UI at http://localhost:9992.
    git clone https://github.com/bytebot-ai/bytebot.git
    cd bytebot
    echo "ANTHROPIC_API_KEY=your_api_key_here" > docker/.env
    docker-compose -f docker/docker-compose.yml up -d
  11. Manually activate Takeover Mode during tasks

    main

    You can manually interrupt Bytebot during task execution to guide it, resolve issues, or correct its path.

    Steps to manually take control:

    1. Open Task Detail View: While Bytebot is working, click on the specific task to open its detail view.
    2. Click Takeover Button: Hit the takeover button to interrupt the agent and take control of the desktop.
    3. Guide Bytebot: Perform the necessary actions (clicks, drags, typing, etc.) to resolve the obstacle.
    4. Release Control: Click to release control, allowing Bytebot to resume the task from your current state.