> ## Documentation Index
> Fetch the complete documentation index at: https://docs.julep.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Browser Base

> Learn how to use the Browser Base integration with Julep

## Overview

Welcome to the Browser Base integration guide for Julep! This integration allows you to manage browser sessions and perform various actions, enabling you to build workflows that require browser automation capabilities. Whether you're testing web applications or automating web tasks, this guide will walk you through the setup and usage.

## Prerequisites

<Info type="info" title="API Key Required">
  To use the Browserbase integration, you need an API key. You can obtain this key by signing up at [Browserbase](https://browserbase.com/signup).
</Info>

<Info type="info" title="Project ID Required">
  To use the Browserbase integration, you need a Project ID. You can obtain this ID by signing up at [Browserbase](https://browserbase.com/signup).
</Info>

## How to Use the Integration

To get started with the Browserbase integration, follow these steps to configure and create a task:

<Steps>
  <Step title="Configure Your API Key">
    Add your API key and project ID to the tools section of your task. This will allow Julep to authenticate requests to Browserbase on your behalf.
  </Step>

  <Step title="Create Task Definition">
    Use the following YAML configuration to define your browser automation task:

    ```yaml Browser Base Example theme={"dark"}
    name: Browser Base Task
    tools:
    - name: browserbase_tool
      type: integration
      integration:
        provider: browserbase
        method: create_session
        setup:
          api_key: "BROWSERBASE_API_KEY"
          project_id: "BROWSERBASE_PROJECT_ID"
    main:
    - tool: browserbase_tool
      arguments:
        project_id: BROWSERBASE_PROJECT_ID
    ```
  </Step>
</Steps>

### YAML Explanation

<AccordionGroup>
  <Accordion title="Basic Configuration">
    * ***name***: A descriptive name for the task, in this case, "Browser Base Task".
    * ***tools***: This section lists the tools or integrations being used. Here, `browserbase_tool` is defined as an integration tool.
  </Accordion>

  <Accordion title="Tool Configuration">
    * ***type***: Specifies the type of tool, which is `integration` in this context.
    * ***integration***: Details the provider and setup for the integration.
      * ***provider***: Indicates the service provider, which is `browserbase` for Browserbase.
      * ***method***: Specifies the method to use, such as `create_session`, `list_sessions`, `get_session`, `complete_session`, `get_live_urls`, or `install_extension_from_github`. Defaults to `list_sessions` if not specified.
      * ***setup***: Contains configuration details.
        * ***api\_key***:(Required) The API key. Can be found in Settings.
        * ***project\_id***: (Required) The Project ID. Can be found in Settings.
        * ***api\_url***: (optional) The API URL. Defaults to [https://www.browserbase.com](https://www.browserbase.com)
        * ***connect\_url***: (optional) The Connect URL. Defaults to wss\://connect.browserbase.com
  </Accordion>

  <Accordion title="Workflow Configuration">
    * ***main***: Defines the main execution steps.
      * ***tool***: Refers to the tool defined earlier (`browserbase_tool`).
      * ***arguments***: Specifies the input parameters for the tool, which vary depending on the method used.
            <Accordion title="create_session">
              * ***project\_id***: The Project ID. Can be found in Settings.
              * ***extension\_id***: (optional) The installed Extension ID. See Install Extension from GitHub.
              * ***browser\_settings***: (optional) Browser settings object.
              * ***timeout***: (optional) Duration in seconds after which the session will automatically end. Defaults to the Project's defaultTimeout.
              * ***keep\_alive***: (optional) Set to true to keep the session alive even after disconnections. This is available on the Startup plan only.
              * ***proxies***: (optional) Proxy configuration. Can be true for default proxy, or an array of proxy configurations.
            </Accordion>
            <Accordion title="list_sessions">
              * ***status***: The status of the sessions to list (Available options: RUNNING, ERROR, TIMED\_OUT, COMPLETED).
            </Accordion>
            <Accordion title="get_session">
              * ***id***: The session ID.
            </Accordion>
            <Accordion title="complete_session">
              * ***id***: The session ID.
            </Accordion>
            <Accordion title="get_live_urls">
              * ***id***: The session ID.
            </Accordion>
            <Accordion title="install_extension_from_github">
              * ***repository\_name***: The GitHub repository name.
              * ***ref***: Ref to install from a branch or tag.
            </Accordion>
  </Accordion>
</AccordionGroup>

<Note>
  * Remember to replace `BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID` with your actual API key and project ID.
  * Customize the `arguments` based on the method you choose to use.
</Note>

## Conclusion

With the Browserbase integration, you can efficiently manage browser sessions and automate web tasks.
This integration provides a robust solution for browser automation, enhancing your workflow's capabilities and user experience.

<Tip>
  For more information, please refer to the [Browserbase API documentation](https://docs.browserbase.com/introduction).
</Tip>
