Skip to main content

Module eviction

Module eviction 

Source
Expand description

Memory eviction subsystem.

Provides a trait-based eviction policy framework with an Ebbinghaus forgetting curve implementation. The background sweep loop runs periodically, scoring entries and soft-deleting the lowest-scoring ones from SQLite before removing their Qdrant vectors in a second phase.

Two-phase design ensures crash safety: soft-deleted SQLite rows are invisible to the application immediately, and Qdrant cleanup is retried on the next sweep if the agent crashes between phases.

Structs§

EbbinghausPolicy
Ebbinghaus forgetting curve eviction policy.
EvictionConfig
Configuration for the eviction subsystem.
EvictionEntry
An entry passed to EvictionPolicy::score.

Traits§

EvictionPolicy
Trait for eviction scoring strategies.

Functions§

start_eviction_loop
Start the background eviction loop.