letta-nightly 0.5.4.dev20241128000451__py3-none-any.whl → 0.6.0.dev20241204051808__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of letta-nightly might be problematic. Click here for more details.

letta/server/server.py CHANGED
@@ -1,4 +1,5 @@
1
1
  # inspecting tools
2
+ import json
2
3
  import os
3
4
  import traceback
4
5
  import warnings
@@ -7,6 +8,8 @@ from asyncio import Lock
7
8
  from datetime import datetime
8
9
  from typing import Callable, Dict, List, Optional, Tuple, Union
9
10
 
11
+ from composio.client import Composio
12
+ from composio.client.collections import ActionModel, AppModel
10
13
  from fastapi import HTTPException
11
14
 
12
15
  import letta.constants as constants
@@ -54,7 +57,7 @@ from letta.schemas.embedding_config import EmbeddingConfig
54
57
  # openai schemas
55
58
  from letta.schemas.enums import JobStatus
56
59
  from letta.schemas.job import Job
57
- from letta.schemas.letta_message import LettaMessage
60
+ from letta.schemas.letta_message import FunctionReturn, LettaMessage
58
61
  from letta.schemas.llm_config import LLMConfig
59
62
  from letta.schemas.memory import (
60
63
  ArchivalMemorySummary,
@@ -76,9 +79,10 @@ from letta.services.organization_manager import OrganizationManager
76
79
  from letta.services.per_agent_lock_manager import PerAgentLockManager
77
80
  from letta.services.sandbox_config_manager import SandboxConfigManager
78
81
  from letta.services.source_manager import SourceManager
82
+ from letta.services.tool_execution_sandbox import ToolExecutionSandbox
79
83
  from letta.services.tool_manager import ToolManager
80
84
  from letta.services.user_manager import UserManager
81
- from letta.utils import create_random_username, json_dumps, json_loads
85
+ from letta.utils import create_random_username, get_utc_time, json_dumps, json_loads
82
86
 
83
87
  logger = get_logger(__name__)
84
88
 
@@ -227,6 +231,11 @@ class SyncServer(Server):
227
231
  # Locks
228
232
  self.send_message_lock = Lock()
229
233
 
234
+ # Composio
235
+ self.composio_client = None
236
+ if tool_settings.composio_api_key:
237
+ self.composio_client = Composio(api_key=tool_settings.composio_api_key)
238
+
230
239
  # Initialize the metadata store
231
240
  config = LettaConfig.load()
232
241
  if settings.letta_pg_uri_no_default:
@@ -365,14 +374,20 @@ class SyncServer(Server):
365
374
 
366
375
  def load_agent(self, agent_id: str, interface: Union[AgentInterface, None] = None) -> Agent:
367
376
  """Updated method to load agents from persisted storage"""
368
- agent_state = self.get_agent(agent_id=agent_id)
369
- actor = self.user_manager.get_user_by_id(user_id=agent_state.user_id)
377
+ agent_lock = self.per_agent_lock_manager.get_lock(agent_id)
378
+ with agent_lock:
379
+ agent_state = self.get_agent(agent_id=agent_id)
380
+ actor = self.user_manager.get_user_by_id(user_id=agent_state.user_id)
381
+
382
+ interface = interface or self.default_interface_factory()
383
+ if agent_state.agent_type == AgentType.memgpt_agent:
384
+ agent = Agent(agent_state=agent_state, interface=interface, user=actor)
385
+ else:
386
+ agent = O1Agent(agent_state=agent_state, interface=interface, user=actor)
370
387
 
371
- interface = interface or self.default_interface_factory()
372
- if agent_state.agent_type == AgentType.memgpt_agent:
373
- return Agent(agent_state=agent_state, interface=interface, user=actor)
374
- else:
375
- return O1Agent(agent_state=agent_state, interface=interface, user=actor)
388
+ # Persist to agent
389
+ save_agent(agent, self.ms)
390
+ return agent
376
391
 
377
392
  def _step(
378
393
  self,
@@ -1715,7 +1730,7 @@ class SyncServer(Server):
1715
1730
  self.blocks_agents_manager.add_block_to_agent(agent_id, block_id, block_label=block.label)
1716
1731
 
1717
1732
  # get agent memory
1718
- memory = self.load_agent(agent_id=agent_id).agent_state.memory
1733
+ memory = self.get_agent(agent_id=agent_id).memory
1719
1734
  return memory
1720
1735
 
1721
1736
  def unlink_block_from_agent_memory(self, user_id: str, agent_id: str, block_label: str, delete_if_no_ref: bool = True) -> Memory:
@@ -1723,7 +1738,7 @@ class SyncServer(Server):
1723
1738
  self.blocks_agents_manager.remove_block_with_label_from_agent(agent_id=agent_id, block_label=block_label)
1724
1739
 
1725
1740
  # get agent memory
1726
- memory = self.load_agent(agent_id=agent_id).agent_state.memory
1741
+ memory = self.get_agent(agent_id=agent_id).memory
1727
1742
  return memory
1728
1743
 
1729
1744
  def update_agent_memory_limit(self, user_id: str, agent_id: str, block_label: str, limit: int) -> Memory:
@@ -1733,7 +1748,7 @@ class SyncServer(Server):
1733
1748
  block_id=block.id, block_update=BlockUpdate(limit=limit), actor=self.user_manager.get_user_by_id(user_id=user_id)
1734
1749
  )
1735
1750
  # get agent memory
1736
- memory = self.load_agent(agent_id=agent_id).agent_state.memory
1751
+ memory = self.get_agent(agent_id=agent_id).memory
1737
1752
  return memory
1738
1753
 
1739
1754
  def upate_block(self, user_id: str, block_id: str, block_update: BlockUpdate) -> Block:
@@ -1750,3 +1765,122 @@ class SyncServer(Server):
1750
1765
  if block.label == label:
1751
1766
  return block
1752
1767
  return None
1768
+
1769
+ # def run_tool(self, tool_id: str, tool_args: str, user_id: str) -> FunctionReturn:
1770
+ # """Run a tool using the sandbox and return the result"""
1771
+
1772
+ # try:
1773
+ # tool_args_dict = json.loads(tool_args)
1774
+ # except json.JSONDecodeError:
1775
+ # raise ValueError("Invalid JSON string for tool_args")
1776
+
1777
+ # # Get the tool by ID
1778
+ # user = self.user_manager.get_user_by_id(user_id=user_id)
1779
+ # tool = self.tool_manager.get_tool_by_id(tool_id=tool_id, actor=user)
1780
+ # if tool.name is None:
1781
+ # raise ValueError(f"Tool with id {tool_id} does not have a name")
1782
+
1783
+ # # TODO eventually allow using agent state in tools
1784
+ # agent_state = None
1785
+
1786
+ # try:
1787
+ # sandbox_run_result = ToolExecutionSandbox(tool.name, tool_args_dict, user_id).run(agent_state=agent_state)
1788
+ # if sandbox_run_result is None:
1789
+ # raise ValueError(f"Tool with id {tool_id} returned execution with None")
1790
+ # function_response = str(sandbox_run_result.func_return)
1791
+
1792
+ # return FunctionReturn(
1793
+ # id="null",
1794
+ # function_call_id="null",
1795
+ # date=get_utc_time(),
1796
+ # status="success",
1797
+ # function_return=function_response,
1798
+ # )
1799
+ # except Exception as e:
1800
+ # # same as agent.py
1801
+ # from letta.constants import MAX_ERROR_MESSAGE_CHAR_LIMIT
1802
+
1803
+ # error_msg = f"Error executing tool {tool.name}: {e}"
1804
+ # if len(error_msg) > MAX_ERROR_MESSAGE_CHAR_LIMIT:
1805
+ # error_msg = error_msg[:MAX_ERROR_MESSAGE_CHAR_LIMIT]
1806
+
1807
+ # return FunctionReturn(
1808
+ # id="null",
1809
+ # function_call_id="null",
1810
+ # date=get_utc_time(),
1811
+ # status="error",
1812
+ # function_return=error_msg,
1813
+ # )
1814
+
1815
+ def run_tool_from_source(
1816
+ self,
1817
+ user_id: str,
1818
+ tool_args: str,
1819
+ tool_source: str,
1820
+ tool_source_type: Optional[str] = None,
1821
+ tool_name: Optional[str] = None,
1822
+ ) -> FunctionReturn:
1823
+ """Run a tool from source code"""
1824
+
1825
+ try:
1826
+ tool_args_dict = json.loads(tool_args)
1827
+ except json.JSONDecodeError:
1828
+ raise ValueError("Invalid JSON string for tool_args")
1829
+
1830
+ if tool_source_type is not None and tool_source_type != "python":
1831
+ raise ValueError("Only Python source code is supported at this time")
1832
+
1833
+ # NOTE: we're creating a floating Tool object and NOT persiting to DB
1834
+ tool = Tool(
1835
+ name=tool_name,
1836
+ source_code=tool_source,
1837
+ )
1838
+ assert tool.name is not None, "Failed to create tool object"
1839
+
1840
+ # TODO eventually allow using agent state in tools
1841
+ agent_state = None
1842
+
1843
+ # Next, attempt to run the tool with the sandbox
1844
+ try:
1845
+ sandbox_run_result = ToolExecutionSandbox(tool.name, tool_args_dict, user_id, tool_object=tool).run(agent_state=agent_state)
1846
+ if sandbox_run_result is None:
1847
+ raise ValueError(f"Tool with id {tool.id} returned execution with None")
1848
+ function_response = str(sandbox_run_result.func_return)
1849
+
1850
+ return FunctionReturn(
1851
+ id="null",
1852
+ function_call_id="null",
1853
+ date=get_utc_time(),
1854
+ status="success",
1855
+ function_return=function_response,
1856
+ )
1857
+ except Exception as e:
1858
+ # same as agent.py
1859
+ from letta.constants import MAX_ERROR_MESSAGE_CHAR_LIMIT
1860
+
1861
+ error_msg = f"Error executing tool {tool.name}: {e}"
1862
+ if len(error_msg) > MAX_ERROR_MESSAGE_CHAR_LIMIT:
1863
+ error_msg = error_msg[:MAX_ERROR_MESSAGE_CHAR_LIMIT]
1864
+
1865
+ return FunctionReturn(
1866
+ id="null",
1867
+ function_call_id="null",
1868
+ date=get_utc_time(),
1869
+ status="error",
1870
+ function_return=error_msg,
1871
+ )
1872
+
1873
+ # Composio wrappers
1874
+ def get_composio_apps(self) -> List["AppModel"]:
1875
+ """Get a list of all Composio apps with actions"""
1876
+ apps = self.composio_client.apps.get()
1877
+ apps_with_actions = []
1878
+ for app in apps:
1879
+ if app.meta["actionsCount"] > 0:
1880
+ apps_with_actions.append(app)
1881
+
1882
+ return apps_with_actions
1883
+
1884
+ def get_composio_actions_from_app_name(self, composio_app_name: str) -> List["ActionModel"]:
1885
+ actions = self.composio_client.actions.get(apps=[composio_app_name])
1886
+ return actions
@@ -1,4 +1,4 @@
1
- import asyncio
1
+ import threading
2
2
  from collections import defaultdict
3
3
 
4
4
 
@@ -6,9 +6,9 @@ class PerAgentLockManager:
6
6
  """Manages per-agent locks."""
7
7
 
8
8
  def __init__(self):
9
- self.locks = defaultdict(asyncio.Lock)
9
+ self.locks = defaultdict(threading.Lock)
10
10
 
11
- def get_lock(self, agent_id: str) -> asyncio.Lock:
11
+ def get_lock(self, agent_id: str) -> threading.Lock:
12
12
  """Retrieve the lock for a specific agent_id."""
13
13
  return self.locks[agent_id]
14
14
 
@@ -11,6 +11,7 @@ from typing import Any, Optional
11
11
  from letta.log import get_logger
12
12
  from letta.schemas.agent import AgentState
13
13
  from letta.schemas.sandbox_config import SandboxConfig, SandboxRunResult, SandboxType
14
+ from letta.schemas.tool import Tool
14
15
  from letta.services.sandbox_config_manager import SandboxConfigManager
15
16
  from letta.services.tool_manager import ToolManager
16
17
  from letta.services.user_manager import UserManager
@@ -27,7 +28,7 @@ class ToolExecutionSandbox:
27
28
  # We make this a long random string to avoid collisions with any variables in the user's code
28
29
  LOCAL_SANDBOX_RESULT_VAR_NAME = "result_ZQqiequkcFwRwwGQMqkt"
29
30
 
30
- def __init__(self, tool_name: str, args: dict, user_id: str, force_recreate=False):
31
+ def __init__(self, tool_name: str, args: dict, user_id: str, force_recreate=False, tool_object: Optional[Tool] = None):
31
32
  self.tool_name = tool_name
32
33
  self.args = args
33
34
 
@@ -36,14 +37,18 @@ class ToolExecutionSandbox:
36
37
  # agent_state is the state of the agent that invoked this run
37
38
  self.user = UserManager().get_user_by_id(user_id=user_id)
38
39
 
39
- # Get the tool
40
- # TODO: So in theory, it's possible this retrieves a tool not provisioned to the agent
41
- # TODO: That would probably imply that agent_state is incorrectly configured
42
- self.tool = ToolManager().get_tool_by_name(tool_name=tool_name, actor=self.user)
43
- if not self.tool:
44
- raise ValueError(
45
- f"Agent attempted to invoke tool {self.tool_name} that does not exist for organization {self.user.organization_id}"
46
- )
40
+ # If a tool object is provided, we use it directly, otherwise pull via name
41
+ if tool_object is not None:
42
+ self.tool = tool_object
43
+ else:
44
+ # Get the tool via name
45
+ # TODO: So in theory, it's possible this retrieves a tool not provisioned to the agent
46
+ # TODO: That would probably imply that agent_state is incorrectly configured
47
+ self.tool = ToolManager().get_tool_by_name(tool_name=tool_name, actor=self.user)
48
+ if not self.tool:
49
+ raise ValueError(
50
+ f"Agent attempted to invoke tool {self.tool_name} that does not exist for organization {self.user.organization_id}"
51
+ )
47
52
 
48
53
  self.sandbox_config_manager = SandboxConfigManager(tool_settings)
49
54
  self.force_recreate = force_recreate
@@ -59,19 +64,19 @@ class ToolExecutionSandbox:
59
64
  Tuple[Any, Optional[AgentState]]: Tuple containing (tool_result, agent_state)
60
65
  """
61
66
  if tool_settings.e2b_api_key:
62
- logger.info(f"Using e2b sandbox to execute {self.tool_name}")
67
+ logger.debug(f"Using e2b sandbox to execute {self.tool_name}")
63
68
  code = self.generate_execution_script(agent_state=agent_state)
64
69
  result = self.run_e2b_sandbox(code=code)
65
70
  else:
66
- logger.info(f"Using local sandbox to execute {self.tool_name}")
71
+ logger.debug(f"Using local sandbox to execute {self.tool_name}")
67
72
  code = self.generate_execution_script(agent_state=agent_state)
68
73
  result = self.run_local_dir_sandbox(code=code)
69
74
 
70
75
  # Log out any stdout from the tool run
71
- logger.info(f"Executed tool '{self.tool_name}', logging stdout from tool run: \n")
76
+ logger.debug(f"Executed tool '{self.tool_name}', logging stdout from tool run: \n")
72
77
  for log_line in result.stdout:
73
- logger.info(f"{log_line}")
74
- logger.info(f"Ending stdout log from tool run.")
78
+ logger.debug(f"{log_line}")
79
+ logger.debug(f"Ending stdout log from tool run.")
75
80
 
76
81
  # Return result
77
82
  return result
@@ -132,7 +137,8 @@ class ToolExecutionSandbox:
132
137
  sandbox_config_fingerprint=sbx_config.fingerprint(),
133
138
  )
134
139
  except Exception as e:
135
- raise RuntimeError(f"Executing tool {self.tool_name} has an unexpected error: {e}")
140
+ logger.error(f"Executing tool {self.tool_name} has an unexpected error: {e}")
141
+ raise e
136
142
  finally:
137
143
  # Clean up the temp file and restore stdout
138
144
  sys.stdout = old_stdout
@@ -154,7 +160,9 @@ class ToolExecutionSandbox:
154
160
  env_vars = self.sandbox_config_manager.get_sandbox_env_vars_as_dict(sandbox_config_id=sbx_config.id, actor=self.user, limit=100)
155
161
  execution = sbx.run_code(code, envs=env_vars)
156
162
  if execution.error is not None:
157
- raise Exception(f"Executing tool {self.tool_name} failed with {execution.error}")
163
+ logger.error(f"Executing tool {self.tool_name} failed with {execution.error}")
164
+ # Raise a concise exception as this gets returned to the LLM
165
+ raise self.parse_exception_from_e2b_execution(execution)
158
166
  elif len(execution.results) == 0:
159
167
  return None
160
168
  else:
@@ -166,6 +174,12 @@ class ToolExecutionSandbox:
166
174
  sandbox_config_fingerprint=sbx_config.fingerprint(),
167
175
  )
168
176
 
177
+ def parse_exception_from_e2b_execution(self, e2b_execution: "Execution") -> Exception:
178
+ builtins_dict = __builtins__ if isinstance(__builtins__, dict) else vars(__builtins__)
179
+ # Dynamically fetch the exception class from builtins, defaulting to Exception if not found
180
+ exception_class = builtins_dict.get(e2b_execution.error.name, Exception)
181
+ return exception_class(e2b_execution.error.value)
182
+
169
183
  def get_running_e2b_sandbox_with_same_state(self, sandbox_config: SandboxConfig) -> Optional["Sandbox"]:
170
184
  from e2b_code_interpreter import Sandbox
171
185
 
@@ -273,9 +287,26 @@ class ToolExecutionSandbox:
273
287
  f"{self.LOCAL_SANDBOX_RESULT_VAR_NAME} = base64.b64encode(pickle.dumps({self.LOCAL_SANDBOX_RESULT_VAR_NAME})).decode('utf-8')\n"
274
288
  )
275
289
  code += f"{self.LOCAL_SANDBOX_RESULT_VAR_NAME}\n"
276
-
277
290
  return code
278
291
 
292
+ def _convert_param_to_value(self, param_type: str, raw_value: str) -> str:
293
+
294
+ if param_type == "string":
295
+ value = "pickle.loads(" + str(pickle.dumps(raw_value)) + ")"
296
+
297
+ elif param_type == "integer" or param_type == "boolean" or param_type == "number":
298
+ value = raw_value
299
+
300
+ elif param_type == "array":
301
+ value = raw_value
302
+
303
+ elif param_type == "object":
304
+ value = raw_value
305
+
306
+ else:
307
+ raise TypeError(f"Unsupported type: {param_type}, raw_value={raw_value}")
308
+ return str(value)
309
+
279
310
  def initialize_param(self, name: str, raw_value: str) -> str:
280
311
  params = self.tool.json_schema["parameters"]["properties"]
281
312
  spec = params.get(name)
@@ -287,14 +318,9 @@ class ToolExecutionSandbox:
287
318
  if param_type is None and spec.get("parameters"):
288
319
  param_type = spec["parameters"].get("type")
289
320
 
290
- if param_type == "string":
291
- value = '"' + raw_value + '"'
292
- elif param_type == "integer" or param_type == "boolean":
293
- value = raw_value
294
- else:
295
- raise TypeError(f"unsupported type: {param_type}")
321
+ value = self._convert_param_to_value(param_type, raw_value)
296
322
 
297
- return name + " = " + str(value) + "\n"
323
+ return name + " = " + value + "\n"
298
324
 
299
325
  def invoke_function_call(self, inject_agent_state: bool) -> str:
300
326
  """
letta/utils.py CHANGED
@@ -1015,13 +1015,6 @@ def get_persona_text(name: str, enforce_limit=True):
1015
1015
  raise ValueError(f"Persona {name}.txt not found")
1016
1016
 
1017
1017
 
1018
- def get_human_text(name: str):
1019
- for file_path in list_human_files():
1020
- file = os.path.basename(file_path)
1021
- if f"{name}.txt" == file or name == file:
1022
- return open(file_path, "r", encoding="utf-8").read().strip()
1023
-
1024
-
1025
1018
  def get_schema_diff(schema_a, schema_b):
1026
1019
  # Assuming f_schema and linked_function['json_schema'] are your JSON schemas
1027
1020
  f_schema_json = json_dumps(schema_a)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-nightly
3
- Version: 0.5.4.dev20241128000451
3
+ Version: 0.6.0.dev20241204051808
4
4
  Summary: Create LLM agents with long-term memory and custom tools
5
5
  License: Apache License
6
6
  Author: Letta Team
@@ -129,24 +129,24 @@ The two main ways to install Letta are through **pypi** (`pip`) or via **Docker*
129
129
 
130
130
  ### Step 1 - Install Letta using `pip`
131
131
  ```sh
132
- $ pip install -U letta
132
+ pip install -U letta
133
133
  ```
134
134
 
135
135
  ### Step 2 - Set your environment variables for your chosen LLM / embedding providers
136
136
  ```sh
137
- $ export OPENAI_API_KEY=sk-...
137
+ export OPENAI_API_KEY=sk-...
138
138
  ```
139
139
 
140
140
  For Ollama (see our full [documentation](https://docs.letta.com/install) for examples of how to set up various providers):
141
141
  ```sh
142
- $ export OLLAMA_BASE_URL=http://localhost:11434
142
+ export OLLAMA_BASE_URL=http://localhost:11434
143
143
  ```
144
144
 
145
145
  ### Step 3 - Run the Letta CLI
146
146
 
147
147
  You can create agents and chat with them via the Letta CLI tool (`letta run`):
148
148
  ```sh
149
- $ letta run
149
+ letta run
150
150
  ```
151
151
  ```
152
152
  🧬 Creating new agent...
@@ -179,7 +179,7 @@ Hit enter to begin (will request first Letta message)
179
179
 
180
180
  You can start the Letta API server with `letta server` (see the full API reference [here](https://docs.letta.com/api-reference)):
181
181
  ```sh
182
- $ letta server
182
+ letta server
183
183
  ```
184
184
  ```
185
185
  Initializing database...
@@ -1,6 +1,6 @@
1
- letta/__init__.py,sha256=FGDVS-TIQ5GQN2d3DaYbDaEaDCH54TpwzX5lSn60KwY,1035
1
+ letta/__init__.py,sha256=_ggYQoxBKoYjXCP5rLX8CWJ1vau_BhviuXwDBHDZJJw,1035
2
2
  letta/__main__.py,sha256=6Hs2PV7EYc5Tid4g4OtcLXhqVHiNYTGzSBdoOnW2HXA,29
3
- letta/agent.py,sha256=-4L2daggVPMjZylLFbilfcpzmjfrSQXHFpqbRmqPQRs,77352
3
+ letta/agent.py,sha256=9M0emIYjOlE3ZlJJYReDYZO84Atnd1ds7Je5KOEYcjE,77519
4
4
  letta/agent_store/chroma.py,sha256=-kCEMBFKmqCyFeIETYf7RN-khGddsip2FAhSzNqaC7U,12537
5
5
  letta/agent_store/db.py,sha256=n15t8qhHfqhtFDxSQg_9uwvMntpWml8Jz_Y-ofL0loQ,23467
6
6
  letta/agent_store/lancedb.py,sha256=i63d4VZwj9UIOTNs5f0JZ_r5yZD-jKWz4FAH4RMpXOE,5104
@@ -9,11 +9,11 @@ letta/agent_store/qdrant.py,sha256=6_33V-FEDpT9LG5zmr6-3y9slw1YFLswxpahiyMkvHA,7
9
9
  letta/agent_store/storage.py,sha256=4gKvMRYBGm9cwyaDOzljxDKgqr4MxGXcC4yGhAdKcAA,6693
10
10
  letta/benchmark/benchmark.py,sha256=ebvnwfp3yezaXOQyGXkYCDYpsmre-b9hvNtnyx4xkG0,3701
11
11
  letta/benchmark/constants.py,sha256=aXc5gdpMGJT327VuxsT5FngbCK2J41PQYeICBO7g_RE,536
12
- letta/cli/cli.py,sha256=PFJz_9jD3B9UpmMGS72iiaep3tCuQfNfpISf_u5URPM,16832
12
+ letta/cli/cli.py,sha256=fpcpBKEAzKU6o9gSS5pe6YRTkiybIik5CC9mCAVl_bA,16928
13
13
  letta/cli/cli_config.py,sha256=tB0Wgz3O9j6KiCsU1HWfsKmhNM9RqLsAxzxEDFQFGnM,8565
14
14
  letta/cli/cli_load.py,sha256=x4L8s15GwIW13xrhKYFWHo_y-IVGtoPDHWWKcHDRP10,4587
15
15
  letta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- letta/client/client.py,sha256=u6sJDEU2Em0o79YI8fT8dOCtTI6JD5s1MZsMYgMbUdk,123559
16
+ letta/client/client.py,sha256=uUEpADbWwm7bhwv2mA4kllyDC6MpnfRKd8CLpP8kEt0,123907
17
17
  letta/client/streaming.py,sha256=Hh5pjlyrdCuO2V75ZCxSSOCPd3BmHdKFGaIUJC6fBp0,4775
18
18
  letta/client/utils.py,sha256=OJlAKWrldc4I6M1WpcTWNtPJ4wfxlzlZqWLfCozkFtI,2872
19
19
  letta/config.py,sha256=AF4XY6grcu87OLjrWXh1ufnyKWsCL0qER-_9jQCAlU0,18947
@@ -26,9 +26,9 @@ letta/errors.py,sha256=mFeTpZP37otDMr68s9hyGOnafJPrWeblQOI79cgP4nQ,3209
26
26
  letta/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  letta/functions/function_sets/base.py,sha256=9Rs8SNrtUgqYtlmztE1gVO6FEn864u8t-X1qik24nps,8096
28
28
  letta/functions/function_sets/extras.py,sha256=Jik3UiDqYTm4Lam1XPTvuVjvgUHwIAhopsnbmVhGMBg,4732
29
- letta/functions/functions.py,sha256=7FankCCKpUgBUnrzmF96sRy8fHyfkfYFFJ_f45MsZh0,4196
29
+ letta/functions/functions.py,sha256=evH6GKnIJwVVre1Xre2gaSIqREv4eNM4DiWOhn8PMqg,3299
30
30
  letta/functions/helpers.py,sha256=K84kqAN1RXZIhjb7-btS0C2p-SInYNv6FvSfo-16Y6g,8578
31
- letta/functions/schema_generator.py,sha256=PIuey3ZsMvOTBViPWlqajleu48LOEEkcxnLhRPkyRsE,9076
31
+ letta/functions/schema_generator.py,sha256=Y0rQjJBI8Z5fSKmT71EGXtHpIvNb3dMM5X00TP89tlY,19330
32
32
  letta/helpers/__init__.py,sha256=p0luQ1Oe3Skc6sH4O58aHHA3Qbkyjifpuq0DZ1GAY0U,59
33
33
  letta/helpers/tool_rule_solver.py,sha256=YCwawbRUQw10ZVR17WYXo8b5roxdGe-B5nNVMqlAgBE,4826
34
34
  letta/humans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -41,10 +41,10 @@ letta/llm_api/azure_openai.py,sha256=Y1HKPog1XzM_f7ujUK_Gv2zQkoy5pU-1bKiUnvSxSrs
41
41
  letta/llm_api/azure_openai_constants.py,sha256=oXtKrgBFHf744gyt5l1thILXgyi8NDNUrKEa2GGGpjw,278
42
42
  letta/llm_api/cohere.py,sha256=vDRd-SUGp1t_JUIdwC3RkIhwMl0OY7n-tAU9uPORYkY,14826
43
43
  letta/llm_api/google_ai.py,sha256=xKz9JDZs3m6yzSfcgCAAUD_rjI20BBIINoiSvlcnOw0,17621
44
- letta/llm_api/helpers.py,sha256=KqkdjZWYghx4OPwLcHEC6ruc_z9DScbysw3VH4x9A0Q,9887
44
+ letta/llm_api/helpers.py,sha256=F8xZDZgDojWX5v-0vakyeUQyCyBr1HmzmsITRdOsmVg,13457
45
45
  letta/llm_api/llm_api_tools.py,sha256=h2eudFygI6yFIOaA5Q9GmhiwMPq2mHQyhoSHbn57CCE,16866
46
46
  letta/llm_api/mistral.py,sha256=fHdfD9ug-rQIk2qn8tRKay1U6w9maF11ryhKi91FfXM,1593
47
- letta/llm_api/openai.py,sha256=gGuxfE4_TURwnKfleogDCURvKe4UFb7KitoCWqWqKkI,23844
47
+ letta/llm_api/openai.py,sha256=Z3xNoJPtplzNU5Lj8JkQg8lJkSb18QKIpFTfLRoaK5E,24180
48
48
  letta/local_llm/README.md,sha256=hFJyw5B0TU2jrh9nb0zGZMgdH-Ei1dSRfhvPQG_NSoU,168
49
49
  letta/local_llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  letta/local_llm/chat_completion_proxy.py,sha256=SiohxsjGTku4vOryOZx7I0t0xoO_sUuhXgoe62fKq3c,12995
@@ -76,7 +76,7 @@ letta/local_llm/settings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZ
76
76
  letta/local_llm/settings/deterministic_mirostat.py,sha256=kgRikcxYHfIbPFydHW6W7IO9jmp6NeA7JNAhnI3DPsc,1221
77
77
  letta/local_llm/settings/settings.py,sha256=ZAbzDpu2WsBXjVGXJ-TKUpS99VTI__3EoZml9KqYef0,2971
78
78
  letta/local_llm/settings/simple.py,sha256=HAO2jBJ_hJCEsXWIJcD0sckR0tI0zs3x2CPdf6ORQLs,719
79
- letta/local_llm/utils.py,sha256=0DELikgq82aztlN-sAOSuDLWbG0IVD67P7kHHjJ6nF0,13101
79
+ letta/local_llm/utils.py,sha256=gEaJxEoJaXsc7qK1Czey3BacF7hu7N3oOFhtBpaXO4Q,13211
80
80
  letta/local_llm/vllm/api.py,sha256=2kAGZjc_GH9ILJnVRq-45yfsfKELVfbC9VEl_cIC6vg,2590
81
81
  letta/local_llm/webui/api.py,sha256=kkxncdCFq1vjgvaHOoQ__j7rcDPgC1F64KcEm94Y6Rs,2639
82
82
  letta/local_llm/webui/legacy_api.py,sha256=k3H3y4qp2Fs-XmP24iSIEyvq6wjWFWBzklY3-wRAJNI,2335
@@ -85,7 +85,7 @@ letta/local_llm/webui/settings.py,sha256=gmLHfiOl1u4JmlAZU2d2O8YKF9lafdakyjwR_ft
85
85
  letta/log.py,sha256=FxkAk2f8Bl-u9dfImSj1DYnjAsmV6PL3tjTSnEiNP48,2218
86
86
  letta/main.py,sha256=5guUzYyxID3FDlegk3dNUev7vjPMglcIw-xqdyHdhKI,19175
87
87
  letta/memory.py,sha256=YupXOvzVJXH59RW4XWBrd7qMNEYaMbtWXCheKeWZwpU,17873
88
- letta/metadata.py,sha256=Jej-1-zUIcd_h6LaeiemYmI1ujoYSQ9916IkvoZXT90,18659
88
+ letta/metadata.py,sha256=IipAhhpLXve8mVRAf4LNQhZxexwt-5lmf7bqCr8hE3E,18643
89
89
  letta/o1_agent.py,sha256=jTMlP7LxR4iUDWaGHMy8SiZtlzn6_RqP0H1HaEWXydQ,3078
90
90
  letta/openai_backcompat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
91
91
  letta/openai_backcompat/openai_object.py,sha256=Y1ZS1sATP60qxJiOsjOP3NbwSzuzvkNAvb3DeuhM5Uk,13490
@@ -133,7 +133,7 @@ letta/pytest.ini,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
133
133
  letta/schemas/agent.py,sha256=hRBYnihopF9WIecGUeAp_TsZN_AcFn2TAW5JsDUcQyQ,8400
134
134
  letta/schemas/agents_tags.py,sha256=9DGr8fN2DHYdWvZ_qcXmrKI0w7YKCGz2lfEcrX2KAkI,1130
135
135
  letta/schemas/api_key.py,sha256=u07yzzMn-hBAHZIIKbWY16KsgiFjSNR8lAghpMUo3_4,682
136
- letta/schemas/block.py,sha256=jaudWYF70C3M52Xofh6lomaoguzMQznHStsO2g6ZRRM,5815
136
+ letta/schemas/block.py,sha256=pVDH8jr5r-oxdX4cK9dX2wXyLBzgGKQOBWOzqZSeBog,5944
137
137
  letta/schemas/blocks_agents.py,sha256=31KoTqQ9cGvqxqmuagtXiQLoaHLq7DlyGdjJTGncxTs,1333
138
138
  letta/schemas/embedding_config.py,sha256=1kD6NpiXeH4roVumxqDAKk7xt8SpXGWNhZs_XXUSlEU,2855
139
139
  letta/schemas/enums.py,sha256=F396hXs57up4Jqj1vwWVknMpoVo7MkccVBALvKGHPpE,1032
@@ -156,7 +156,7 @@ letta/schemas/organization.py,sha256=d2oN3IK2HeruEHKXwIzCbJ3Fxdi_BEe9JZ8J9aDbHwQ
156
156
  letta/schemas/passage.py,sha256=eYQMxD_XjHAi72jmqcGBU4wM4VZtSU0XK8uhQxxN3Ug,3563
157
157
  letta/schemas/sandbox_config.py,sha256=LC0hnB3TbFJmY7lXqVsseJkqTbxry0xmBB0bwI8Y7Rc,4769
158
158
  letta/schemas/source.py,sha256=B1VbaDJV-EGPv1nQXwCx_RAzeAJd50UqP_1m1cIRT8c,2854
159
- letta/schemas/tool.py,sha256=DolG1PZDacREGQco7gYFVJNZFLjfBa1jDRmuCPKNiuM,9131
159
+ letta/schemas/tool.py,sha256=d88nXm9sH6xOH0d6DKiPehRFVUA5TsfkBBzOP7wmIY8,9715
160
160
  letta/schemas/tool_rule.py,sha256=pLt-BzgFSrlVO6ipY4kygyvfoM0BWA-XdqhGxso9aKs,1192
161
161
  letta/schemas/usage.py,sha256=lvn1ooHwLEdv6gwQpw5PBUbcwn_gwdT6HA-fCiix6sY,817
162
162
  letta/schemas/user.py,sha256=V32Tgl6oqB3KznkxUz12y7agkQicjzW7VocSpj78i6Q,1526
@@ -164,7 +164,7 @@ letta/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
164
164
  letta/server/constants.py,sha256=yAdGbLkzlOU_dLTx0lKDmAnj0ZgRXCEaIcPJWO69eaE,92
165
165
  letta/server/generate_openapi_schema.sh,sha256=0OtBhkC1g6CobVmNEd_m2B6sTdppjbJLXaM95icejvE,371
166
166
  letta/server/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
167
- letta/server/rest_api/app.py,sha256=QbCgYeyzA86iefwomROBAaxwvSWYQT10fhHcNZsyjH4,7555
167
+ letta/server/rest_api/app.py,sha256=xhhSJznX0aEnqixMHGN7ALfXopufos-fSikiKp4Qffs,7711
168
168
  letta/server/rest_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
169
  letta/server/rest_api/auth/index.py,sha256=fQBGyVylGSRfEMLQ17cZzrHd5Y1xiVylvPqH5Rl-lXQ,1378
170
170
  letta/server/rest_api/auth_token.py,sha256=725EFEIiNj4dh70hrSd94UysmFD8vcJLrTRfNHkzxDo,774
@@ -178,19 +178,19 @@ letta/server/rest_api/routers/openai/assistants/threads.py,sha256=g8iu98__tQEMY9
178
178
  letta/server/rest_api/routers/openai/chat_completions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
179
179
  letta/server/rest_api/routers/openai/chat_completions/chat_completions.py,sha256=qFMpxfYIlJ-PW08IQt09RW44u6hwkssdsUT-h_GuOvE,4836
180
180
  letta/server/rest_api/routers/v1/__init__.py,sha256=RZc0fIHNN4BGretjU6_TGK7q49RyV4jfYNudoiK_sUo,762
181
- letta/server/rest_api/routers/v1/agents.py,sha256=SHWsfcSB86WS23wiGqmZFeY0ns5s1VpzJ2mQZYpo60M,25168
181
+ letta/server/rest_api/routers/v1/agents.py,sha256=Tj7QyHjem_tOgzDzTyEJREDH2rzDgpE6S5azBDrhY_o,24884
182
182
  letta/server/rest_api/routers/v1/blocks.py,sha256=UCVfMbb8hzOXI6a8OYWKuXyOropIxw6PYKZkwwAh1v0,4880
183
183
  letta/server/rest_api/routers/v1/health.py,sha256=pKCuVESlVOhGIb4VC4K-H82eZqfghmT6kvj2iOkkKuc,401
184
184
  letta/server/rest_api/routers/v1/jobs.py,sha256=a-j0v-5A0un0pVCOHpfeWnzpOWkVDQO6ti42k_qAlZY,2272
185
185
  letta/server/rest_api/routers/v1/llms.py,sha256=TcyvSx6MEM3je5F4DysL7ligmssL_pFlJaaO4uL95VY,877
186
186
  letta/server/rest_api/routers/v1/organizations.py,sha256=tyqVzXTpMtk3sKxI3Iz4aS6RhbGEbXDzFBB_CpW18v4,2080
187
- letta/server/rest_api/routers/v1/sandbox_configs.py,sha256=j-q9coHFhrsRwyswGyrVPUjawI0Iy6eYaG4iKd6ZKMA,4219
188
- letta/server/rest_api/routers/v1/sources.py,sha256=5Cs2YTSooh_WNT2C18PsdKzkyr4ZvaHt5Xjubyz0yJw,9196
189
- letta/server/rest_api/routers/v1/tools.py,sha256=eDzRv7ETP8Tu0kPxFutLC1Lz4J411sHOqbHF9nD5MLs,6204
187
+ letta/server/rest_api/routers/v1/sandbox_configs.py,sha256=4tkTH8z9vpuBiGzxrS_wxkFdznnWZx-U-9F08czHMP8,5004
188
+ letta/server/rest_api/routers/v1/sources.py,sha256=HUbcBENk4RZDzxvP9tRANiWLX60nOkMdUCZ48jFGfk8,9630
189
+ letta/server/rest_api/routers/v1/tools.py,sha256=TP16cpuTF2HYLFZVmabExw9gziB-PtkExtWVkjxrRes,9553
190
190
  letta/server/rest_api/routers/v1/users.py,sha256=M1wEr2IyHzuRwINYxLXTkrbAH3osLe_cWjzrWrzR1aw,3729
191
191
  letta/server/rest_api/static_files.py,sha256=NG8sN4Z5EJ8JVQdj19tkFa9iQ1kBPTab9f_CUxd_u4Q,3143
192
192
  letta/server/rest_api/utils.py,sha256=6c5a_-ZFTlwZ1IuzpRQtqxSG1eD56nNhKhWlrdgBYWk,3103
193
- letta/server/server.py,sha256=Ki5MrO5y0L9iCTO1SoNqRtCLKdWQ5uxoRDebAzPi8NM,73777
193
+ letta/server/server.py,sha256=jgi0QipurP1xZKUEdUDk-ZD_6MbB8rDw82fd0RB60wc,78943
194
194
  letta/server/startup.sh,sha256=wTOQOJJZw_Iec57WIu0UW0AVflk0ZMWYZWg8D3T_gSQ,698
195
195
  letta/server/static_files/assets/index-3ab03d5b.css,sha256=OrA9W4iKJ5h2Wlr7GwdAT4wow0CM8hVit1yOxEL49Qw,54295
196
196
  letta/server/static_files/assets/index-9fa459a2.js,sha256=wtfkyHnEIMACHKL3UgN_jZNOKWEcOFjmWoeRHLngPwk,1815584
@@ -208,10 +208,10 @@ letta/services/agents_tags_manager.py,sha256=zNqeXDpaf4dQ77jrRHiQfITdk4FawBzcND-
208
208
  letta/services/block_manager.py,sha256=TrbStwHAREwnybA6jZSkNPe-EYUa5rdiuliPR2PTV-M,5426
209
209
  letta/services/blocks_agents_manager.py,sha256=mfO3EMW9os_E1_r4SRlC2wmBFFLpt8p-yhdOH_Iotaw,5627
210
210
  letta/services/organization_manager.py,sha256=OfE2_NMmhqXURX4sg7hCOiFQVQpV5ZiPu7J3sboCSYc,3555
211
- letta/services/per_agent_lock_manager.py,sha256=02iw5e-xoLiKGqqn2KdJdk-QlrDHPz5oMuEs1ibwXHA,540
211
+ letta/services/per_agent_lock_manager.py,sha256=porM0cKKANQ1FvcGXOO_qM7ARk5Fgi1HVEAhXsAg9-4,546
212
212
  letta/services/sandbox_config_manager.py,sha256=9BCu59nHR4nIMFXgFyEMOY2UTmZvBMS3GlDBWWCHB4I,12648
213
213
  letta/services/source_manager.py,sha256=StX5Wfd7XSCKJet8qExIu3GMoI-eMIbEarAeTv2gq0s,6555
214
- letta/services/tool_execution_sandbox.py,sha256=VHsdRYYWkp5UQOzqmznsIOIXn7iUiXRGxNqv655YXwU,13100
214
+ letta/services/tool_execution_sandbox.py,sha256=_kak3Mp_FHCyY8lpdUoMNnHvEPna6wOtmTUMZAV121Q,14353
215
215
  letta/services/tool_manager.py,sha256=FVCB9R3NFahh-KE5jROzf6J9WEgqhqGoDk5RpWjlgjg,7835
216
216
  letta/services/tool_sandbox_env/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
217
217
  letta/services/user_manager.py,sha256=UJa0hqCjz0yXtvrCR8OVBqlSR5lC_Ejn-uG__58zLds,4398
@@ -219,9 +219,9 @@ letta/settings.py,sha256=ZcUcwvl7hStawZ0JOA0133jNk3j5qBd7qlFAAaIPsU8,3608
219
219
  letta/streaming_interface.py,sha256=_FPUWy58j50evHcpXyd7zB1wWqeCc71NCFeWh_TBvnw,15736
220
220
  letta/streaming_utils.py,sha256=329fsvj1ZN0r0LpQtmMPZ2vSxkDBIUUwvGHZFkjm2I8,11745
221
221
  letta/system.py,sha256=buKYPqG5n2x41hVmWpu6JUpyd7vTWED9Km2_M7dLrvk,6960
222
- letta/utils.py,sha256=COwQLAt02eEM9tjp6p5kN8YeTqGXr714l5BvffLVCLU,32376
223
- letta_nightly-0.5.4.dev20241128000451.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
224
- letta_nightly-0.5.4.dev20241128000451.dist-info/METADATA,sha256=vYzNsn1K8OhLOM8-AclcS7bIepEwp3StewZg7pu7sTo,11515
225
- letta_nightly-0.5.4.dev20241128000451.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
226
- letta_nightly-0.5.4.dev20241128000451.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
227
- letta_nightly-0.5.4.dev20241128000451.dist-info/RECORD,,
222
+ letta/utils.py,sha256=iELiiJhSnijGDmwyk_T4NBJIqFUnEw_Flv9ZpSBUPFA,32136
223
+ letta_nightly-0.6.0.dev20241204051808.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
224
+ letta_nightly-0.6.0.dev20241204051808.dist-info/METADATA,sha256=4ioH68hCc1kGmkAXK2bv4gLhD_6yJNwA2d4oN2JndTk,11505
225
+ letta_nightly-0.6.0.dev20241204051808.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
226
+ letta_nightly-0.6.0.dev20241204051808.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
227
+ letta_nightly-0.6.0.dev20241204051808.dist-info/RECORD,,