LangSmith Deployment
Use this skill to deploy, revise, monitor, and troubleshoot LangGraph-based agents in LangSmith Deployment.
Use This Skill When
- You need to deploy a new agent to LangSmith Cloud.
- You need to create a new deployment revision from Git changes or env changes.
- You need rollback guidance for a failing revision.
- You need to choose deployment model: Cloud, Hybrid/Self-hosted with control plane, or Standalone server.
- You need CI/CD automation using LangSmith Deployment control-plane APIs.
- You need monitoring and alert setup aligned with current LangSmith alert model.
- You need
langgraph.json validation and deployment compatibility checks.
Deployment Model Selection
| Model |
Use when |
Build/Source |
Operates infra |
| Cloud |
Fastest managed production path |
GitHub repo via control plane |
LangSmith |
| Hybrid/Self-hosted with control plane |
You need private data plane + centralized deployment UI/API |
Container image + control plane |
You |
| Standalone server |
You want direct Agent Server hosting without control plane |
Containerized server |
You |
Core Workflow
- Validate local deployment config.
- Choose deployment model and endpoint strategy.
- Create deployment or revision.
- Configure environment variables and secrets correctly.
- Configure monitoring and alerts.
- Verify runtime behavior and keep rollback path ready.
Script-First Commands
1) Validate langgraph.json
uv run python skills/langsmith-deployment/scripts/validate_deployment.py --config langgraph.json --target cloud
2) Create a Cloud deployment (US default)
uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \
--name "my-agent-prod" \
--owner my-org \
--repo my-agent-repo \
--branch main \
--config langgraph.json
3) Create a Cloud deployment (EU)
uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \
--name "my-agent-prod" \
--owner my-org \
--repo my-agent-repo \
--region eu
4) Use a self-hosted control plane
uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \
--name "my-agent-prod" \
--owner my-org \
--repo my-agent-repo \
--control-plane-url https://<your-langsmith-host>/api-host
5) Create a revision for an existing deployment
uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \
--name "my-agent-prod" \
--owner my-org \
--repo my-agent-repo \
--deployment-id <deployment-id> \
--branch main
6) Roll back deployment revision
uv run python skills/langsmith-deployment/scripts/rollback_deployment.py \
--deployment-id <deployment-id> \
--list-revisions
uv run python skills/langsmith-deployment/scripts/rollback_deployment.py \
--deployment-id <deployment-id>
7) Generate monitoring + alert setup plan
uv run python skills/langsmith-deployment/scripts/setup_monitoring.py \
--project my-agent-prod \
--output-json /tmp/monitoring-plan.json
Note: setup_monitoring.py generates a docs-aligned setup plan/templates. Alerts are configured in LangSmith UI per project.
Configuration Rules To Enforce
graphs is required in langgraph.json.
- For Python projects,
dependencies is required.
- For JS projects (
node_version present), dependencies may be handled via package.json.
env may be either a string path to an env file or an inline object map.
python_version should be one of 3.11, 3.12, 3.13 when set.
pip_installer should be one of auto, pip, uv when set.
node_version currently documented for LangGraph.js as 20.
API/Endpoint Notes
- LangSmith Deployment control-plane API defaults are:
- US:
https://api.host.langchain.com.
- EU:
https://eu.api.host.langchain.com.
- Self-hosted control-plane base URL is typically
https://<host>/api-host.
- For org-scoped API keys, include workspace/tenant id (
X-Tenant-Id), exposed by scripts as --tenant-id.
Secrets And Environment Guidance
- Never hardcode secrets in
langgraph.json or source code.
- Prefer environment injection from deployment UI, Kubernetes Secrets, or cloud secret managers.
- Avoid passing secrets in shell arguments when possible; prefer
LANGSMITH_API_KEY env var.
- In control-plane deployment flows, tracing auth env handling differs from standalone; rely on deployment model docs before overriding tracing/auth vars.
- For standalone server, ensure required runtime vars are present (
DATABASE_URI, REDIS_URI, license key, and any app provider keys).
Verification After Deploy
- Check deployment/revision status in LangSmith Deployments UI.
- Verify server API and health endpoints from deployment runtime (
/docs etc.).
- Run a smoke invocation against your assistant/graph.
- Confirm traces, latency, and error metrics in Monitoring dashboards.
References To Load By Task
references/deployment-guide.md: Deployment model choice and end-to-end execution.
references/cicd-integration.md: CI/CD stages, control-plane automation patterns, preview/prod strategy.
references/environment-management.md: Env var sources, secrets patterns, standalone required vars.
references/monitoring-alerts.md: Dashboards, alert model, webhook payload guidance.
references/scaling-configuration.md: Scaling responsibilities by model and tuning knobs.
references/troubleshooting-deployment.md: Failure triage and rollback strategy.
Script Map
scripts/validate_deployment.py: Validate langgraph.json and deployment readiness.
scripts/deploy_to_langsmith.py: Create deployment or revision via control-plane API.
scripts/deploy_to_langsmith.ts: TypeScript equivalent deploy/revision script.
scripts/rollback_deployment.py: List and rollback revisions.
scripts/setup_monitoring.py: Generate alert/dashboard/webhook setup plan.
Assets
assets/templates/langgraph-cloud.json: Cloud-oriented starter config.
assets/templates/github-actions-deploy.yml: CI/CD template for deployment automation.
assets/templates/kubernetes-deployment.yaml: Kubernetes template for self-managed environments.
assets/templates/.env.example: Env var template for safe sharing.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: langsmith-deployment3description: Deploy and operate production agent servers with LangSmith Deployment. Use when work involves choosing Cloud vs Hybrid/Self-hosted-with-control-plane vs Standalone, preparing/validating langgraph.json, creating deployments or revisions, rolling back revisions, wiring CI/CD to control-plane APIs, configuring environment variables and secrets, setting monitoring/alerts/webhooks, or troubleshooting deployment/runtime/scaling issues for LangChain/LangGraph applications. Use when this capability is needed.4---56# LangSmith Deployment78Use this skill to deploy, revise, monitor, and troubleshoot LangGraph-based agents in LangSmith Deployment.910## Use This Skill When1112- You need to deploy a new agent to LangSmith Cloud.13- You need to create a new deployment revision from Git changes or env changes.14- You need rollback guidance for a failing revision.15- You need to choose deployment model: Cloud, Hybrid/Self-hosted with control plane, or Standalone server.16- You need CI/CD automation using LangSmith Deployment control-plane APIs.17- You need monitoring and alert setup aligned with current LangSmith alert model.18- You need `langgraph.json` validation and deployment compatibility checks.1920## Deployment Model Selection2122| Model | Use when | Build/Source | Operates infra |23|---|---|---|---|24| Cloud | Fastest managed production path | GitHub repo via control plane | LangSmith |25| Hybrid/Self-hosted with control plane | You need private data plane + centralized deployment UI/API | Container image + control plane | You |26| Standalone server | You want direct Agent Server hosting without control plane | Containerized server | You |2728## Core Workflow29301. Validate local deployment config.312. Choose deployment model and endpoint strategy.323. Create deployment or revision.334. Configure environment variables and secrets correctly.345. Configure monitoring and alerts.356. Verify runtime behavior and keep rollback path ready.3637## Script-First Commands3839### 1) Validate `langgraph.json`4041```bash42uv run python skills/langsmith-deployment/scripts/validate_deployment.py --config langgraph.json --target cloud43```4445### 2) Create a Cloud deployment (US default)4647```bash48uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \49 --name "my-agent-prod" \50 --owner my-org \51 --repo my-agent-repo \52 --branch main \53 --config langgraph.json54```5556### 3) Create a Cloud deployment (EU)5758```bash59uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \60 --name "my-agent-prod" \61 --owner my-org \62 --repo my-agent-repo \63 --region eu64```6566### 4) Use a self-hosted control plane6768```bash69uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \70 --name "my-agent-prod" \71 --owner my-org \72 --repo my-agent-repo \73 --control-plane-url https://<your-langsmith-host>/api-host74```7576### 5) Create a revision for an existing deployment7778```bash79uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \80 --name "my-agent-prod" \81 --owner my-org \82 --repo my-agent-repo \83 --deployment-id <deployment-id> \84 --branch main85```8687### 6) Roll back deployment revision8889```bash90uv run python skills/langsmith-deployment/scripts/rollback_deployment.py \91 --deployment-id <deployment-id> \92 --list-revisions9394uv run python skills/langsmith-deployment/scripts/rollback_deployment.py \95 --deployment-id <deployment-id>96```9798### 7) Generate monitoring + alert setup plan99100```bash101uv run python skills/langsmith-deployment/scripts/setup_monitoring.py \102 --project my-agent-prod \103 --output-json /tmp/monitoring-plan.json104```105106Note: `setup_monitoring.py` generates a docs-aligned setup plan/templates. Alerts are configured in LangSmith UI per project.107108## Configuration Rules To Enforce109110- `graphs` is required in `langgraph.json`.111- For Python projects, `dependencies` is required.112- For JS projects (`node_version` present), dependencies may be handled via `package.json`.113- `env` may be either a string path to an env file or an inline object map.114- `python_version` should be one of `3.11`, `3.12`, `3.13` when set.115- `pip_installer` should be one of `auto`, `pip`, `uv` when set.116- `node_version` currently documented for LangGraph.js as `20`.117118## API/Endpoint Notes119120- LangSmith Deployment control-plane API defaults are:121- US: `https://api.host.langchain.com`.122- EU: `https://eu.api.host.langchain.com`.123- Self-hosted control-plane base URL is typically `https://<host>/api-host`.124- For org-scoped API keys, include workspace/tenant id (`X-Tenant-Id`), exposed by scripts as `--tenant-id`.125126## Secrets And Environment Guidance127128- Never hardcode secrets in `langgraph.json` or source code.129- Prefer environment injection from deployment UI, Kubernetes Secrets, or cloud secret managers.130- Avoid passing secrets in shell arguments when possible; prefer `LANGSMITH_API_KEY` env var.131- In control-plane deployment flows, tracing auth env handling differs from standalone; rely on deployment model docs before overriding tracing/auth vars.132- For standalone server, ensure required runtime vars are present (`DATABASE_URI`, `REDIS_URI`, license key, and any app provider keys).133134## Verification After Deploy135136- Check deployment/revision status in LangSmith Deployments UI.137- Verify server API and health endpoints from deployment runtime (`/docs` etc.).138- Run a smoke invocation against your assistant/graph.139- Confirm traces, latency, and error metrics in Monitoring dashboards.140141## References To Load By Task142143- `references/deployment-guide.md`: Deployment model choice and end-to-end execution.144- `references/cicd-integration.md`: CI/CD stages, control-plane automation patterns, preview/prod strategy.145- `references/environment-management.md`: Env var sources, secrets patterns, standalone required vars.146- `references/monitoring-alerts.md`: Dashboards, alert model, webhook payload guidance.147- `references/scaling-configuration.md`: Scaling responsibilities by model and tuning knobs.148- `references/troubleshooting-deployment.md`: Failure triage and rollback strategy.149150## Script Map151152- `scripts/validate_deployment.py`: Validate `langgraph.json` and deployment readiness.153- `scripts/deploy_to_langsmith.py`: Create deployment or revision via control-plane API.154- `scripts/deploy_to_langsmith.ts`: TypeScript equivalent deploy/revision script.155- `scripts/rollback_deployment.py`: List and rollback revisions.156- `scripts/setup_monitoring.py`: Generate alert/dashboard/webhook setup plan.157158## Assets159160- `assets/templates/langgraph-cloud.json`: Cloud-oriented starter config.161- `assets/templates/github-actions-deploy.yml`: CI/CD template for deployment automation.162- `assets/templates/kubernetes-deployment.yaml`: Kubernetes template for self-managed environments.163- `assets/templates/.env.example`: Env var template for safe sharing.164165---166> Converted and distributed by [TomeVault](https://tomevault.io/claim/lubu-labs) — claim your Tome and manage your conversions.167<!-- tomevault:4.0:skill_md:2026-04-11 -->