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: incorrect heartbeat type warning (#780)

cthomas53ce1bb415b0
diff --git a/letta/agent.py b/letta/agent.py
index ebcc118c9..4fa9f761e 100644
--- a/letta/agent.py
+++ b/letta/agent.py
@@ -466,7 +466,10 @@ class Agent(BaseAgent):
if isinstance(heartbeat_request, str) and heartbeat_request.lower().strip() == "true":
heartbeat_request = True
- if not isinstance(heartbeat_request, bool) or heartbeat_request is None:
+ if heartbeat_request is None:
+ heartbeat_request = False
+
+ if not isinstance(heartbeat_request, bool):
self.logger.warning(
f"{CLI_WARNING_PREFIX}'request_heartbeat' arg parsed was not a bool or None, type={type(heartbeat_request)}, value={heartbeat_request}"
)