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
§NOT Responsible For
- Cross-agent shared memory (see runtime.rs coordinator)
- Persistence to disk or external store
Structs§
- AgentId
- Stable identifier for an agent instance.
- Decay
Policy - Governs how memory importance decays over time.
- Episodic
Store - Stores episodic (event-based) memories for agents, ordered by insertion time.
- Memory
Id - Stable identifier for a memory item.
- 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§
- Recall
Policy - Controls how memories are scored and ranked during recall.