Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: Clean up prints (#1515)
Matthew Zhoudc361c5c8ee3
diff --git a/letta/server/rest_api/app.py b/letta/server/rest_api/app.pyindex b593e7b41..ddf66a828 100644--- a/letta/server/rest_api/app.py+++ b/letta/server/rest_api/app.py@@ -139,7 +139,7 @@ def create_application() -> "FastAPI":@app.on_event("startup")async def configure_executor():- print(f"Configured event loop executor with {settings.event_loop_threadpool_max_workers} workers.")+ print(f"INFO: Configured event loop executor with {settings.event_loop_threadpool_max_workers} workers.")loop = asyncio.get_running_loop()executor = concurrent.futures.ThreadPoolExecutor(max_workers=settings.event_loop_threadpool_max_workers)loop.set_default_executor(executor)diff --git a/letta/services/tool_sandbox/base.py b/letta/services/tool_sandbox/base.pyindex 918a616b8..3c5b75e6a 100644--- a/letta/services/tool_sandbox/base.py+++ b/letta/services/tool_sandbox/base.py@@ -174,8 +174,6 @@ class AsyncToolSandboxBase(ABC):return None, Noneresult = pickle.loads(base64.b64decode(text))- print("LOOK HERE!")- print(result)agent_state = result["agent_state"]return result["results"], agent_statediff --git a/tests/integration_test_experimental.py b/tests/integration_test_experimental.pyindex fa9fa8cc7..111d5cc58 100644--- a/tests/integration_test_experimental.py+++ b/tests/integration_test_experimental.py@@ -307,7 +307,7 @@ def test_multi_agent_broadcast_client(client: Letta, weather_tool):client.agents.delete(agent_id=worker.id)# create worker agents- num_workers = 50+ num_workers = 10for idx in range(num_workers):client.agents.create(name=f"worker_{idx}",@@ -329,6 +329,9 @@ def test_multi_agent_broadcast_client(client: Letta, weather_tool):)# send a message to the supervisor+ import time++ start = time.perf_counter()response = client.agents.messages.create(agent_id=supervisor.id,messages=[@@ -338,7 +341,43 @@ def test_multi_agent_broadcast_client(client: Letta, weather_tool):}],)+ end = time.perf_counter()+ print("TIME ELAPSED: " + str(end - start))+ for message in response.messages:+ print(message)+++def test_call_weather(client: Letta, weather_tool):+ # delete any existing worker agents+ workers = client.agents.list(tags=["worker", "supervisor"])+ for worker in workers:+ client.agents.delete(agent_id=worker.id)+ # create supervisor agent+ supervisor = client.agents.create(+ name="supervisor",+ include_base_tools=True,+ tool_ids=[weather_tool.id],+ model="openai/gpt-4o",+ embedding="letta/letta-free",+ tags=["supervisor"],+ )++ # send a message to the supervisor+ import time++ start = time.perf_counter()+ response = client.agents.messages.create(+ agent_id=supervisor.id,+ messages=[+ {+ "role": "user",+ "content": "What's the weather like in Seattle?",+ }+ ],+ )+ end = time.perf_counter()+ print("TIME ELAPSED: " + str(end - start))for message in response.messages:print(message)