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

# Manage Fleet

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

<Note>
  Fleet traces all agent runs and stores them in LangSmith. Self-hosted customers can disable tracing but run data is always stored in LangSmith Deployment. Configure retention policies according to your organization's requirements.
</Note>

## Prerequisites

Before enabling Fleet, 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).

<Info>
  Fleet 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>

## Components

Fleet consists of the following components:

* `agentBootstrap`: Job that deploys the LangSmith Deployment (agent) needed for Fleet.
* `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 Fleet

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

```yaml theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
backend:
  agentBootstrap:
    enabled: true

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

agentBuilderToolServer:
  enabled: true

agentBuilderTriggerServer:
  enabled: true
```

### Generate an encryption key

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

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
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 `fleet_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)  |
| `microsoftOAuthProvider` | Outlook, Calendar, Teams, SharePoint, Word, Excel, PowerPoint | Outlook         | [See below](#microsoft-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={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
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>"
      microsoftOAuthProvider: "<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 Fleet, 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={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        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 Fleet to access.
        </Note>
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Google OAuth provider" id="google-oauth-provider">
    To enable Google OAuth for Fleet, 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={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        config:
          agentBuilder:
            oauthProviderOrgId: "<your-org-id>"
            oauth:
              googleOAuthProvider: "<provider-id>"
        ```
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Microsoft OAuth provider" id="microsoft-oauth-provider">
    To enable Microsoft OAuth for Fleet, create an Azure app registration, add the required Microsoft Graph delegated permissions, and configure a Microsoft OAuth provider in LangSmith.

    <Steps>
      <Step title="Create an Azure app registration">
        In the [Microsoft Entra admin center](https://entra.microsoft.com/), go to **Applications > App registrations** and create a new registration.
      </Step>

      <Step title="Choose supported account types">
        Select the account type that matches your deployment. If you need users from multiple Microsoft Entra tenants to authenticate, choose a multi-tenant option. If your deployment is limited to one tenant, you can use a single-tenant app registration.
      </Step>

      <Step title="Add the redirect URI">
        Add the following web 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="Create a client secret">
        In **Certificates & secrets**, create a new client secret. Copy the **Application (client) ID** and the generated client secret value.
      </Step>

      <Step title="Add Microsoft Graph delegated permissions">
        In **API permissions**, add the following Microsoft Graph delegated permissions:

        * `Mail.ReadWrite`
        * `Mail.Send`
        * `Calendars.ReadWrite`
        * `Team.ReadBasic.All`
        * `Channel.ReadBasic.All`
        * `Channel.Create`
        * `ChannelMessage.Send`
        * `ChannelMessage.Read.All`
        * `Chat.Create`
        * `Chat.ReadWrite`
        * `User.ReadBasic.All`
        * `Files.ReadWrite.All`
        * `Sites.ReadWrite.All`

        <Note>
          LangSmith automatically requests `offline_access` for Microsoft providers so users can receive refresh tokens.
        </Note>
      </Step>

      <Step title="Grant tenant consent">
        Grant admin consent for the tenant if your Microsoft 365 policies require it for these delegated permissions.
      </Step>

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

        * **Name**: For example, `Microsoft`
        * **Provider ID**: Unique string, for example: `microsoft-oauth-provider`
        * **Client ID**: Application (client) ID from Azure
        * **Client Secret**: Client secret value from Azure
        * **Authorization URL**: `https://login.microsoftonline.com/common/oauth2/v2.0/authorize`
        * **Token URL**: `https://login.microsoftonline.com/common/oauth2/v2.0/token`
        * **Provider Type**: `microsoft`
        * **Token endpoint auth method**: `client_secret_post`

        <Note>
          If you created a single-tenant app registration, replace `common` in the authorization and token URLs with your tenant ID.
        </Note>
      </Step>

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

        ```yaml theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        config:
          agentBuilder:
            oauthProviderOrgId: "<your-org-id>"
            oauth:
              microsoftOAuthProvider: "<provider-id>"
        ```
      </Step>
    </Steps>
  </Accordion>

  <Accordion title="Linear OAuth provider" id="linear-oauth-provider">
    To enable Linear OAuth for Fleet, 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={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        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 Fleet, 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={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        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 Fleet, 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={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        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={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
        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 Fleet, provide the **channel ID** and **channel name**.
      </Step>
    </Steps>
  </Accordion>
</AccordionGroup>

## Disable Fleet

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

```yaml theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
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/fleet/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>
