Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
chore: enable client-defined tools integration test (#8223)
Sarah Wooders3cf91d9dbc74
diff --git a/pyproject.toml b/pyproject.tomlindex 17f934e7f..d251d6c22 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -43,7 +43,7 @@ dependencies = ["llama-index>=0.12.2","llama-index-embeddings-openai>=0.3.1","anthropic>=0.75.0",- "letta-client>=1.3.1",+ "letta-client>=1.6.3","openai>=2.11.0","opentelemetry-api==1.30.0","opentelemetry-sdk==1.30.0",diff --git a/tests/integration_test_builtin_tools.py b/tests/integration_test_builtin_tools.pyindex ecb9815ee..4ddb1c32d 100644--- a/tests/integration_test_builtin_tools.py+++ b/tests/integration_test_builtin_tools.py@@ -72,8 +72,6 @@ def agent_state(client: Letta) -> AgentState:Creates and returns an agent state for testing with a pre-configured agent.Uses system-level EXA_API_KEY setting."""- client.tools.upsert_base_tools()-send_message_tool = client.tools.list(name="send_message").items[0]run_code_tool = client.tools.list(name="run_code").items[0]web_search_tool = client.tools.list(name="web_search").items[0]@@ -355,8 +353,6 @@ def agent_with_custom_tools(client: Letta) -> AgentState:Creates an agent with custom add/multiply tools and run_code toolto test programmatic tool calling."""- client.tools.upsert_base_tools()-# Create custom toolsadd_tool = client.tools.create(source_code=ADD_TOOL_SOURCE)multiply_tool = client.tools.create(source_code=MULTIPLY_TOOL_SOURCE)diff --git a/tests/integration_test_human_in_the_loop.py b/tests/integration_test_human_in_the_loop.pyindex af1a9486f..87365d296 100644--- a/tests/integration_test_human_in_the_loop.py+++ b/tests/integration_test_human_in_the_loop.py@@ -131,7 +131,6 @@ def approval_tool_fixture(client: Letta):"""Creates and returns a tool that requires approval for testing."""- client.tools.upsert_base_tools()approval_tool = client.tools.upsert_from_function(func=get_secret_code_tool,default_requires_approval=True,@@ -143,7 +142,6 @@ def approval_tool_fixture(client: Letta):@pytest.fixture(scope="function")def dice_tool_fixture(client: Letta):- client.tools.upsert_base_tools()dice_tool = client.tools.upsert_from_function(func=roll_dice_tool,)diff --git a/tests/integration_test_multi_agent.py b/tests/integration_test_multi_agent.pyindex f30dad93c..fcf180caa 100644--- a/tests/integration_test_multi_agent.py+++ b/tests/integration_test_multi_agent.py@@ -57,7 +57,6 @@ def client(server_url: str) -> Letta:Creates and returns a synchronous Letta REST client for testing."""client_instance = Letta(base_url=server_url)- client_instance.tools.upsert_base_tools()yield client_instancediff --git a/tests/integration_test_send_message.py b/tests/integration_test_send_message.pyindex 410aa9967..b7f55a7db 100644--- a/tests/integration_test_send_message.py+++ b/tests/integration_test_send_message.py@@ -1057,7 +1057,6 @@ def agent_state(client: Letta) -> AgentState:Creates and returns an agent state for testing with a pre-configured agent.The agent is named 'supervisor' and is configured with base tools and the roll_dice tool."""- client.tools.upsert_base_tools()dice_tool = client.tools.upsert_from_function(func=roll_dice)send_message_tool = client.tools.list(name="send_message").items[0]diff --git a/tests/integration_test_sleeptime_agent.py b/tests/integration_test_sleeptime_agent.pyindex 34c8591b5..21291df68 100644--- a/tests/integration_test_sleeptime_agent.py+++ b/tests/integration_test_sleeptime_agent.py@@ -61,9 +61,6 @@ def client(server_url: str) -> Letta:@pytest.mark.flaky(max_runs=3)@pytest.mark.asyncio(loop_scope="module")async def test_sleeptime_group_chat(client):- # 0. Refresh base tools- client.tools.upsert_base_tools()-# 1. Create sleeptime agentmain_agent = client.agents.create(name="main_agent",@@ -184,7 +181,6 @@ async def test_sleeptime_group_chat(client):@pytest.mark.asyncio(loop_scope="module")async def test_sleeptime_removes_redundant_information(client):# 1. set up sleep-time agent as in test_sleeptime_group_chat- client.tools.upsert_base_tools()main_agent = client.agents.create(name="main_agent",memory_blocks=[@@ -291,9 +287,6 @@ async def test_sleeptime_edit(client):@pytest.mark.asyncio(loop_scope="module")async def test_sleeptime_agent_new_block_attachment(client):"""Test that a new block created after agent creation is properly attached to both main and sleeptime agents."""- # 0. Refresh base tools- client.tools.upsert_base_tools()-# 1. Create sleeptime agentmain_agent = client.agents.create(name="main_agent",diff --git a/tests/test_sources.py b/tests/test_sources.pyindex 47cb062fa..2bf68edc8 100644--- a/tests/test_sources.py+++ b/tests/test_sources.py@@ -71,7 +71,6 @@ def client() -> LettaSDKClient:wait_for_server(server_url)print("Running client tests with server:", server_url)client = LettaSDKClient(base_url=server_url)- client.tools.upsert_base_tools()yield clientdiff --git a/uv.lock b/uv.lockindex e46072cca..badf558d1 100644--- a/uv.lock+++ b/uv.lock@@ -1,5 +1,5 @@version = 1-revision = 3+revision = 2requires-python = ">=3.11, <3.14"resolution-markers = ["python_full_version >= '3.13'",@@ -2507,7 +2507,7 @@ requires-dist = [{ name = "langchain", marker = "extra == 'external-tools'", specifier = ">=0.3.7" },{ name = "langchain-community", marker = "extra == 'desktop'", specifier = ">=0.3.7" },{ name = "langchain-community", marker = "extra == 'external-tools'", specifier = ">=0.3.7" },- { name = "letta-client", specifier = ">=1.3.1" },+ { name = "letta-client", specifier = ">=1.6.3" },{ name = "llama-index", specifier = ">=0.12.2" },{ name = "llama-index-embeddings-openai", specifier = ">=0.3.1" },{ name = "locust", marker = "extra == 'desktop'", specifier = ">=2.31.5" },@@ -2584,7 +2584,7 @@ provides-extras = ["postgres", "redis", "pinecone", "sqlite", "experimental", "s[[package]]name = "letta-client"-version = "1.3.1"+version = "1.6.3"source = { registry = "https://pypi.org/simple" }dependencies = [{ name = "anyio" },@@ -2594,9 +2594,9 @@ dependencies = [{ name = "sniffio" },{ name = "typing-extensions" },]-sdist = { url = "https://files.pythonhosted.org/packages/bf/f3/bca794dc7a7a735c5e95aabd406fbbf9e4296c9eccf5f7cb0bcd357e67d1/letta_client-1.3.1.tar.gz", hash = "sha256:28eff58052a4bf829f8964fca46c858509b2e6b49c3b1cb49d4bac4a91b1101f", size = 238563, upload-time = "2025-11-26T20:55:30.231Z" }+sdist = { url = "https://files.pythonhosted.org/packages/14/e3/ac97d0a8581ff93bf236054afbbda4dc2d989a74fbf65d1c76aba58ea8b0/letta_client-1.6.3.tar.gz", hash = "sha256:882db8393d5394d1ed4be8891a52f05a32430fa886c217fbc272351e8835c801", size = 256291, upload-time = "2026-01-03T00:02:22.13Z" }wheels = [- { url = "https://files.pythonhosted.org/packages/21/28/c21f067cc7def89ee60461fc14e7bc5401f37f67664921914fdc3b4a4a91/letta_client-1.3.1-py3-none-any.whl", hash = "sha256:61a7576877c6a882c7e31eebc59a290c42bed4e6a5ba521f244ced9194cacdfb", size = 369529, upload-time = "2025-11-26T20:55:29.106Z" },+ { url = "https://files.pythonhosted.org/packages/47/6f/7a0dab25ff1c2a1f410ed866c4ed7912e40d427959160da3d641e37ff682/letta_client-1.6.3-py3-none-any.whl", hash = "sha256:2530073d789c1dedabcba4b6d5440bf17354e5e54afded62495abee150b2f9c5", size = 394935, upload-time = "2026-01-03T00:02:20.577Z" },][[package]]