letta-nightly 0.6.5.dev20241219104153__py3-none-any.whl → 0.6.6.dev20241220190343__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.

@@ -1,4 +1,4 @@
1
- from typing import List, Union
1
+ from typing import Any, Dict, List, Optional, Union
2
2
 
3
3
  from pydantic import Field
4
4
 
@@ -21,6 +21,16 @@ class ChildToolRule(BaseToolRule):
21
21
  children: List[str] = Field(..., description="The children tools that can be invoked.")
22
22
 
23
23
 
24
+ class ConditionalToolRule(BaseToolRule):
25
+ """
26
+ A ToolRule that conditionally maps to different child tools based on the output.
27
+ """
28
+ type: ToolRuleType = ToolRuleType.conditional
29
+ default_child: Optional[str] = Field(None, description="The default child tool to be called. If None, any tool can be called.")
30
+ child_output_mapping: Dict[Any, str] = Field(..., description="The output case to check for mapping")
31
+ require_output_mapping: bool = Field(default=False, description="Whether to throw an error when output doesn't match any case")
32
+
33
+
24
34
  class InitToolRule(BaseToolRule):
25
35
  """
26
36
  Represents the initial tool rule configuration.
@@ -37,4 +47,4 @@ class TerminalToolRule(BaseToolRule):
37
47
  type: ToolRuleType = ToolRuleType.exit_loop
38
48
 
39
49
 
40
- ToolRule = Union[ChildToolRule, InitToolRule, TerminalToolRule]
50
+ ToolRule = Union[ChildToolRule, InitToolRule, TerminalToolRule, ConditionalToolRule]
@@ -12,11 +12,11 @@ from letta.local_llm.constants import INNER_THOUGHTS_KWARG
12
12
  from letta.schemas.enums import MessageStreamStatus
13
13
  from letta.schemas.letta_message import (
14
14
  AssistantMessage,
15
- FunctionCall,
16
- FunctionCallDelta,
17
- FunctionCallMessage,
18
- FunctionReturn,
19
- InternalMonologue,
15
+ ToolCall,
16
+ ToolCallDelta,
17
+ ToolCallMessage,
18
+ ToolReturnMessage,
19
+ ReasoningMessage,
20
20
  LegacyFunctionCallMessage,
21
21
  LegacyLettaMessage,
22
22
  LettaMessage,
@@ -411,7 +411,7 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
411
411
 
412
412
  def _process_chunk_to_letta_style(
413
413
  self, chunk: ChatCompletionChunkResponse, message_id: str, message_date: datetime
414
- ) -> Optional[Union[InternalMonologue, FunctionCallMessage, AssistantMessage]]:
414
+ ) -> Optional[Union[ReasoningMessage, ToolCallMessage, AssistantMessage]]:
415
415
  """
416
416
  Example data from non-streaming response looks like:
417
417
 
@@ -426,10 +426,10 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
426
426
 
427
427
  # inner thoughts
428
428
  if message_delta.content is not None:
429
- processed_chunk = InternalMonologue(
429
+ processed_chunk = ReasoningMessage(
430
430
  id=message_id,
431
431
  date=message_date,
432
- internal_monologue=message_delta.content,
432
+ reasoning=message_delta.content,
433
433
  )
434
434
 
435
435
  # tool calls
@@ -442,7 +442,7 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
442
442
  if self.inner_thoughts_in_kwargs:
443
443
  raise NotImplementedError("inner_thoughts_in_kwargs with use_assistant_message not yet supported")
444
444
 
445
- # If we just received a chunk with the message in it, we either enter "send_message" mode, or we do standard FunctionCallMessage passthrough mode
445
+ # If we just received a chunk with the message in it, we either enter "send_message" mode, or we do standard ToolCallMessage passthrough mode
446
446
 
447
447
  # Track the function name while streaming
448
448
  # If we were previously on a 'send_message', we need to 'toggle' into 'content' mode
@@ -474,7 +474,7 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
474
474
  assistant_message=cleaned_func_args,
475
475
  )
476
476
 
477
- # otherwise we just do a regular passthrough of a FunctionCallDelta via a FunctionCallMessage
477
+ # otherwise we just do a regular passthrough of a ToolCallDelta via a ToolCallMessage
478
478
  else:
479
479
  tool_call_delta = {}
480
480
  if tool_call.id:
@@ -485,13 +485,13 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
485
485
  if tool_call.function.name:
486
486
  tool_call_delta["name"] = tool_call.function.name
487
487
 
488
- processed_chunk = FunctionCallMessage(
488
+ processed_chunk = ToolCallMessage(
489
489
  id=message_id,
490
490
  date=message_date,
491
- function_call=FunctionCallDelta(
491
+ tool_call=ToolCallDelta(
492
492
  name=tool_call_delta.get("name"),
493
493
  arguments=tool_call_delta.get("arguments"),
494
- function_call_id=tool_call_delta.get("id"),
494
+ tool_call_id=tool_call_delta.get("id"),
495
495
  ),
496
496
  )
497
497
 
@@ -518,10 +518,10 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
518
518
 
519
519
  # If we have inner thoughts, we should output them as a chunk
520
520
  if updates_inner_thoughts:
521
- processed_chunk = InternalMonologue(
521
+ processed_chunk = ReasoningMessage(
522
522
  id=message_id,
523
523
  date=message_date,
524
- internal_monologue=updates_inner_thoughts,
524
+ reasoning=updates_inner_thoughts,
525
525
  )
526
526
  # Additionally inner thoughts may stream back with a chunk of main JSON
527
527
  # In that case, since we can only return a chunk at a time, we should buffer it
@@ -531,7 +531,7 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
531
531
  else:
532
532
  self.function_args_buffer += updates_main_json
533
533
 
534
- # If we have main_json, we should output a FunctionCallMessage
534
+ # If we have main_json, we should output a ToolCallMessage
535
535
  elif updates_main_json:
536
536
 
537
537
  # If there's something in the function_name buffer, we should release it first
@@ -539,13 +539,13 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
539
539
  # however the frontend may expect name first, then args, so to be
540
540
  # safe we'll output name first in a separate chunk
541
541
  if self.function_name_buffer:
542
- processed_chunk = FunctionCallMessage(
542
+ processed_chunk = ToolCallMessage(
543
543
  id=message_id,
544
544
  date=message_date,
545
- function_call=FunctionCallDelta(
545
+ tool_call=ToolCallDelta(
546
546
  name=self.function_name_buffer,
547
547
  arguments=None,
548
- function_call_id=self.function_id_buffer,
548
+ tool_call_id=self.function_id_buffer,
549
549
  ),
550
550
  )
551
551
  # Clear the buffer
@@ -561,20 +561,20 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
561
561
  self.function_args_buffer += updates_main_json
562
562
 
563
563
  # If there was nothing in the name buffer, we can proceed to
564
- # output the arguments chunk as a FunctionCallMessage
564
+ # output the arguments chunk as a ToolCallMessage
565
565
  else:
566
566
  # There may be a buffer from a previous chunk, for example
567
567
  # if the previous chunk had arguments but we needed to flush name
568
568
  if self.function_args_buffer:
569
569
  # In this case, we should release the buffer + new data at once
570
570
  combined_chunk = self.function_args_buffer + updates_main_json
571
- processed_chunk = FunctionCallMessage(
571
+ processed_chunk = ToolCallMessage(
572
572
  id=message_id,
573
573
  date=message_date,
574
- function_call=FunctionCallDelta(
574
+ tool_call=ToolCallDelta(
575
575
  name=None,
576
576
  arguments=combined_chunk,
577
- function_call_id=self.function_id_buffer,
577
+ tool_call_id=self.function_id_buffer,
578
578
  ),
579
579
  )
580
580
  # clear buffer
@@ -582,13 +582,13 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
582
582
  self.function_id_buffer = None
583
583
  else:
584
584
  # If there's no buffer to clear, just output a new chunk with new data
585
- processed_chunk = FunctionCallMessage(
585
+ processed_chunk = ToolCallMessage(
586
586
  id=message_id,
587
587
  date=message_date,
588
- function_call=FunctionCallDelta(
588
+ tool_call=ToolCallDelta(
589
589
  name=None,
590
590
  arguments=updates_main_json,
591
- function_call_id=self.function_id_buffer,
591
+ tool_call_id=self.function_id_buffer,
592
592
  ),
593
593
  )
594
594
  self.function_id_buffer = None
@@ -608,10 +608,10 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
608
608
  # # if tool_call.function.name:
609
609
  # # tool_call_delta["name"] = tool_call.function.name
610
610
 
611
- # processed_chunk = FunctionCallMessage(
611
+ # processed_chunk = ToolCallMessage(
612
612
  # id=message_id,
613
613
  # date=message_date,
614
- # function_call=FunctionCallDelta(name=tool_call_delta.get("name"), arguments=tool_call_delta.get("arguments")),
614
+ # tool_call=ToolCallDelta(name=tool_call_delta.get("name"), arguments=tool_call_delta.get("arguments")),
615
615
  # )
616
616
 
617
617
  else:
@@ -642,10 +642,10 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
642
642
  # if tool_call.function.name:
643
643
  # tool_call_delta["name"] = tool_call.function.name
644
644
 
645
- # processed_chunk = FunctionCallMessage(
645
+ # processed_chunk = ToolCallMessage(
646
646
  # id=message_id,
647
647
  # date=message_date,
648
- # function_call=FunctionCallDelta(name=tool_call_delta.get("name"), arguments=tool_call_delta.get("arguments")),
648
+ # tool_call=ToolCallDelta(name=tool_call_delta.get("name"), arguments=tool_call_delta.get("arguments")),
649
649
  # )
650
650
 
651
651
  # elif False and self.inner_thoughts_in_kwargs and tool_call.function:
@@ -680,15 +680,15 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
680
680
  # Once we get a complete key, check if the key matches
681
681
 
682
682
  # If it does match, start processing the value (stringified-JSON string
683
- # And with each new chunk, output it as a chunk of type InternalMonologue
683
+ # And with each new chunk, output it as a chunk of type ReasoningMessage
684
684
 
685
- # If the key doesn't match, then flush the buffer as a single FunctionCallMessage chunk
685
+ # If the key doesn't match, then flush the buffer as a single ToolCallMessage chunk
686
686
 
687
687
  # If we're reading a value
688
688
 
689
- # If we're reading the inner thoughts value, we output chunks of type InternalMonologue
689
+ # If we're reading the inner thoughts value, we output chunks of type ReasoningMessage
690
690
 
691
- # Otherwise, do simple chunks of FunctionCallMessage
691
+ # Otherwise, do simple chunks of ToolCallMessage
692
692
 
693
693
  else:
694
694
 
@@ -701,13 +701,13 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
701
701
  if tool_call.function.name:
702
702
  tool_call_delta["name"] = tool_call.function.name
703
703
 
704
- processed_chunk = FunctionCallMessage(
704
+ processed_chunk = ToolCallMessage(
705
705
  id=message_id,
706
706
  date=message_date,
707
- function_call=FunctionCallDelta(
707
+ tool_call=ToolCallDelta(
708
708
  name=tool_call_delta.get("name"),
709
709
  arguments=tool_call_delta.get("arguments"),
710
- function_call_id=tool_call_delta.get("id"),
710
+ tool_call_id=tool_call_delta.get("id"),
711
711
  ),
712
712
  )
713
713
 
@@ -823,10 +823,10 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
823
823
  # "id": str(msg_obj.id) if msg_obj is not None else None,
824
824
  # }
825
825
  assert msg_obj is not None, "Internal monologue requires msg_obj references for metadata"
826
- processed_chunk = InternalMonologue(
826
+ processed_chunk = ReasoningMessage(
827
827
  id=msg_obj.id,
828
828
  date=msg_obj.created_at,
829
- internal_monologue=msg,
829
+ reasoning=msg,
830
830
  )
831
831
 
832
832
  self._push_to_buffer(processed_chunk)
@@ -911,13 +911,13 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
911
911
  assistant_message=func_args[self.assistant_message_tool_kwarg],
912
912
  )
913
913
  else:
914
- processed_chunk = FunctionCallMessage(
914
+ processed_chunk = ToolCallMessage(
915
915
  id=msg_obj.id,
916
916
  date=msg_obj.created_at,
917
- function_call=FunctionCall(
917
+ tool_call=ToolCall(
918
918
  name=function_call.function.name,
919
919
  arguments=function_call.function.arguments,
920
- function_call_id=function_call.id,
920
+ tool_call_id=function_call.id,
921
921
  ),
922
922
  )
923
923
 
@@ -942,24 +942,24 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
942
942
  msg = msg.replace("Success: ", "")
943
943
  # new_message = {"function_return": msg, "status": "success"}
944
944
  assert msg_obj.tool_call_id is not None
945
- new_message = FunctionReturn(
945
+ new_message = ToolReturnMessage(
946
946
  id=msg_obj.id,
947
947
  date=msg_obj.created_at,
948
- function_return=msg,
948
+ tool_return=msg,
949
949
  status="success",
950
- function_call_id=msg_obj.tool_call_id,
950
+ tool_call_id=msg_obj.tool_call_id,
951
951
  )
952
952
 
953
953
  elif msg.startswith("Error: "):
954
954
  msg = msg.replace("Error: ", "")
955
955
  # new_message = {"function_return": msg, "status": "error"}
956
956
  assert msg_obj.tool_call_id is not None
957
- new_message = FunctionReturn(
957
+ new_message = ToolReturnMessage(
958
958
  id=msg_obj.id,
959
959
  date=msg_obj.created_at,
960
- function_return=msg,
960
+ tool_return=msg,
961
961
  status="error",
962
- function_call_id=msg_obj.tool_call_id,
962
+ tool_call_id=msg_obj.tool_call_id,
963
963
  )
964
964
 
965
965
  else:
@@ -4,7 +4,7 @@ from typing import TYPE_CHECKING, Optional
4
4
  from fastapi import APIRouter, Body, Depends, Header, HTTPException
5
5
 
6
6
  from letta.schemas.enums import MessageRole
7
- from letta.schemas.letta_message import FunctionCall, LettaMessage
7
+ from letta.schemas.letta_message import ToolCall, LettaMessage
8
8
  from letta.schemas.openai.chat_completion_request import ChatCompletionRequest
9
9
  from letta.schemas.openai.chat_completion_response import (
10
10
  ChatCompletionResponse,
@@ -94,7 +94,7 @@ async def create_chat_completion(
94
94
  created_at = None
95
95
  for letta_msg in response_messages.messages:
96
96
  assert isinstance(letta_msg, LettaMessage)
97
- if isinstance(letta_msg, FunctionCall):
97
+ if isinstance(letta_msg, ToolCall):
98
98
  if letta_msg.name and letta_msg.name == "send_message":
99
99
  try:
100
100
  letta_function_call_args = json.loads(letta_msg.arguments)
@@ -456,13 +456,6 @@ def get_agent_messages(
456
456
  """
457
457
  actor = server.user_manager.get_user_or_default(user_id=user_id)
458
458
 
459
- # TODO: Temporary debugging logs for debugging very slow endpoint
460
- import uuid
461
-
462
- temp_rand_uuid = uuid.uuid4()
463
-
464
- logger.info(f"[{temp_rand_uuid}] RECEIVED GET /messages for agent_id={agent_id} before={before} limit={limit}")
465
-
466
459
  return server.get_agent_recall_cursor(
467
460
  user_id=actor.id,
468
461
  agent_id=agent_id,
@@ -472,7 +465,6 @@ def get_agent_messages(
472
465
  return_message_object=msg_object,
473
466
  assistant_message_tool_name=assistant_message_tool_name,
474
467
  assistant_message_tool_kwarg=assistant_message_tool_kwarg,
475
- temp_rand_uuid=temp_rand_uuid,
476
468
  )
477
469
 
478
470
 
@@ -7,7 +7,7 @@ from fastapi import APIRouter, Body, Depends, Header, HTTPException
7
7
 
8
8
  from letta.errors import LettaToolCreateError
9
9
  from letta.orm.errors import UniqueConstraintViolationError
10
- from letta.schemas.letta_message import FunctionReturn
10
+ from letta.schemas.letta_message import ToolReturnMessage
11
11
  from letta.schemas.tool import Tool, ToolCreate, ToolRunFromSource, ToolUpdate
12
12
  from letta.schemas.user import User
13
13
  from letta.server.rest_api.utils import get_letta_server
@@ -163,7 +163,7 @@ def upsert_base_tools(
163
163
  return server.tool_manager.upsert_base_tools(actor=actor)
164
164
 
165
165
 
166
- @router.post("/run", response_model=FunctionReturn, operation_id="run_tool_from_source")
166
+ @router.post("/run", response_model=ToolReturnMessage, operation_id="run_tool_from_source")
167
167
  def run_tool_from_source(
168
168
  server: SyncServer = Depends(get_letta_server),
169
169
  request: ToolRunFromSource = Body(...),
letta/server/server.py CHANGED
@@ -47,7 +47,7 @@ from letta.schemas.embedding_config import EmbeddingConfig
47
47
  # openai schemas
48
48
  from letta.schemas.enums import JobStatus
49
49
  from letta.schemas.job import Job, JobUpdate
50
- from letta.schemas.letta_message import FunctionReturn, LettaMessage
50
+ from letta.schemas.letta_message import ToolReturnMessage, LettaMessage
51
51
  from letta.schemas.llm_config import LLMConfig
52
52
  from letta.schemas.memory import (
53
53
  ArchivalMemorySummary,
@@ -979,33 +979,14 @@ class SyncServer(Server):
979
979
  return_message_object: bool = True,
980
980
  assistant_message_tool_name: str = constants.DEFAULT_MESSAGE_TOOL,
981
981
  assistant_message_tool_kwarg: str = constants.DEFAULT_MESSAGE_TOOL_KWARG,
982
- temp_rand_uuid: Optional[str] = None,
983
982
  ) -> Union[List[Message], List[LettaMessage]]:
984
983
  # TODO: Thread actor directly through this function, since the top level caller most likely already retrieved the user
985
- import datetime
986
984
 
987
- start_time = datetime.datetime.utcnow()
988
-
989
- logger.info(
990
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Fetching actor for user_id={user_id} (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
991
- )
992
985
  actor = self.user_manager.get_user_or_default(user_id=user_id)
993
-
994
- logger.info(
995
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Loading agent object for agent_id={agent_id} (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
996
- )
997
- letta_agent = self.load_agent(agent_id=agent_id, actor=actor)
998
-
999
- logger.info(
1000
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Resolving start_date and end_date for filtering messages (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
1001
- )
1002
986
  start_date = self.message_manager.get_message_by_id(after, actor=actor).created_at if after else None
1003
987
  end_date = self.message_manager.get_message_by_id(before, actor=actor).created_at if before else None
1004
988
 
1005
- logger.info(
1006
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Fetching messages for agent_id={agent_id}, start_date={start_date}, end_date={end_date}, limit={limit}, reverse={reverse} (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
1007
- )
1008
- records = letta_agent.message_manager.list_messages_for_agent(
989
+ records = self.message_manager.list_messages_for_agent(
1009
990
  agent_id=agent_id,
1010
991
  actor=actor,
1011
992
  start_date=start_date,
@@ -1014,15 +995,7 @@ class SyncServer(Server):
1014
995
  ascending=not reverse,
1015
996
  )
1016
997
 
1017
- logger.info(
1018
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Validating message types (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
1019
- )
1020
- assert all(isinstance(m, Message) for m in records)
1021
-
1022
998
  if not return_message_object:
1023
- logger.info(
1024
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Converting messages to LettaMessage objects (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
1025
- )
1026
999
  records = [
1027
1000
  msg
1028
1001
  for m in records
@@ -1033,14 +1006,8 @@ class SyncServer(Server):
1033
1006
  ]
1034
1007
 
1035
1008
  if reverse:
1036
- logger.info(
1037
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Reversing message order (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
1038
- )
1039
1009
  records = records[::-1]
1040
1010
 
1041
- logger.info(
1042
- f"[{temp_rand_uuid}] {datetime.datetime.utcnow()} - Returning {len(records)} messages (Elapsed: {(datetime.datetime.utcnow() - start_time).total_seconds()}s)"
1043
- )
1044
1011
  return records
1045
1012
 
1046
1013
  def get_server_config(self, include_defaults: bool = False) -> dict:
@@ -1383,7 +1350,7 @@ class SyncServer(Server):
1383
1350
  tool_source: str,
1384
1351
  tool_source_type: Optional[str] = None,
1385
1352
  tool_name: Optional[str] = None,
1386
- ) -> FunctionReturn:
1353
+ ) -> ToolReturnMessage:
1387
1354
  """Run a tool from source code"""
1388
1355
 
1389
1356
  try:
@@ -1407,24 +1374,24 @@ class SyncServer(Server):
1407
1374
  # Next, attempt to run the tool with the sandbox
1408
1375
  try:
1409
1376
  sandbox_run_result = ToolExecutionSandbox(tool.name, tool_args_dict, actor, tool_object=tool).run(agent_state=agent_state)
1410
- return FunctionReturn(
1377
+ return ToolReturnMessage(
1411
1378
  id="null",
1412
- function_call_id="null",
1379
+ tool_call_id="null",
1413
1380
  date=get_utc_time(),
1414
1381
  status=sandbox_run_result.status,
1415
- function_return=str(sandbox_run_result.func_return),
1382
+ tool_return=str(sandbox_run_result.func_return),
1416
1383
  stdout=sandbox_run_result.stdout,
1417
1384
  stderr=sandbox_run_result.stderr,
1418
1385
  )
1419
1386
 
1420
1387
  except Exception as e:
1421
1388
  func_return = get_friendly_error_msg(function_name=tool.name, exception_name=type(e).__name__, exception_message=str(e))
1422
- return FunctionReturn(
1389
+ return ToolReturnMessage(
1423
1390
  id="null",
1424
- function_call_id="null",
1391
+ tool_call_id="null",
1425
1392
  date=get_utc_time(),
1426
1393
  status="error",
1427
- function_return=func_return,
1394
+ tool_return=func_return,
1428
1395
  stdout=[],
1429
1396
  stderr=[traceback.format_exc()],
1430
1397
  )
@@ -147,6 +147,7 @@ class MessageManager:
147
147
  limit=limit,
148
148
  filters=message_filters,
149
149
  query_text=query_text,
150
+ ascending=ascending,
150
151
  )
151
152
 
152
153
  @enforce_types
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-nightly
3
- Version: 0.6.5.dev20241219104153
3
+ Version: 0.6.6.dev20241220190343
4
4
  Summary: Create LLM agents with long-term memory and custom tools
5
5
  License: Apache License
6
6
  Author: Letta Team
@@ -1,6 +1,6 @@
1
- letta/__init__.py,sha256=zY_5By7t8Jgl0Nejq2i4yOTJQg0lzJNlwdmp8sB-W9Y,1014
1
+ letta/__init__.py,sha256=kBJPc_H6xrNs2Y1U-Otm4HteKlgr6AfbLp8nRxMwfiQ,1014
2
2
  letta/__main__.py,sha256=6Hs2PV7EYc5Tid4g4OtcLXhqVHiNYTGzSBdoOnW2HXA,29
3
- letta/agent.py,sha256=qFWmRmpjBtIA-fQ3zhStLeHb69vvz4Hf1tygvAOrJqw,78266
3
+ letta/agent.py,sha256=UkbUrQjbOsPUU6_1jJQ0i3VYZ28A-9J5V6201Xktreg,79195
4
4
  letta/benchmark/benchmark.py,sha256=ebvnwfp3yezaXOQyGXkYCDYpsmre-b9hvNtnyx4xkG0,3701
5
5
  letta/benchmark/constants.py,sha256=aXc5gdpMGJT327VuxsT5FngbCK2J41PQYeICBO7g_RE,536
6
6
  letta/chat_only_agent.py,sha256=3wBCzddcfF6IMbPdDtTZFze5-HJSYxHd8w6jkkSwzsw,4628
@@ -8,8 +8,8 @@ letta/cli/cli.py,sha256=N6jCmysldhAGTQPkGDmRVMAIID7GlgECXqarcMV5h3M,16502
8
8
  letta/cli/cli_config.py,sha256=tB0Wgz3O9j6KiCsU1HWfsKmhNM9RqLsAxzxEDFQFGnM,8565
9
9
  letta/cli/cli_load.py,sha256=xFw-CuzjChcIptaqQ1XpDROENt0JSjyPeiQ0nmEeO1k,2706
10
10
  letta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- letta/client/client.py,sha256=hQDOqeWIeHNvvWTiO6QgBcuzHQ54V-G0DjtbJ-ycL9Y,126673
12
- letta/client/streaming.py,sha256=Hh5pjlyrdCuO2V75ZCxSSOCPd3BmHdKFGaIUJC6fBp0,4775
11
+ letta/client/client.py,sha256=UZUwEHFXXfhvyZmajcFV5BIPtfq9ZeHeeFBW0eRS9gc,126690
12
+ letta/client/streaming.py,sha256=tuByoy_T40pKghpoTboyBMmotlMEqVFPqNRgODZJ38k,4754
13
13
  letta/client/utils.py,sha256=OJlAKWrldc4I6M1WpcTWNtPJ4wfxlzlZqWLfCozkFtI,2872
14
14
  letta/config.py,sha256=JFGY4TWW0Wm5fTbZamOwWqk5G8Nn-TXyhgByGoAqy2c,12375
15
15
  letta/constants.py,sha256=1cyuDmvdkmt9px5N3IqzxvcKJ_ERrYUdSzN60Ky-HBs,7054
@@ -17,7 +17,7 @@ letta/credentials.py,sha256=D9mlcPsdDWlIIXQQD8wSPE9M_QvsRrb0p3LB5i9OF5Q,5806
17
17
  letta/data_sources/connectors.py,sha256=Bwgf6mW55rDrdX69dY3bLzQW9Uuk_o9w4skwbx1NioY,7039
18
18
  letta/data_sources/connectors_helper.py,sha256=2TQjCt74fCgT5sw1AP8PalDEk06jPBbhrPG4HVr-WLs,3371
19
19
  letta/embeddings.py,sha256=r1jWuZplYZl8GzfObBZxPdKWg2O0Msd8D164qSoCPIM,8855
20
- letta/errors.py,sha256=Suh7081WzyH-LcAaJGs8tQ6TQ6b4ATd5cmUyBCa5aoA,5139
20
+ letta/errors.py,sha256=ZdaZ1spBobTNEVgeoaZ0Up4VqaTFhk2wDYzzzX9smz0,5111
21
21
  letta/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  letta/functions/function_sets/base.py,sha256=bOiitkhzqYKwZBiRYrx29AlordiA5IrXw25eVSRK8BY,5984
23
23
  letta/functions/function_sets/extras.py,sha256=Jik3UiDqYTm4Lam1XPTvuVjvgUHwIAhopsnbmVhGMBg,4732
@@ -25,7 +25,7 @@ letta/functions/functions.py,sha256=evH6GKnIJwVVre1Xre2gaSIqREv4eNM4DiWOhn8PMqg,
25
25
  letta/functions/helpers.py,sha256=fJo4gPvWpkvR7jn0HucRorz4VlpYVqmYsiX1RetnnSY,8569
26
26
  letta/functions/schema_generator.py,sha256=sN0QurH69H9jfRnRV5CBSYS7bVU9BKBdF0SSCGrwuQA,19256
27
27
  letta/helpers/__init__.py,sha256=p0luQ1Oe3Skc6sH4O58aHHA3Qbkyjifpuq0DZ1GAY0U,59
28
- letta/helpers/tool_rule_solver.py,sha256=YCwawbRUQw10ZVR17WYXo8b5roxdGe-B5nNVMqlAgBE,4826
28
+ letta/helpers/tool_rule_solver.py,sha256=BzYSEMlv6NAfQplzqINGjza7jAXa831JkhbdCRQ58fY,6236
29
29
  letta/humans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  letta/humans/examples/basic.txt,sha256=Lcp8YESTWvOJgO4Yf_yyQmgo5bKakeB1nIVrwEGG6PA,17
31
31
  letta/humans/examples/cs_phd.txt,sha256=9C9ZAV_VuG7GB31ksy3-_NAyk8rjE6YtVOkhp08k1xw,297
@@ -91,7 +91,7 @@ letta/orm/agents_tags.py,sha256=dYSnHz4IWBjyOiQ4RJomX3P0QN76JTlEZEw5eJM6Emg,925
91
91
  letta/orm/base.py,sha256=K_LpNUURbsj44ycHbzvNXG_n8pBOjf1YvDaikIPDpQA,2716
92
92
  letta/orm/block.py,sha256=U2fOXdab9ynQscOqzUo3xv1a_GjqHLIgoNSZq-U0mYg,3308
93
93
  letta/orm/blocks_agents.py,sha256=W0dykl9OchAofSuAYZD5zNmhyMabPr9LTJrz-I3A0m4,983
94
- letta/orm/custom_columns.py,sha256=EEiPx9AuMI4JeLmGAOD8L_XWh4JwQB166zBJHuJmQS0,4891
94
+ letta/orm/custom_columns.py,sha256=dBYJn3yc1BIy7ZntIFfq9oEdQav-u0r412C2HyDeUPU,5056
95
95
  letta/orm/enums.py,sha256=KfHcFt_fR6GUmSlmfsa-TetvmuRxGESNve8MStRYW64,145
96
96
  letta/orm/errors.py,sha256=Se0Guz-gqi-D36NUWSh7AP9zTVCSph9KgZh_trwng4o,734
97
97
  letta/orm/file.py,sha256=0qfqmBFizwtYriCz_qrshjxw3A9lMaRFKtwsZecviyo,1765
@@ -134,22 +134,22 @@ letta/prompts/system/memgpt_modified_chat.txt,sha256=F_yD4ZcR4aGDE3Z98tI7e609GYe
134
134
  letta/prompts/system/memgpt_modified_o1.txt,sha256=objnDgnxpF3-MmU28ZqZ7-TOG8UlHBM_HMyAdSDWK88,5492
135
135
  letta/prompts/system/memgpt_offline_memory.txt,sha256=rWEJeF-6aiinjkJM9hgLUYCmlEcC_HekYB1bjEUYq6M,2460
136
136
  letta/prompts/system/memgpt_offline_memory_chat.txt,sha256=ituh7gDuio7nC2UKFB7GpBq6crxb8bYedQfJ0ADoPgg,3949
137
- letta/providers.py,sha256=LUIxZ882dv_jFD3ngq3LVHhNbKgUcGGcJSCsjOZ5jR4,25416
137
+ letta/providers.py,sha256=vSOPExE8gpCTUYuz1qccr0wh10JK4QO2jtQleMLWL7s,25439
138
138
  letta/pytest.ini,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
139
139
  letta/schemas/agent.py,sha256=8zorIkzmsC2IBpO3r-I5p18VA-7BGDe_rxXqfPUJ9lE,10212
140
140
  letta/schemas/block.py,sha256=pVDH8jr5r-oxdX4cK9dX2wXyLBzgGKQOBWOzqZSeBog,5944
141
141
  letta/schemas/embedding_config.py,sha256=u6n-MjUgLfKeDCMdG8f_7qCxJBxo0I8d3KIggmhwjfA,3236
142
- letta/schemas/enums.py,sha256=F396hXs57up4Jqj1vwWVknMpoVo7MkccVBALvKGHPpE,1032
142
+ letta/schemas/enums.py,sha256=_ar3z6H_HP5c4cQEIf4xYO1nqFHQQXWKy6VdcaOX-lQ,1064
143
143
  letta/schemas/file.py,sha256=ChN2CWzLI2TT9WLItcfElEH0E8b7kzPylF2OQBr6Beg,1550
144
144
  letta/schemas/health.py,sha256=zT6mYovvD17iJRuu2rcaQQzbEEYrkwvAE9TB7iU824c,139
145
145
  letta/schemas/job.py,sha256=vRVVpMCHTxot9uaalLS8RARnqzJWvcLB1XP5XRBioPc,1398
146
146
  letta/schemas/letta_base.py,sha256=v3OvpVFVUfcuK1lIyTjM0x4fmWeWQw1DdlhKXHBUCz8,3608
147
- letta/schemas/letta_message.py,sha256=fBPKrHBRS9eTo8NAmLiaP5TNJATsrVn9QCxYmD6a7UY,6833
147
+ letta/schemas/letta_message.py,sha256=SpAxAEFQa-JMzxIQ5cqz0TENB5S9WsdrTAHGUJBLCQQ,8040
148
148
  letta/schemas/letta_request.py,sha256=Hfb66FB1tXmrpEX4_yLQVfTrTSMbPYeEvZY-vqW9Tj8,981
149
- letta/schemas/letta_response.py,sha256=vQV5uqe-kq9fc4wCo-sVB_PJt5yUk8DB2zOgHsrmN-k,6189
149
+ letta/schemas/letta_response.py,sha256=PSHnIzGAz1MP1ACA_f7zyt4zXDnYJhNfcDRbV1HJpo4,6940
150
150
  letta/schemas/llm_config.py,sha256=RbgnCaqYd_yl-Xs7t-DEI1NhpKD8WiVWjxcwq5mZd5M,4467
151
151
  letta/schemas/memory.py,sha256=iWEm15qMa4pWQQUMIt6mnlrBQvACII0MpfNX8QujGE8,10072
152
- letta/schemas/message.py,sha256=QF6OrCVfh5ETo-KJ2KZpleAuvisBIMMsIL3uH6h_kMM,34161
152
+ letta/schemas/message.py,sha256=Z_k8YpURh0Dbx4BaFbo6Z7YP9JIkItL1UKtDnmZfVHE,34149
153
153
  letta/schemas/openai/chat_completion_request.py,sha256=AOIwgbN3CZKVqkuXeMHeSa53u4h0wVq69t3T_LJ0vIE,3389
154
154
  letta/schemas/openai/chat_completion_response.py,sha256=ub-oVSyLpuJd-5_yzCSIRR8tD3GM83IeDO1c1uAATa4,3970
155
155
  letta/schemas/openai/chat_completions.py,sha256=V0ZPIIk-ds3O6MAkNHMz8zh1hqMFSPrTcYr88WDYzWE,3588
@@ -160,7 +160,7 @@ letta/schemas/passage.py,sha256=t_bSI8hpEuh-mj8bV8qOiIA1tAgyjGKrZMVe9l5oIaY,3675
160
160
  letta/schemas/sandbox_config.py,sha256=3CZyClISK3722MWstwOcKp_ppOI1LOE98i84Q4E2U4Y,5737
161
161
  letta/schemas/source.py,sha256=B1VbaDJV-EGPv1nQXwCx_RAzeAJd50UqP_1m1cIRT8c,2854
162
162
  letta/schemas/tool.py,sha256=_9_JkGSlIn2PCbyJ18aQrNueZgxHFUT093GcJSWYqT4,10346
163
- letta/schemas/tool_rule.py,sha256=jVGdGsp2K-qnrcaWF3WjCSvxpDlF2wVxeNMXzmoYLtc,1072
163
+ letta/schemas/tool_rule.py,sha256=R3KiU3m5LDhiQsK-ZNOHqicMeTLhA7yW0cVZOBH57Uk,1678
164
164
  letta/schemas/usage.py,sha256=lvn1ooHwLEdv6gwQpw5PBUbcwn_gwdT6HA-fCiix6sY,817
165
165
  letta/schemas/user.py,sha256=V32Tgl6oqB3KznkxUz12y7agkQicjzW7VocSpj78i6Q,1526
166
166
  letta/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -171,16 +171,16 @@ letta/server/rest_api/app.py,sha256=ulEJeVgH5w9TdzqDJntmDfs8DCjIlImwLDoe6X1sPOc,
171
171
  letta/server/rest_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
172
172
  letta/server/rest_api/auth/index.py,sha256=fQBGyVylGSRfEMLQ17cZzrHd5Y1xiVylvPqH5Rl-lXQ,1378
173
173
  letta/server/rest_api/auth_token.py,sha256=725EFEIiNj4dh70hrSd94UysmFD8vcJLrTRfNHkzxDo,774
174
- letta/server/rest_api/interface.py,sha256=Ekso3B5H_fl-8C2g6I3wkmYI-iwvYin2z5hMf3ElSbM,45965
174
+ letta/server/rest_api/interface.py,sha256=NQjzO1sMvb-bTp8Tbnw_IndsomlOnwznSoJaqofiagk,45760
175
175
  letta/server/rest_api/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
176
176
  letta/server/rest_api/routers/openai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
177
177
  letta/server/rest_api/routers/openai/assistants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
178
178
  letta/server/rest_api/routers/openai/assistants/assistants.py,sha256=PXv5vLFDa3ptMBY6QJUkMaPqk2HFP0IpirJUCmgOY6k,4828
179
179
  letta/server/rest_api/routers/openai/assistants/schemas.py,sha256=d3LdBLUI-mMUCP-Q3X9Z_DqIu-ko9_KLMt8og799aNg,5630
180
180
  letta/server/rest_api/routers/openai/chat_completions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
181
- letta/server/rest_api/routers/openai/chat_completions/chat_completions.py,sha256=Yvhcr1FVk1JltXg8PRwkJf8TD1fO4ARDAVsMmHY5xzc,4849
181
+ letta/server/rest_api/routers/openai/chat_completions/chat_completions.py,sha256=UoZCLvAsC2SzfnJg7LOz0h2wfcn8hmU33d2CW18erKw,4841
182
182
  letta/server/rest_api/routers/v1/__init__.py,sha256=RZc0fIHNN4BGretjU6_TGK7q49RyV4jfYNudoiK_sUo,762
183
- letta/server/rest_api/routers/v1/agents.py,sha256=JIeHoe-C1_6PaSSYWuj5GPbHBEiWLqsQJzb_HCebvHw,30637
183
+ letta/server/rest_api/routers/v1/agents.py,sha256=a_u-g4tX1PN_c6cFnubApLqAkmZNTCu1YF6MmYdmymY,30359
184
184
  letta/server/rest_api/routers/v1/blocks.py,sha256=IJ2pppwNooaUjIwyBALnKL4sJ8idW8cVJlY-VH_J9HY,4803
185
185
  letta/server/rest_api/routers/v1/health.py,sha256=pKCuVESlVOhGIb4VC4K-H82eZqfghmT6kvj2iOkkKuc,401
186
186
  letta/server/rest_api/routers/v1/jobs.py,sha256=-tEyuIxlXZfPREeMks-sRzHwhKE2xxgzbXeEbBAS2Q8,2730
@@ -188,11 +188,11 @@ letta/server/rest_api/routers/v1/llms.py,sha256=TcyvSx6MEM3je5F4DysL7ligmssL_pFl
188
188
  letta/server/rest_api/routers/v1/organizations.py,sha256=tyqVzXTpMtk3sKxI3Iz4aS6RhbGEbXDzFBB_CpW18v4,2080
189
189
  letta/server/rest_api/routers/v1/sandbox_configs.py,sha256=pG3X3bYbmsq90kRc-06qfnM6yalvYEpVVEQnTuZVm0o,5134
190
190
  letta/server/rest_api/routers/v1/sources.py,sha256=bLvxyYBOLx1VD5YPuoCBrQrua0AruzUzvCMIiekjVQg,9974
191
- letta/server/rest_api/routers/v1/tools.py,sha256=y6Dx8VDcq0CShDbMqv47y1dgrT-P6bMAiIQE4CIw9Yo,11170
191
+ letta/server/rest_api/routers/v1/tools.py,sha256=KC44cB5QYja0piHkQxI1F-IzJbck2OvnXaOj-gOsdqs,11176
192
192
  letta/server/rest_api/routers/v1/users.py,sha256=EBQe9IfCG3kzHpKmotz4yVGZioXz3SCSRy5yEhJK8hU,2293
193
193
  letta/server/rest_api/static_files.py,sha256=NG8sN4Z5EJ8JVQdj19tkFa9iQ1kBPTab9f_CUxd_u4Q,3143
194
194
  letta/server/rest_api/utils.py,sha256=3wF-KavVVKzcdxcTQ7zzKtQQ1a7jRN3YuKXttrI5S9Y,3963
195
- letta/server/server.py,sha256=eBLkVhbmPrlNWMI38fI15PjTdLuv9Uc3yQTPxF0JlPg,61973
195
+ letta/server/server.py,sha256=_hcPg16zReylsO_T8LO-G5mk3UYLambtcq3-Lblvw0A,59954
196
196
  letta/server/startup.sh,sha256=722uKJWB2C4q3vjn39De2zzPacaZNw_1fN1SpLGjKIo,1569
197
197
  letta/server/static_files/assets/index-048c9598.js,sha256=mR16XppvselwKCcNgONs4L7kZEVa4OEERm4lNZYtLSk,146819
198
198
  letta/server/static_files/assets/index-0e31b727.css,sha256=DjG3J3RSFLcinzoisOYYLiyTAIe5Uaxge3HE-DmQIsU,7688
@@ -210,7 +210,7 @@ letta/services/agent_manager.py,sha256=GQyLp6ZgBCXozkkbfeY81_sFbf-UHVU_ulaTvFO9d
210
210
  letta/services/block_manager.py,sha256=HUj9HKW2LvAsENEsgCO3Pf3orvSy6XOimev38VKmRZ8,4929
211
211
  letta/services/helpers/agent_manager_helper.py,sha256=4AoJJI3ELDZrfhx38vc2OwgQflb7mkdppucln0MkgYg,3457
212
212
  letta/services/job_manager.py,sha256=FrkSXloke48CZKuzlYdysxM5gKWoTu7FRigPrs_YW4A,3645
213
- letta/services/message_manager.py,sha256=ucFJLbK835YSfEENoxdKB3wPZgO-NYFO9EvDV0W-sc0,7682
213
+ letta/services/message_manager.py,sha256=l_1_Su9jt3si5EdvbHoC9F4ITuLub4ApcgdkTfK2y2s,7715
214
214
  letta/services/organization_manager.py,sha256=hJI86_FErkRaW-VLBBmvmmciIXN59LN0mEMm78C36kQ,3331
215
215
  letta/services/passage_manager.py,sha256=3wR9ZV3nIkJ-oSywA2SVR2yLoNe2Nv5WyfaLtoNN5i8,7867
216
216
  letta/services/per_agent_lock_manager.py,sha256=porM0cKKANQ1FvcGXOO_qM7ARk5Fgi1HVEAhXsAg9-4,546
@@ -225,8 +225,8 @@ letta/streaming_interface.py,sha256=_FPUWy58j50evHcpXyd7zB1wWqeCc71NCFeWh_TBvnw,
225
225
  letta/streaming_utils.py,sha256=329fsvj1ZN0r0LpQtmMPZ2vSxkDBIUUwvGHZFkjm2I8,11745
226
226
  letta/system.py,sha256=buKYPqG5n2x41hVmWpu6JUpyd7vTWED9Km2_M7dLrvk,6960
227
227
  letta/utils.py,sha256=AlGH2fADkU5VkGISj9-hwMSZVKQUiI1whWTvXCKOiYw,33338
228
- letta_nightly-0.6.5.dev20241219104153.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
229
- letta_nightly-0.6.5.dev20241219104153.dist-info/METADATA,sha256=T6o-VctnMHTFvzBlj19iFGVpp7dF3IzSf-4pOjbYB4Y,21693
230
- letta_nightly-0.6.5.dev20241219104153.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
231
- letta_nightly-0.6.5.dev20241219104153.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
232
- letta_nightly-0.6.5.dev20241219104153.dist-info/RECORD,,
228
+ letta_nightly-0.6.6.dev20241220190343.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
229
+ letta_nightly-0.6.6.dev20241220190343.dist-info/METADATA,sha256=NXjjI6aBP3Fkf30gi_bNVfUMJLnStK8jbGMXpywtE-E,21693
230
+ letta_nightly-0.6.6.dev20241220190343.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
231
+ letta_nightly-0.6.6.dev20241220190343.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
232
+ letta_nightly-0.6.6.dev20241220190343.dist-info/RECORD,,