Prerequisites
Install the base LangSmith platform
Install KEDA
KEDA on your cluster:Configure an ingress
hostname in your langsmith_config.yaml.Verify cluster capacity
Verify storage
PROVISIONER value (not kubernetes.io/no-provisioner) and be marked (default), or you must configure one before proceeding.Verify egress
https://beacon.langchain.com is available. See the egress documentation.Enable LangSmith Deployment
Components
Enabling LangSmith Deployment provisions the following resources in your cluster:listener: Listens to the control plane for changes to your deployments and creates or updates downstream CRDs.LangGraphPlatform CRD: Manages instances of LangSmith Deployment.operator: Handles changes to your LangSmith CRDs.host-backend: The control plane.
Enable the feature
To enable LangSmith Deployment, update yourlangsmith_config.yaml:
Enable deployment in your config
langsmith_config.yaml, enable the deployment option. You must also have a valid ingress configured.langgraphPlatform option is deprecated. Use config.deployment for any version after v0.12.0.(Optional) Configure image mirroring
hostBackendImage and operatorImage options in your langsmith_config.yaml. Use the image tags specified in the latest LangSmith Helm chart release.(Optional) Configure base agent templates
values.yaml if you need to customize how the operator creates agent Kubernetes resources. The most common use case is adding imagePullSecrets to authenticate with a private container registry. See Configure authentication for private registries for details.Apply the changes
<version> and <namespace> with your values:Optional configuration
Configure additional data planes
In addition to the data plane created above, you can create more data planes in different Kubernetes clusters or in the same cluster under a different namespace. There are different ways to achieve this, so implement the solution that works best for your use case.Prerequisites
Review cluster organization
Verify hybrid prerequisites
https://api.host.langchain.com and https://api.smith.langchain.com.Enable the feature in Postgres
Deploy to a different cluster
Follow the hybrid setup guide
config.langsmithWorkspaceId to the workspace ID from the previous step.(Optional) Add more data planes to the same cluster
Deploy to a different namespace in the same cluster
Update your config
langsmith_config.yaml, make the following modifications:- Set
operator.watchNamespacesto the current namespace your self-hosted LangSmith instance is running in. This prevents conflicts with the operator added by the new data plane. - Use the Gateway API or an Istio Gateway. Adjust your
langsmith_config.yamlaccordingly.
Apply the changes
Follow the hybrid setup guide
config.langsmithWorkspaceId to the workspace ID from the previous step. Set config.watchNamespaces to a different namespace than the one used by the existing data plane.(Optional) Configure log access
Configure authentication for private registries
If your Agent Server deployments will use images from private container registries (for example, AWS ECR, Azure ACR, or GCP Artifact Registry), configure image pull secrets. This configuration applies to all deployments automatically, allowing them to authenticate with your private registry.Create a Kubernetes image pull secret
myregistry.com: Your registry URLyour-username: Your registry usernameyour-password: Your registry password or access tokenlangsmith: The Kubernetes namespace where LangSmith is installed
Configure the deployment template in your langsmith_config.yaml
imagePullSecrets to the operator’s deployment template:Apply the changes
Read Agent Server logs from other namespaces
For deployments where the control plane and data plane are in the same cluster, ensure the control plane Kubernetes deployment (host-backend) has permission to get, list, and watch Kubernetes deployments, pods, replicasets, and logs from the namespace where the Agent Server deployment exists. There are different ways to achieve this. The following example uses Kubernetes RBAC, but use the approach that best fits your use case:
Create a Role with the required permissions
Role in the Agent Server namespace. Replace <data_plane_namespace>:Get the control plane ServiceAccount
<control_plane_namespace>:Bind the Role to the control plane ServiceAccount
<data_plane_namespace>, <control_plane_namespace>, and <control_plane_service_account>:
