Skip to main content
Each self-hosted Agent Server deployment can define a Kubernetes ServiceAccount and Secrets Store CSI SecretProviderClass. These resources give the deployment its own cloud identity and mount cloud secrets as files. The operator creates them in the deployment’s namespace. This feature requires a full self-hosted LangSmith installation with the bundled operator. It is not available on LangSmith Cloud, BYOC, standalone Agent Servers, or deployments on a remote listener.
Per-deployment identities require LangSmith Helm chart version 0.18.0 or later. If you override the chart’s images, keep langgraph-operator 0.1.66 or later.

How it works

You add up to 16 manifests to a deployment in the LangSmith UI or through the control plane API. LangSmith accepts two resource kinds:
  • v1 ServiceAccount, which carries the workload identity annotation for your cloud.
  • secrets-store.csi.x-k8s.io/v1 SecretProviderClass, which tells the Secrets Store CSI driver which secrets to fetch.
The operator creates each object with the deployment as its owner. It refuses to adopt or update an existing object that the deployment does not control. It also refuses to roll out a deployment that uses a ServiceAccount or SecretProviderClass created by a different deployment. Saving the manifests redeploys the deployment. A rollback does not restore earlier manifests, because they belong to the deployment rather than to a revision. LangSmith stores the manifests in plaintext in its database and in the deployment’s custom resource. Do not put credentials in labels, annotations, or parameters. While the feature is enabled, the deployment detail API returns saved manifests only to users who can update the deployment. Service principals, list responses, and legacy deployment responses do not receive them.

Prerequisites

  • Agent Server hosting enabled on your installation. See Enable Agent Server hosting.
  • Permission to update the deployment.
  • The Secrets Store CSI driver and the provider for your cloud, installed on the cluster. The LangSmith chart does not install either.
  • Workload identity configured for your cluster.

Enable the feature

Per-deployment manifests are off by default. Set config.deployment.extraManifestsEnabled to true in your langsmith_config.yaml:
The chart enables the feature in the LangSmith backend and in the operator. It also grants the operator get, create, patch, and delete permissions on secretproviderclasses. When you set operator.rbac.create to false, grant those permissions yourself. The backend setting stays off unless config.deployment.enabled and operator.enabled are also true. Use the chart setting rather than overriding the environment variables, so the backend and operator stay in sync.

Add manifests to a deployment

Create the deployment first. To configure its identity and secret mounts:
1

Open the deployment settings

Open the deployment’s Deployment Settings and find the Kubernetes Resources section.
2

Write the manifests

In Extra Kubernetes Manifests, enter YAML documents separated by ---. Start each metadata.name with the prefix shown in the editor: the deployment’s resource name followed by -.Do not set metadata.namespace. The operator always uses the deployment’s namespace.
3

Mount the secrets

Under Secret mounts, each SecretProviderClass from the editor has a Mount path. Set a path, for example /mnt/secrets. Each secret appears as a file under that path.
4

Select the service account

Set Service account name to the account defined in your manifests. LangSmith suggests the name when you define exactly one ServiceAccount, but keeps any name you entered manually.
5

Save and redeploy

Select Save and redeploy to apply the manifests, secret mounts, and service account together.
Add ServiceAccount and SecretProviderClass manifests, confirm the automatically selected service account, set the mount path to /mnt/secrets, and save the deployment settings

Configure manifests and a secret mount in a local LangSmith instance. The recording uses placeholder cloud values and does not show a Kubernetes rollout.

Examples

Each example uses my-agent-0123abcd- as the prefix. Replace it with the prefix that the editor shows for your deployment. Replace every other value in angle brackets with your own. The workload identity binding on your cloud must name the exact ServiceAccount and the deployment’s namespace. Find the namespace with kubectl get lgp -A.
Install the Azure Key Vault provider and set up Microsoft Entra Workload ID:
  1. Create a user-assigned managed identity, and grant it Key Vault Secrets User on the vault.
  2. Add a federated identity credential to the managed identity. Set the issuer to your cluster’s OIDC issuer URL, the subject to system:serviceaccount:<namespace>:my-agent-0123abcd-kv, and the audience to api://AzureADTokenExchange.
clientID is required. usePodIdentity and useVMManagedIdentity can only be "false".

Manifest rules

LangSmith rejects a save that breaks these rules. The operator validates the manifests again before applying them:
  • Names: Use lowercase Kubernetes DNS subdomain names with the required prefix. Do not repeat a name within the same kind.
  • Metadata: metadata can set only name, labels, and annotations. Label and annotation keys must be valid Kubernetes qualified names, and their values must be strings. Label values must also be valid Kubernetes label values. Keys that start with lgp-operator.io/ or apps.langchain.ai/ are reserved.
  • Service accounts: A ServiceAccount can set only automountServiceAccountToken besides apiVersion, kind, and metadata. Set automountServiceAccountToken to a boolean.
  • Secret provider classes: A SecretProviderClass spec can contain only provider and parameters. LangSmith rejects secretObjects, so the provider does not sync a Kubernetes Secret.
  • Parameters: All values must be strings. Each provider accepts only the following keys.

Update or remove manifests

Edit the manifests in Deployment Settings and save. Clearing the editor removes every manifest. Before removing a ServiceAccount, clear Service account name or select another account. Clearing the field returns to the installation’s default service account configuration. The operator deletes a removed object only after the rollout completes and no references remain. It checks the current server configuration, all Deployment templates in the namespace, and all existing pods. This includes scaled-to-zero templates and terminating pods. Remove remaining references to allow deletion. When a saved SecretProviderClass that has a mount is missing from the manifests, Deployment Settings shows a warning before you save. Saving removes that mount. When you rename a SecretProviderClass, set the Mount path for the new name before you save. Deleting a deployment deletes its objects through Kubernetes garbage collection. This can remove the objects while the deployment’s pods are still draining. To remove the objects, clear the manifests and their references before disabling the feature. Setting config.deployment.extraManifestsEnabled to false leaves existing objects unchanged. While disabled, the API rejects changes to extra_manifests. Updates that omit the field or resend the stored list still succeed. Before downgrading to a version that does not preserve extra manifests, disable the feature. Restore a supporting version and the intended manifests before you enable it again.

Check the status

The operator reports progress in the ExtraManifestsReady condition on the deployment’s LGP resource:
InvalidManifests, ReferenceForbidden, ApplyFailed, and ApplyRetrying keep the previous revision running. PrunePending and PruneFailed do not block the rollout. The condition is absent when no manifests, inventory, or forbidden references remain. When a pod stays in ContainerCreating, run kubectl describe pod. Inspect the FailedMount event message. Check the driver and provider installation, workload identity binding and permissions, and secret name and location.

See also