您正在尝试使用内置的 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 为您处理所有持久化基础架构。

相关


Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.