CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.
Python agent-frameworkagent-harnessagent-runtimeagentic-aiai-agentsai-frameworkanthropicharnessharness-engineeringharness-frameworklanggraphlanggraph-alternativellmmcpopenaipi-agentpi-agent-corepythonpython-agent
---
id: cubepi-checkpointer
title: cubepi.checkpointer
sidebar_position: 3
hide_table_of_contents: false
---
# `cubepi.checkpointer`
### Checkpointer
_class_
[source](https://github.com/cubeplexai/cubepi/blob/main/cubepi/checkpointer/base.py#L13)
### CheckpointData
_class_
```python
CheckpointData(self, messages: list[Any] = list(), extra: dict[str, Any] = dict())
```
[source](https://github.com/cubeplexai/cubepi/blob/main/cubepi/checkpointer/base.py#L7)
### MemoryCheckpointer
_class_
```python
MemoryCheckpointer(self)
```
[source](https://github.com/cubeplexai/cubepi/blob/main/cubepi/checkpointer/memory.py#L8)
### PostgresCheckpointer
_class_
```python
PostgresCheckpointer(self, dsn: str, *, min_pool_size: int = 1, max_pool_size: int = 10)
```
Checkpointer backed by PostgreSQL.
**Usage**
```python
cp = PostgresCheckpointer(dsn="postgresql://...")
async with cp:
await cp.append(thread_id, [msg1, msg2])
data = await cp.load(thread_id)
await cp.save_extra(thread_id, {"k": "v"})
```
Raises CubepiSchemaUninitialized / CubepiSchemaMismatch at __aenter__
if the DB schema isn't compatible with this cubepi version.
[source](https://github.com/cubeplexai/cubepi/blob/main/cubepi/checkpointer/postgres/checkpointer.py#L46)
### SQLiteCheckpointer
_class_
```python
SQLiteCheckpointer(self, db_path: str)
```
[source](https://github.com/cubeplexai/cubepi/blob/main/cubepi/checkpointer/sqlite.py#L12)
<!-- GENERATED by build-api-reference.py — DO NOT EDIT -->