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.

Break out of loop if agent.step succeeds

Vivian Fangbcb9f7f3c7e1
diff --git a/memgpt/main.py b/memgpt/main.py
index 57ea9e8bb..6f4adb252 100644
--- a/memgpt/main.py
+++ b/memgpt/main.py
@@ -533,6 +533,7 @@ async def run_agent_loop(memgpt_agent, first, no_verify=False, cfg=None, legacy=
elif heartbeat_request:
user_message = system.get_heartbeat(constants.REQ_HEARTBEAT_MESSAGE)
skip_next_user_input = True
+ break
except Exception as e:
print("An exception ocurred when running agent.step(): ")
traceback.print_exc()