1"""

2 AgentOS Checkpointer — 对话与工作流持久化引擎。

3

4 参考 LangGraph PostgresSaver 设计，实现:

5 - 故障恢复：Agent 崩溃后从最近 checkpoint 恢复

6 - 时间旅行：回退到任意历史状态，重放/分支

7 - 多后端：Postgres / SQLite / File

8 - 自动快照：每次 tool_call / llm_call 后自动保存

9

10 用法:

11 from agentos.checkpoint import create_checkpointer

12

13 cp = create_checkpointer("sqlite", db_path="checkpoints.db")

14 await cp.put(checkpoint) # 保存状态

15 state = await cp.get(id) # 恢复状态

16"""

17

18 from agentos.checkpoint.base import (

19 Checkpoint,

20 CheckpointMetadata,

21 CheckpointBackend,

22)

23 from agentos.checkpoint.sqlite import SQLiteCheckpointer

24 from agentos.checkpoint.postgres import PostgresCheckpointer

25 from agentos.checkpoint.factory import create_checkpointer

26

27__all__ = [

28 "Checkpoint",

29 "CheckpointMetadata",

30 "CheckpointBackend",

31 "SQLiteCheckpointer",

32 "PostgresCheckpointer",

33 "create_checkpointer",

34]