Skip to content

Commit 408e903

Browse files
chore: allow disabling of agent products automatically (#565)
* chore: allow disabling of agent products automatically * enable agent bootstrap by default * new images * update operator * addressed romains comment
1 parent 6699662 commit 408e903

File tree

6 files changed

+69
-39
lines changed

6 files changed

+69
-39
lines changed

charts/langsmith/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ maintainers:
55
email: ankush@langchain.dev
66
description: Helm chart to deploy the langsmith application and all services it depends on.
77
type: application
8-
version: 0.13.3
9-
appVersion: "0.13.4"
8+
version: 0.13.4
9+
appVersion: "0.13.5"

charts/langsmith/README.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# langsmith
22

3-
![Version: 0.13.3](https://img.shields.io/badge/Version-0.13.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.13.4](https://img.shields.io/badge/AppVersion-0.13.4-informational?style=flat-square)
3+
![Version: 0.13.4](https://img.shields.io/badge/Version-0.13.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.13.5](https://img.shields.io/badge/AppVersion-0.13.5-informational?style=flat-square)
44

55
Helm chart to deploy the langsmith application and all services it depends on.
66

@@ -137,41 +137,41 @@ For information on how to use this chart, up-to-date release notes, and other gu
137137
| gateway.sectionName | string | `""` | |
138138
| images.aceBackendImage.pullPolicy | string | `"IfNotPresent"` | |
139139
| images.aceBackendImage.repository | string | `"docker.io/langchain/langsmith-ace-backend"` | |
140-
| images.aceBackendImage.tag | string | `"0.13.4"` | |
140+
| images.aceBackendImage.tag | string | `"0.13.5"` | |
141141
| images.agentBuilderImage.pullPolicy | string | `"IfNotPresent"` | |
142142
| images.agentBuilderImage.repository | string | `"docker.io/langchain/agent-builder-deep-agent"` | |
143-
| images.agentBuilderImage.tag | string | `"0.13.4"` | |
143+
| images.agentBuilderImage.tag | string | `"0.13.5"` | |
144144
| images.agentBuilderToolServerImage.pullPolicy | string | `"IfNotPresent"` | |
145145
| images.agentBuilderToolServerImage.repository | string | `"docker.io/langchain/agent-builder-tool-server"` | |
146-
| images.agentBuilderToolServerImage.tag | string | `"0.13.4"` | |
146+
| images.agentBuilderToolServerImage.tag | string | `"0.13.5"` | |
147147
| images.agentBuilderTriggerServerImage.pullPolicy | string | `"IfNotPresent"` | |
148148
| images.agentBuilderTriggerServerImage.repository | string | `"docker.io/langchain/agent-builder-trigger-server"` | |
149-
| images.agentBuilderTriggerServerImage.tag | string | `"0.13.4"` | |
149+
| images.agentBuilderTriggerServerImage.tag | string | `"0.13.5"` | |
150150
| images.backendImage.pullPolicy | string | `"IfNotPresent"` | |
151151
| images.backendImage.repository | string | `"docker.io/langchain/langsmith-backend"` | |
152-
| images.backendImage.tag | string | `"0.13.4"` | |
152+
| images.backendImage.tag | string | `"0.13.5"` | |
153153
| images.clickhouseImage.pullPolicy | string | `"Always"` | |
154154
| images.clickhouseImage.repository | string | `"docker.io/clickhouse/clickhouse-server"` | |
155155
| images.clickhouseImage.tag | string | `"25.4"` | |
156156
| images.frontendImage.pullPolicy | string | `"IfNotPresent"` | |
157157
| images.frontendImage.repository | string | `"docker.io/langchain/langsmith-frontend"` | |
158-
| images.frontendImage.tag | string | `"0.13.4"` | |
158+
| images.frontendImage.tag | string | `"0.13.5"` | |
159159
| images.hostBackendImage.pullPolicy | string | `"IfNotPresent"` | |
160160
| images.hostBackendImage.repository | string | `"docker.io/langchain/hosted-langserve-backend"` | |
161-
| images.hostBackendImage.tag | string | `"0.13.4"` | |
161+
| images.hostBackendImage.tag | string | `"0.13.5"` | |
162162
| images.imagePullSecrets | list | `[]` | Secrets with credentials to pull images from a private registry. Specified as name: value. |
163163
| images.insightsAgentImage.pullPolicy | string | `"IfNotPresent"` | |
164164
| images.insightsAgentImage.repository | string | `"docker.io/langchain/langsmith-clio"` | |
165-
| images.insightsAgentImage.tag | string | `"0.13.4"` | |
165+
| images.insightsAgentImage.tag | string | `"0.13.5"` | |
166166
| images.operatorImage.pullPolicy | string | `"IfNotPresent"` | |
167167
| images.operatorImage.repository | string | `"docker.io/langchain/langgraph-operator"` | |
168-
| images.operatorImage.tag | string | `"0.1.23"` | |
168+
| images.operatorImage.tag | string | `"0.1.34"` | |
169169
| images.platformBackendImage.pullPolicy | string | `"IfNotPresent"` | |
170170
| images.platformBackendImage.repository | string | `"docker.io/langchain/langsmith-go-backend"` | |
171-
| images.platformBackendImage.tag | string | `"0.13.4"` | |
171+
| images.platformBackendImage.tag | string | `"0.13.5"` | |
172172
| images.playgroundImage.pullPolicy | string | `"IfNotPresent"` | |
173173
| images.playgroundImage.repository | string | `"docker.io/langchain/langsmith-playground"` | |
174-
| images.playgroundImage.tag | string | `"0.13.4"` | |
174+
| images.playgroundImage.tag | string | `"0.13.5"` | |
175175
| images.postgresImage.pullPolicy | string | `"IfNotPresent"` | |
176176
| images.postgresImage.repository | string | `"docker.io/postgres"` | |
177177
| images.postgresImage.tag | string | `"14.7"` | |
@@ -340,6 +340,11 @@ For information on how to use this chart, up-to-date release notes, and other gu
340340
| config.observability.tracing.exporter | string | `"http"` | |
341341
| config.observability.tracing.useTls | bool | `true` | |
342342
| config.personalOrgsDisabled | bool | `true` | Disable personal orgs. |
343+
| config.security | object | `{"cors":{"allowedOrigins":"*","allowedOriginsRegex":"","alwaysAllowPathsRegex":""}}` | Security configuration for CORS, headers, and other security-related settings. These settings control cross-origin access and help protect against common web vulnerabilities. |
344+
| config.security.cors | object | `{"allowedOrigins":"*","allowedOriginsRegex":"","alwaysAllowPathsRegex":""}` | CORS (Cross-Origin Resource Sharing) configuration. Controls which origins can make requests to the LangSmith API. By default, CORS is permissive. For production deployments, you should restrict this. |
345+
| config.security.cors.allowedOrigins | string | `"*"` | Comma-separated list of allowed origins. Use "*" to allow all origins (not recommended for production). Example: "https://app.example.com,https://admin.example.com" If allowedOriginsRegex is set, this value is ignored. |
346+
| config.security.cors.allowedOriginsRegex | string | `""` | Regular expression pattern for allowed origins. Takes precedence over allowedOrigins if set. Example: "https://.*\\.example\\.com" to allow all subdomains of example.com. Leave empty to use allowedOrigins instead. |
347+
| config.security.cors.alwaysAllowPathsRegex | string | `""` | Regular expression pattern for paths that should always allow CORS from any origin. Useful for public endpoints like webhooks or public API endpoints. Example: ".*(/feedback/tokens/|/public/).*" |
343348
| config.settings | object | `{"redisRunsExpirySeconds":"21600"}` | Application Settings. These are used to tune the application |
344349
| config.settings.redisRunsExpirySeconds | string | `"21600"` | Optional. Be very careful when lowering this value as it can result in runs being lost if your queue is down/not processing items fast enough. |
345350
| config.telemetry.logs | bool | `true` | Optional. These values are used to send telemetry to the LangChain team to assist with troubleshooting. |

charts/langsmith/templates/_helpers.tpl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,28 @@ Template containing common environment variables that are used by several servic
589589
{{ printf "%s-%s" (include "langsmith.fullname" .) "agent-bootstrap" | trunc 63 | trimSuffix "-" }}
590590
{{- end -}}
591591

592+
{{- define "agentBootstrap.createAgentProducts" -}}
593+
{{- $createProducts := list }}
594+
{{- if .Values.config.agentBuilder.enabled }}
595+
{{- $createProducts = append $createProducts "agent_builder" }}
596+
{{- end }}
597+
{{- if .Values.config.insights.enabled }}
598+
{{- $createProducts = append $createProducts "insights" }}
599+
{{- end }}
600+
{{ toYaml $createProducts }}
601+
{{- end -}}
602+
603+
{{- define "agentBootstrap.destroyAgentProducts" -}}
604+
{{- $destroyProducts := list }}
605+
{{- if not .Values.config.agentBuilder.enabled }}
606+
{{- $destroyProducts = append $destroyProducts "agent_builder" }}
607+
{{- end }}
608+
{{- if not .Values.config.insights.enabled }}
609+
{{- $destroyProducts = append $destroyProducts "insights" }}
610+
{{- end }}
611+
{{ toYaml $destroyProducts }}
612+
{{- end -}}
613+
592614
{{/* Fail on duplicate keys in the inputted list of environment variables */}}
593615
{{- define "langsmith.detectDuplicates" -}}
594616
{{- $inputList := . -}}

charts/langsmith/templates/agent-bootstrap/bootstrap-job.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
{{- if and .Values.backend.agentBootstrap.enabled (or .Values.config.agentBuilder.enabled .Values.config.insights.enabled) }}
1+
{{- if and .Values.backend.agentBootstrap.enabled .Values.config.deployment.enabled }}
22
{{- $envVars := concat .Values.commonEnv (include "langsmith.commonEnv" . | fromYamlArray) .Values.backend.agentBootstrap.extraEnv -}}
33
{{- $volumes := concat .Values.commonVolumes (include "langsmith.tlsVolumes" . | fromYamlArray) -}}
44
{{- $volumeMounts := concat .Values.commonVolumeMounts (include "langsmith.tlsVolumeMounts" . | fromYamlArray) }}
5-
# This job deploys bundled agents (Agent Builder, Insights) via the LangSmith Deployments API
6-
# It runs as a post-install/post-upgrade hook to ensure the agents are deployed after the rest of LangSmith is ready
5+
{{- $createProducts := include "agentBootstrap.createAgentProducts" . | fromYamlArray }}
6+
{{- $destroyProducts := include "agentBootstrap.destroyAgentProducts" . | fromYamlArray }}
7+
# This job creates/destroys bundled agents per product (Agent Builder, Insights) via the LangSmith Deployments API.
8+
# Each product is either create (enabled) or destroy (disabled) in a single run (e.g. turn off Agent Builder, turn on Insights).
9+
# It runs as a post-install/post-upgrade hook.
710
apiVersion: batch/v1
811
kind: Job
912
metadata:
@@ -79,15 +82,11 @@ spec:
7982
- "python"
8083
- "scripts/deploy_bundled_agents.pyc"
8184
args:
82-
- "--products"
83-
{{- $products := list }}
84-
{{- if .Values.config.agentBuilder.enabled }}
85-
{{- $products = append $products "agent_builder" }}
86-
{{- end }}
87-
{{- if .Values.config.insights.enabled }}
88-
{{- $products = append $products "insights" }}
89-
{{- end }}
90-
- "{{ join "," $products }}"
85+
- "--destroy-products"
86+
- "{{ join "," $destroyProducts }}"
87+
- "--create-products"
88+
- "{{ join "," $createProducts }}"
89+
{{- if $createProducts }}
9190
- "--config"
9291
- |
9392
{
@@ -120,6 +119,7 @@ spec:
120119
}
121120
{{- end }}
122121
}
122+
{{- end }}
123123
env:
124124
{{- with $envVars }}
125125
{{- toYaml . | nindent 12 }}

charts/langsmith/templates/agent-bootstrap/rbac.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# RBAC for the agent bootstrap job to create/patch ConfigMaps and restart deployments
2-
{{- if and .Values.backend.agentBootstrap.enabled (or .Values.config.agentBuilder.enabled .Values.config.insights.enabled) }}
1+
# ServiceAccount for the agent bootstrap job (needed whenever the job runs)
2+
{{- if and .Values.backend.agentBootstrap.enabled .Values.config.deployment.enabled }}
33
apiVersion: v1
44
kind: ServiceAccount
55
metadata:
@@ -10,7 +10,10 @@ metadata:
1010
app.kubernetes.io/component: agent-bootstrap
1111
annotations:
1212
{{- include "langsmith.annotations" . | nindent 4 }}
13+
{{- end }}
1314
---
15+
# Role + RoleBinding: only when at least one product is enabled (create path patches ConfigMaps and restarts deployments)
16+
{{- if and .Values.backend.agentBootstrap.enabled .Values.config.deployment.enabled (or .Values.config.agentBuilder.enabled .Values.config.insights.enabled) }}
1417
apiVersion: rbac.authorization.k8s.io/v1
1518
kind: Role
1619
metadata:

charts/langsmith/values.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,35 @@ images:
3333
aceBackendImage:
3434
repository: "docker.io/langchain/langsmith-ace-backend"
3535
pullPolicy: IfNotPresent
36-
tag: "0.13.4"
36+
tag: "0.13.5"
3737
backendImage:
3838
repository: "docker.io/langchain/langsmith-backend"
3939
pullPolicy: IfNotPresent
40-
tag: "0.13.4"
40+
tag: "0.13.5"
4141
insightsAgentImage:
4242
repository: "docker.io/langchain/langsmith-clio"
4343
pullPolicy: IfNotPresent
44-
tag: "0.13.4"
44+
tag: "0.13.5"
4545
frontendImage:
4646
repository: "docker.io/langchain/langsmith-frontend"
4747
pullPolicy: IfNotPresent
48-
tag: "0.13.4"
48+
tag: "0.13.5"
4949
hostBackendImage:
5050
repository: "docker.io/langchain/hosted-langserve-backend"
5151
pullPolicy: IfNotPresent
52-
tag: "0.13.4"
52+
tag: "0.13.5"
5353
operatorImage:
5454
repository: "docker.io/langchain/langgraph-operator"
5555
pullPolicy: IfNotPresent
56-
tag: "0.1.23"
56+
tag: "0.1.34"
5757
platformBackendImage:
5858
repository: "docker.io/langchain/langsmith-go-backend"
5959
pullPolicy: IfNotPresent
60-
tag: "0.13.4"
60+
tag: "0.13.5"
6161
playgroundImage:
6262
repository: "docker.io/langchain/langsmith-playground"
6363
pullPolicy: IfNotPresent
64-
tag: "0.13.4"
64+
tag: "0.13.5"
6565
postgresImage:
6666
repository: "docker.io/postgres"
6767
pullPolicy: IfNotPresent
@@ -77,15 +77,15 @@ images:
7777
agentBuilderToolServerImage:
7878
repository: "docker.io/langchain/agent-builder-tool-server"
7979
pullPolicy: IfNotPresent
80-
tag: "0.13.4"
80+
tag: "0.13.5"
8181
agentBuilderTriggerServerImage:
8282
repository: "docker.io/langchain/agent-builder-trigger-server"
8383
pullPolicy: IfNotPresent
84-
tag: "0.13.4"
84+
tag: "0.13.5"
8585
agentBuilderImage:
8686
repository: "docker.io/langchain/agent-builder-deep-agent"
8787
pullPolicy: IfNotPresent
88-
tag: "0.13.4"
88+
tag: "0.13.5"
8989

9090
ingress:
9191
enabled: false

0 commit comments

Comments
 (0)