Storage
sxth-mind supports pluggable storage backends for persisting the belief state — the cognitive model it owns (UserMind, ProjectMind, Nudge).
Storage persists beliefs, not raw bytes. Raw conversation turns and events
live behind a separate
EvidenceSource that sxth-mind reads
but does not own — “own the beliefs, rent the bytes.” If you’re looking for where
message history is kept, that’s the evidence source, not storage.Available Backends
Memory (Default)
In-memory storage. Data is lost when the process exits. Good for development and testing.SQLite
Persistent storage using SQLite. Good for single-server deployments.user_minds— User-level belief stateproject_minds— Project-specific belief statenudges— Proactive suggestions
Custom Storage
Implement theBaseStorage interface for custom backends (Redis, PostgreSQL, MongoDB, etc.):
There are no memory/message methods on
BaseStorage — raw history is the
EvidenceSource’s job, not storage’s.Storage Lifecycle
When using the HTTP API, storage is initialized and closed automatically via FastAPI’s lifespan:Data Model
All storage backends persist these entities:
Raw message/event history is not a storage entity — it lives behind the
EvidenceSource.
Data is serialized as JSON using Pydantic’s model_dump_json() and deserialized with model_validate_json().
