Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: temp disable stream tokens (#2189)
Charles Packeref1635c0d6fc
diff --git a/.persist/.gitkeep b/.persist/.gitkeepdeleted file mode 100644index e69de29bb..000000000diff --git a/letta/server/rest_api/routers/v1/agents.py b/letta/server/rest_api/routers/v1/agents.pyindex 20661ef9b..ebf10b7cd 100644--- a/letta/server/rest_api/routers/v1/agents.py+++ b/letta/server/rest_api/routers/v1/agents.py@@ -486,6 +486,8 @@ async def send_message_streaming(This endpoint accepts a message from a user and processes it through the agent.It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True."""+ request.stream_tokens = False+actor = server.get_user_or_default(user_id=user_id)result = await send_message_to_agent(server=server,diff --git a/letta/server/rest_api/utils.py b/letta/server/rest_api/utils.pyindex 4fd92b5aa..a87400dc2 100644--- a/letta/server/rest_api/utils.py+++ b/letta/server/rest_api/utils.py@@ -1,6 +1,5 @@import asyncioimport json-import tracebackimport warningsfrom enum import Enumfrom typing import AsyncGenerator, Optional, Union@@ -62,6 +61,9 @@ async def sse_async_generator(raise ValueError(f"Expected LettaUsageStatistics, got {type(usage)}")yield sse_formatter({"usage": usage.model_dump()})except Exception as e:+ import traceback++ traceback.print_exc()warnings.warn(f"Error getting usage data: {e}")yield sse_formatter({"error": "Failed to get usage data"})diff --git a/letta/services/sandbox_config_manager.py b/letta/services/sandbox_config_manager.pyindex 05b669d82..c91e6669f 100644--- a/letta/services/sandbox_config_manager.py+++ b/letta/services/sandbox_config_manager.py@@ -33,7 +33,7 @@ class SandboxConfigManager:def get_or_create_default_sandbox_config(self, sandbox_type: SandboxType, actor: PydanticUser) -> PydanticSandboxConfig:sandbox_config = self.get_sandbox_config_by_type(sandbox_type, actor=actor)if not sandbox_config:- logger.info(f"Creating new sandbox config of type {sandbox_type}, none found for organization {actor.organization_id}.")+ logger.debug(f"Creating new sandbox config of type {sandbox_type}, none found for organization {actor.organization_id}.")# TODO: Add more sandbox types laterif sandbox_type == SandboxType.E2B: