Skip to main content

Module storage

Module storage 

Source
Expand description

Storage abstraction layer for Recursive.

Defines the traits that decouple the agent kernel from specific storage backends (local filesystem, Redis, S3, etc.).

§Design

Two orthogonal traits cover all persistent data needs:

  • StorageBackend: long-lived data — transcript and memory entries. Implementations include local::LocalStorageBackend (files) and, in cloud deployments, S3 or Postgres.

  • SessionStore: short-lived hot state used for crash recovery. The local implementation NoopSessionStore is a zero-cost no-op. Cloud implementations write to Redis with a TTL.

The kernel accepts these traits via dependency injection, so the same code runs in both local and multi-tenant cloud modes.

Re-exports§

pub use local::LocalStorageBackend;

Modules§

local
Local filesystem implementation of StorageBackend.

Structs§

AgentCheckpointState
Opaque snapshot of in-flight agent state for crash recovery / pod migration.
NoopSessionStore
In-memory no-op SessionStore.

Traits§

SessionStore
Hot-state store for in-flight Agent Loop checkpoints.
StorageBackend
Persistent storage for session transcript and memory entries.