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: fix parsing error in multiagent tool (#845)

Sarah Wooders070d7021975f
diff --git a/letta/functions/helpers.py b/letta/functions/helpers.py
index 9ebe9494e..bd2643c49 100644
--- a/letta/functions/helpers.py
+++ b/letta/functions/helpers.py
@@ -269,9 +269,11 @@ def parse_letta_response_for_assistant_message(
fallback_reasoning.append(m.reasoning)
if messages:
- return f"Agent {target_agent_id} said: '{"\n".join(messages)}'"
+ messages_str = "\n".join(messages)
+ return f"Agent {target_agent_id} said: '{messages_str}'"
else:
- return f"Agent {target_agent_id}'s inner thoughts: '{"\n".join(messages)}'"
+ messages_str = "\n".join(fallback_reasoning)
+ return f"Agent {target_agent_id}'s inner thoughts: '{messages_str}'"
def execute_send_message_to_agent(