Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(memory): trigger consolidation by unconsolidated count, not total
Re-binbc32e85c25f2
diff --git a/nanobot/agent/loop.py b/nanobot/agent/loop.pyindex b05ba90ba..0bd05a835 100644--- a/nanobot/agent/loop.py+++ b/nanobot/agent/loop.py@@ -352,7 +352,8 @@ class AgentLoop:return OutboundMessage(channel=msg.channel, chat_id=msg.chat_id,content="π nanobot commands:\n/new β Start a new conversation\n/help β Show available commands")- if len(session.messages) > self.memory_window and session.key not in self._consolidating:+ unconsolidated = len(session.messages) - session.last_consolidated+ if (unconsolidated >= self.memory_window and session.key not in self._consolidating):self._consolidating.add(session.key)lock = self._get_consolidation_lock(session.key)