You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: add Generate Protobuf step to pipeline before lint/test (ceec947)
chore: untrack generated protobuf files and add to .gitignore (621a9ba)
Revert: remove EMA confidence formula and in-process Pregel scheduler from PR #7 (5f1ea83)
fix: preserve context_history on LTM edges and use momentum-weighted confidence so evolving facts do not silently overwrite established knowledge in the graph (309642d)
feat: schedule Pregel community detection every 6 hours so bridge entities are identified automatically, enabling FetchContext to surface the most cross-cutting LTM nodes first (889df3f)
fix: fetch all STM events before flush so IndexCognitiveEvents receives the full event set and older interactions are not invisible to Milvus semantic search (008df02)
docs: pivot Analyst integration to Federated Architecture (9b47b80)
docs: add Section 10 — DocIntel agent integration with Athena Memory OS (8e590f4)
Wire LTMReader into SearchMemory so ArangoDB graph nodes are returned alongside MTM chain results (7546d61)
fix: skip STM coalescing for sequential workflow steps with different step_ids (bd46ad3)
fix: strip LLM markdown fences in entity extraction and skip chain-break for same execution (ba3af45)
ci: move GitHub mirror step from dev to main branch pipeline (4bae07c)
feat(queue): Implement multi-tenant Index Queue architecture 2 3 Refactors the task queueing system from a single global queue to a scalable, multi-tenant "queue of queues" pattern. This change addresses the "Noisy Neighbor" problem, ensuring that work from one agent cannot block or delay work from another. 4 5 Key changes: 6 - Producer (server.go): The API server now acts as the producer. It pushes new tasks to a private, scoped queue for each agent and then adds a pointer to that scoped queue onto a global work index. 7 - Consumer (worker.go): The background worker now acts as the consumer. It performs a two-step dequeue, first popping a scoped queue name from the global index, and then popping the actual task from that scoped queue. 8 - task_queue.go: This file has been simplified to a model/helper package, defining the queue structures but abstracting away the enqueue/dequeue logic. 9 10 Additionally, all relevant unit tests for the server, worker, and task queue have been updated to reflect this new architecture. This includes fixing mock implementations and rewriting test logic to validate the new two-step enqueue/dequeue process. (a4c725a)
Subject: feat(memory): Architect STM for Cognitive Chains & Hot/Cold PathWhat We ChangedThis commit introduces a fundamental, end-to-end architectural refactor of the Athena MemOs Short-Term Memory (STM) system. The system has been evolved from a simple "chat logger" into a high-performance, robust "cognitive logger."The key changes are:1. New Data Model (dialogue.go):Replaced the old $Q+R DialoguePage model with a new, granular CognitiveEvent struct. This new model includes Role ("user", "agent") and Type ("message", "thought", "action", "observation").2. Hot/Cold Path Architecture:Hot Path (stm_cache.go): Refactored to be a "fire-and-forget" service. Its only job is to LPUSH a new CognitiveEvent to a Redis list and return immediately, ensuring zero blocking on the main thread.Cold Path (worker.go): A new asynchronous worker pool now handles all processing.3. Smart Trigger (server.go / task_queue.go):Replaced the old "heavy" MemoryProcessingTask with a "lightweight" CognitiveChainCheckTask that only contains a UserID.Implemented the "Smart Trigger" optimization (from stm_review.md) in the API handler. The worker is now only called for user/message events, preventing queue flooding from high-frequency agent thoughts.4. Worker "Brain" Logic (worker.go):The worker now runs the "Cosine Gate" logic (fast-pass, fast-fail, LLM fallback) to detect chain breaks by reading directly from the STM cache.Implemented the "Save-Then-Trim" data-safety protocol (from stm_review.md). The worker now only LTrims the STM after the MTM save is successful, preventing data loss on persistence errors.5. Service Layer (stm_store.go):Refactored the stm_store into a "hands" service layer.Removed DetermineDialogueChain.Created ProcessMTMFormation to orchestrate the entire MTM save pipeline (summarize, embed, save to Mongo/Milvus).Updated CreateSegmentSummary to use the new rich prompt from stm_review.md, enabling it to understand [thought] and [action] events.6. Testing (new *_test.go files):Added a new server_test.go to validate the "Smart Trigger" logic.Added a new worker_test.go with negative test cases to validate the "Save-Then-Trim" error handling.Why We Changed ItThe previous architecture was insufficient for a true autonomous agent.It was a "Chat Logger": It could only store what was said ($Q+R$), not how the agent was thinking.It was Not Production-Ready: It was slow (blocking calls on the hot path), not scalable (no "Smart Trigger"), and not data-safe (no "save-then-trim" logic).This refactor evolves Athena MemOs from a "conversational" memory to a true "cognitive" memory, built on a robust, production-grade architecture.How It Improves STMFunctionality: The STM is now a "Cognitive Chain" logger. It captures the agent's full reasoning (thoughts, actions, observations), providing a vastly richer data source for MTM/LPM consolidation.Performance: The "Hot Path" is now blazingly fast and non-blocking, ensuring minimal latency for the agent's core cognitive loop.Scalability: The "Smart Trigger" prevents the worker queue from being flooded by high-frequency agent events, making the "Cold Path" efficient and cost-effective.Robustness (Data-Safe): The "Save-Then-Trim" logic guarantees data consistency. Memory is no longer lost if MTM persistence fails during processing.Efficiency: The "Cosine Gate" significantly reduces the number of expensive LLM calls required for chain analysis.BREAKING CHANGESThis commit changes the entire public-facing contract and internal data model of the memory system.Model Change: The models.DialoguePage struct is deleted. It is replaced by models.CognitiveEvent.Model Change: The models.MemoryProcessingTask struct is deleted. It is replaced by models.CognitiveChainCheckTask.API Change: The task_queue.EnqueueMemoryTask function is deleted. Callers must now call stmCache.AddSTMEvent (for the hot path) and task_queue.EnqueueCognitiveCheckTask (for the trigger).API Change: The stm_store.DetermineDialogueChain function is deleted. This logic now lives inside the worker.Data Change: The STMEvent struct in stm_cache has a new (7f4e3de)
activated all 90 personality dimension types (c6ceb0a)