If youâre looking for a quick setup, try the quickstart guide first.
Prerequisites
- Applications are deployed from GitHub repositories. Configure and upload an application to a GitHub repository.
- Verify that the LangGraph API runs locally. If the API does not run successfully (i.e.,
langgraph dev), deploying to LangSmith will fail as well.
One-Time Setup Required: A GitHub organization owner or admin must complete the OAuth flow in the LangSmith UI to authorize the
hosted-langserve GitHub app. This only needs to be done once per workspace. After the initial OAuth authorization, all developers with deployment permissions can create and manage deployments without requiring GitHub admin access.Create new deployment
Starting from the LangSmith UI, select Deployments in the left-hand navigation panel, Deployments. In the top-right corner, select + New Deployment to create a new deployment:- In the Create New Deployment panel, fill out the required fields. For Deployment details:
- Select Import from GitHub and follow the GitHub OAuth workflow to install and authorize LangChainâs
hosted-langserveGitHub app to access the selected repositories. After installation is complete, return to the Create New Deployment panel and select the GitHub repository to deploy from the dropdown menu.The GitHub user installing LangChainâshosted-langserveGitHub app must be an owner of the organization or account. This authorization only needs to be completed once per LangSmith workspaceâsubsequent deployments can be created by any user with deployment permissions. - Specify a name for the deployment.
- Specify the desired Git Branch. A deployment is linked to a branch. When a new revision is created, code for the linked branch will be deployed. The branch can be updated later in the Deployment Settings.
- 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, specifylanggraph.json. - Use the checkbox to Automatically update deployment on push to branch. If checked, the deployment will automatically be updated when changes are pushed to the specified Git Branch. You can enable or disable this setting on the Deployment Settings in the UI.
For Deployment Type:
- Development deployments are meant for non-production use cases and are provisioned with minimal resources.
- Production deployments can serve up to 500 requests/second and are provisioned with highly available storage with automatic backups.
- Determine if the deployment should be Shareable through Studio.
- Specify Environment Variables and secrets. To configure additional variables for the deployment, refer to the Environment Variables reference.
- 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 project is automatically created with the same name as the deployment.
- Select Import from GitHub and follow the GitHub OAuth workflow to install and authorize LangChainâs
- In the top-right corner, select Submit. After a few seconds, the Deployment view 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. You can create subsequent revisions to deploy new code changes. Starting from the LangSmith UI, select Deployments in the left-hand navigation panel. Select an existing deployment to create a new revision for.- In the Deployment view, in the top-right corner, select + New Revision.
- In the New Revision modal, fill out the required fields.
- Specify the full path to the API config file including the file name. For example, if the file
langgraph.jsonis in the root of the repository, specifylanggraph.json. - Determine if the deployment should be Shareable through Studio.
- Specify Environment Variables and secrets. Existing secrets and environment variables are prepopulated. To configure additional variables for the revision, refer to the Environment Variables reference.
- 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 API config file including the file name. For example, if the file
- Select Submit`. After a few seconds, the New Revision modal will close and the new revision will be queued for deployment.
View build and server logs
Build and server logs are available for each revision. Starting from the Deployments view:- Select the desired revision from the Revisions table. A panel slides open from the right-hand side and the Build tab is selected by default, which displays build logs for the revision.
- In the panel, select the Server tab to view server logs for the revision. Server logs are only available after a revision has been deployed.
- Within the Server tab, adjust the date/time range picker as needed. By default, the date/time range picker is set to the Last 7 days.
View deployment metrics
Starting from the LangSmith UI:- In the left-hand navigation panel, select Deployments.
- Select an existing deployment to monitor.
- Select the Monitoring tab to view the deployment metrics. Refer to a list of all available metrics.
- Within the Monitoring tab, use the date/time range picker as needed. By default, the date/time range picker is set to the Last 15 minutes.
Interrupt revision
Interrupting a revision will stop deployment of the revision. Starting from the Deployments view:- Select the menu icon (three dots) on the right-hand side of the row for the desired revision from the Revisions table.
- Select Interrupt from the menu.
- A modal will appear. Review the confirmation message. Select Interrupt revision.
Delete deployment
Starting from the LangSmith UI:- In the left-hand navigation panel, select Deployments, which contains a list of existing deployments.
- Select the menu icon (three dots) on the right-hand side of the row for the desired deployment and select Delete.
- A Confirmation modal will appear. Select Delete.
Deployment settings
Starting from the Deployments view:- In the top-right corner, select the gear icon (Deployment Settings).
- Update the
Git Branchto the desired branch. - Check/uncheck checkbox to Automatically update deployment on push to branch.
- Branch creation/deletion and tag creation/deletion events will not trigger an update. Only pushes to an existing branch will trigger an update.
- Pushes in quick succession to a branch will queue subsequent updates. Once a build completes, the most recent commit will begin building and the other queued builds will be skipped.
Add or remove GitHub repositories
After installing and authorizing LangChainâshosted-langserve GitHub app, repository access for the app can be modified to add new repositories or remove existing repositories. If a new repository is created, it may need to be added explicitly.
- From the GitHub profile, navigate to Settings > Applications >
hosted-langserve> click Configure. - Under Repository access, select All repositories or Only select repositories. If Only select repositories is selected, new repositories must be explicitly added.
- Click Save.
- When creating a new deployment, the list of GitHub repositories in the dropdown menu will be updated to reflect the repository access changes.
Allowlist IP addresses
All traffic from LangSmith deployments created after January 6th 2025 will come through a NAT gateway. This NAT gateway will have several static ip addresses depending on the region you are deploying in. Refer to the table below for the list of IP addresses to allowlist:| US | EU |
|---|---|
| 35.197.29.146 | 34.90.213.236 |
| 34.145.102.123 | 34.13.244.114 |
| 34.169.45.153 | 34.32.180.189 |
| 34.82.222.17 | 34.34.69.108 |
| 35.227.171.135 | 34.32.145.240 |
| 34.169.88.30 | 34.90.157.44 |
| 34.19.93.202 | 34.141.242.180 |
| 34.19.34.50 | 34.32.141.108 |
| 34.59.244.194 | |
| 34.9.99.224 | |
| 34.68.27.146 | |
| 34.41.178.137 | |
| 34.123.151.210 | |
| 34.135.61.140 | |
| 34.121.166.52 | |
| 34.31.121.70 |