这是用户在 2025-8-7 15:14 为 https://docs.langchain.com/langgraph-platform/langgraph-server 保存的双语快照页面,由 沉浸式翻译 提供双语支持。了解如何保存?
LangGraph Server offers an API for creating and managing agent-based applications. It is built on the concept of assistants, which are agents configured for specific tasks, and includes built-in persistence and a task queue. This versatile API supports a wide range of agentic application use cases, from background processing to real-time interactions.
LangGraph Server 提供了一个用于创建和管理基于代理的应用程序的 API。它基于助手的概念构建,助手是为特定任务配置的代理,并包含内置的持久化和任务队列。这个多功能 API 支持广泛的基于代理的应用程序用例,从后台处理到实时交互。
Use LangGraph Server to create and manage assistants, threads, runs, cron jobs, webhooks, and more.
使用 LangGraph Server 创建和管理助手、线程、运行、cron 作业、Webhook 等。
API reference For detailed information on the API endpoints and data models, see LangGraph Platform API reference docs.
API 参考 有关 API 端点和数据模型的详细信息,请参阅 LangGraph 平台 API 参考文档。
To use the Enterprise version of the LangGraph Server, you must acquire a license key that you will need to specify when running the Docker image. To acquire a license key, please email sales@langchain.dev.
要使用 Enterprise 版本的 LangGraph Server,您必须获取一个许可证密钥,您需要在运行 Docker 镜像时指定该密钥。要获取许可证密钥,请发送邮件至 sales@langchain.dev。
You can run the Enterprise version of the LangGraph Server on the following deployment options:
您可以在以下部署选项上运行 Enterprise 版本的 LangGraph Server:
  • Cloud  
  • Hybrid  混合
  • Self-hosted  自托管

Application structure  应用结构

To deploy a LangGraph Server application, you need to specify the graph(s) you want to deploy, as well as any relevant configuration settings, such as dependencies and environment variables.
要部署 LangGraph Server 应用程序,您需要指定要部署的图以及任何相关的配置设置,例如依赖项和环境变量。
Read the application structure guide to learn how to structure your LangGraph application for deployment.
阅读应用程序结构指南,了解如何为部署构建您的 LangGraph 应用程序。

Parts of a deployment  部署的组成部分

When you deploy LangGraph Server, you are deploying one or more graphs, a database for persistence, and a task queue.
当你部署 LangGraph Server 时,你正在部署一个或多个图、用于持久化的数据库以及一个任务队列。

Graphs  

When you deploy a graph with LangGraph Server, you are deploying a “blueprint” for an Assistant.
当你使用 LangGraph Server 部署一个图时,你正在部署一个助手的“蓝图”。
An Assistant is a graph paired with specific configuration settings. You can create multiple assistants per graph, each with unique settings to accommodate different use cases that can be served by the same graph.
助手是一个与特定配置设置配对的图。您可以为每个图创建多个助手,每个助手都有独特的设置,以适应可以通过同一图提供的不同用例。
Upon deployment, LangGraph Server will automatically create a default assistant for each graph using the graph’s default configuration settings.
在部署时,LangGraph Server 将使用图的默认配置设置自动为每个图创建一个默认助手。
We often think of a graph as implementing an agent, but a graph does not necessarily need to implement an agent. For example, a graph could implement a simple chatbot that only supports back-and-forth conversation, without the ability to influence any application control flow.
我们通常认为图是在实现一个代理,但图不一定需要实现代理。例如,图可以实现一个仅支持来回对话的简单聊天机器人,而无法影响任何应用程序的控制流程。

In reality, as applications get more complex, a graph will often implement a more complex flow that may use multiple agents working in tandem.
实际上,随着应用程序变得更加复杂,图通常会实现一个更复杂的流程,该流程可能使用多个协同工作的代理。

Persistence and task queue
持久化和任务队列

LangGraph Server leverages a database for persistence and a task queue.
LangGraph Server 利用数据库进行持久化存储,并使用任务队列。
Currently, only Postgres is supported as a database for LangGraph Server and Redis as the task queue.
目前,LangGraph Server 仅支持 Postgres 作为数据库,以及 Redis 作为任务队列。
If you’re deploying using LangGraph Platform, these components are managed for you. If you’re deploying LangGraph Server on your own infrastructure, you’ll need to set up and manage these components yourself.
如果你使用 LangGraph Platform 进行部署,这些组件将由平台管理。如果你在自己的基础设施上部署 LangGraph Server,你需要自行设置和管理这些组件。
Please review the deployment options guide for more information on how these components are set up and managed.
请查阅部署选项指南,以获取更多关于这些组件如何设置和管理的详细信息。

Learn more  了解更多

  • LangGraph Application Structure guide explains how to structure your LangGraph application for deployment.
    LangGraph 应用结构指南解释了如何为部署构建您的 LangGraph 应用。
  • The LangGraph Platform API Reference provides detailed information on the API endpoints and data models.
    LangGraph 平台 API 参考 提供了关于 API 端点和数据模型的详细信息。