> ## Documentation Index
> Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-patchr-1773857969-df0cef9.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Agent Builder

[Agent Builder](/langsmith/agent-builder) allows users to create, deploy, and manage AI agents directly within LangSmith with no code. An agent created in Agent Builder is essentially an assistant on a LangSmith Deployment. This page explains how to manage Agent Builder on a [self-hosted LangSmith instance](/langsmith/self-hosted).

<Info>
  Agent Builder is available on [LangSmith Self-Hosted v0.13](https://changelog.langchain.com/announcements/langsmith-self-hosted-v0-13) and later. Self-hosted is an add-on to the Enterprise plan. For more details, refer to [Pricing](https://www.langchain.com/pricing). [Contact our sales team](https://www.langchain.com/contact-sales) if you want to get a license key to trial LangSmith in your environment.
</Info>

## Prerequisites

Before enabling Agent Builder, you must complete the following setup steps:

1. Install the base LangSmith platform:
   * [Install on Kubernetes](/langsmith/kubernetes).
   * [Install on Docker](/langsmith/docker).
2. [Enable LangSmith Deployment](/langsmith/deploy-self-hosted-full-platform) (agent deployment capabilities).

## Components

Agent Builder consists of the following components:

* `agentBootstrap`: Job that deploys the LangSmith Deployment (agent) needed for Agent Builder.
* `agentBuilder`
  * `toolServer`: Provides MCP tool execution for agents.
  * `triggerServer`: Handles webhooks and scheduled triggers.
  * `agent`: The main agent that will handle agent generation and where all the assistants will be created.

## Enable Agent Builder

To enable Agent Builder, add the following to your `values.yaml`:

```yaml theme={null}
backend:
  agentBootstrap:
    enabled: true

config:
  agentBuilder:
    enabled: true
    encryptionKey: "<key>"

agentBuilderToolServer:
  enabled: true

agentBuilderTriggerServer:
  enabled: true
```

### Generate an encryption key

Agent Builder requires a Fernet encryption key to securely store secrets. Generate one using Python:

```bash theme={null}
python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
```

<Note>
  You can store the encryption key in a predefined Kubernetes secret using the `agent_builder_encryption_key` parameter. See [Use an existing secret](/langsmith/self-host-using-an-existing-secret#parameters) for details.
</Note>

## Enable OAuth tools and triggers (optional)

To enable OAuth-based tools (like Gmail, Slack, GitHub), configure the `oauthProviderOrgId` and add provider IDs for each integration you want to enable. You can enable any combination of providers.

### Available providers

| Provider                | Tools enabled                                   | Trigger enabled | Setup guide                           |
| ----------------------- | ----------------------------------------------- | --------------- | ------------------------------------- |
| `githubOAuthProvider`   | GitHub                                          | -               | [See below](#github-oauth-provider)   |
| `googleOAuthProvider`   | Gmail, Google Calendar, Google Sheets, BigQuery | Gmail           | [See below](#google-oauth-provider)   |
| `linearOAuthProvider`   | Linear                                          | -               | [See below](#linear-oauth-provider)   |
| `linkedinOAuthProvider` | LinkedIn                                        | -               | [See below](#linkedin-oauth-provider) |
| `slackOAuthProvider`    | Slack                                           | Slack           | [See below](#slack-oauth-provider)    |

### General configuration

Add the following to your `values.yaml`. Include only the providers you need.

```yaml theme={null}
backend:
  agentBootstrap:
    enabled: true

config:
  agentBuilder:
    # Organization ID where OAuth providers are configured
    oauthProviderOrgId: "<your-org-id>"
    oauth:
      # Add provider IDs for integrations you want to enable,
      # Slack requires additional configuration
      slackOAuthProvider: "<provider-id>"
      slackSigningSecret: "<signing-secret>"
      slackBotId: "<bot-id>"
      googleOAuthProvider: "<provider-id>"
      linkedinOAuthProvider: "<provider-id>"
      linearOAuthProvider: "<provider-id>"
      githubOAuthProvider: "<provider-id>"
```

<Warning>
  The provider ID must be unique and cannot end with `-agent-builder` or `-oauth-provider`.
</Warning>

### Provider setup guides

<AccordionGroup>
  <Accordion title="GitHub OAuth provider" id="github-oauth-provider">
    To enable GitHub OAuth for Agent Builder, you need to create a GitHub OAuth app and configure it with the required permissions.

    <Steps>
      <Step title="Create a GitHub OAuth app">
        Go to [GitHub Settings > Developer settings > OAuth Apps](https://github.com/settings/developers) and click **New OAuth App**.
      </Step>

      <Step title="Configure the app">
        Fill in the application details. You can name it whatever you like and leave the default checkbox settings.
      </Step>

      <Step title="Set permissions">
        Give the app read/write permissions to **Pull Requests** and **Issues**.
      </Step>

      <Step title="Add callback URL">
        Set the callback URL, replacing `<hostname>` with your LangSmith hostname and `<provider-id>` with your provider ID:

        ```
        https://<hostname>/host-oauth-callback/<provider-id>
        ```
      </Step>

      <Step title="Generate client secret">
        Click **Generate a new client secret** and copy both the **Client ID** (shown at the top of the app page) and the **Client Secret**.
      </Step>

      <Step title="Configure OAuth provider in LangSmith">
        In LangSmith, go to **Settings > OAuth Providers** and add a new provider:

        * **Client ID**: from GitHub app
        * **Client Secret**: from GitHub app
        * **Authorization URL**: `https://github.com/login/oauth/authorize`
        * **Token URL**: `https://github.com/login/oauth/access_token`
        * **Provider ID**: Unique string, for example: `github`
      </Step>

      <Step title="Deploy">
        Add the following to your `values.yaml` and deploy:

        ```yaml theme={null}
        config:
          agentBuilder:
            oauthProviderOrgId: "<your-org-id>"
            oauth:
              githubOAuthProvider: "<provider-id>"
        ```
      </Step>

      <Step title="Install the app on repositories">
        After creating the app, you need to:

        1. Authenticate the app to your GitHub account.
        2. Go to **Settings > Applications > Installed GitHub Apps** and install the app on the repositories you want it to access.

        <Note>
          For private repositories, you must explicitly install the app on each repository you want Agent Builder to access.
        </Note>
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Google OAuth provider" id="google-oauth-provider">
    To enable Google OAuth for Agent Builder, you need to create an OAuth client in GCP and configure it with the required URLs and credentials.

    <Steps>
      <Step title="Create OAuth client in GCP">
        Create a new OAuth client app (Web application) in [Google Cloud Console](https://console.cloud.google.com/apis/credentials).
      </Step>

      <Step title="Add URLs to GCP">
        Add the following URLs to your OAuth client, replacing `<hostname>` with your LangSmith hostname and `<provider-id>` with the provider ID you'll use (e.g., `google`):

        **Authorized JavaScript origins:**

        * `https://<hostname>`

        **Authorized redirect URIs:**

        * `https://<hostname>/api-host/v2/auth/callback/<provider-id>`
        * `https://<hostname>/host-oauth-callback/<provider-id>`
      </Step>

      <Step title="Copy credentials">
        Copy the **Client ID** and **Client Secret** from the GCP OAuth app.
      </Step>

      <Step title="Configure OAuth provider in LangSmith">
        In LangSmith, go to **Settings > OAuth Providers** and add a new provider:

        * **Client ID**: Find in GCP
        * **Client Secret**: Find in GCP
        * **Authorization URL**: `https://accounts.google.com/o/oauth2/auth`
        * **Token URL**: `https://oauth2.googleapis.com/token`
        * **Provider ID**: Unique string, for example: `google`
      </Step>

      <Step title="Deploy">
        Add the LangSmith OAuth provider ID to your `values.yaml` and deploy:

        ```yaml theme={null}
        config:
          agentBuilder:
            oauthProviderOrgId: "<your-org-id>"
            oauth:
              googleOAuthProvider: "<provider-id>"
        ```
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Linear OAuth provider" id="linear-oauth-provider">
    To enable Linear OAuth for Agent Builder, you need to create a Linear OAuth app and configure it with the required credentials.

    <Steps>
      <Step title="Create a Linear OAuth app">
        Go to [Linear Settings > API > Applications](https://linear.app/settings/api/applications/new) and create a new OAuth application.
      </Step>

      <Step title="Add callback URL">
        Set the callback URL, replacing `<hostname>` with your LangSmith hostname and `<provider-id>` with your provider ID:

        ```
        https://<hostname>/host-oauth-callback/<provider-id>
        ```
      </Step>

      <Step title="Copy credentials">
        After creating the app, copy the **Client ID** and **Client Secret**.
      </Step>

      <Step title="Configure OAuth provider in LangSmith">
        In LangSmith, go to **Settings > OAuth Providers** and add a new provider:

        * **Client ID**: from Linear app
        * **Client Secret**: from Linear app
        * **Authorization URL**: `https://linear.app/oauth/authorize`
        * **Token URL**: `https://api.linear.app/oauth/token`
        * **Provider ID**: Unique string, for example: `linear`
      </Step>

      <Step title="Deploy">
        Add the following to your `values.yaml` and deploy:

        ```yaml theme={null}
        config:
          agentBuilder:
            oauthProviderOrgId: "<your-org-id>"
            oauth:
              linearOAuthProvider: "<provider-id>"
        ```
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="LinkedIn OAuth provider" id="linkedin-oauth-provider">
    To enable LinkedIn OAuth for Agent Builder, you need to create a LinkedIn OAuth app and configure it with the required credentials.

    <Steps>
      <Step title="Create a LinkedIn OAuth app">
        Go to [linkedin.com/developers/apps](https://www.linkedin.com/developers/apps/) and create a new app.
      </Step>

      <Step title="Configure OAuth settings">
        In your app settings, go to the **Auth** tab.
      </Step>

      <Step title="Add redirect URI">
        Add the following redirect URI, replacing `<hostname>` with your LangSmith hostname and `<provider-id>` with your provider ID:

        ```
        https://<hostname>/host-oauth-callback/<provider-id>
        ```
      </Step>

      <Step title="Copy credentials">
        Copy the **Client ID** and **Client Secret** from the Auth tab.
      </Step>

      <Step title="Configure OAuth provider in LangSmith">
        In LangSmith, go to **Settings > OAuth Providers** and add a new provider:

        * **Client ID**: from LinkedIn app
        * **Client Secret**: from LinkedIn app
        * **Authorization URL**: `https://www.linkedin.com/oauth/v2/authorization`
        * **Token URL**: `https://www.linkedin.com/oauth/v2/accessToken`
        * **Provider ID**: Unique string, for example: `linkedin`
      </Step>

      <Step title="Deploy">
        Add the following to your `values.yaml` and deploy:

        ```yaml theme={null}
        config:
          agentBuilder:
            oauthProviderOrgId: "<your-org-id>"
            oauth:
              linkedinOAuthProvider: "<provider-id>"
        ```
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Slack OAuth provider" id="slack-oauth-provider">
    To enable Slack OAuth for Agent Builder, you need to create a Slack app and configure it with the required scopes, credentials, and event subscriptions.

    <Steps>
      <Step title="Create a Slack app">
        Go to [api.slack.com/apps](https://api.slack.com/apps) and click **Create New App**.
      </Step>

      <Step title="Add scopes">
        In **OAuth & Permissions**, add the following scopes:

        * `channels:history`
        * `channels:read`
        * `chat:write`
        * `groups:history`
        * `groups:read`
        * `im:history`
        * `im:read`
        * `im:write`
        * `mpim:history`
        * `team:read`
        * `users:read`
        * `users:read.email`
      </Step>

      <Step title="Copy credentials from Slack">
        Copy the **Client ID**, **Client Secret**, and **Signing Secret** from the Slack app settings.
      </Step>

      <Step title="Configure OAuth provider in LangSmith">
        In LangSmith, go to **Settings > OAuth Providers** and add a new provider:

        * **Client ID**: Find in Slack app
        * **Client Secret**: Find in Slack app
        * **Authorization URL**: `https://slack.com/oauth/v2/authorize`
        * **Token URL**: `https://slack.com/api/oauth.v2.access`
        * **Provider ID**: Unique string, for example: `slack`
      </Step>

      <Step title="Add redirect URI to Slack">
        Add the following redirect URI to your Slack app under **OAuth & Permissions > Redirect URLs**, replacing `<hostname>` with your LangSmith hostname and `<provider-id>` with your provider ID (e.g., `slack`):

        ```
        https://<hostname>/host-oauth-callback/<provider-id>
        ```
      </Step>

      <Step title="Get the bot ID">
        1. Get the bot token from **OAuth & Permissions** in your Slack app.
        2. Run the following command:

        ```bash theme={null}
        curl -X POST https://slack.com/api/auth.test \
          -H "Authorization: Bearer <bot-token>"
        ```

        3. Copy the `bot_id` from the response.
      </Step>

      <Step title="Deploy LangSmith">
        Add the following to your `values.yaml` and deploy:

        ```yaml theme={null}
        config:
          agentBuilder:
            oauthProviderOrgId: "<your-org-id>"
            oauth:
              slackOAuthProvider: "<provider-id>"
              slackSigningSecret: "<signing-secret>"
              slackBotId: "<bot-id>"
        ```
      </Step>

      <Step title="Enable event subscriptions">
        1. After deployment, go to **Event Subscriptions** in your Slack app and enable events.

        2. Set the **Request URL** to:

           ```
           https://<hostname>/v1/triggers/webhooks/d809e66e-0000-4000-8000-000000000002
           ```

        3. Add the following bot events:
           * `message.channels`
           * `message.groups`
           * `message.im`
           * `message.mpim`
      </Step>

      <Step title="Set up triggers and tools">
        1. Add the Slack bot to the channel you want it to read from.
        2. When configuring the Slack tool or trigger in Agent Builder, provide the **channel ID** and **channel name**.
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

## Disable Agent Builder

To disable Agent Builder, set the following to `false` in your `values.yaml`:

```yaml theme={null}
config:
    agentBuilder:
        enabled: false
```

***

<div className="source-links">
  <Callout icon="edit">
    [Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/agent-builder-self-hosted.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>

  <Callout icon="terminal-2">
    [Connect these docs](/use-these-docs) to Claude, VSCode, and more via MCP for real-time answers.
  </Callout>
</div>
