langsmith-deployment
Original:🇺🇸 English
Translated
5 scripts
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.
4installs
Added on
NPX Install
npx skill4agent add lubu-labs/langchain-agent-skills langsmith-deploymentTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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 validation and deployment compatibility checks.
langgraph.json
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
langgraph.jsonbash
uv run python skills/langsmith-deployment/scripts/validate_deployment.py --config langgraph.json --target cloud2) Create a Cloud deployment (US default)
bash
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.json3) Create a Cloud deployment (EU)
bash
uv run python skills/langsmith-deployment/scripts/deploy_to_langsmith.py \
--name "my-agent-prod" \
--owner my-org \
--repo my-agent-repo \
--region eu4) Use a self-hosted control plane
bash
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-host5) Create a revision for an existing deployment
bash
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 main6) Roll back deployment revision
bash
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
bash
uv run python skills/langsmith-deployment/scripts/setup_monitoring.py \
--project my-agent-prod \
--output-json /tmp/monitoring-plan.jsonNote: generates a docs-aligned setup plan/templates. Alerts are configured in LangSmith UI per project.
setup_monitoring.pyConfiguration Rules To Enforce
- is required in
graphs.langgraph.json - For Python projects, is required.
dependencies - For JS projects (present), dependencies may be handled via
node_version.package.json - may be either a string path to an env file or an inline object map.
env - should be one of
python_version,3.11,3.12when set.3.13 - should be one of
pip_installer,auto,pipwhen set.uv - currently documented for LangGraph.js as
node_version.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 (), exposed by scripts as
X-Tenant-Id.--tenant-id
Secrets And Environment Guidance
- Never hardcode secrets in or source code.
langgraph.json - Prefer environment injection from deployment UI, Kubernetes Secrets, or cloud secret managers.
- Avoid passing secrets in shell arguments when possible; prefer env var.
LANGSMITH_API_KEY - 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, license key, and any app provider keys).REDIS_URI
Verification After Deploy
- Check deployment/revision status in LangSmith Deployments UI.
- Verify server API and health endpoints from deployment runtime (etc.).
/docs - Run a smoke invocation against your assistant/graph.
- Confirm traces, latency, and error metrics in Monitoring dashboards.
References To Load By Task
- : Deployment model choice and end-to-end execution.
references/deployment-guide.md - : CI/CD stages, control-plane automation patterns, preview/prod strategy.
references/cicd-integration.md - : Env var sources, secrets patterns, standalone required vars.
references/environment-management.md - : Dashboards, alert model, webhook payload guidance.
references/monitoring-alerts.md - : Scaling responsibilities by model and tuning knobs.
references/scaling-configuration.md - : Failure triage and rollback strategy.
references/troubleshooting-deployment.md
Script Map
- : Validate
scripts/validate_deployment.pyand deployment readiness.langgraph.json - : Create deployment or revision via control-plane API.
scripts/deploy_to_langsmith.py - : TypeScript equivalent deploy/revision script.
scripts/deploy_to_langsmith.ts - : List and rollback revisions.
scripts/rollback_deployment.py - : Generate alert/dashboard/webhook setup plan.
scripts/setup_monitoring.py
Assets
- : Cloud-oriented starter config.
assets/templates/langgraph-cloud.json - : CI/CD template for deployment automation.
assets/templates/github-actions-deploy.yml - : Kubernetes template for self-managed environments.
assets/templates/kubernetes-deployment.yaml - : Env var template for safe sharing.
assets/templates/.env.example