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

# Set up a LangSmith connector

> C1 provides identity governance and just-in-time provisioning for LangSmith. Integrate your LangSmith instance with C1 to run user access reviews (UARs), enable just-in-time access requests, and automatically provision and deprovision access.

## Capabilities

| Resource | Sync | Provision |
| - | - | - |
| Users | | |
| Workspaces | | |
| Organization roles | | |
| Workspace roles | | |

## Gather LangSmith credentials

> [!WARNING]
>
> Use an organization-scoped LangSmith service key (`lsv2_sk_...`), not a
> personal access token (`lsv2_pt_...`) or workspace-scoped key. C1 recommends a
> service key with the Organization Admin role.

**Step 1**

In LangSmith, open **Settings** > **API Keys**.

**Step 2**

Create or select an organization-scoped service key. Grant Organization
Admin, or grant `organization:read`, `workspaces:read`, and
`workspaces:manage-members`.

**Step 3**

Copy the service key.

**Step 4**

Open **Settings** > **Organization** and copy the organization UUID.

## Configuration fields

| Field | Required | Description |
| - | - | - |
| `api-key` | Yes | Organization-scoped LangSmith service key. |
| `organization-id` | Yes | LangSmith organization UUID sent as `X-Organization-Id` on every request. |

## Synced resource types

* **Users**: active organization members.
* **Workspaces**: non-deleted, non-personal workspaces in the organization.
* **Organization roles**: organization-scoped role definitions and read-only
  assignments.
* **Workspace roles**: workspace-scoped role definitions per workspace and
  workspace role assignment grants.

## Special notes

* Workspace role grants can be added and revoked from C1.
* Organization role grants are read-only because LangSmith replaces the single
  organization role on update rather than adding or removing independent
  grants.
* A user must already be a LangSmith organization member before C1 can assign
  the user to a workspace role.
* Personal and deleted workspaces are filtered out during sync.
* The connector targets LangSmith Cloud.

## Configure the LangSmith connector

> [tab] Cloud-hosted
>
> Follow these instructions to use a built-in, no-code connector hosted by C1.
>
> **Step 1**
>
> In C1, navigate to **Apps** > **Connectors** and click **Add connector**.
>
> **Step 2**
>
> Search for **LangSmith** and click **Add**.
>
> **Step 3**
>
> Choose where to add the connector: **Create a new app**, or **Add to an existing app** (then select the app).
>
> If you're creating a new app, choose whether to link it to an application discovered from your identity provider: select **Yes** and pick the IdP application, or **No** to continue with just the connector.
>
> **Step 4**
>
> Set the connector's **Name** and, optionally, a **Description**.
>
> **Step 5**
>
> Click the pencil icon next to **Owners** to choose who can configure and manage this connector.
>
> **Step 6**
>
> Click **Add**. The connector is created and its configuration page opens.
>
> **Step 7**
>
> Find the **Settings** area of the page and click **Edit**.
>
> **Step 8**
>
> Paste the LangSmith credentials into the relevant fields:
>
> * **LangSmith service key**: The organization-scoped service key.
> * **Organization ID**: The LangSmith organization UUID.
>
> **Step 9**
>
> Click **Save**.
>
> **Step 10**
>
> The connector's label changes to **Syncing**, followed by
> **Connected**. You can view the logs to ensure that information is
> syncing.
>
> **Done.** Your LangSmith connector is now pulling access data into C1.

> [tab] Self-hosted
>
> Follow these instructions to run the LangSmith connector in your own
> environment.
>
> **Step 1**
>
> In C1, navigate to **Apps** > **Connectors** and click **Add connector**.
>
> **Step 2**
>
> Search for **Baton** and click **Add**.
>
> **Step 3**
>
> Choose where to add the connector: **Create a new app**, or **Add to an existing app** (then select the app).
>
> If you're creating a new app, choose whether to link it to an application discovered from your identity provider: select **Yes** and pick the IdP application, or **No** to continue with just the connector.
>
> **Step 4**
>
> Set the connector's **Name** and, optionally, a **Description**.
>
> **Step 5**
>
> Click the pencil icon next to **Owners** to choose who can configure and manage this connector.
>
> **Step 6**
>
> Click **Add**. The connector is created and its configuration page opens.
>
> **Step 7**
>
> In the **Settings** area, click **Edit**, then click **Rotate** to
> generate a new Client ID and Client Secret. Store these values
> securely for your deployment.
>
> **Step 8**
>
> Configure C1 credentials and LangSmith credentials as environment
> variables:
>
> ```bash theme={"theme":{"light":"css-variables","dark":"css-variables"}}
> BATON_CLIENT_ID=<C1 client ID>
> BATON_CLIENT_SECRET=<C1 client secret>
> BATON_HOST_ID=baton-langsmith
> BATON_API_KEY=<LangSmith organization-scoped service key>
> BATON_ORGANIZATION_ID=<LangSmith organization UUID>
> ```
>
> **Step 9**
>
> Deploy the connector using the Public ECR image:
>
> ```bash theme={"theme":{"light":"css-variables","dark":"css-variables"}}
> public.ecr.aws/conductorone/baton-langsmith:<version>
> ```
>
> Use a version tag without the leading `v`, such as `0.0.3`.
>
> **Done.** Your LangSmith connector is now pulling access data into C1.
