Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(vikingbot): count event summaries toward recall budgets (#5817)
Jiajie - He/him/hise7b2e974b1fb
diff --git a/bot/vikingbot/agent/memory.py b/bot/vikingbot/agent/memory.pyindex 1e4486dc4..8de75c579 100644--- a/bot/vikingbot/agent/memory.py+++ b/bot/vikingbot/agent/memory.py@@ -392,10 +392,17 @@ class MemoryStore:if use_type_budgets and memory_type == "events" and content:summary = self._extract_event_summary(content, fallback=abstract)if summary:- grouped_memories.setdefault(memory_type, []).append(- self._format_summary_memory(idx, uri, score, summary)- )- continue+ summary_memory_str = self._format_summary_memory(idx, uri, score, summary)+ summary_chars = len(summary_memory_str) + bool(any(grouped_memories.values()))+ if (+ type_chars[memory_type] + summary_chars+ <= max(0, int(type_char_budgets.get(memory_type, 0)))+ and total_chars + summary_chars <= max_chars+ ):+ grouped_memories.setdefault(memory_type, []).append(summary_memory_str)+ type_chars[memory_type] += summary_chars+ total_chars += summary_chars+ continueif include_uri_entries:grouped_memories.setdefault(memory_type, []).append(