跳到主要内容
您正在尝试使用内置的 LangGraph 持久化功能,但未提供检查点。 StateGraph@entrypointcompile() 方法中缺少 checkpointer 时,会发生这种情况。

故障排除

以下方法可能有助于解决此错误:
from langgraph.checkpoint.memory import InMemorySaver
checkpointer = InMemorySaver()

# Graph API
graph = StateGraph(...).compile(checkpointer=checkpointer)

# Functional API
@entrypoint(checkpointer=checkpointer)
def workflow(messages: list[str]) -> str:
    ...
  • 使用 LangGraph API,这样您就不需要手动实现或配置检查点。该 API 为您处理所有持久化基础设施。

以编程方式连接这些文档到 Claude、VSCode 等,通过 MCP 获取实时答案。
© . This site is unofficial and not affiliated with LangChain, Inc.