letta-nightly 0.6.48.dev20250407104216__py3-none-any.whl → 0.6.49.dev20250408104230__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.

Files changed (87) hide show
  1. letta/__init__.py +1 -1
  2. letta/agent.py +47 -12
  3. letta/agents/base_agent.py +7 -4
  4. letta/agents/helpers.py +52 -0
  5. letta/agents/letta_agent.py +105 -42
  6. letta/agents/voice_agent.py +2 -2
  7. letta/constants.py +13 -1
  8. letta/errors.py +10 -3
  9. letta/functions/function_sets/base.py +65 -0
  10. letta/functions/interface.py +2 -2
  11. letta/functions/mcp_client/base_client.py +18 -1
  12. letta/{dynamic_multi_agent.py → groups/dynamic_multi_agent.py} +3 -0
  13. letta/groups/helpers.py +113 -0
  14. letta/{round_robin_multi_agent.py → groups/round_robin_multi_agent.py} +2 -0
  15. letta/groups/sleeptime_multi_agent.py +259 -0
  16. letta/{supervisor_multi_agent.py → groups/supervisor_multi_agent.py} +1 -0
  17. letta/helpers/converters.py +109 -7
  18. letta/helpers/message_helper.py +1 -0
  19. letta/helpers/tool_rule_solver.py +40 -23
  20. letta/interface.py +12 -5
  21. letta/interfaces/anthropic_streaming_interface.py +329 -0
  22. letta/llm_api/anthropic.py +12 -1
  23. letta/llm_api/anthropic_client.py +65 -14
  24. letta/llm_api/azure_openai.py +2 -2
  25. letta/llm_api/google_ai_client.py +13 -2
  26. letta/llm_api/google_constants.py +3 -0
  27. letta/llm_api/google_vertex_client.py +2 -2
  28. letta/llm_api/llm_api_tools.py +1 -1
  29. letta/llm_api/llm_client.py +7 -0
  30. letta/llm_api/llm_client_base.py +2 -7
  31. letta/llm_api/openai.py +7 -1
  32. letta/llm_api/openai_client.py +250 -0
  33. letta/orm/__init__.py +4 -0
  34. letta/orm/agent.py +6 -0
  35. letta/orm/block.py +32 -2
  36. letta/orm/block_history.py +46 -0
  37. letta/orm/custom_columns.py +60 -0
  38. letta/orm/enums.py +7 -0
  39. letta/orm/group.py +6 -0
  40. letta/orm/groups_blocks.py +13 -0
  41. letta/orm/llm_batch_items.py +55 -0
  42. letta/orm/llm_batch_job.py +48 -0
  43. letta/orm/message.py +7 -1
  44. letta/orm/organization.py +2 -0
  45. letta/orm/sqlalchemy_base.py +18 -15
  46. letta/prompts/system/memgpt_sleeptime_chat.txt +52 -0
  47. letta/prompts/system/sleeptime.txt +26 -0
  48. letta/schemas/agent.py +13 -1
  49. letta/schemas/enums.py +17 -2
  50. letta/schemas/group.py +14 -1
  51. letta/schemas/letta_message.py +5 -3
  52. letta/schemas/llm_batch_job.py +53 -0
  53. letta/schemas/llm_config.py +14 -4
  54. letta/schemas/message.py +44 -0
  55. letta/schemas/tool.py +3 -0
  56. letta/schemas/usage.py +1 -0
  57. letta/server/db.py +2 -0
  58. letta/server/rest_api/app.py +1 -1
  59. letta/server/rest_api/chat_completions_interface.py +8 -3
  60. letta/server/rest_api/interface.py +36 -7
  61. letta/server/rest_api/routers/v1/agents.py +53 -39
  62. letta/server/rest_api/routers/v1/runs.py +14 -2
  63. letta/server/rest_api/utils.py +15 -4
  64. letta/server/server.py +120 -71
  65. letta/services/agent_manager.py +70 -6
  66. letta/services/block_manager.py +190 -2
  67. letta/services/group_manager.py +68 -0
  68. letta/services/helpers/agent_manager_helper.py +6 -4
  69. letta/services/llm_batch_manager.py +139 -0
  70. letta/services/message_manager.py +17 -31
  71. letta/services/tool_executor/tool_execution_sandbox.py +1 -3
  72. letta/services/tool_executor/tool_executor.py +9 -20
  73. letta/services/tool_manager.py +14 -3
  74. letta/services/tool_sandbox/__init__.py +0 -0
  75. letta/services/tool_sandbox/base.py +188 -0
  76. letta/services/tool_sandbox/e2b_sandbox.py +116 -0
  77. letta/services/tool_sandbox/local_sandbox.py +221 -0
  78. letta/sleeptime_agent.py +61 -0
  79. letta/streaming_interface.py +20 -10
  80. letta/utils.py +4 -0
  81. {letta_nightly-0.6.48.dev20250407104216.dist-info → letta_nightly-0.6.49.dev20250408104230.dist-info}/METADATA +2 -2
  82. {letta_nightly-0.6.48.dev20250407104216.dist-info → letta_nightly-0.6.49.dev20250408104230.dist-info}/RECORD +85 -69
  83. letta/offline_memory_agent.py +0 -173
  84. letta/services/tool_executor/async_tool_execution_sandbox.py +0 -397
  85. {letta_nightly-0.6.48.dev20250407104216.dist-info → letta_nightly-0.6.49.dev20250408104230.dist-info}/LICENSE +0 -0
  86. {letta_nightly-0.6.48.dev20250407104216.dist-info → letta_nightly-0.6.49.dev20250408104230.dist-info}/WHEEL +0 -0
  87. {letta_nightly-0.6.48.dev20250407104216.dist-info → letta_nightly-0.6.49.dev20250408104230.dist-info}/entry_points.txt +0 -0
@@ -33,7 +33,7 @@ class AgentChunkStreamingInterface(ABC):
33
33
  raise NotImplementedError
34
34
 
35
35
  @abstractmethod
36
- def internal_monologue(self, msg: str, msg_obj: Optional[Message] = None):
36
+ def internal_monologue(self, msg: str, msg_obj: Optional[Message] = None, chunk_index: Optional[int] = None):
37
37
  """Letta generates some internal monologue"""
38
38
  raise NotImplementedError
39
39
 
@@ -43,13 +43,18 @@ class AgentChunkStreamingInterface(ABC):
43
43
  raise NotImplementedError
44
44
 
45
45
  @abstractmethod
46
- def function_message(self, msg: str, msg_obj: Optional[Message] = None):
46
+ def function_message(self, msg: str, msg_obj: Optional[Message] = None, chunk_index: Optional[int] = None):
47
47
  """Letta calls a function"""
48
48
  raise NotImplementedError
49
49
 
50
50
  @abstractmethod
51
51
  def process_chunk(
52
- self, chunk: ChatCompletionChunkResponse, message_id: str, message_date: datetime, expect_reasoning_content: bool = False
52
+ self,
53
+ chunk: ChatCompletionChunkResponse,
54
+ message_id: str,
55
+ message_date: datetime,
56
+ expect_reasoning_content: bool = False,
57
+ message_index: int = 0,
53
58
  ):
54
59
  """Process a streaming chunk from an OpenAI-compatible server"""
55
60
  raise NotImplementedError
@@ -95,7 +100,12 @@ class StreamingCLIInterface(AgentChunkStreamingInterface):
95
100
  pass
96
101
 
97
102
  def process_chunk(
98
- self, chunk: ChatCompletionChunkResponse, message_id: str, message_date: datetime, expect_reasoning_content: bool = False
103
+ self,
104
+ chunk: ChatCompletionChunkResponse,
105
+ message_id: str,
106
+ message_date: datetime,
107
+ expect_reasoning_content: bool = False,
108
+ message_index: int = 0,
99
109
  ):
100
110
  assert len(chunk.choices) == 1, chunk
101
111
 
@@ -166,7 +176,7 @@ class StreamingCLIInterface(AgentChunkStreamingInterface):
166
176
  StreamingCLIInterface.nonstreaming_interface(msg)
167
177
 
168
178
  @staticmethod
169
- def internal_monologue(msg: str, msg_obj: Optional[Message] = None):
179
+ def internal_monologue(msg: str, msg_obj: Optional[Message] = None, chunk_index: Optional[int] = None):
170
180
  StreamingCLIInterface.nonstreaming_interface(msg, msg_obj)
171
181
 
172
182
  @staticmethod
@@ -186,7 +196,7 @@ class StreamingCLIInterface(AgentChunkStreamingInterface):
186
196
  StreamingCLIInterface.nonstreaming_interface(msg, msg_obj)
187
197
 
188
198
  @staticmethod
189
- def function_message(msg: str, msg_obj: Optional[Message] = None, debug: bool = DEBUG):
199
+ def function_message(msg: str, msg_obj: Optional[Message] = None, debug: bool = DEBUG, chunk_index: Optional[int] = None):
190
200
  StreamingCLIInterface.nonstreaming_interface(msg, msg_obj)
191
201
 
192
202
  @staticmethod
@@ -218,7 +228,7 @@ class AgentRefreshStreamingInterface(ABC):
218
228
  raise NotImplementedError
219
229
 
220
230
  @abstractmethod
221
- def internal_monologue(self, msg: str, msg_obj: Optional[Message] = None):
231
+ def internal_monologue(self, msg: str, msg_obj: Optional[Message] = None, chunk_index: Optional[int] = None):
222
232
  """Letta generates some internal monologue"""
223
233
  raise NotImplementedError
224
234
 
@@ -228,7 +238,7 @@ class AgentRefreshStreamingInterface(ABC):
228
238
  raise NotImplementedError
229
239
 
230
240
  @abstractmethod
231
- def function_message(self, msg: str, msg_obj: Optional[Message] = None):
241
+ def function_message(self, msg: str, msg_obj: Optional[Message] = None, chunk_index: Optional[int] = None):
232
242
  """Letta calls a function"""
233
243
  raise NotImplementedError
234
244
 
@@ -355,7 +365,7 @@ class StreamingRefreshCLIInterface(AgentRefreshStreamingInterface):
355
365
  def warning_message(msg: str):
356
366
  StreamingCLIInterface.nonstreaming_interface.warning_message(msg)
357
367
 
358
- def internal_monologue(self, msg: str, msg_obj: Optional[Message] = None):
368
+ def internal_monologue(self, msg: str, msg_obj: Optional[Message] = None, chunk_index: Optional[int] = None):
359
369
  if self.disable_inner_mono_call:
360
370
  return
361
371
  StreamingCLIInterface.nonstreaming_interface.internal_monologue(msg, msg_obj)
@@ -378,7 +388,7 @@ class StreamingRefreshCLIInterface(AgentRefreshStreamingInterface):
378
388
  StreamingCLIInterface.nonstreaming_interface.user_message(msg, msg_obj)
379
389
 
380
390
  @staticmethod
381
- def function_message(msg: str, msg_obj: Optional[Message] = None, debug: bool = DEBUG):
391
+ def function_message(msg: str, msg_obj: Optional[Message] = None, debug: bool = DEBUG, chunk_index: Optional[int] = None):
382
392
  StreamingCLIInterface.nonstreaming_interface.function_message(msg, msg_obj)
383
393
 
384
394
  @staticmethod
letta/utils.py CHANGED
@@ -1070,3 +1070,7 @@ def log_telemetry(logger: Logger, event: str, **kwargs):
1070
1070
  timestamp = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S,%f UTC") # More readable timestamp
1071
1071
  extra_data = " | ".join(f"{key}={value}" for key, value in kwargs.items() if value is not None)
1072
1072
  logger.info(f"[{timestamp}] EVENT: {event} | {extra_data}")
1073
+
1074
+
1075
+ def make_key(*args, **kwargs):
1076
+ return str((args, tuple(sorted(kwargs.items()))))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-nightly
3
- Version: 0.6.48.dev20250407104216
3
+ Version: 0.6.49.dev20250408104230
4
4
  Summary: Create LLM agents with long-term memory and custom tools
5
5
  License: Apache License
6
6
  Author: Letta Team
@@ -49,7 +49,7 @@ Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev" or extra == "all"
49
49
  Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
50
50
  Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "desktop" or extra == "all"
51
51
  Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "desktop" or extra == "all"
52
- Requires-Dist: letta_client (>=0.1.65,<0.2.0) ; extra == "desktop"
52
+ Requires-Dist: letta_client (>=0.1.97,<0.2.0) ; extra == "desktop"
53
53
  Requires-Dist: llama-index (>=0.12.2,<0.13.0)
54
54
  Requires-Dist: llama-index-embeddings-openai (>=0.3.1,<0.4.0)
55
55
  Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "desktop" or extra == "all"
@@ -1,12 +1,13 @@
1
- letta/__init__.py,sha256=ybkzV0FTH0Df6VATwyLpOuBWuSFNNe_qpMjvCbLxcls,918
1
+ letta/__init__.py,sha256=vFxBYQ7CXzdpscTSkuWubBzVc4zaZDlIrsV47silfdA,918
2
2
  letta/__main__.py,sha256=6Hs2PV7EYc5Tid4g4OtcLXhqVHiNYTGzSBdoOnW2HXA,29
3
- letta/agent.py,sha256=swKmDf1bR1hD8VAIEl74-VgiQym0IAPxL4u9F7pvtBQ,69450
3
+ letta/agent.py,sha256=p50-366ei7AFHkJdMbRYroN5Kb3n50Kjmnfh8v0c0vo,71193
4
4
  letta/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- letta/agents/base_agent.py,sha256=BX-Dj9CZgbwjhVn_UzqXDgDOc-moA-BjZ17200_XZL8,1675
5
+ letta/agents/base_agent.py,sha256=prNHSRthrhFiPZD6FL7KJ6AG-FJgFCI1c-ZQhRQWtec,1792
6
6
  letta/agents/ephemeral_agent.py,sha256=DBMXT50UQoqjkvl_Piwle3Fy7iXopy15oMWwnWzbpvo,2751
7
7
  letta/agents/ephemeral_memory_agent.py,sha256=-Wn7DCQC06UBHkINGOME4oQ8sdr-jJZTb72NRK5u62U,4847
8
- letta/agents/letta_agent.py,sha256=xvcX0dXA-kuav1aRxO3kgnJ7wcv8jkxfIYtDwCIVdvc,14420
9
- letta/agents/voice_agent.py,sha256=Z6yeki9gljotWBj7_fQmCOdkzfAGjBvBkJe3K_oiNVU,17247
8
+ letta/agents/helpers.py,sha256=FsFPxY2lxaWBWphBYIVIO9pbWM2C13HbcWVnWtbK2y8,2522
9
+ letta/agents/letta_agent.py,sha256=vwR8lxDwVXW16rX35B3qZFnpjxmS3gzhlGOxY02KR98,17753
10
+ letta/agents/voice_agent.py,sha256=kbIYVdYbX7w6YPU2n66fxnSL336kIzub9xczBZ2u_Mc,17233
10
11
  letta/benchmark/benchmark.py,sha256=ebvnwfp3yezaXOQyGXkYCDYpsmre-b9hvNtnyx4xkG0,3701
11
12
  letta/benchmark/constants.py,sha256=aXc5gdpMGJT327VuxsT5FngbCK2J41PQYeICBO7g_RE,536
12
13
  letta/cli/cli.py,sha256=zJz78-qDUz-depb7VQWkg87RBKiETQU4h9DI6ukQBa8,16477
@@ -17,59 +18,65 @@ letta/client/client.py,sha256=3uNsMqQyebbjFeWHHyqcManPUH7JzkBzmA9OgOLQrQs,137582
17
18
  letta/client/streaming.py,sha256=UsDS_tDTsA3HgYryIDvGGmx_dWfnfQwtmEwLi4Z89Ik,4701
18
19
  letta/client/utils.py,sha256=VCGV-op5ZSmurd4yw7Vhf93XDQ0BkyBT8qsuV7EqfiU,2859
19
20
  letta/config.py,sha256=JFGY4TWW0Wm5fTbZamOwWqk5G8Nn-TXyhgByGoAqy2c,12375
20
- letta/constants.py,sha256=_QI06HD6yLmGFrTqexLkUnUWSsKUiBlM1QtbiLGEq4k,7773
21
+ letta/constants.py,sha256=wPVCqmYBANB8vyu3igqrX3gGoTEWYKkKLpdkkZ5a4PA,8223
21
22
  letta/data_sources/connectors.py,sha256=R2AssXpqS7wN6VI8AfxvqaZs5S1ZACc4E_FewmR9iZI,7022
22
23
  letta/data_sources/connectors_helper.py,sha256=oQpVlc-BjSz9sTZ7sp4PsJSXJbBKpZPi3Dam03CURTQ,3376
23
- letta/dynamic_multi_agent.py,sha256=DlYaSK5roLZ8M1HGUNeTh9YcVnDpPHKGnBv1jHdWkC4,12066
24
24
  letta/embeddings.py,sha256=KvC2bl5tARpVY9xcFmw4Cwu1vN0DoH266v2mSUZqwkY,10528
25
- letta/errors.py,sha256=szJhSRXndgjMCqpN_rSa-o3AGhMo7AMqd_OmP8-wM28,6333
25
+ letta/errors.py,sha256=TezN7uPt7TtOof4Iu9_tq3UxrFE0zjn2o-3_ewKCfiw,6641
26
26
  letta/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  letta/functions/ast_parsers.py,sha256=CQI0rUoIXcLKAev_GYrXcldRIGN5ZQtk5u4FLoHe5sE,5728
28
- letta/functions/function_sets/base.py,sha256=sxtxbIRfPvDnOQ1heQzKf3PbVPPoFUjNWJgFIilWGWM,6136
28
+ letta/functions/function_sets/base.py,sha256=CVPSjGR-QaSC7gi3h0A3FeWlyxb30SaN9alTnL0w69M,9115
29
29
  letta/functions/function_sets/extras.py,sha256=mG7jCd2RUsf1w9G8mVcv26twJWpiDhbWI6VvnLZoEOk,4899
30
30
  letta/functions/function_sets/multi_agent.py,sha256=y22k0z-u5Qh_V82IxmdIbd_rKbXdx5mZP2pXM1kYNlU,7056
31
31
  letta/functions/functions.py,sha256=NyWLh7a-f4mXti5vM1oWDwXzfA58VmVVqL03O9vosKY,5672
32
32
  letta/functions/helpers.py,sha256=NDy2iDh3jUeyClavZiAah7PsOXPA6KdZHU_GcSJcfYE,27434
33
- letta/functions/interface.py,sha256=s_PPp5WDvGH_y9KUpMlORkdC141ITczFk3wsevrrUD8,2866
33
+ letta/functions/interface.py,sha256=pN1gpDnLISW44gRcic1IX6I6pDwOT9UbkST_4ICuMvQ,2936
34
34
  letta/functions/mcp_client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- letta/functions/mcp_client/base_client.py,sha256=TZ98rGk93XRz8qVnTu3-YwuvnZLWEDHdPFZk6QXkkKk,3652
35
+ letta/functions/mcp_client/base_client.py,sha256=lFcdLMfKuQb2CQ5gfG29t83s43mXIc__N4dtg2vBkZQ,4330
36
36
  letta/functions/mcp_client/exceptions.py,sha256=IE5SLCuMK7hK9V1QsJafPo6u0S0OwqRvMx2NcsE3g3c,313
37
37
  letta/functions/mcp_client/sse_client.py,sha256=XOLnWIcrjBEkZ-IksgnHKSdVds3pC2E8OPkIhCNxloo,1470
38
38
  letta/functions/mcp_client/stdio_client.py,sha256=2oouLGphu4S15OrYj97n9_ZYZo-GMRWNLWwaw-U4TNs,4562
39
39
  letta/functions/mcp_client/types.py,sha256=nmcnQn2EpxXzXg5_pWPsHZobfxO6OucaUgz1bVvam7o,1411
40
40
  letta/functions/schema_generator.py,sha256=4hiDQpHemyfKWME-5X6xJuSiv7g9V_BgAPFegohHBIM,22327
41
+ letta/groups/dynamic_multi_agent.py,sha256=Opf9yvD1TRgPTLD0wNXaLDH6j5U82_bZ6wDH-UE5WZw,12198
42
+ letta/groups/helpers.py,sha256=Cof7vfZMOT2gApYpROpiAyKSKrofP1UPJxZQWFcZaqA,4336
43
+ letta/groups/round_robin_multi_agent.py,sha256=pBoZuOyoeG9NCAyz4998ZqW61Fa1STYl18D56u12yg8,7236
44
+ letta/groups/sleeptime_multi_agent.py,sha256=fCBPgM7lvYHoZLurudUe9tBOeFiBWudDdQsJX8EgjXc,9834
45
+ letta/groups/supervisor_multi_agent.py,sha256=ZfJb-rf2DGgOnZHru08KUJ9Y_1eFfOdlYJkd5zW5tgk,4468
41
46
  letta/helpers/__init__.py,sha256=p0luQ1Oe3Skc6sH4O58aHHA3Qbkyjifpuq0DZ1GAY0U,59
42
47
  letta/helpers/composio_helpers.py,sha256=6CWV483vE3N-keQlblexxBiQHxorMAgQuvbok4adGO4,949
43
- letta/helpers/converters.py,sha256=ndAm9p7cfA1YuoLdZOV7rTFADz2iyeUt_OZtaI5GFO0,9037
48
+ letta/helpers/converters.py,sha256=Y4lewCDuW-JPHqpPn7nn0GgvYi0J2B9l5s63TURQRRU,12937
44
49
  letta/helpers/datetime_helpers.py,sha256=7U5ZJkE0cLki4sG8ukIHZSAoFfQpLWQu2kFekETy6Zg,2633
45
50
  letta/helpers/json_helpers.py,sha256=PWZ5HhSqGXO4e563dM_8M72q7ScirjXQ4Rv1ckohaV8,396
46
- letta/helpers/message_helper.py,sha256=ZntYIsiOHv9lOPmloCrh9Mxf74l0F9-D99-FM5InI34,1668
51
+ letta/helpers/message_helper.py,sha256=bR2cjbdDHV1SUmk3IAsxKrWgaF1qP1Qz4ZCc2ws0l_Y,1695
47
52
  letta/helpers/tool_execution_helper.py,sha256=iLEqH7RdHUJSJO8p-YZCl3bYMDTix6FeYplwHAZUac0,7578
48
- letta/helpers/tool_rule_solver.py,sha256=JPRtMjYalvaxx0HnoEzV3dw9Gee4s8rQoqxP1HHyOWc,6036
53
+ letta/helpers/tool_rule_solver.py,sha256=YgjEqKWmymQW64dmp9WqNzaMyyrBiTzM1_gnfJQP6b0,6792
49
54
  letta/humans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
55
  letta/humans/examples/basic.txt,sha256=Lcp8YESTWvOJgO4Yf_yyQmgo5bKakeB1nIVrwEGG6PA,17
51
56
  letta/humans/examples/cs_phd.txt,sha256=9C9ZAV_VuG7GB31ksy3-_NAyk8rjE6YtVOkhp08k1xw,297
52
- letta/interface.py,sha256=6CrnvydRZfVY9BQ4fCn85rmQU6D9udcsGww8nTnT95E,12793
57
+ letta/interface.py,sha256=6GKasvJMASu-kcZch6Hffz1vnHuPA_ryI6cLH2bMArc,13023
53
58
  letta/interfaces/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
+ letta/interfaces/anthropic_streaming_interface.py,sha256=9AH4iGe9Uh3l0smdCDy_1p1Qp0boqmnusJo6PkY38fU,16192
54
60
  letta/interfaces/openai_chat_completions_streaming_interface.py,sha256=SfqVp7V7AbBqv8D_IwyqrcztNiI0nKhjAvqtZQE_jfM,4729
55
61
  letta/interfaces/utils.py,sha256=c6jvO0dBYHh8DQnlN-B0qeNC64d3CSunhfqlFA4pJTY,278
56
62
  letta/llm_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
- letta/llm_api/anthropic.py,sha256=PRppmT-aZq3i2s-iLg6O4AgxfPcHU5TNVgzppY0DaUY,43652
58
- letta/llm_api/anthropic_client.py,sha256=SmV2vnFAK06XalITaF2HVnWGlYNGV8Pd3WmOiiWCM3Q,19710
63
+ letta/llm_api/anthropic.py,sha256=1Jn_5uXKXMgGuMCytE21rHGlJ_Y-ORNM7K6dFJ5V5EU,44255
64
+ letta/llm_api/anthropic_client.py,sha256=5y4t5hZIoxyYSNIx8YYX9mrXaPbqEg-qcdNByOHkbYU,22096
59
65
  letta/llm_api/aws_bedrock.py,sha256=kAPpKPRe4ZUa6fkxFbo8xwQgq4fJf3QoZEAP1LOCfaw,4168
60
- letta/llm_api/azure_openai.py,sha256=Y8R9vDmruJnCr_EfmPj_oangX8gJPpiyhTppD9T8SHE,5168
66
+ letta/llm_api/azure_openai.py,sha256=YAkXwKyfnJFNhB45pkJVFsoxUNB_M74rQYchtw_CN6I,5099
61
67
  letta/llm_api/azure_openai_constants.py,sha256=ZaR2IasJThijG0uhLKJThrixdAxLPD2IojfeaJ-KQMQ,294
62
68
  letta/llm_api/cohere.py,sha256=uzSXkvDPg4CV6tNnbX3yYkYsXRXAm4FvclUX8ln1etM,14863
63
69
  letta/llm_api/deepseek.py,sha256=b1mSW8gnBrpAI8d2GcBpDyLYDnuC-P1UP6xJPalfQS4,12456
64
- letta/llm_api/google_ai_client.py,sha256=rzW1v6yOjKV-qtb4pIn9dJy9VEbLMoiewiqE9cjGyio,17651
65
- letta/llm_api/google_constants.py,sha256=ZdABT9l9l-qKcV2QCkVsv9kQbttx6JyIJoOWS8IMS5o,448
66
- letta/llm_api/google_vertex_client.py,sha256=Cu1AVKxLCSvip1h8lleJ8voatSH2d6XnGmQjdKqmVoo,9648
70
+ letta/llm_api/google_ai_client.py,sha256=jP10ryjDoBm_FqS3hDsi9O-aUbnSTdI4WktIdHASlJo,18128
71
+ letta/llm_api/google_constants.py,sha256=1dqwt-YwdYGnAHV5rIPfGHfE3ybPzSn_48vlNYfd-bk,588
72
+ letta/llm_api/google_vertex_client.py,sha256=8JEb7CQKIjSpRlCv3KJJhflw6sRvdJ-1fqrUAJGbWrE,9667
67
73
  letta/llm_api/helpers.py,sha256=sLYv30UnKBRVPuhU_KDXfKFdbkUONiDAyVEwGr86l3A,16780
68
- letta/llm_api/llm_api_tools.py,sha256=ABNSPIJgbGmOBcCTjoMIB5g2bOYbXP9HpTKVjMmDlv0,26993
69
- letta/llm_api/llm_client.py,sha256=bnS5vU5NW-rybZVECSwLYv8AvHMbPP6VMRfMqYVZ-CY,1846
70
- letta/llm_api/llm_client_base.py,sha256=3umeVqo-IbSUUN1Uzq6wvoDeTHqvhktCCzNM0nJecq8,5619
74
+ letta/llm_api/llm_api_tools.py,sha256=2ZOE-dM-1nr8JVF5CYtSrDZ8DdTspcY4_baiwTJ-MS0,27028
75
+ letta/llm_api/llm_client.py,sha256=PWnzdwD_7TMmbBuZnCWt10pJL4WXLCsQ3yS9-Y3Nh-c,2112
76
+ letta/llm_api/llm_client_base.py,sha256=SznKqeO4CPW36oC7QL4bAjwi1EFwn_GjJZ4rTPhEa8I,5424
71
77
  letta/llm_api/mistral.py,sha256=fHdfD9ug-rQIk2qn8tRKay1U6w9maF11ryhKi91FfXM,1593
72
- letta/llm_api/openai.py,sha256=pdaZmFTTOvxJ-Od91rGwZ0ucvpdyKMCyGI5yDZgKIUM,22468
78
+ letta/llm_api/openai.py,sha256=9PwwmuxRgefHibJtT_TVqhJAeLK2st3ecvAlJ_P2TD8,22764
79
+ letta/llm_api/openai_client.py,sha256=ciGoS4q46N9NaB9GZCoS4lhBax9KGzGxe0rifFx7O84,11620
73
80
  letta/local_llm/README.md,sha256=hFJyw5B0TU2jrh9nb0zGZMgdH-Ei1dSRfhvPQG_NSoU,168
74
81
  letta/local_llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
82
  letta/local_llm/chat_completion_proxy.py,sha256=k8_8kIKglMSXnthIdc4TnR3ACJVQsk6MHJY_Y3lM6B0,13845
@@ -110,36 +117,39 @@ letta/local_llm/webui/settings.py,sha256=gmLHfiOl1u4JmlAZU2d2O8YKF9lafdakyjwR_ft
110
117
  letta/log.py,sha256=FbFwU9KEX7k0FBYhPl7fJ6uQ3NO3-ZbsnM2OpcTFXjo,2217
111
118
  letta/main.py,sha256=_agyaYPJq70OL0goNwO34zENL2KupnTgqlg-HVcNaTY,15379
112
119
  letta/memory.py,sha256=dGzMdYYG1Mhan9POLcmyI6fVL7Xs8TEozWfAo4v1QQo,3592
113
- letta/offline_memory_agent.py,sha256=P_rm6GmKAH6lg7-njuv7dK29f7v5-tAQy-rMOwcPfwk,7499
114
120
  letta/openai_backcompat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
121
  letta/openai_backcompat/openai_object.py,sha256=GSzeCTwLpLD2fH4X8wVqzwdmoTjKK2I4PnriBY453lc,13505
116
122
  letta/orm/__all__.py,sha256=2gh2MZTkA3Hw67VWVKK3JIStJOqTeLdpCvYSVYNeEDA,692
117
- letta/orm/__init__.py,sha256=t9ZXn6Y7Cp1Ia0iZXBhXw9JZ6-ff8bSavKD4uy2mBN8,1079
118
- letta/orm/agent.py,sha256=X2H_wDIvX7K0uBO5aoXfIH1C3b31FZ8IywWfgmDc0J8,9602
123
+ letta/orm/__init__.py,sha256=sLJwaOdpm0Ts2EnE00v_zV39m_q7N4sLXvdmTw1KQic,1276
124
+ letta/orm/agent.py,sha256=ndSaoj6OpWBg_U59ad_VHp9nn3ttBy9tuY46Bn93kBA,9986
119
125
  letta/orm/agents_tags.py,sha256=dYSnHz4IWBjyOiQ4RJomX3P0QN76JTlEZEw5eJM6Emg,925
120
126
  letta/orm/base.py,sha256=VjvxF9TwKF9Trf8BJkDgf7D6KrWWopOkUiF18J3IElk,3071
121
- letta/orm/block.py,sha256=Ci_CO54CDb4vpZkrRircmYjc-Y00Zhs9T14s3Bf_dF4,4134
127
+ letta/orm/block.py,sha256=Hut-NAq6cDp6WXJ-2G1-5DJCZg0cB7D1X4z1taiBbS0,5591
128
+ letta/orm/block_history.py,sha256=6-k9e5weTWKqWZgZUH2lF42vWrLhXNUJZQVJDHQEfgY,2088
122
129
  letta/orm/blocks_agents.py,sha256=W0dykl9OchAofSuAYZD5zNmhyMabPr9LTJrz-I3A0m4,983
123
- letta/orm/custom_columns.py,sha256=A6FSbwnweFwcnunH38ZIebjI2zWufW_aPz6WK1aF9ps,3007
124
- letta/orm/enums.py,sha256=gUmlsCN04RiwtbN1FysjgqDqbR7WiU546iNPjCEzTNk,610
130
+ letta/orm/custom_columns.py,sha256=XFWT8e-LR0cIUAAJ9ymuAG1NMX9Z-xfvCOluIqQD-RM,4799
131
+ letta/orm/enums.py,sha256=mVoH07BBSOSwxX4g_768mIGN84bgEyA-b_I6S0gdCn4,786
125
132
  letta/orm/errors.py,sha256=Se0Guz-gqi-D36NUWSh7AP9zTVCSph9KgZh_trwng4o,734
126
133
  letta/orm/file.py,sha256=7_p7LxityP3NQZVURQYG0kgcZhEkVuMN0Fj4h9YOe1w,1780
127
- letta/orm/group.py,sha256=r-XLtuIlUte7QqROl8X1JGrj3Z55q-TtX1GBcBrvbt4,1482
134
+ letta/orm/group.py,sha256=GFN0_ObViH8jbPUXptiztca7gF0eQcCAOVb2LLMmRaA,1916
128
135
  letta/orm/groups_agents.py,sha256=1J6ZyXlTjC8CG0fXPuzfcFo_Bg0cpZSyktYRkoFOUt4,483
136
+ letta/orm/groups_blocks.py,sha256=ou18XqI9tkb0fcecUd4eHTVmmndGuby1DIdmHM5lHF4,489
129
137
  letta/orm/identities_agents.py,sha256=cfIQ6UsbwmjxtGVmFt1ArK2zbKr9k6VWoELuISDnLSc,502
130
138
  letta/orm/identities_blocks.py,sha256=oS0DnDXKzcWtlH2dDFREkNF1JHJ3Kyg8fN9GI8DKtcg,501
131
139
  letta/orm/identity.py,sha256=DQlyqQtszv8AlP0HYftBbewoHbCr-_vQllzEvNuGrxA,2867
132
140
  letta/orm/job.py,sha256=G2P-xUpTapD4lhU2FwMZET1b5QR4ju9WOB3uiTKD_mw,2157
133
141
  letta/orm/job_messages.py,sha256=SgwaYPYwwAC3dBtl9Xye_TWUl9H_-m95S95TTcfPyOg,1245
134
- letta/orm/message.py,sha256=cdQvpTY8HN-Ld5ky2d7CoADcM70xUhzo8vVNlQvzAjc,3466
142
+ letta/orm/llm_batch_items.py,sha256=PrJtT1-bbZXXGK0LvFYV30bIhcOovQ69O0cqLt_Kwds,2744
143
+ letta/orm/llm_batch_job.py,sha256=s7kXwri_SxNfRmkm-ZHGvr0nW2j4pnZlOOu5GZ94B9g,2209
144
+ letta/orm/message.py,sha256=Me1GdA4_iALK-ArWkoU8yKqYG_UsCvLVOWEScS7JkvA,3801
135
145
  letta/orm/mixins.py,sha256=9c79Kfr-Z1hL-SDYKeoptx_yMTbBwJJBo9nrKEzSDAc,1622
136
- letta/orm/organization.py,sha256=XR59kcobWdsAjP-5lHCKuDdlnMrDuRJBqk5ykGrj5cY,3304
146
+ letta/orm/organization.py,sha256=WQnT-UfSbwfp8V_XwqQL11LQE6cdEF2SLWRyVKUi_U8,3572
137
147
  letta/orm/passage.py,sha256=tQi-fZZFBFVz0KZxd0foKPkAOaempgiYOHHK6lJ98gw,3332
138
148
  letta/orm/provider.py,sha256=-qA9tvKTZgaM4D7CoDZZiA7zTgjaaWDV4jZvifQv_MM,805
139
149
  letta/orm/sandbox_config.py,sha256=DyOy_1_zCMlp13elCqPcuuA6OwUove6mrjhcpROTg50,4150
140
150
  letta/orm/source.py,sha256=z89VZUHV9K8Ew9JCYoZqUeRb1WEUKmrn0MMFkppaphE,2117
141
151
  letta/orm/sources_agents.py,sha256=Ik_PokCBrXRd9wXWomeNeb8EtLUwjb9VMZ8LWXqpK5A,473
142
- letta/orm/sqlalchemy_base.py,sha256=4DiFj6M-lCtuzXAsx5w07nzcQBRfWJGaZ4Dnz9zS9Bs,26992
152
+ letta/orm/sqlalchemy_base.py,sha256=NzydTxwFoJIeqwfL8eD7SuRxNS6M3uM9iMnXD5y8Iks,27100
143
153
  letta/orm/sqlite_functions.py,sha256=JCScKiRlYCKxy9hChQ8wsk4GMKknZE24MunnG3fM1Gw,4255
144
154
  letta/orm/step.py,sha256=fjm7fLtYLCtFM6Mj6e2boP6P7dHSFG24Nem85VfVqHg,3216
145
155
  letta/orm/tool.py,sha256=ft3BDA7Pt-zsXLyPvS_Z_Ibis6H6vY20F7Li7p6nPu8,2652
@@ -172,28 +182,30 @@ letta/prompts/system/memgpt_modified_chat.txt,sha256=F_yD4ZcR4aGDE3Z98tI7e609GYe
172
182
  letta/prompts/system/memgpt_modified_o1.txt,sha256=objnDgnxpF3-MmU28ZqZ7-TOG8UlHBM_HMyAdSDWK88,5492
173
183
  letta/prompts/system/memgpt_offline_memory.txt,sha256=rWEJeF-6aiinjkJM9hgLUYCmlEcC_HekYB1bjEUYq6M,2460
174
184
  letta/prompts/system/memgpt_offline_memory_chat.txt,sha256=ituh7gDuio7nC2UKFB7GpBq6crxb8bYedQfJ0ADoPgg,3949
185
+ letta/prompts/system/memgpt_sleeptime_chat.txt,sha256=ieHvVkJYE_4Z_vyUJS4KImBZCSQDcsUmy9IRF-FBpPE,4712
186
+ letta/prompts/system/sleeptime.txt,sha256=XfDl2j0jLYLloMib-EQ0Xu94URPRa7pmZ7VRarzMfOc,2476
175
187
  letta/pytest.ini,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
176
- letta/round_robin_multi_agent.py,sha256=Tu-mQ73uRpSI7yQ-3INOEbyENd9nsQV_DdObBXALtOw,7146
177
- letta/schemas/agent.py,sha256=7Xxp4i0HNc0vKkMX9iXZSd9A-_mQxUXsgY-Y1voK2pc,15204
188
+ letta/schemas/agent.py,sha256=omkyJeBj7neYaxpOkk-72g4elEwBxQKCtFH2oxxafLU,15913
178
189
  letta/schemas/block.py,sha256=rMWflyj982qW86dQK-9saXBHKaLCu3aUG2gQTckG3Ik,4984
179
190
  letta/schemas/embedding_config.py,sha256=ufboqW9ctSBJdhwzJRbrGtTzOTwSKfT0LY0mowpr6fs,3398
180
191
  letta/schemas/embedding_config_overrides.py,sha256=lkTa4y-EQ2RnaEKtKDM0sEAk7EwNa67REw8DGNNtGQY,84
181
- letta/schemas/enums.py,sha256=0tOunJGgrTlORWkl3HrFkFjBT-4KgA2Y9QpLceoY2yY,1033
192
+ letta/schemas/enums.py,sha256=cxmmgsx1DAy3zntl_3Rpzi4pl47e6A7gL3DcDy4yCZA,1235
182
193
  letta/schemas/environment_variables.py,sha256=VRtzOjdeQdHcSHXisk7oJUQlheruxhSWNS0xqlfGzbs,2429
183
194
  letta/schemas/file.py,sha256=ChN2CWzLI2TT9WLItcfElEH0E8b7kzPylF2OQBr6Beg,1550
184
- letta/schemas/group.py,sha256=bM7dsZeCKU3BTP-AncT2CTpYkhjt8oBiPjOIrooMmWY,2383
195
+ letta/schemas/group.py,sha256=aS23bf93EWwpAZteob6EPfg6djGSioL4W7Qm1FL8moA,3101
185
196
  letta/schemas/health.py,sha256=zT6mYovvD17iJRuu2rcaQQzbEEYrkwvAE9TB7iU824c,139
186
197
  letta/schemas/identity.py,sha256=9emyusE65zFSW7IDKDMsGzMwqDbadF0eKjvYNDtpS1s,3220
187
198
  letta/schemas/job.py,sha256=MX9EiLDDIeHm3q52ImOjp7UzXEdYTXAWWobRCAxwV0w,2225
188
199
  letta/schemas/letta_base.py,sha256=DuMqiNFmYwTAsXUHYdX--EWgtFUVzph5ptLZvu7aguI,3988
189
- letta/schemas/letta_message.py,sha256=vPf4r_4pBS8eoXYsesfQeCfTSTWNZ6Ltgk-nrP_9VgI,13664
200
+ letta/schemas/letta_message.py,sha256=dWT0lW25N3lx25bXnJpb5iUu9GQc0ypZR5FjoQoLFX8,13800
190
201
  letta/schemas/letta_message_content.py,sha256=CeIgyOy8HYMh_oGoPYlATp6d3Hp5v7SU3St9HPSbIqo,6402
191
202
  letta/schemas/letta_request.py,sha256=dzy3kwb5j2QLaSV0sDlwISEMt2xxH3IiK-vR9xJV65k,1123
192
203
  letta/schemas/letta_response.py,sha256=pq-SxXQy5yZo1-DiAwV2mMURlUvz1Uu7HHR_tB1hMho,7139
193
- letta/schemas/llm_config.py,sha256=xEAfwigMc5MDY6hUtLRhsWW6iZPlPUezo-ZOZzWB8cs,5953
204
+ letta/schemas/llm_batch_job.py,sha256=q5TCUPsvro1R_02XyNdsJDvKizL-H9ioAbev-2LgoGU,2771
205
+ letta/schemas/llm_config.py,sha256=uZhaCWKt9BKMqWAZg6oBBk6cR5c-pnlcDHdj716VC_o,6540
194
206
  letta/schemas/llm_config_overrides.py,sha256=-oRglCTcajF6UAK3RAa0FLWVuKODPI1v403fDIWMAtA,1815
195
207
  letta/schemas/memory.py,sha256=GOYDfPKzbWftUWO9Hv4KW7xAi1EIQmC8zpP7qvEkVHw,10245
196
- letta/schemas/message.py,sha256=lEgJBnp3swrVbc0lDhm02ajrJmkScIOaBu7Om9Ipb94,45341
208
+ letta/schemas/message.py,sha256=k0WbudJnLdCMI-8ulKWeBHVYTfotO5ukON6gFxif2yc,47149
197
209
  letta/schemas/openai/chat_completion_request.py,sha256=MtqUG7YsgsbJ7Rdauw-NOSpwNBgYjpx00xxrY8jOvmQ,4092
198
210
  letta/schemas/openai/chat_completion_response.py,sha256=yoepGZkg5PIobGqvATJruPdV4odpIUDHWniodSQo3PY,4433
199
211
  letta/schemas/openai/chat_completions.py,sha256=l0e9sT9boTD5VBU5YtJ0s7qUtCfFGB2K-gQLeEZ2LHU,3599
@@ -206,9 +218,9 @@ letta/schemas/run.py,sha256=SRqPRziINIiPunjOhE_NlbnQYgxTvqmbauni_yfBQRA,2085
206
218
  letta/schemas/sandbox_config.py,sha256=SZCo3FSMz-DIBMKGu0atT4tsVFXGsqMFPaJnjrxpkX4,5993
207
219
  letta/schemas/source.py,sha256=IuenIFs7B8uOuYJIHXqR1E28wVSa-pUX6NkLZH7cukg,3141
208
220
  letta/schemas/step.py,sha256=WkcVnruUUOWLKwiWPn2Gfal4EQZPNLqlsd9859xhgsw,2224
209
- letta/schemas/tool.py,sha256=Nj6ztGhpLVj2caEpMxt6e64hp1uBIXe5kng23ONLwiU,12781
221
+ letta/schemas/tool.py,sha256=n1gYBORUwT4pH5NYLLfT8v97JcoI3W6mpnUsa-GzcNg,13063
210
222
  letta/schemas/tool_rule.py,sha256=tZ-BoyFJcFLMOd8KIng8pw3yCtdV8KGh4Vz730ZA-WQ,5674
211
- letta/schemas/usage.py,sha256=b8cNifTm7cqd1MtnqfZqUbn2KtACubX-VkEaYEMLBkg,1153
223
+ letta/schemas/usage.py,sha256=9SSTH5kUliwiVF14b-yKbDcmxQBOLg4YH5xhXDbW9UU,1281
212
224
  letta/schemas/user.py,sha256=V32Tgl6oqB3KznkxUz12y7agkQicjzW7VocSpj78i6Q,1526
213
225
  letta/serialize_schemas/__init__.py,sha256=cosMjvWz7cubC1azbUofzYrcDBTuSgjJImUdsrSs3p0,77
214
226
  letta/serialize_schemas/marshmallow_agent.py,sha256=cO7A5nuWBtrrhMOP8eRNrdBls_9wZe-K1dQr40_yQPI,5271
@@ -222,21 +234,21 @@ letta/serialize_schemas/marshmallow_tool.py,sha256=jwU69BDCakPlYPSk-ta21kuvsURKO
222
234
  letta/serialize_schemas/pydantic_agent_schema.py,sha256=NKq70niUVMI3_lxMKc3u3rOBUhm77bIFaPRj9aidMUQ,3006
223
235
  letta/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
224
236
  letta/server/constants.py,sha256=yAdGbLkzlOU_dLTx0lKDmAnj0ZgRXCEaIcPJWO69eaE,92
225
- letta/server/db.py,sha256=cA1MHpMCTTC1MX7VWppJ-cKq1XW93Vws_vTV0-bKmTE,3642
237
+ letta/server/db.py,sha256=HD8L3Vd8Ri8s7uhXw5MCDt9slYfpOlDVNZcM2JkiVeE,3766
226
238
  letta/server/generate_openapi_schema.sh,sha256=0OtBhkC1g6CobVmNEd_m2B6sTdppjbJLXaM95icejvE,371
227
239
  letta/server/rest_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
- letta/server/rest_api/app.py,sha256=DiTnnLfgVQCeA40zKeweCYyIh5Ct5Hi5CtmU1jqE52k,13685
240
+ letta/server/rest_api/app.py,sha256=FdewLNIa1PhMZoLsQdhsGuDVLCW39yLxWXqmhYcYCDg,13695
229
241
  letta/server/rest_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
230
242
  letta/server/rest_api/auth/index.py,sha256=fQBGyVylGSRfEMLQ17cZzrHd5Y1xiVylvPqH5Rl-lXQ,1378
231
243
  letta/server/rest_api/auth_token.py,sha256=725EFEIiNj4dh70hrSd94UysmFD8vcJLrTRfNHkzxDo,774
232
- letta/server/rest_api/chat_completions_interface.py,sha256=W2Zxm-RuahS5Ll8OzwUJoPC5fGliVGc3yN_icybI3G4,10953
233
- letta/server/rest_api/interface.py,sha256=_RBsgCxb2nrtsOQbiTtIsiVh16y7GXh6oqc7nXYIZyA,63754
244
+ letta/server/rest_api/chat_completions_interface.py,sha256=3kGR7ZW4ldwSeUURyPlvRcekWexs7zfDLYB4FlxNgGY,11088
245
+ letta/server/rest_api/interface.py,sha256=2TSWMKnHrAmu8xIdqx-hl9FST1lXXBgi9k2KR0GfjdI,65702
234
246
  letta/server/rest_api/optimistic_json_parser.py,sha256=SS60lTp1oH2MXbHOChEnNm46xYcoAU3nInIXWDglmmw,6739
235
247
  letta/server/rest_api/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
236
248
  letta/server/rest_api/routers/openai/chat_completions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
237
249
  letta/server/rest_api/routers/openai/chat_completions/chat_completions.py,sha256=OgjWs4zJaIi5Ps67iCTeOLmLXcW0S5Xccd-TcNa9obQ,5321
238
250
  letta/server/rest_api/routers/v1/__init__.py,sha256=AV_uopcsNQIK-paX-9X23dNmLMUDDe_fgLTfeNyjWk8,1456
239
- letta/server/rest_api/routers/v1/agents.py,sha256=MS8rR54ZehrDy8U_USTNrxKUplExfeetoC4fr2rpYRo,32096
251
+ letta/server/rest_api/routers/v1/agents.py,sha256=Mxz3cG_-WkhFy_elXsWm5CDrxqwqcNAYs8tFvf1DPRw,32564
240
252
  letta/server/rest_api/routers/v1/blocks.py,sha256=Sefvon0jLvlNh0oAzntUcDZptnutuJOf-2Wcad_45Dg,4169
241
253
  letta/server/rest_api/routers/v1/groups.py,sha256=B0FQi-JXMIlKflAADY7QCZTMtYdG6sQltjbcAh90j1A,10876
242
254
  letta/server/rest_api/routers/v1/health.py,sha256=MoOjkydhGcJXTiuJrKIB0etVXiRMdTa51S8RQ8-50DQ,399
@@ -245,7 +257,7 @@ letta/server/rest_api/routers/v1/jobs.py,sha256=4oeJfI2odNGubU_g7WSORJhn_usFsbRa
245
257
  letta/server/rest_api/routers/v1/llms.py,sha256=lYp5URXtZk1yu_Pe-p1Wq1uQ0qeb6aWtx78rXSB7N_E,881
246
258
  letta/server/rest_api/routers/v1/organizations.py,sha256=r7rj-cA3shgAgM0b2JCMqjYsDIFv3ruZjU7SYbPGGqg,2831
247
259
  letta/server/rest_api/routers/v1/providers.py,sha256=qyZsNTXgLVsoLZoCVY4qaqiG34zCEVmRUP2Cn6maK_4,2949
248
- letta/server/rest_api/routers/v1/runs.py,sha256=-2_YA2nuxcLqiPjG9CPHeZbyrtlNQZnAsaNohGn5fMg,8278
260
+ letta/server/rest_api/routers/v1/runs.py,sha256=9nuJRjBtRgZPq3CiCEUA_3S2xPHFP5DsJxIenH5OO34,8847
249
261
  letta/server/rest_api/routers/v1/sandbox_configs.py,sha256=9hqnnMwJ3wCwO-Bezu3Xl8i3TDSIuInw3gSeHaKUXfE,8526
250
262
  letta/server/rest_api/routers/v1/sources.py,sha256=1YiTBGpIJQ7QqaKENq9VcIl28xIjYCrNmRwUdPk4_OM,9140
251
263
  letta/server/rest_api/routers/v1/steps.py,sha256=DVVwaxLNbNAgWpr2oQkrNjdS-wi0bP8kVJZUO-hiaf8,3275
@@ -254,8 +266,8 @@ letta/server/rest_api/routers/v1/tools.py,sha256=k_4kSFMsK2WNSmNMclMdu3GrNo-JDqt
254
266
  letta/server/rest_api/routers/v1/users.py,sha256=G5DBHSkPfBgVHN2Wkm-rVYiLQAudwQczIq2Z3YLdbVo,2277
255
267
  letta/server/rest_api/routers/v1/voice.py,sha256=0lerWjrKLkt4gXLhZl1cIcgstOz9Q2HZwc67L58BCXE,2451
256
268
  letta/server/rest_api/static_files.py,sha256=NG8sN4Z5EJ8JVQdj19tkFa9iQ1kBPTab9f_CUxd_u4Q,3143
257
- letta/server/rest_api/utils.py,sha256=gYj-34XoUfUBrFvjsQbdmR-OCp39DwWclUgIRaNsm3Y,13826
258
- letta/server/server.py,sha256=P9RW_D9ajeQ00xecuu-rCkbmYFybAWZ23N7Z1nwGvG8,76097
269
+ letta/server/rest_api/utils.py,sha256=5fPkyCOuDfxzLgrPCXctYkc5xrJDVo985bHp1uHJNWQ,14569
270
+ letta/server/server.py,sha256=YFV8VOTHktJGUzuEHN-dAapshTDThxh1u4Ck8wqgY3Y,78175
259
271
  letta/server/startup.sh,sha256=MRXh1RKbS5lyA7XAsk7O6Q4LEKOqnv5B-dwe0SnTHeQ,2514
260
272
  letta/server/static_files/assets/index-048c9598.js,sha256=mR16XppvselwKCcNgONs4L7kZEVa4OEERm4lNZYtLSk,146819
261
273
  letta/server/static_files/assets/index-0e31b727.css,sha256=SBbja96uiQVLDhDOroHgM6NSl7tS4lpJRCREgSS_hA8,7672
@@ -269,14 +281,15 @@ letta/server/ws_api/interface.py,sha256=TWl9vkcMCnLsUtgsuENZ-ku2oMDA-OUTzLh_yNRo
269
281
  letta/server/ws_api/protocol.py,sha256=5mDgpfNZn_kNwHnpt5Dsuw8gdNH298sgxTGed3etzYg,1836
270
282
  letta/server/ws_api/server.py,sha256=cBSzf-V4zT1bL_0i54OTI3cMXhTIIxqjSRF8pYjk7fg,5835
271
283
  letta/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
272
- letta/services/agent_manager.py,sha256=eJ_c-MatejKAZirbqQOFkM7rTuHjtUthyO-OnGpNIn4,62965
273
- letta/services/block_manager.py,sha256=L0_iWq7biycf_LXDqhqs_tXq88o_-zlLRW9SvtL3ETA,6018
274
- letta/services/group_manager.py,sha256=yCNTdq3chhF9Xi_5w2X-nLcOK-ljRYO1ZqLBwfBTdwQ,8851
275
- letta/services/helpers/agent_manager_helper.py,sha256=fmpL-8xyDPFdA-pfIV7cMJBBi6w3ELzcJDCI7-9mw28,17316
284
+ letta/services/agent_manager.py,sha256=ngbV9-x8KDHX7uyTdufe8bB3H4_mHHMV762ReAZcvpI,66037
285
+ letta/services/block_manager.py,sha256=Onq95-7LVoapa21T5s3Ictg44Wg5hn5unuzEsqDpGn8,14323
286
+ letta/services/group_manager.py,sha256=pSIdtnIb93wgB0_dNk3KqzddRIlTnHn8_3bsWoJwQ6E,12222
287
+ letta/services/helpers/agent_manager_helper.py,sha256=S3_3IJTjQ1VNNcSJsuwqbWo_WS7QarsjoIPwWF3uxVM,17510
276
288
  letta/services/helpers/tool_execution_helper.py,sha256=lLoebs1kZKjw62y1PxHbIDkHq_heJN2ZT0gKje-R8oo,6941
277
289
  letta/services/identity_manager.py,sha256=DJzvq5TqzgmVdnH401YAJUycXTE0tNN70KRZTwu6ko8,8505
278
290
  letta/services/job_manager.py,sha256=ejcv_nMljByimiWJjvj7aqUFQktL1kK-vx_cra2L2cs,16317
279
- letta/services/message_manager.py,sha256=Gjz79wpjLm837yCbp0Hbcmz2TkXe2iJEjAw0xVs7HpI,16852
291
+ letta/services/llm_batch_manager.py,sha256=gpR2xAHU8mCNUKQx1FO1JtlLq8gSd0bJHrc1Rkm01kM,5513
292
+ letta/services/message_manager.py,sha256=EpUwEh6YXZ1qIXc3xAcAOKTr5Ys4-MDhrsX3aOZ8RBM,16416
280
293
  letta/services/organization_manager.py,sha256=Ax0KmPSc_YYsYaxeld9gc7ST-J6DemHQ542DD7l7AWA,3989
281
294
  letta/services/passage_manager.py,sha256=GeEsQZx3uBe4E509LaZtwKVjIeIw4Lra9jOqFgbk1yg,9102
282
295
  letta/services/per_agent_lock_manager.py,sha256=porM0cKKANQ1FvcGXOO_qM7ARk5Fgi1HVEAhXsAg9-4,546
@@ -288,21 +301,24 @@ letta/services/summarizer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
288
301
  letta/services/summarizer/enums.py,sha256=szzPX2OBRRJEZsBTGYQThrNz02ELFqhuLwvOR7ozi7A,208
289
302
  letta/services/summarizer/summarizer.py,sha256=qPcR7VsHsgUsUtxmKx_73l3XdDhFvDzZ8VeIs4w3NBc,4757
290
303
  letta/services/tool_executor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
291
- letta/services/tool_executor/async_tool_execution_sandbox.py,sha256=qJmKXCNaLC3OGqWx5d1c25yuAkSWKTOvJlVdU3ddWTQ,17150
292
304
  letta/services/tool_executor/tool_execution_manager.py,sha256=K59aTZRSs6zaINBO69wCsJJVVYxqR46vueLYjApQkFY,4066
293
- letta/services/tool_executor/tool_execution_sandbox.py,sha256=g__ycVoMk7v4W4qUuR8cLv3TGM7LFW8jdrpDuCo8TXk,24574
294
- letta/services/tool_executor/tool_executor.py,sha256=BLlS0iwNDNHDQRnc8H8FijRqqpdXZHPOmdHBytLMfec,16969
295
- letta/services/tool_manager.py,sha256=CAXkbw8cv6LZ8Do9lloWw0biKH0lBf-qtsdq0yedhbQ,10053
305
+ letta/services/tool_executor/tool_execution_sandbox.py,sha256=bi04fz7EfTCW8qcCvb_uyaweswb8CC3S05fZS-QGQ5E,24531
306
+ letta/services/tool_executor/tool_executor.py,sha256=yxwPWTaBN5hFMtONa8U-H03WWrNEaMoh-oseAXq7xdY,16583
307
+ letta/services/tool_manager.py,sha256=PrVaghtKpxJONM6Trwc06NBFIZPAR40PwPCzo3xJ87M,10269
308
+ letta/services/tool_sandbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
309
+ letta/services/tool_sandbox/base.py,sha256=3_r0dinWwRQB50lFFwdf4TagbQwU0caur3y3wriOaT4,7756
310
+ letta/services/tool_sandbox/e2b_sandbox.py,sha256=GRn01PJkmWKyTegDGNg9H0xZ7D3yfF39EbIN8xUGgPE,5463
311
+ letta/services/tool_sandbox/local_sandbox.py,sha256=K3fu8advIVWg4lJm35mDu4Q3e6cxV4WkrwWMqsP9xlA,9762
296
312
  letta/services/user_manager.py,sha256=ScHbdJK9kNF8QXjsd3ZWGEL87n_Uyp3YwfKetOJmpHs,4304
297
313
  letta/settings.py,sha256=hC9cbF9mNSiSfd-QUVB4ITItG83ywjYnASKPCqlK9eU,7877
298
- letta/streaming_interface.py,sha256=1vuAckIxo1p1UsXtDzE8LTUve5RoTZRdXUe-WBIYDWU,15818
314
+ letta/sleeptime_agent.py,sha256=7aXpfvL5kh3l065qOcsSTMuyRtbp3uYC5RNf-xbdXio,2238
315
+ letta/streaming_interface.py,sha256=NisvpQWgVLheq8rCswBKRCFjQ9tCsTchp2xUEFieAQ0,16228
299
316
  letta/streaming_utils.py,sha256=jLqFTVhUL76FeOuYk8TaRQHmPTf3HSRc2EoJwxJNK6U,11946
300
- letta/supervisor_multi_agent.py,sha256=EwdfgznrwKkJZpxU-HO6iofR4PINCnGuWEbKamO3AQY,4433
301
317
  letta/system.py,sha256=dnOrS2FlRMwijQnOvfrky0Lg8wEw-FUq2zzfAJOUSKA,8477
302
318
  letta/tracing.py,sha256=RstWXpfWVF77nmb_ISORVWd9IQw2Ky3de40k_S70yKI,8258
303
- letta/utils.py,sha256=AdHrQ2OQ3V4XhJ1LtYwbLUO71j2IJY37cIUxXPgaaRY,32125
304
- letta_nightly-0.6.48.dev20250407104216.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
305
- letta_nightly-0.6.48.dev20250407104216.dist-info/METADATA,sha256=JaRz5hiaBWIYGrGHF_pJFT1ICF61-mQugtzWX6VqXYA,22937
306
- letta_nightly-0.6.48.dev20250407104216.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
307
- letta_nightly-0.6.48.dev20250407104216.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
308
- letta_nightly-0.6.48.dev20250407104216.dist-info/RECORD,,
319
+ letta/utils.py,sha256=yZfpeLyEDaYefM_RU2faxWVkLes9exfKb2AqikgxENY,32212
320
+ letta_nightly-0.6.49.dev20250408104230.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
321
+ letta_nightly-0.6.49.dev20250408104230.dist-info/METADATA,sha256=97gl27P96gOLYTjpX5aD89XUkypWP_UVXCnXsi-i8vI,22937
322
+ letta_nightly-0.6.49.dev20250408104230.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
323
+ letta_nightly-0.6.49.dev20250408104230.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
324
+ letta_nightly-0.6.49.dev20250408104230.dist-info/RECORD,,
@@ -1,173 +0,0 @@
1
- from typing import List, Optional, Union
2
-
3
- from letta.agent import Agent, AgentState, save_agent
4
- from letta.interface import AgentInterface
5
- from letta.orm import User
6
- from letta.schemas.message import Message
7
- from letta.schemas.openai.chat_completion_response import UsageStatistics
8
- from letta.schemas.usage import LettaUsageStatistics
9
-
10
-
11
- def trigger_rethink_memory(agent_state: "AgentState", message: str) -> None: # type: ignore
12
- """
13
- Called if and only when user says the word trigger_rethink_memory". It will trigger the re-evaluation of the memory.
14
-
15
- Args:
16
- message (str): Description of what aspect of the memory should be re-evaluated.
17
-
18
- """
19
- from letta import create_client
20
-
21
- client = create_client()
22
- agents = client.list_agents()
23
- for agent in agents:
24
- if agent.agent_type == "offline_memory_agent":
25
- client.user_message(agent_id=agent.id, message=message)
26
-
27
-
28
- def trigger_rethink_memory_convo(agent_state: "AgentState", message: str) -> None: # type: ignore
29
- """
30
- Called if and only when user says the word "trigger_rethink_memory". It will trigger the re-evaluation of the memory.
31
-
32
- Args:
33
- message (str): Description of what aspect of the memory should be re-evaluated.
34
-
35
- """
36
- from letta import create_client
37
-
38
- client = create_client()
39
- recent_convo = "".join([str(message) for message in agent_state.messages])[
40
- -2000:
41
- ] # TODO: make a better representation of the convo history
42
- agent_state.memory.update_block_value(label="conversation_block", value=recent_convo)
43
-
44
- client = create_client()
45
- agents = client.list_agents()
46
- for agent in agents:
47
- if agent.agent_type == "offline_memory_agent":
48
- client.user_message(agent_id=agent.id, message=message)
49
-
50
-
51
- def rethink_memory_convo(agent_state: "AgentState", new_memory: str, target_block_label: str, source_block_label: str) -> None: # type: ignore
52
- """
53
- Re-evaluate the memory in block_name, integrating new and updated facts. Replace outdated information with the most likely truths, avoiding redundancy with original memories. Ensure consistency with other memory blocks.
54
-
55
- Args:
56
- new_memory (str): The new memory with information integrated from the memory block. If there is no new information, then this should be the same as the content in the source block.
57
- source_block_label (str): The name of the block to integrate information from. None if all the information has been integrated to terminate the loop. This can by any block.
58
- target_block_label (str): The name of the block to write to. This should be chat_agent_human_new or chat_agent_persona_new.
59
-
60
- Returns:
61
- None: None is always returned as this function does not produce a response.
62
- """
63
- if target_block_label is not None:
64
- if agent_state.memory.get_block(target_block_label) is None:
65
- agent_state.memory.create_block(label=target_block_label, value=new_memory)
66
- agent_state.memory.update_block_value(label=target_block_label, value=new_memory)
67
- return None
68
-
69
-
70
- def rethink_memory(agent_state: "AgentState", new_memory: str, target_block_label: str, source_block_label: str) -> None: # type: ignore
71
- """
72
- Re-evaluate the memory in block_name, integrating new and updated facts.
73
- Replace outdated information with the most likely truths, avoiding redundancy with original memories.
74
- Ensure consistency with other memory blocks.
75
-
76
- Args:
77
- new_memory (str): The new memory with information integrated from the memory block. If there is no new information, then this should be the same as the content in the source block.
78
- source_block_label (str): The name of the block to integrate information from. None if all the information has been integrated to terminate the loop.
79
- target_block_label (str): The name of the block to write to.
80
- Returns:
81
- None: None is always returned as this function does not produce a response.
82
- """
83
-
84
- if target_block_label is not None:
85
- if agent_state.memory.get_block(target_block_label) is None:
86
- agent_state.memory.create_block(label=target_block_label, value=new_memory)
87
- agent_state.memory.update_block_value(label=target_block_label, value=new_memory)
88
- return None
89
-
90
-
91
- def finish_rethinking_memory(agent_state: "AgentState") -> None: # type: ignore
92
- """
93
- This function is called when the agent is done rethinking the memory.
94
-
95
- Returns:
96
- Optional[str]: None is always returned as this function does not produce a response.
97
- """
98
- return None
99
-
100
-
101
- def finish_rethinking_memory_convo(agent_state: "AgentState") -> None: # type: ignore
102
- """
103
- This function is called when the agent is done rethinking the memory.
104
-
105
- Returns:
106
- Optional[str]: None is always returned as this function does not produce a response.
107
- """
108
- from letta import create_client
109
-
110
- client = create_client()
111
- agents = client.list_agents()
112
-
113
- agent_state.memory.update_block_value("chat_agent_human", agent_state.memory.get_block("chat_agent_human_new").value)
114
- agent_state.memory.update_block_value("chat_agent_persona", agent_state.memory.get_block("chat_agent_persona_new").value)
115
- for agent in agents:
116
- if agent.name == "conversation_agent":
117
- agent.memory.update_block_value(label="chat_agent_human", value=agent_state.memory.get_block("chat_agent_human_new").value)
118
- agent.memory.update_block_value(label="chat_agent_persona", value=agent_state.memory.get_block("chat_agent_persona_new").value)
119
-
120
- return None
121
-
122
-
123
- class OfflineMemoryAgent(Agent):
124
- def __init__(
125
- self,
126
- interface: AgentInterface,
127
- agent_state: AgentState,
128
- user: User = None,
129
- # extras
130
- first_message_verify_mono: bool = False,
131
- max_memory_rethinks: int = 10,
132
- ):
133
- super().__init__(interface, agent_state, user)
134
- self.first_message_verify_mono = first_message_verify_mono
135
- self.max_memory_rethinks = max_memory_rethinks
136
-
137
- def step(
138
- self,
139
- messages: Union[Message, List[Message]],
140
- chaining: bool = True,
141
- max_chaining_steps: Optional[int] = None,
142
- **kwargs,
143
- ) -> LettaUsageStatistics:
144
- """Go through what is currently in memory core memory and integrate information."""
145
- next_input_message = messages if isinstance(messages, list) else [messages]
146
- counter = 0
147
- total_usage = UsageStatistics()
148
- step_count = 0
149
-
150
- while counter < self.max_memory_rethinks:
151
- if counter > 0:
152
- next_input_message = []
153
- kwargs["first_message"] = False
154
- step_response = self.inner_step(
155
- messages=next_input_message,
156
- **kwargs,
157
- )
158
- for message in step_response.messages:
159
- if message.tool_calls:
160
- for tool_call in message.tool_calls:
161
- # check if the function name is "finish_rethinking_memory"
162
- if tool_call.function.name == "finish_rethinking_memory":
163
- counter = self.max_memory_rethinks
164
- break
165
- usage = step_response.usage
166
- step_count += 1
167
- total_usage += usage
168
- counter += 1
169
- self.interface.step_complete()
170
-
171
- save_agent(self)
172
-
173
- return LettaUsageStatistics(**total_usage.model_dump(), step_count=step_count)