Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: last tool call never streams (#2640)
cthomas435a6a60a3ae
diff --git a/letta/agents/letta_agent.py b/letta/agents/letta_agent.pyindex 547e349f5..836f7af65 100644--- a/letta/agents/letta_agent.py+++ b/letta/agents/letta_agent.py@@ -556,8 +556,8 @@ class LettaAgent(BaseAgent):),)- if not use_assistant_message or should_continue:- tool_return = [msg for msg in persisted_messages if msg.role == "tool"][-1].to_letta_messages()[0]+ tool_return = [msg for msg in persisted_messages if msg.role == "tool"][-1].to_letta_messages()[0]+ if not (use_assistant_message and tool_return.name == "send_message"):yield f"data: {tool_return.model_dump_json()}\n\n"if not should_continue: