Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 29 additions & 24 deletions src/langsmith/deploy-to-cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,34 @@ Before setting up, review the [Cloud overview page](/langsmith/cloud) to underst
1. LangSmith applications are deployed from GitHub repositories. Configure and upload a LangSmith application to a GitHub repository in order to deploy it to LangSmith.
2. [Verify that the LangGraph API runs locally](/langsmith/local-server). If the API does not run successfully (i.e. `langgraph dev`), deploying to LangSmith will fail as well.

<Note>
**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.
</Note>

## Create new deployment

Starting from the <a href="https://smith.langchain.com/" target="_blank">LangSmith UI</a>:

1. In the left-hand navigation panel, select **Deployments**, which contains a list of existing deployments.
2. In the top-right corner, select **+ New Deployment** to create a new deployment.
3. In the `Create New Deployment` panel, fill out the required fields.
1. `Deployment details`
1. Select `Import from GitHub` and follow the GitHub OAuth workflow to install and authorize LangChain's `hosted-langserve` GitHub 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. **Note**: The GitHub user installing LangChain's `hosted-langserve` GitHub app must be an [owner](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#organization-owners) of the organization or account.
2. Specify a name for the deployment.
3. 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](#deployment-settings).
4. Specify the full path to the [LangGraph API config file](/langsmith/cli#configuration-file) including the file name. For example, if the file `langgraph.json` is in the root of the repository, simply specify `langgraph.json`.
5. Check/uncheck 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`. This setting can be enabled/disabled later in the [Deployment Settings](#deployment-settings).
2. Select the desired `Deployment Type`.
1. `Development` deployments are meant for non-production use cases and are provisioned with minimal resources.
2. `Production` deployments can serve up to 500 requests/second and are provisioned with highly available storage with automatic backups.
3. Determine if the deployment should be `Shareable through Studio`.
1. If unchecked, the deployment will only be accessible with a valid LangSmith API key for the workspace.
2. If checked, the deployment will be accessible through Studio to any LangSmith user. A direct URL to Studio for the deployment will be provided to share with other LangSmith users.
4. Specify `Environment Variables` and secrets. See the [Environment Variables reference](/langsmith/env-var) to configure additional variables for the deployment.
1. Sensitive values such as API keys (e.g. `OPENAI_API_KEY`) should be specified as secrets.
2. Additional non-secret environment variables can be specified as well.
5. A new LangSmith `Tracing Project` is automatically created with the same name as the deployment.
1. `Deployment details`
1. Select `Import from GitHub` and follow the GitHub OAuth workflow to install and authorize LangChain's `hosted-langserve` GitHub 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.
<Note> The GitHub user installing LangChain's `hosted-langserve` GitHub app must be an [owner](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#organization-owners) 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.</Note>
2. Specify a name for the deployment.
3. 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](#deployment-settings).
4. Specify the full path to the [LangGraph API config file](/langsmith/cli#configuration-file) including the file name. For example, if the file `langgraph.json` is in the root of the repository, simply specify `langgraph.json`.
5. 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`. This setting can be enabled/disabled later in the [Deployment Settings](#deployment-settings).
2. Select the desired `Deployment Type`.
1. `Development` deployments are meant for non-production use cases and are provisioned with minimal resources.
2. `Production` deployments can serve up to 500 requests/second and are provisioned with highly available storage with automatic backups.
3. Determine if the deployment should be `Shareable through Studio`.
1. If unchecked, the deployment will only be accessible with a valid LangSmith API key for the workspace.
2. If checked, the deployment will be accessible through Studio to any LangSmith user. A direct URL to Studio for the deployment will be provided to share with other LangSmith users.
4. Specify `Environment Variables` and secrets. See the [Environment Variables reference](/langsmith/env-var) to configure additional variables for the deployment.
1. Sensitive values such as API keys (e.g. `OPENAI_API_KEY`) should be specified as secrets.
2. Additional non-secret environment variables can be specified as well.
5. A new LangSmith `Tracing Project` is automatically created with the same name as the deployment.
4. 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
Expand All @@ -54,14 +59,14 @@ Starting from the <a href="https://smith.langchain.com/" target="_blank">LangSmi
2. Select an existing deployment to create a new revision for.
3. In the `Deployment` view, in the top-right corner, select `+ New Revision`.
4. In the `New Revision` modal, fill out the required fields.
1. Specify the full path to the [LangGraph API config file](/langsmith/cli#configuration-file) including the file name. For example, if the file `langgraph.json` is in the root of the repository, simply specify `langgraph.json`.
2. Determine if the deployment should be `Shareable through Studio`.
1. If unchecked, the deployment will only be accessible with a valid LangSmith API key for the workspace.
2. If checked, the deployment will be accessible through Studio to any LangSmith user. A direct URL to Studio for the deployment will be provided to share with other LangSmith users.
3. Specify `Environment Variables` and secrets. Existing secrets and environment variables are prepopulated. See the [Environment Variables reference](/langsmith/env-var) to configure additional variables for the revision.
1. Add new secrets or environment variables.
2. Remove existing secrets or environment variables.
3. Update the value of existing secrets or environment variables.
1. Specify the full path to the [LangGraph API config file](/langsmith/cli#configuration-file) including the file name. For example, if the file `langgraph.json` is in the root of the repository, simply specify `langgraph.json`.
2. Determine if the deployment should be `Shareable through Studio`.
1. If unchecked, the deployment will only be accessible with a valid LangSmith API key for the workspace.
2. If checked, the deployment will be accessible through Studio to any LangSmith user. A direct URL to Studio for the deployment will be provided to share with other LangSmith users.
3. Specify `Environment Variables` and secrets. Existing secrets and environment variables are prepopulated. See the [Environment Variables reference](/langsmith/env-var) to configure additional variables for the revision.
1. Add new secrets or environment variables.
2. Remove existing secrets or environment variables.
3. Update the value of existing secrets or environment variables.
5. 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
Expand Down