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: Require experimental flag temporarily to use experimental agent loop (#1636)

Matthew Zhou3a5ea9ba1421
diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.py
index 78ba2f949..fa6012817 100644
--- a/letta/server/rest_api/routers/v1/agents.py
+++ b/letta/server/rest_api/routers/v1/agents.py
@@ -31,6 +31,7 @@ from letta.schemas.user import User
from letta.serialize_schemas.pydantic_agent_schema import AgentSchema
from letta.server.rest_api.utils import get_letta_server
from letta.server.server import SyncServer
+from letta.settings import settings
# These can be forward refs, but because Fastapi needs them at runtime the must be imported normally
@@ -598,6 +599,7 @@ async def send_message(
and not agent.enable_sleeptime
and not agent.multi_agent_group
and not agent.agent_type == AgentType.sleeptime_agent
+ and settings.use_experimental
):
experimental_agent = LettaAgent(
agent_id=agent_id,
@@ -659,6 +661,7 @@ async def send_message_streaming(
and not agent.enable_sleeptime
and not agent.multi_agent_group
and not agent.agent_type == AgentType.sleeptime_agent
+ and settings.use_experimental
):
experimental_agent = LettaAgent(
agent_id=agent_id,