Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: remove dedup messages (#2204)
Kevin Lin5d87b1bc8c54
diff --git a/letta/offline_memory_agent.py b/letta/offline_memory_agent.pyindex b8f68ea7f..cceefb437 100644--- a/letta/offline_memory_agent.py+++ b/letta/offline_memory_agent.py@@ -150,11 +150,8 @@ class OfflineMemoryAgent(Agent):step_count = 0while counter < self.max_memory_rethinks:- # This is hacky but we need to do this for now- # TODO: REMOVE THIS- for m in next_input_message:- m.id = m._generate_id()-+ if counter > 0:+ next_input_message = []kwargs["ms"] = mskwargs["first_message"] = Falsestep_response = self.inner_step(diff --git a/tests/test_offline_memory_agent.py b/tests/test_offline_memory_agent.pyindex d642d159c..c3cbb71dc 100644--- a/tests/test_offline_memory_agent.py+++ b/tests/test_offline_memory_agent.py@@ -98,7 +98,7 @@ def test_ripple_edit(client, mock_e2b_api_key_none):assert conversation_agent.memory.get_block("rethink_memory_block").value != "[empty]"# Clean up agent- client.create_agent(conversation_agent.id)+ client.delete_agent(conversation_agent.id)client.delete_agent(offline_memory_agent.id)