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/settings2
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:
mainonly
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
Always Test Before Deploy
Always Test Before Deploy
Use Staging Environment
Use Staging Environment
Tag Deployments
Tag Deployments
Require Approvals for Production
Require Approvals for Production
Use GitHub Environments or GitLab’s manual approval:
Run Smoke Tests
Run Smoke Tests
Notify on Deployment
Notify on Deployment
Rollback Strategy
Automatic Rollback on Failure
Manual Rollback
Multi-Environment Strategy
- Development
- Staging
- Production
Trigger: Every push to
develop branchNOTE: Automatic deploys only run when the repository variableENABLE_DEV_AUTODEPLOYis set totrue. This keeps CI from waiting on environment approvals by default.
Monitoring Deployments
View deployment status:Troubleshooting
Authentication failed
Authentication failed
Symptom:
401 UnauthorizedSolution: Verify LANGCHAIN_API_KEY secret is set correctly in CI/CD platform.Deployment timeout
Deployment timeout
Symptom: Deployment takes too longSolution:
- Optimize dependencies in
langgraph/requirements.txt - Reduce Docker image size
- Check network connectivity
Smoke test fails
Smoke test fails
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.