Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix(core): remove "edit again if necessary" from memory tool return message (#9367)

Charles Packerf58c4a43fa39
diff --git a/letta/functions/function_sets/base.py b/letta/functions/function_sets/base.py
index 45cede978..35f580168 100644
--- a/letta/functions/function_sets/base.py
+++ b/letta/functions/function_sets/base.py
@@ -387,7 +387,7 @@ def memory_replace(agent_state: "AgentState", label: str, old_str: str, new_str:
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
# return None
@@ -458,7 +458,7 @@ def memory_insert(agent_state: "AgentState", label: str, new_str: str, insert_li
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
return success_msg
@@ -534,7 +534,7 @@ def memory_rethink(agent_state: "AgentState", label: str, new_memory: str) -> No
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
# return None
diff --git a/letta/services/tool_executor/core_tool_executor.py b/letta/services/tool_executor/core_tool_executor.py
index 043debbab..054791a9e 100644
--- a/letta/services/tool_executor/core_tool_executor.py
+++ b/letta/services/tool_executor/core_tool_executor.py
@@ -405,7 +405,7 @@ class LettaCoreToolExecutor(ToolExecutor):
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
# return None
@@ -548,8 +548,7 @@ class LettaCoreToolExecutor(ToolExecutor):
return (
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
- f"Review the changes and make sure they are as expected (correct indentation, no duplicate lines, etc). "
- f"Edit the memory block again if necessary."
+ f"Review the changes and make sure they are as expected (correct indentation, no duplicate lines, etc)."
)
# Extended mode: parse codex-like patch operations for memory blocks
@@ -759,7 +758,7 @@ class LettaCoreToolExecutor(ToolExecutor):
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
return success_msg
@@ -799,7 +798,7 @@ class LettaCoreToolExecutor(ToolExecutor):
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
# return None
@@ -973,7 +972,7 @@ class LettaCoreToolExecutor(ToolExecutor):
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
return success_msg
@@ -1040,7 +1039,7 @@ class LettaCoreToolExecutor(ToolExecutor):
f"The core memory block with label `{label}` has been successfully edited. "
f"Your system prompt has been recompiled with the updated memory contents and is now active in your context. "
f"Review the changes and make sure they are as expected (correct indentation, "
- f"no duplicate lines, etc). Edit the memory block again if necessary."
+ f"no duplicate lines, etc)."
)
return success_msg