orchestrata_ultimate.memory
Reference › orchestrata_ultimate › memory
Memory Engine — unified agent memory with dual-layer storage.
The memory package (SPEC-010) gives agents durable, searchable recall behind one class. Everything routes through memory_engine, whose MemoryEngine offers store, retrieve, search, summarize, update, delete and migrate. The curated narrative tells the design story.
Storage is in two layers. hot_store keeps working memory in Redis with a TTL and the embedding beside each entry. cold_store keeps long-term memory as Memory nodes in the knowledge graph and degrades to a no-op when the graph is unavailable. Writes go to the hot layer; migrate_to_cold moves a finished session to the graph; reads check the hot layer first and retrieve and summarize fall back to the cold one.
Two services support the engine: embedding (dependency-free word-frequency vectors and cosine ranking) and compressor (extractive summaries within a token budget), which is bounded by token_counter, a module used across the codebase. memory_context is the bridge to the pipelines: a registry that binds an engine to a thread id and provides best-effort recall and thread summaries for prompts. The entry point for the gateway is the engine itself. Start with memory_engine, then read the two stores.
Curated narrative
The hand-written story of this package: orchestrata_ultimate.memory.
8 modules, 1,754 lines of code.
Modules
| Module | Summary | LOC |
|---|---|---|
__init__ |
Memory Engine — unified agent memory with dual-layer storage. | 13 |
cold_store |
Graph cold storage for long-term memory. | 384 |
compressor |
Context compression for memory summarization. | 138 |
embedding |
Embedding service for semantic memory search. | 101 |
hot_store |
Redis hot storage for working memory. | 363 |
memory_context |
Run-scoped memory-context provider registry. | 306 |
memory_engine |
Memory Engine — unified agent memory abstraction. | 354 |
token_counter |
Token counting implementations. | 95 |