Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: only import modal if there is a key (#3668)
Sarah Wooders02507dd356d3
diff --git a/letta/services/tool_executor/sandbox_tool_executor.py b/letta/services/tool_executor/sandbox_tool_executor.pyindex d0153dd21..5189b5e19 100644--- a/letta/services/tool_executor/sandbox_tool_executor.py+++ b/letta/services/tool_executor/sandbox_tool_executor.py@@ -13,7 +13,6 @@ from letta.schemas.user import Userfrom letta.services.agent_manager import AgentManagerfrom letta.services.tool_executor.tool_executor_base import ToolExecutorfrom letta.services.tool_sandbox.local_sandbox import AsyncToolSandboxLocal-from letta.services.tool_sandbox.modal_sandbox import AsyncToolSandboxModalfrom letta.settings import tool_settingsfrom letta.types import JsonDictfrom letta.utils import get_friendly_error_msg@@ -22,6 +21,8 @@ logger = get_logger(__name__)if tool_settings.e2b_api_key:from letta.services.tool_sandbox.e2b_sandbox import AsyncToolSandboxE2B+if tool_settings.modal_api_key:+ from letta.services.tool_sandbox.modal_sandbox import AsyncToolSandboxModalclass SandboxToolExecutor(ToolExecutor):diff --git a/pyproject.toml b/pyproject.tomlindex 0ab250f61..37e06cbbd 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -115,7 +115,7 @@ pinecone = ["pinecone"]dev = ["pytest", "pytest-asyncio", "pexpect", "black", "pre-commit", "pyright", "pytest-order", "autoflake", "isort", "locust"]experimental = ["uvloop", "granian", "google-cloud-profiler"]server = ["websockets", "fastapi", "uvicorn"]-cloud-tool-sandbox = ["e2b-code-interpreter", "modal"]+cloud-tool-sandbox = ["e2b-code-interpreter", "modal"] # TODO: split this upexternal-tools = ["docker", "langchain", "wikipedia", "langchain-community", "firecrawl-py"]tests = ["wikipedia"]bedrock = ["boto3", "aioboto3"]