Data and state

In this sectionWhere your agent state lives: threads, memory and shared server state, on Postgres and Redis by default.

  • 8 pages
  • About 64 min to read all

This section covers where 10xGraph keeps agent state: checkpoints for threads, long-term memory, shared server state and the databases behind them. Use Postgres and Redis by default, SQLite for local work, and any database through BaseCheckpointer, BaseStore and BaseCacheStore.

Reference: BaseCheckpointer · Source: base_checkpointer.py

Reference: BaseStore · Source: base_store.py

Reference: BaseCacheStore · Source: base.py

  • Set up checkpointing: Choose and configure a checkpointer for state persistence, from development to production.
  • Durability and concurrency: Thread isolation, state history, optimistic concurrency, and idempotent tool calls.
  • Memory store: Use PgVectorStore and QdrantStore for long-term memory and enable agent-level memory with MemoryConfig.
  • PgVectorStore: Keep long-term memory and RAG in the same Postgres as your checkpointer.
  • Cache store: What the API server keeps in its cache store, which backend to use, and how each feature behaves when the store fails.
  • Postgres and Redis: Set up PgCheckpointer for durable, resumable agent threads, with schema, pooling and operations.
  • Bring your own database: The storage classes behind a 10xGraph server and how to plug in a custom one.
  • Backup and restore: What 10xGraph persists and how to back up, restore or roll back a running deployment safely.

All pages in Data and state

Threads and state

  1. Set up checkpointingChoose and configure a checkpointer for state persistence: InMemoryCheckpointer for development, SqliteCheckpointer for client agents, or PgCheckpointer for production.11 min
  2. Durability and concurrencyEnsure reliable execution: thread isolation, state history, optimistic concurrency, and idempotent tool calls.7 min

Long-term memory

  1. How to use the memory storeGuide to using PgVectorStore and QdrantStore for long-term memory, factory helpers, and enabling agent-level memory with MemoryConfig.12 min
  2. How to use PgVectorStoreKeep long-term memory and RAG in the same Postgres as your checkpointer with PgVectorStore: install, search strategies, settings, embedding fallback and table layout.7 min

Shared server state

  1. Cache storeWhat the API server keeps in its cache store, when to use memory, Redis or a custom backend, what processes share, and how each feature behaves when the store fails.2 min

Your databases

  1. Postgres and Redis checkpointingSet up PgCheckpointer for durable, resumable agent threads: Postgres as the source of truth, Redis as a cache, plus schema, pooling and operations.8 min
  2. Bring your own backendThe three storage classes behind a 10xGraph server, what each holds, how to plug in a custom one, the aping rules and the BaseCacheStore contract.9 min
  3. Backup and restoreWhat 10xGraph persists, how to back up the Postgres tables that hold threads and state, and how to restore or roll back a running deployment safely.8 min