mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-20 14:42:28 +02:00
Plus: 1. Improve docstrings of add_node 2. Update crosslinking of sqlite and aiosqlite docstrings 3. Fix a bunch of links so we can turn on strict validation
4.4 KiB
4.4 KiB
How to Deploy to LangGraph Cloud
LangGraph Cloud is available within LangSmith. To deploy a LangGraph Cloud API, navigate to the LangSmith UI.
Setup GitHub Repository
LangGraph Cloud applications are deployed from GitHub repositories. Configure and upload a LangGraph Cloud application to a GitHub repository in order to deploy it to LangGraph Cloud.
Create New Deployment
Starting from the LangSmith UI...
- In the left-hand navigation panel, select
Deployments. TheDeploymentsview contains a list of existing LangGraph Cloud deployments. - In the top-right corner, select
+ New Deploymentto create a new deployment. - In the
Create New Deploymentpanel, fill out the required fields.Deployment details- Select
Import from GitHuband follow the GitHub OAuth workflow to install and authorize LangChain'shosted-langserveGitHub app to access the selected repositories. After installation is complete, return to theCreate New Deploymentpanel and select the GitHub repository to deploy from the dropdown menu. - Specify a name for the deployment.
- Specify the full path to the LangGraph API config file including the file name. For example, if the file
langgraph.jsonis in the root of the repository, simply specifylanggraph.json. - Specify the desired
gitreference (e.g. branch name). For example, different branches of the repository can be deployed.
- Select
- Select the desired
Deployment Type.Developmentdeployments are meant for non-production use cases and are provisioned with minimal resources.Productiondeployments can serve up to 500 requests/second and are provisioned with highly available storage with automatic backups.
- Specify
Environment Variablesand secrets. See the Environment Variables reference to configure additional variables for the deployment.- Sensitive values such as API keys (e.g.
OPENAI_API_KEY) should be specified as secrets. - Additional non-secret environment variables can be specified as well.
- Sensitive values such as API keys (e.g.
- A new LangSmith
Tracing Projectis automatically created with the same name as the deployment.
- In the top-right corner, select
Submit. After a few seconds, theDeploymentview appears and the new deployment will be queued for provisioning.
Create New Revision
When creating a new deployment, a new revision is created by default. Subsequent revisions can be created to deploy new code changes.
Starting from the LangSmith UI...
- In the left-hand navigation panel, select
Deployments. TheDeploymentsview contains a list of existing LangGraph Cloud deployments. - Select an existing deployment to create a new revision for.
- In the
Deploymentview, in the top-right corner, select+ New Revision. - In the
New Revisionmodal, fill out the required fields.- Specify the full path to the LangGraph API config file including the file name. For example, if the file
langgraph.jsonis in the root of the repository, simply specifylanggraph.json. - Specify the desired
gitreference (e.g. branch name). For example, different branches of the repository can be deployed. - Specify
Environment Variablesand secrets. Existing secrets and environment variables are prepopulated. See the Environment Variables reference to configure additional variables for the revision.- Add new secrets or environment variables.
- Remove existing secrets or environment variables.
- Update the value of existing secrets or environment variables.
- Specify the full path to the LangGraph API config file including the file name. For example, if the file
- Select
Submit. After a few seconds, theNew Revisionmodal will close and the new revision will be queued for deployment.
Asynchronous Deployment
New deployments and revisions are provisioned and deployed asynchronously. They are not deployed immediately after submission. Currently, deployment can take up to several minutes.
The Deployment view continually updates the status of pending revisions.