Skip to main content

Overview

Automate your LangGraph Platform deployments with continuous integration and deployment pipelines. Deploy on every commit, with automated testing and rollback capabilities.
Automated Deployments: Push to main → CI/CD tests → Auto-deploy to production

GitHub Actions

Quick Setup

1

Add LangSmith API Key

Go to GitHub repo → Settings → Secrets → New repository secretName: LANGCHAIN_API_KEY Value: Your LangSmith API key from smith.langchain.com/settings
2

Create Workflow File

3

Push to GitHub

Full Workflow

.github/workflows/deploy-langgraph-platform.yml

Environment Protection Rules

Set up deployment approvals in GitHub:
1

Go to Repository Settings

Settings → Environments → New environment
2

Create 'production' Environment

  • Name: production
  • Enable “Required reviewers”
  • Add reviewers (team leads)
  • Set deployment branch: main only
3

Create 'staging' Environment

  • Name: staging
  • No approvals needed
  • Auto-deploy on push to main

GitLab CI/CD

.gitlab-ci.yml

CircleCI

.circleci/config.yml

Best Practices

Use GitHub Environments or GitLab’s manual approval:

Rollback Strategy

Automatic Rollback on Failure

Manual Rollback

Multi-Environment Strategy

Trigger: Every push to develop branch
NOTE: Automatic deploys only run when the repository variable ENABLE_DEV_AUTODEPLOY is set to true. This keeps CI from waiting on environment approvals by default.

Monitoring Deployments

View deployment status:

Troubleshooting

Symptom: 401 UnauthorizedSolution: Verify LANGCHAIN_API_KEY secret is set correctly in CI/CD platform.
Symptom: Deployment takes too longSolution:
  • Optimize dependencies in langgraph/requirements.txt
  • Reduce Docker image size
  • Check network connectivity
Symptom: Test invocation returns errorSolution:
  • Check deployment logs: langgraph deployment logs
  • Verify secrets are set
  • Test locally first with langgraph dev

Next Steps

Quickstart

Deploy your first agent

Monitoring

Monitor deployments

Secrets

Manage secrets in CI/CD

Configuration

Configure deployments

CI/CD Ready! Your LangGraph Platform deployments are now automated with testing, staging, and production workflows.