Skip to content

Build and run agents you can see, understand and trust.

fix(agent): remove duplicated message saved to long-term memory (#1171)

Osier-Yi9e8558b39ab9
diff --git a/src/agentscope/agent/_react_agent.py b/src/agentscope/agent/_react_agent.py
index a0797da2d..29bffbdef 100644
--- a/src/agentscope/agent/_react_agent.py
+++ b/src/agentscope/agent/_react_agent.py
@@ -528,11 +528,9 @@ class ReActAgent(ReActAgentBase):
if self._static_control:
await self.long_term_memory.record(
[
- *([*msg] if isinstance(msg, list) else [msg]),
*await self.memory.get_memory(
exclude_mark=_MemoryMark.COMPRESSED,
),
- reply_msg,
],
)