Expand description
§Module: Memory
§Responsibility
Provides episodic, semantic, and working memory stores for agents.
Mirrors the public API of tokio-agent-memory and tokio-memory.
§Guarantees
- Thread-safe: all stores wrap their state in
Arc<Mutex<_>> - Bounded: WorkingMemory evicts the oldest entry when capacity is exceeded
- Decaying: DecayPolicy reduces importance scores over time
- Non-panicking: all operations return
Result - Lock-poisoning resilient: a panicking thread does not permanently break a store
- O(1) agent lookup: EpisodicStore indexes items per-agent for efficient recall
§NOT Responsible For
- Cross-agent shared memory (see runtime.rs coordinator)
- Persistence to disk or external store
Re-exports§
Structs§
- Decay
Policy - Governs how memory importance decays over time.
- Episodic
Store - Stores episodic (event-based) memories for agents, ordered by insertion time.
- Episodic
Store Builder - Fluent builder for
EpisodicStore. - Memory
Item - A single memory record stored for an agent.
- Semantic
Store - Stores semantic (fact-based) knowledge as tagged key-value pairs.
- Working
Memory - A bounded, key-value working memory for transient agent state.
Enums§
- Eviction
Policy - Policy controlling which item is evicted when the per-agent capacity is exceeded.
- Recall
Policy - Controls how memories are scored and ranked during recall.