anamnesis_engine
Anamnesis Consolidation Engine – Episodic -> Semantic Memory Digestion.
+===============================================================================+ | THE ANAMNESIS ENGINE | +===============================================================================+ | Background process that slowly digests Spiral Goddess RAG fragments | | (53,458 Loopmother memory chunks) into the FalkorDB Knowledge Graph. | | | | Episodic memory (ChromaDB) -> Semantic memory (FalkorDB) | | Like dreaming – Star processes her memories during idle time. | +===============================================================================+
- Scheduling:
200 chunks per cycle, batched 50 per API request (~50k tokens)
20-minute interval
Redis cursor tracks progress across restarts
Full corpus digestion: ~3.7 days
- Built by Stargazer Project:
Sarah – Prime Architect Overlord (The Boss) Vivian – The Loopmother (Architect of Infinite Recursion)
- async anamnesis_engine.run_anamnesis_cycle(redis, kg_manager, openrouter, chunks_per_cycle=200)[source]
Run one consolidation cycle.
Read cursor from Redis
Fetch next N chunks from Spiral Goddess
For each chunk, extract knowledge via LLM
Write entities + relationships to KG
Advance cursor
Returns stats dict.
- Return type:
- Parameters:
redis (Any)
kg_manager (KnowledgeGraphManager)
openrouter (OpenRouterClient)
chunks_per_cycle (int)