当你准备将 LangChain 智能体部署到生产环境时,LangSmith 提供了一个专为智能体工作负载设计的托管平台。传统的托管平台是为无状态、短生命周期的 Web 应用构建的,而 LangGraph 是专为有状态、长时间运行的智能体构建的,它们需要持久化状态和后台执行。LangSmith 处理基础设施、扩展和运维问题,让你可以直接从代码仓库进行部署。Documentation Index
Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
前提条件
在开始之前,请确保你具备以下条件:- 一个 GitHub 账号
- 一个 LangSmith 账号(免费注册)
部署你的智能体
1. 在 GitHub 上创建代码仓库
你的应用代码必须存放在 GitHub 代码仓库中才能在 LangSmith 上部署。公开和私有仓库均受支持。对于本快速入门,首先按照本地服务器设置指南确保你的应用与 LangGraph 兼容。然后,将代码推送到仓库。2. Deploy to LangSmith
Navigate to LangSmith Deployment
Log in to LangSmith. In the left sidebar, select Deployments.
Create new deployment
Click the + New Deployment button. A pane will open where you can fill in the required fields.
Link repository
If you are a first time user or adding a private repository that has not been previously connected, click the Add new account button and follow the instructions to connect your GitHub account.
3. Test your application in Studio
Once your application is deployed:- Select the deployment you just created to view more details.
- Click the Studio button in the top right corner. Studio will open to display your graph.
4. Get the API URL for your deployment
- In the Deployment details view in LangGraph, click the API URL to copy it to your clipboard.
- Click the
URLto copy it to the clipboard.
5. Test the API
You can now test the API:- Python
- Rest API
- Install LangGraph Python:
- Send a message to the agent:
将这些文档连接到 Claude、VSCode 等工具,通过 MCP 获取实时回答。

