Expand description
Persistence support for @persistent agent beliefs.
This module provides the runtime support for persistent agent state:
CheckpointStoretrait for storage backendsPersisted<T>wrapper for auto-checkpointing fieldsAgentCheckpointfor managing agent-level persistence
§Backends
The following backends are available via feature flags:
persistence-sqlite: SQLite database (recommended for local development)persistence-postgres: PostgreSQL (recommended for production)persistence-file: JSON files (useful for debugging)
Without any persistence feature, only MemoryCheckpointStore is available.
Structs§
- Memory
Checkpoint Store - In-memory checkpoint store for testing.
- Persisted
- A wrapper for @persistent fields that auto-checkpoints on modification.
Traits§
- Checkpoint
Store - A checkpoint store for persisting agent state.
Functions§
- agent_
checkpoint_ key - Helper to generate a unique checkpoint key for an agent instance.
- checkpoint_
all - Helper to save all @persistent fields atomically before yield.