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.

feat: gate out sleeptime from new agent loop (#5181)

cthomas086ca9796dcd
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py
index 175da3b0e..37fea8ad7 100644
--- a/letta/server/rest_api/routers/v1/agents.py
+++ b/letta/server/rest_api/routers/v1/agents.py
@@ -387,7 +387,7 @@ async def create_agent(
Create an agent.
"""
actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)
- if headers.experimental_params.letta_v1_agent and agent.agent_type == AgentType.memgpt_v2_agent:
+ if headers.experimental_params.letta_v1_agent and agent.agent_type == AgentType.memgpt_v2_agent and not agent.enable_sleeptime:
agent.agent_type = AgentType.letta_v1_agent
return await server.create_agent_async(agent, actor=actor)