Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: rebase #1560 (tool timeout) (#1637)
Charles Packer4c2fea1f8d36
diff --git a/letta/services/tool_sandbox/local_sandbox.py b/letta/services/tool_sandbox/local_sandbox.pyindex 352f6de69..3d7b7f030 100644--- a/letta/services/tool_sandbox/local_sandbox.py+++ b/letta/services/tool_sandbox/local_sandbox.py@@ -12,6 +12,7 @@ from letta.services.helpers.tool_execution_helper import (install_pip_requirements_for_sandbox,)from letta.services.tool_sandbox.base import AsyncToolSandboxBase+from letta.settings import tool_settingsfrom letta.tracing import log_event, trace_methodfrom letta.utils import get_friendly_error_msg@@ -152,7 +153,7 @@ class AsyncToolSandboxLocal(AsyncToolSandboxBase):)try:- stdout_bytes, stderr_bytes = await asyncio.wait_for(process.communicate(), timeout=60)+ stdout_bytes, stderr_bytes = await asyncio.wait_for(process.communicate(), timeout=tool_settings.local_sandbox_timeout)except asyncio.TimeoutError:# Terminate the process on timeoutif process.returncode is None:diff --git a/letta/settings.py b/letta/settings.pyindex e51865012..dffa0faff 100644--- a/letta/settings.py+++ b/letta/settings.py@@ -17,6 +17,7 @@ class ToolSettings(BaseSettings):# Local Sandbox configurationslocal_sandbox_dir: Optional[str] = None+ local_sandbox_timeout: float = 180# MCP settingsmcp_connect_to_server_timeout: float = 30.0