Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: add null check to step logging LET-3890 (#4004)
cthomas2d4511fd2143
diff --git a/letta/agents/letta_agent.py b/letta/agents/letta_agent.pyindex 8c7255aa1..dd393eaf2 100644--- a/letta/agents/letta_agent.py+++ b/letta/agents/letta_agent.py@@ -431,7 +431,7 @@ class LettaAgent(BaseAgent):if step_progression <= StepProgression.RESPONSE_RECEIVED:# TODO (cliandy): persist response if we get it back- if settings.track_errored_messages:+ if settings.track_errored_messages and initial_messages:for message in initial_messages:message.is_err = Truemessage.step_id = effective_step_id@@ -714,7 +714,7 @@ class LettaAgent(BaseAgent):if step_progression <= StepProgression.RESPONSE_RECEIVED:# TODO (cliandy): persist response if we get it back- if settings.track_errored_messages:+ if settings.track_errored_messages and initial_messages:for message in initial_messages:message.is_err = Truemessage.step_id = effective_step_id@@ -1109,7 +1109,7 @@ class LettaAgent(BaseAgent):)if step_progression <= StepProgression.STREAM_RECEIVED:- if first_chunk and settings.track_errored_messages:+ if first_chunk and settings.track_errored_messages and initial_messages:for message in initial_messages:message.is_err = Truemessage.step_id = effective_step_id