mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-20 04:44:46 +08:00
Support langgraph checkpointer (#1005)
* Add checkpointer configuration to config.example.yaml - Introduced a new section for checkpointer configuration to enable state persistence for the embedded DeerFlowClient. - Documented supported types: memory, sqlite, and postgres, along with examples for each. - Clarified that the LangGraph Server manages its own state persistence separately. * refactor(checkpointer): streamline checkpointer initialization and logging * fix(uv.lock): update revision and add new wheel URLs for brotlicffi package * feat: add langchain-anthropic dependency and update related configurations * Fix checkpointer lifecycle, docstring, and path resolution bugs from PR #1005 review (#4) * Initial plan * Address all review suggestions from PR #1005 Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> * Fix resolve_path to always return real Path; move SQLite special-string handling to callers Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: foreleven <4785594+foreleven@users.noreply.github.com>
This commit is contained in:
@@ -344,3 +344,37 @@ memory:
|
||||
fact_confidence_threshold: 0.7 # Minimum confidence for storing facts
|
||||
injection_enabled: true # Whether to inject memory into system prompt
|
||||
max_injection_tokens: 2000 # Maximum tokens for memory injection
|
||||
|
||||
|
||||
# ============================================================================
|
||||
# Checkpointer Configuration
|
||||
# ============================================================================
|
||||
# Configure state persistence for the embedded DeerFlowClient.
|
||||
# The LangGraph Server manages its own state persistence separately
|
||||
# via the server infrastructure (this setting does not affect it).
|
||||
#
|
||||
# When configured, DeerFlowClient will automatically use this checkpointer,
|
||||
# enabling multi-turn conversations to persist across process restarts.
|
||||
#
|
||||
# Supported types:
|
||||
# memory - In-process only. State is lost when the process exits. (default)
|
||||
# sqlite - File-based SQLite persistence. Survives restarts.
|
||||
# Requires: uv add langgraph-checkpoint-sqlite
|
||||
# postgres - PostgreSQL persistence. Suitable for multi-process deployments.
|
||||
# Requires: uv add langgraph-checkpoint-postgres psycopg[binary] psycopg-pool
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# In-memory (default when omitted — no persistence):
|
||||
# checkpointer:
|
||||
# type: memory
|
||||
#
|
||||
# SQLite (file-based, single-process):
|
||||
# checkpointer:
|
||||
# type: sqlite
|
||||
# connection_string: checkpoints.db
|
||||
#
|
||||
# PostgreSQL (multi-process, production):
|
||||
# checkpointer:
|
||||
# type: postgres
|
||||
# connection_string: postgresql://user:password@localhost:5432/deerflow
|
||||
|
||||
Reference in New Issue
Block a user