letta-nightly 0.6.37.dev20250311104150__tar.gz → 0.6.39.dev20250313104142__tar.gz

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 (286) hide show
  1. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/PKG-INFO +20 -18
  2. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/__init__.py +1 -1
  3. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/agent.py +83 -23
  4. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/agents/low_latency_agent.py +3 -2
  5. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/client/client.py +1 -50
  6. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/constants.py +4 -1
  7. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/function_sets/base.py +1 -1
  8. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/function_sets/multi_agent.py +9 -8
  9. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/helpers.py +47 -6
  10. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/schema_generator.py +47 -0
  11. letta_nightly-0.6.39.dev20250313104142/letta/helpers/mcp_helpers.py +108 -0
  12. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/cohere.py +1 -1
  13. letta_nightly-0.6.39.dev20250313104142/letta/llm_api/google_ai_client.py +332 -0
  14. letta_nightly-0.6.39.dev20250313104142/letta/llm_api/google_vertex_client.py +214 -0
  15. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/helpers.py +1 -2
  16. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/llm_api_tools.py +0 -1
  17. letta_nightly-0.6.39.dev20250313104142/letta/llm_api/llm_client.py +48 -0
  18. letta_nightly-0.6.39.dev20250313104142/letta/llm_api/llm_client_base.py +129 -0
  19. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/utils.py +30 -20
  20. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/log.py +1 -1
  21. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/memory.py +1 -1
  22. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/__init__.py +1 -0
  23. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/block.py +8 -0
  24. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/enums.py +2 -0
  25. letta_nightly-0.6.39.dev20250313104142/letta/orm/identities_blocks.py +13 -0
  26. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/identity.py +9 -0
  27. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/sqlalchemy_base.py +4 -4
  28. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/step.py +1 -0
  29. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/block.py +4 -48
  30. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/identity.py +3 -0
  31. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/letta_message.py +26 -0
  32. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/message.py +69 -63
  33. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/step.py +1 -0
  34. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/tool.py +39 -2
  35. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/agent.py +8 -1
  36. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/app.py +15 -0
  37. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/chat_completions_interface.py +2 -0
  38. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/interface.py +46 -13
  39. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/openai/chat_completions/chat_completions.py +2 -7
  40. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/agents.py +14 -10
  41. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/blocks.py +5 -1
  42. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/steps.py +2 -0
  43. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/tools.py +71 -1
  44. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/voice.py +3 -6
  45. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/server.py +102 -5
  46. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/agent_manager.py +58 -3
  47. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/block_manager.py +10 -1
  48. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/helpers/agent_manager_helper.py +12 -1
  49. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/identity_manager.py +61 -15
  50. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/message_manager.py +40 -0
  51. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/step_manager.py +8 -1
  52. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/summarizer/summarizer.py +1 -1
  53. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/tool_manager.py +6 -0
  54. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/settings.py +11 -12
  55. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/pyproject.toml +8 -6
  56. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/LICENSE +0 -0
  57. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/README.md +0 -0
  58. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/__main__.py +0 -0
  59. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/agents/__init__.py +0 -0
  60. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/agents/base_agent.py +0 -0
  61. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/agents/ephemeral_agent.py +0 -0
  62. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/benchmark/benchmark.py +0 -0
  63. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/benchmark/constants.py +0 -0
  64. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/cli/cli.py +0 -0
  65. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/cli/cli_config.py +0 -0
  66. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/cli/cli_load.py +0 -0
  67. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/client/__init__.py +0 -0
  68. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/client/streaming.py +0 -0
  69. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/client/utils.py +0 -0
  70. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/config.py +0 -0
  71. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/data_sources/connectors.py +0 -0
  72. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/data_sources/connectors_helper.py +0 -0
  73. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/embeddings.py +0 -0
  74. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/errors.py +0 -0
  75. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/__init__.py +0 -0
  76. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/ast_parsers.py +0 -0
  77. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/function_sets/extras.py +0 -0
  78. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/functions.py +0 -0
  79. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/functions/interface.py +0 -0
  80. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/helpers/__init__.py +0 -0
  81. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/helpers/composio_helpers.py +0 -0
  82. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/helpers/converters.py +0 -0
  83. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/helpers/datetime_helpers.py +0 -0
  84. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/helpers/json_helpers.py +0 -0
  85. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/helpers/tool_execution_helper.py +0 -0
  86. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/helpers/tool_rule_solver.py +0 -0
  87. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/humans/__init__.py +0 -0
  88. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/humans/examples/basic.txt +0 -0
  89. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/humans/examples/cs_phd.txt +0 -0
  90. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/interface.py +0 -0
  91. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/interfaces/__init__.py +0 -0
  92. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/interfaces/openai_chat_completions_streaming_interface.py +0 -0
  93. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/interfaces/utils.py +0 -0
  94. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/__init__.py +0 -0
  95. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/anthropic.py +0 -0
  96. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/aws_bedrock.py +0 -0
  97. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/azure_openai.py +0 -0
  98. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/azure_openai_constants.py +0 -0
  99. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/deepseek.py +0 -0
  100. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/google_ai.py +0 -0
  101. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/google_constants.py +0 -0
  102. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/google_vertex.py +0 -0
  103. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/mistral.py +0 -0
  104. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/llm_api/openai.py +0 -0
  105. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/README.md +0 -0
  106. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/__init__.py +0 -0
  107. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/chat_completion_proxy.py +0 -0
  108. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/constants.py +0 -0
  109. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/function_parser.py +0 -0
  110. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/grammars/__init__.py +0 -0
  111. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/grammars/gbnf_grammar_generator.py +0 -0
  112. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/grammars/json.gbnf +0 -0
  113. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/grammars/json_func_calls_with_inner_thoughts.gbnf +0 -0
  114. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/json_parser.py +0 -0
  115. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/koboldcpp/api.py +0 -0
  116. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/koboldcpp/settings.py +0 -0
  117. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llamacpp/api.py +0 -0
  118. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llamacpp/settings.py +0 -0
  119. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/__init__.py +0 -0
  120. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/airoboros.py +0 -0
  121. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/chatml.py +0 -0
  122. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/configurable_wrapper.py +0 -0
  123. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/dolphin.py +0 -0
  124. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/llama3.py +0 -0
  125. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/simple_summary_wrapper.py +0 -0
  126. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/wrapper_base.py +0 -0
  127. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/llm_chat_completion_wrappers/zephyr.py +0 -0
  128. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/lmstudio/api.py +0 -0
  129. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/lmstudio/settings.py +0 -0
  130. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/ollama/api.py +0 -0
  131. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/ollama/settings.py +0 -0
  132. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/settings/__init__.py +0 -0
  133. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/settings/deterministic_mirostat.py +0 -0
  134. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/settings/settings.py +0 -0
  135. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/settings/simple.py +0 -0
  136. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/vllm/api.py +0 -0
  137. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/webui/api.py +0 -0
  138. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/webui/legacy_api.py +0 -0
  139. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/webui/legacy_settings.py +0 -0
  140. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/local_llm/webui/settings.py +0 -0
  141. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/main.py +0 -0
  142. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/offline_memory_agent.py +0 -0
  143. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/openai_backcompat/__init__.py +0 -0
  144. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/openai_backcompat/openai_object.py +0 -0
  145. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/__all__.py +0 -0
  146. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/agent.py +0 -0
  147. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/agents_tags.py +0 -0
  148. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/base.py +0 -0
  149. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/blocks_agents.py +0 -0
  150. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/custom_columns.py +0 -0
  151. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/errors.py +0 -0
  152. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/file.py +0 -0
  153. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/identities_agents.py +0 -0
  154. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/job.py +0 -0
  155. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/job_messages.py +0 -0
  156. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/message.py +0 -0
  157. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/mixins.py +0 -0
  158. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/organization.py +0 -0
  159. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/passage.py +0 -0
  160. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/provider.py +0 -0
  161. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/sandbox_config.py +0 -0
  162. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/source.py +0 -0
  163. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/sources_agents.py +0 -0
  164. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/sqlite_functions.py +0 -0
  165. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/tool.py +0 -0
  166. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/tools_agents.py +0 -0
  167. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/orm/user.py +0 -0
  168. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/__init__.py +0 -0
  169. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/anna_pa.txt +0 -0
  170. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/google_search_persona.txt +0 -0
  171. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/memgpt_doc.txt +0 -0
  172. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/memgpt_starter.txt +0 -0
  173. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/o1_persona.txt +0 -0
  174. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/offline_memory_persona.txt +0 -0
  175. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/sam.txt +0 -0
  176. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/sam_pov.txt +0 -0
  177. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/sam_simple_pov_gpt35.txt +0 -0
  178. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/personas/examples/sqldb/test.db +0 -0
  179. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/__init__.py +0 -0
  180. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/gpt_summarize.py +0 -0
  181. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/gpt_system.py +0 -0
  182. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_base.txt +0 -0
  183. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_chat.txt +0 -0
  184. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_chat_compressed.txt +0 -0
  185. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_chat_fstring.txt +0 -0
  186. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_convo_only.txt +0 -0
  187. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_doc.txt +0 -0
  188. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_gpt35_extralong.txt +0 -0
  189. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_intuitive_knowledge.txt +0 -0
  190. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_memory_only.txt +0 -0
  191. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_modified_chat.txt +0 -0
  192. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_modified_o1.txt +0 -0
  193. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_offline_memory.txt +0 -0
  194. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/prompts/system/memgpt_offline_memory_chat.txt +0 -0
  195. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/pytest.ini +0 -0
  196. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/agent.py +0 -0
  197. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/embedding_config.py +0 -0
  198. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/embedding_config_overrides.py +0 -0
  199. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/enums.py +0 -0
  200. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/environment_variables.py +0 -0
  201. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/file.py +0 -0
  202. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/health.py +0 -0
  203. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/job.py +0 -0
  204. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/letta_base.py +0 -0
  205. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/letta_request.py +0 -0
  206. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/letta_response.py +0 -0
  207. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/llm_config.py +0 -0
  208. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/llm_config_overrides.py +0 -0
  209. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/memory.py +0 -0
  210. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/openai/chat_completion_request.py +0 -0
  211. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/openai/chat_completion_response.py +0 -0
  212. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/openai/chat_completions.py +0 -0
  213. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/openai/embedding_response.py +0 -0
  214. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/openai/openai.py +0 -0
  215. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/organization.py +0 -0
  216. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/passage.py +0 -0
  217. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/providers.py +0 -0
  218. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/run.py +0 -0
  219. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/sandbox_config.py +0 -0
  220. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/source.py +0 -0
  221. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/tool_rule.py +0 -0
  222. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/usage.py +0 -0
  223. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/schemas/user.py +0 -0
  224. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/__init__.py +0 -0
  225. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/agent_environment_variable.py +0 -0
  226. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/base.py +0 -0
  227. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/block.py +0 -0
  228. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/custom_fields.py +0 -0
  229. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/message.py +0 -0
  230. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/tag.py +0 -0
  231. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/serialize_schemas/tool.py +0 -0
  232. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/__init__.py +0 -0
  233. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/constants.py +0 -0
  234. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/db.py +0 -0
  235. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/generate_openapi_schema.sh +0 -0
  236. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/__init__.py +0 -0
  237. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/auth/__init__.py +0 -0
  238. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/auth/index.py +0 -0
  239. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/auth_token.py +0 -0
  240. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/optimistic_json_parser.py +0 -0
  241. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/__init__.py +0 -0
  242. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/openai/chat_completions/__init__.py +0 -0
  243. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/__init__.py +0 -0
  244. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/health.py +0 -0
  245. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/identities.py +0 -0
  246. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/jobs.py +0 -0
  247. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/llms.py +0 -0
  248. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/organizations.py +0 -0
  249. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/providers.py +0 -0
  250. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/runs.py +0 -0
  251. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/sandbox_configs.py +0 -0
  252. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/sources.py +0 -0
  253. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/tags.py +0 -0
  254. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/routers/v1/users.py +0 -0
  255. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/static_files.py +0 -0
  256. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/rest_api/utils.py +0 -0
  257. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/startup.sh +0 -0
  258. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/static_files/assets/index-048c9598.js +0 -0
  259. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/static_files/assets/index-0e31b727.css +0 -0
  260. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/static_files/favicon.ico +0 -0
  261. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/static_files/index.html +0 -0
  262. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/static_files/memgpt_logo_transparent.png +0 -0
  263. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/utils.py +0 -0
  264. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/ws_api/__init__.py +0 -0
  265. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/ws_api/example_client.py +0 -0
  266. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/ws_api/interface.py +0 -0
  267. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/ws_api/protocol.py +0 -0
  268. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/server/ws_api/server.py +0 -0
  269. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/__init__.py +0 -0
  270. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/helpers/tool_execution_helper.py +0 -0
  271. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/job_manager.py +0 -0
  272. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/organization_manager.py +0 -0
  273. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/passage_manager.py +0 -0
  274. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/per_agent_lock_manager.py +0 -0
  275. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/provider_manager.py +0 -0
  276. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/sandbox_config_manager.py +0 -0
  277. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/source_manager.py +0 -0
  278. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/summarizer/__init__.py +0 -0
  279. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/summarizer/enums.py +0 -0
  280. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/tool_execution_sandbox.py +0 -0
  281. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/services/user_manager.py +0 -0
  282. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/streaming_interface.py +0 -0
  283. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/streaming_utils.py +0 -0
  284. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/system.py +0 -0
  285. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/tracing.py +0 -0
  286. {letta_nightly-0.6.37.dev20250311104150 → letta_nightly-0.6.39.dev20250313104142}/letta/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-nightly
3
- Version: 0.6.37.dev20250311104150
3
+ Version: 0.6.39.dev20250313104142
4
4
  Summary: Create LLM agents with long-term memory and custom tools
5
5
  License: Apache License
6
6
  Author: Letta Team
@@ -14,6 +14,7 @@ Classifier: Programming Language :: Python :: 3.12
14
14
  Provides-Extra: all
15
15
  Provides-Extra: bedrock
16
16
  Provides-Extra: cloud-tool-sandbox
17
+ Provides-Extra: desktop
17
18
  Provides-Extra: dev
18
19
  Provides-Extra: external-tools
19
20
  Provides-Extra: google
@@ -28,17 +29,17 @@ Requires-Dist: black[jupyter] (>=24.2.0,<25.0.0) ; extra == "dev" or extra == "a
28
29
  Requires-Dist: boto3 (>=1.36.24,<2.0.0) ; extra == "bedrock"
29
30
  Requires-Dist: brotli (>=1.1.0,<2.0.0)
30
31
  Requires-Dist: colorama (>=0.4.6,<0.5.0)
31
- Requires-Dist: composio-core (>=0.7.2,<0.8.0)
32
- Requires-Dist: composio-langchain (>=0.7.2,<0.8.0)
33
- Requires-Dist: datamodel-code-generator[http] (>=0.25.0,<0.26.0)
34
- Requires-Dist: datasets (>=2.14.6,<3.0.0) ; extra == "dev" or extra == "all"
32
+ Requires-Dist: composio-core (>=0.7.7,<0.8.0)
33
+ Requires-Dist: composio-langchain (>=0.7.7,<0.8.0)
34
+ Requires-Dist: datamodel-code-generator[http] (>=0.25.0,<0.26.0) ; extra == "desktop" or extra == "all"
35
+ Requires-Dist: datasets (>=2.14.6,<3.0.0)
35
36
  Requires-Dist: demjson3 (>=3.0.6,<4.0.0)
36
- Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "external-tools" or extra == "all"
37
+ Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "external-tools" or extra == "desktop" or extra == "all"
37
38
  Requires-Dist: docstring-parser (>=0.16,<0.17)
38
39
  Requires-Dist: docx2txt (>=0.8,<0.9)
39
40
  Requires-Dist: e2b-code-interpreter (>=1.0.3,<2.0.0) ; extra == "cloud-tool-sandbox"
40
41
  Requires-Dist: faker (>=36.1.0,<37.0.0)
41
- Requires-Dist: fastapi (>=0.115.6,<0.116.0) ; extra == "server" or extra == "all"
42
+ Requires-Dist: fastapi (>=0.115.6,<0.116.0) ; extra == "server" or extra == "desktop" or extra == "all"
42
43
  Requires-Dist: google-genai (>=1.1.0,<2.0.0) ; extra == "google"
43
44
  Requires-Dist: grpcio (>=1.68.1,<2.0.0)
44
45
  Requires-Dist: grpcio-tools (>=1.68.1,<2.0.0)
@@ -47,13 +48,14 @@ Requires-Dist: httpx (>=0.28.0,<0.29.0)
47
48
  Requires-Dist: httpx-sse (>=0.4.0,<0.5.0)
48
49
  Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev" or extra == "all"
49
50
  Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
50
- Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
51
- Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
52
- Requires-Dist: letta_client (>=0.1.54,<0.2.0)
51
+ Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "desktop" or extra == "all"
52
+ Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "desktop" or extra == "all"
53
+ Requires-Dist: letta_client (>=0.1.65,<0.2.0)
53
54
  Requires-Dist: llama-index (>=0.12.2,<0.13.0)
54
55
  Requires-Dist: llama-index-embeddings-openai (>=0.3.1,<0.4.0)
55
- Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "all"
56
+ Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "desktop" or extra == "all"
56
57
  Requires-Dist: marshmallow-sqlalchemy (>=1.4.1,<2.0.0)
58
+ Requires-Dist: mcp (>=1.3.0,<2.0.0)
57
59
  Requires-Dist: nltk (>=3.8.1,<4.0.0)
58
60
  Requires-Dist: numpy (>=1.26.2,<2.0.0)
59
61
  Requires-Dist: openai (>=1.60.0,<2.0.0)
@@ -63,16 +65,16 @@ Requires-Dist: opentelemetry-instrumentation-requests (==0.51b0)
63
65
  Requires-Dist: opentelemetry-sdk (==1.30.0)
64
66
  Requires-Dist: pathvalidate (>=3.2.1,<4.0.0)
65
67
  Requires-Dist: pexpect (>=4.9.0,<5.0.0) ; extra == "dev" or extra == "all"
66
- Requires-Dist: pg8000 (>=1.30.3,<2.0.0) ; extra == "postgres" or extra == "all"
67
- Requires-Dist: pgvector (>=0.2.3,<0.3.0) ; extra == "postgres" or extra == "all"
68
+ Requires-Dist: pg8000 (>=1.30.3,<2.0.0) ; extra == "postgres" or extra == "desktop" or extra == "all"
69
+ Requires-Dist: pgvector (>=0.2.3,<0.3.0) ; extra == "postgres" or extra == "desktop" or extra == "all"
68
70
  Requires-Dist: pre-commit (>=3.5.0,<4.0.0) ; extra == "dev" or extra == "all"
69
71
  Requires-Dist: prettytable (>=3.9.0,<4.0.0)
70
- Requires-Dist: psycopg2 (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "all"
71
- Requires-Dist: psycopg2-binary (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "all"
72
+ Requires-Dist: psycopg2 (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "desktop" or extra == "all"
73
+ Requires-Dist: psycopg2-binary (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "desktop" or extra == "all"
72
74
  Requires-Dist: pydantic (>=2.7.4,<2.10.0)
73
75
  Requires-Dist: pydantic-settings (>=2.2.1,<3.0.0)
74
76
  Requires-Dist: pyhumps (>=3.8.0,<4.0.0)
75
- Requires-Dist: pyright (>=1.1.347,<2.0.0) ; extra == "dev" or extra == "all"
77
+ Requires-Dist: pyright (>=1.1.347,<2.0.0) ; extra == "dev" or extra == "desktop" or extra == "all"
76
78
  Requires-Dist: pytest-asyncio (>=0.23.2,<0.24.0) ; extra == "dev" or extra == "all"
77
79
  Requires-Dist: pytest-order (>=1.2.0,<2.0.0) ; extra == "dev" or extra == "all"
78
80
  Requires-Dist: python-box (>=7.1.1,<8.0.0)
@@ -90,8 +92,8 @@ Requires-Dist: sqlalchemy-utils (>=0.41.2,<0.42.0)
90
92
  Requires-Dist: sqlmodel (>=0.0.16,<0.0.17)
91
93
  Requires-Dist: tqdm (>=4.66.1,<5.0.0)
92
94
  Requires-Dist: typer[all] (>=0.9.0,<0.10.0)
93
- Requires-Dist: uvicorn (>=0.24.0.post1,<0.25.0) ; extra == "server" or extra == "all"
94
- Requires-Dist: wikipedia (>=1.4.0,<2.0.0) ; extra == "external-tools" or extra == "tests" or extra == "all"
95
+ Requires-Dist: uvicorn (>=0.24.0.post1,<0.25.0) ; extra == "server" or extra == "desktop" or extra == "all"
96
+ Requires-Dist: wikipedia (>=1.4.0,<2.0.0) ; extra == "external-tools" or extra == "tests" or extra == "desktop" or extra == "all"
95
97
  Description-Content-Type: text/markdown
96
98
 
97
99
  <p align="center">
@@ -1,4 +1,4 @@
1
- __version__ = "0.6.37"
1
+ __version__ = "0.6.39"
2
2
 
3
3
  # import clients
4
4
  from letta.client.client import LocalClient, RESTClient, create_client
@@ -3,7 +3,7 @@ import time
3
3
  import traceback
4
4
  import warnings
5
5
  from abc import ABC, abstractmethod
6
- from typing import Any, List, Optional, Tuple, Union
6
+ from typing import Any, Dict, List, Optional, Tuple, Union
7
7
 
8
8
  from openai.types.beta.function_tool import FunctionTool as OpenAITool
9
9
 
@@ -26,9 +26,11 @@ from letta.helpers import ToolRulesSolver
26
26
  from letta.helpers.composio_helpers import get_composio_api_key
27
27
  from letta.helpers.datetime_helpers import get_utc_time
28
28
  from letta.helpers.json_helpers import json_dumps, json_loads
29
+ from letta.helpers.mcp_helpers import BaseMCPClient
29
30
  from letta.interface import AgentInterface
30
31
  from letta.llm_api.helpers import calculate_summarizer_cutoff, get_token_counts_for_messages, is_context_overflow_error
31
32
  from letta.llm_api.llm_api_tools import create
33
+ from letta.llm_api.llm_client import LLMClient
32
34
  from letta.local_llm.utils import num_tokens_from_functions, num_tokens_from_messages
33
35
  from letta.log import get_logger
34
36
  from letta.memory import summarize_messages
@@ -37,7 +39,7 @@ from letta.orm.enums import ToolType
37
39
  from letta.schemas.agent import AgentState, AgentStepResponse, UpdateAgent
38
40
  from letta.schemas.block import BlockUpdate
39
41
  from letta.schemas.embedding_config import EmbeddingConfig
40
- from letta.schemas.enums import MessageRole
42
+ from letta.schemas.enums import MessageContentType, MessageRole
41
43
  from letta.schemas.memory import ContextWindowOverview, Memory
42
44
  from letta.schemas.message import Message, ToolReturn
43
45
  from letta.schemas.openai.chat_completion_response import ChatCompletionResponse
@@ -91,6 +93,8 @@ class Agent(BaseAgent):
91
93
  user: User,
92
94
  # extras
93
95
  first_message_verify_mono: bool = True, # TODO move to config?
96
+ # MCP sessions, state held in-memory in the server
97
+ mcp_clients: Optional[Dict[str, BaseMCPClient]] = None,
94
98
  ):
95
99
  assert isinstance(agent_state.memory, Memory), f"Memory object is not of type Memory: {type(agent_state.memory)}"
96
100
  # Hold a copy of the state that was used to init the agent
@@ -148,18 +152,22 @@ class Agent(BaseAgent):
148
152
  # Logger that the Agent specifically can use, will also report the agent_state ID with the logs
149
153
  self.logger = get_logger(agent_state.id)
150
154
 
155
+ # MCPClient, state/sessions managed by the server
156
+ self.mcp_clients = mcp_clients
157
+
151
158
  def load_last_function_response(self):
152
159
  """Load the last function response from message history"""
153
160
  in_context_messages = self.agent_manager.get_in_context_messages(agent_id=self.agent_state.id, actor=self.user)
154
161
  for i in range(len(in_context_messages) - 1, -1, -1):
155
162
  msg = in_context_messages[i]
156
- if msg.role == MessageRole.tool and msg.text:
163
+ if msg.role == MessageRole.tool and msg.content and len(msg.content) == 1 and msg.content[0].type == MessageContentType.text:
164
+ text_content = msg.content[0].text
157
165
  try:
158
- response_json = json.loads(msg.text)
166
+ response_json = json.loads(text_content)
159
167
  if response_json.get("message"):
160
168
  return response_json["message"]
161
169
  except (json.JSONDecodeError, KeyError):
162
- raise ValueError(f"Invalid JSON format in message: {msg.text}")
170
+ raise ValueError(f"Invalid JSON format in message: {text_content}")
163
171
  return None
164
172
 
165
173
  def update_memory_if_changed(self, new_memory: Memory) -> bool:
@@ -196,6 +204,7 @@ class Agent(BaseAgent):
196
204
  return True
197
205
  return False
198
206
 
207
+ # TODO: Refactor into separate class v.s. large if/elses here
199
208
  def execute_tool_and_persist_state(
200
209
  self, function_name: str, function_args: dict, target_letta_tool: Tool
201
210
  ) -> tuple[Any, Optional[SandboxRunResult]]:
@@ -236,6 +245,32 @@ class Agent(BaseAgent):
236
245
  function_response = execute_composio_action(
237
246
  action_name=action_name, args=function_args, api_key=composio_api_key, entity_id=entity_id
238
247
  )
248
+ elif target_letta_tool.tool_type == ToolType.EXTERNAL_MCP:
249
+ # Get the server name from the tool tag
250
+ # TODO make a property instead?
251
+ server_name = target_letta_tool.tags[0].split(":")[1]
252
+
253
+ # Get the MCPClient from the server's handle
254
+ # TODO these don't get raised properly
255
+ if not self.mcp_clients:
256
+ raise ValueError(f"No MCP client available to use")
257
+ if server_name not in self.mcp_clients:
258
+ raise ValueError(f"Unknown MCP server name: {server_name}")
259
+ mcp_client = self.mcp_clients[server_name]
260
+ if not isinstance(mcp_client, BaseMCPClient):
261
+ raise RuntimeError(f"Expected an MCPClient, but got: {type(mcp_client)}")
262
+
263
+ # Check that tool exists
264
+ available_tools = mcp_client.list_tools()
265
+ available_tool_names = [t.name for t in available_tools]
266
+ if function_name not in available_tool_names:
267
+ raise ValueError(
268
+ f"{function_name} is not available in MCP server {server_name}. Please check your `~/.letta/mcp_config.json` file."
269
+ )
270
+
271
+ function_response, is_error = mcp_client.execute_tool(tool_name=function_name, tool_args=function_args)
272
+ sandbox_run_result = SandboxRunResult(status="error" if is_error else "success")
273
+ return function_response, sandbox_run_result
239
274
  else:
240
275
  try:
241
276
  # Parse the source code to extract function annotations
@@ -266,6 +301,7 @@ class Agent(BaseAgent):
266
301
  function_response = get_friendly_error_msg(
267
302
  function_name=function_name, exception_name=type(e).__name__, exception_message=str(e)
268
303
  )
304
+ return function_response, SandboxRunResult(status="error")
269
305
 
270
306
  return function_response, None
271
307
 
@@ -356,19 +392,38 @@ class Agent(BaseAgent):
356
392
  for attempt in range(1, empty_response_retry_limit + 1):
357
393
  try:
358
394
  log_telemetry(self.logger, "_get_ai_reply create start")
359
- response = create(
395
+ # New LLM client flow
396
+ llm_client = LLMClient.create(
397
+ agent_id=self.agent_state.id,
360
398
  llm_config=self.agent_state.llm_config,
361
- messages=message_sequence,
362
- user_id=self.agent_state.created_by_id,
363
- functions=allowed_functions,
364
- # functions_python=self.functions_python, do we need this?
365
- function_call=function_call,
366
- first_message=first_message,
367
- force_tool_call=force_tool_call,
368
- stream=stream,
369
- stream_interface=self.interface,
370
399
  put_inner_thoughts_first=put_inner_thoughts_first,
400
+ actor_id=self.agent_state.created_by_id,
371
401
  )
402
+
403
+ if llm_client and not stream:
404
+ response = llm_client.send_llm_request(
405
+ messages=message_sequence,
406
+ tools=allowed_functions,
407
+ tool_call=function_call,
408
+ stream=stream,
409
+ first_message=first_message,
410
+ force_tool_call=force_tool_call,
411
+ )
412
+ else:
413
+ # Fallback to existing flow
414
+ response = create(
415
+ llm_config=self.agent_state.llm_config,
416
+ messages=message_sequence,
417
+ user_id=self.agent_state.created_by_id,
418
+ functions=allowed_functions,
419
+ # functions_python=self.functions_python, do we need this?
420
+ function_call=function_call,
421
+ first_message=first_message,
422
+ force_tool_call=force_tool_call,
423
+ stream=stream,
424
+ stream_interface=self.interface,
425
+ put_inner_thoughts_first=put_inner_thoughts_first,
426
+ )
372
427
  log_telemetry(self.logger, "_get_ai_reply create finish")
373
428
 
374
429
  # These bottom two are retryable
@@ -632,7 +687,7 @@ class Agent(BaseAgent):
632
687
  function_args,
633
688
  function_response,
634
689
  messages,
635
- [tool_return] if tool_return else None,
690
+ [tool_return],
636
691
  include_function_failed_message=True,
637
692
  )
638
693
  return messages, False, True # force a heartbeat to allow agent to handle error
@@ -659,7 +714,7 @@ class Agent(BaseAgent):
659
714
  "content": function_response,
660
715
  "tool_call_id": tool_call_id,
661
716
  },
662
- tool_returns=[tool_return] if tool_return else None,
717
+ tool_returns=[tool_return] if sandbox_run_result else None,
663
718
  )
664
719
  ) # extend conversation with function response
665
720
  self.interface.function_message(f"Ran {function_name}({function_args})", msg_obj=messages[-1])
@@ -909,6 +964,7 @@ class Agent(BaseAgent):
909
964
  # Log step - this must happen before messages are persisted
910
965
  step = self.step_manager.log_step(
911
966
  actor=self.user,
967
+ agent_id=self.agent_state.id,
912
968
  provider_name=self.agent_state.llm_config.model_endpoint_type,
913
969
  model=self.agent_state.llm_config.model,
914
970
  model_endpoint=self.agent_state.llm_config.model_endpoint,
@@ -989,7 +1045,7 @@ class Agent(BaseAgent):
989
1045
  err_msg,
990
1046
  details={
991
1047
  "num_in_context_messages": len(self.agent_state.message_ids),
992
- "in_context_messages_text": [m.text for m in in_context_messages],
1048
+ "in_context_messages_text": [m.content for m in in_context_messages],
993
1049
  "token_counts": token_counts,
994
1050
  },
995
1051
  )
@@ -1143,14 +1199,17 @@ class Agent(BaseAgent):
1143
1199
  if (
1144
1200
  len(in_context_messages) > 1
1145
1201
  and in_context_messages[1].role == MessageRole.user
1146
- and isinstance(in_context_messages[1].text, str)
1202
+ and in_context_messages[1].content
1203
+ and len(in_context_messages[1].content) == 1
1204
+ and in_context_messages[1].content[0].type == MessageContentType.text
1147
1205
  # TODO remove hardcoding
1148
- and "The following is a summary of the previous " in in_context_messages[1].text
1206
+ and "The following is a summary of the previous " in in_context_messages[1].content[0].text
1149
1207
  ):
1150
1208
  # Summary message exists
1151
- assert in_context_messages[1].text is not None
1152
- summary_memory = in_context_messages[1].text
1153
- num_tokens_summary_memory = count_tokens(in_context_messages[1].text)
1209
+ text_content = in_context_messages[1].content[0].text
1210
+ assert text_content is not None
1211
+ summary_memory = text_content
1212
+ num_tokens_summary_memory = count_tokens(text_content)
1154
1213
  # with a summary message, the real messages start at index 2
1155
1214
  num_tokens_messages = (
1156
1215
  num_tokens_from_messages(messages=in_context_messages_openai[2:], model=self.model)
@@ -1174,6 +1233,7 @@ class Agent(BaseAgent):
1174
1233
  memory_edit_timestamp=get_utc_time(),
1175
1234
  previous_message_count=self.message_manager.size(actor=self.user, agent_id=self.agent_state.id),
1176
1235
  archival_memory_size=self.agent_manager.passage_size(actor=self.user, agent_id=self.agent_state.id),
1236
+ recent_passages=self.agent_manager.list_passages(actor=self.user, agent_id=self.agent_state.id, ascending=False, limit=10),
1177
1237
  )
1178
1238
  num_tokens_external_memory_summary = count_tokens(external_memory_summary)
1179
1239
 
@@ -237,7 +237,8 @@ class LowLatencyAgent(BaseAgent):
237
237
  # TODO: This is a pretty brittle pattern established all over our code, need to get rid of this
238
238
  curr_system_message = in_context_messages[0]
239
239
  curr_memory_str = agent_state.memory.compile()
240
- if curr_memory_str in curr_system_message.text:
240
+ curr_system_message_text = curr_system_message.content[0].text
241
+ if curr_memory_str in curr_system_message_text:
241
242
  # NOTE: could this cause issues if a block is removed? (substring match would still work)
242
243
  logger.debug(
243
244
  f"Memory hasn't changed for agent id={agent_state.id} and actor=({self.actor.id}, {self.actor.name}), skipping system prompt rebuild"
@@ -251,7 +252,7 @@ class LowLatencyAgent(BaseAgent):
251
252
  in_context_memory_last_edit=memory_edit_timestamp,
252
253
  )
253
254
 
254
- diff = united_diff(curr_system_message.text, new_system_message_str)
255
+ diff = united_diff(curr_system_message_text, new_system_message_str)
255
256
  if len(diff) > 0:
256
257
  logger.info(f"Rebuilding system with new memory...\nDiff:\n{diff}")
257
258
 
@@ -4,7 +4,6 @@ import time
4
4
  from typing import Callable, Dict, Generator, List, Optional, Union
5
5
 
6
6
  import requests
7
- from openai.types.chat.chat_completion_message_tool_call import ChatCompletionMessageToolCall as OpenAIToolCall
8
7
 
9
8
  import letta.utils
10
9
  from letta.constants import ADMIN_PREFIX, BASE_MEMORY_TOOLS, BASE_TOOLS, DEFAULT_HUMAN, DEFAULT_PERSONA, FUNCTION_RETURN_CHAR_LIMIT
@@ -29,7 +28,7 @@ from letta.schemas.letta_request import LettaRequest, LettaStreamingRequest
29
28
  from letta.schemas.letta_response import LettaResponse, LettaStreamingResponse
30
29
  from letta.schemas.llm_config import LLMConfig
31
30
  from letta.schemas.memory import ArchivalMemorySummary, ChatMemory, CreateArchivalMemory, Memory, RecallMemorySummary
32
- from letta.schemas.message import Message, MessageCreate, MessageUpdate
31
+ from letta.schemas.message import Message, MessageCreate
33
32
  from letta.schemas.openai.chat_completion_response import UsageStatistics
34
33
  from letta.schemas.organization import Organization
35
34
  from letta.schemas.passage import Passage
@@ -640,30 +639,6 @@ class RESTClient(AbstractClient):
640
639
  # refresh and return agent
641
640
  return self.get_agent(agent_state.id)
642
641
 
643
- def update_message(
644
- self,
645
- agent_id: str,
646
- message_id: str,
647
- role: Optional[MessageRole] = None,
648
- text: Optional[str] = None,
649
- name: Optional[str] = None,
650
- tool_calls: Optional[List[OpenAIToolCall]] = None,
651
- tool_call_id: Optional[str] = None,
652
- ) -> Message:
653
- request = MessageUpdate(
654
- role=role,
655
- content=text,
656
- name=name,
657
- tool_calls=tool_calls,
658
- tool_call_id=tool_call_id,
659
- )
660
- response = requests.patch(
661
- f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/messages/{message_id}", json=request.model_dump(), headers=self.headers
662
- )
663
- if response.status_code != 200:
664
- raise ValueError(f"Failed to update message: {response.text}")
665
- return Message(**response.json())
666
-
667
642
  def update_agent(
668
643
  self,
669
644
  agent_id: str,
@@ -2436,30 +2411,6 @@ class LocalClient(AbstractClient):
2436
2411
  # TODO: get full agent state
2437
2412
  return self.server.agent_manager.get_agent_by_id(agent_state.id, actor=self.user)
2438
2413
 
2439
- def update_message(
2440
- self,
2441
- agent_id: str,
2442
- message_id: str,
2443
- role: Optional[MessageRole] = None,
2444
- text: Optional[str] = None,
2445
- name: Optional[str] = None,
2446
- tool_calls: Optional[List[OpenAIToolCall]] = None,
2447
- tool_call_id: Optional[str] = None,
2448
- ) -> Message:
2449
- message = self.server.update_agent_message(
2450
- agent_id=agent_id,
2451
- message_id=message_id,
2452
- request=MessageUpdate(
2453
- role=role,
2454
- content=text,
2455
- name=name,
2456
- tool_calls=tool_calls,
2457
- tool_call_id=tool_call_id,
2458
- ),
2459
- actor=self.user,
2460
- )
2461
- return message
2462
-
2463
2414
  def update_agent(
2464
2415
  self,
2465
2416
  agent_id: str,
@@ -11,6 +11,9 @@ OPENAI_API_PREFIX = "/openai"
11
11
  COMPOSIO_ENTITY_ENV_VAR_KEY = "COMPOSIO_ENTITY"
12
12
  COMPOSIO_TOOL_TAG_NAME = "composio"
13
13
 
14
+ MCP_CONFIG_NAME = "mcp_config.json"
15
+ MCP_TOOL_TAG_NAME_PREFIX = "mcp" # full format, mcp:server_name
16
+
14
17
  LETTA_CORE_TOOL_MODULE_NAME = "letta.functions.function_sets.base"
15
18
  LETTA_MULTI_AGENT_TOOL_MODULE_NAME = "letta.functions.function_sets.multi_agent"
16
19
 
@@ -50,7 +53,7 @@ BASE_TOOLS = ["send_message", "conversation_search", "archival_memory_insert", "
50
53
  # Base memory tools CAN be edited, and are added by default by the server
51
54
  BASE_MEMORY_TOOLS = ["core_memory_append", "core_memory_replace"]
52
55
  # Multi agent tools
53
- MULTI_AGENT_TOOLS = ["send_message_to_agent_and_wait_for_reply", "send_message_to_agents_matching_all_tags", "send_message_to_agent_async"]
56
+ MULTI_AGENT_TOOLS = ["send_message_to_agent_and_wait_for_reply", "send_message_to_agents_matching_tags", "send_message_to_agent_async"]
54
57
  # Set of all built-in Letta tools
55
58
  LETTA_TOOL_SET = set(BASE_TOOLS + BASE_MEMORY_TOOLS + MULTI_AGENT_TOOLS)
56
59
 
@@ -56,7 +56,7 @@ def conversation_search(self: "Agent", query: str, page: Optional[int] = 0) -> O
56
56
  results_str = f"No results found."
57
57
  else:
58
58
  results_pref = f"Showing {len(messages)} of {total} results (page {page}/{num_pages}):"
59
- results_formatted = [message.text for message in messages]
59
+ results_formatted = [message.content[0].text for message in messages]
60
60
  results_str = f"{results_pref} {json_dumps(results_formatted)}"
61
61
  return results_str
62
62
 
@@ -2,7 +2,7 @@ import asyncio
2
2
  from typing import TYPE_CHECKING, List
3
3
 
4
4
  from letta.functions.helpers import (
5
- _send_message_to_agents_matching_all_tags_async,
5
+ _send_message_to_agents_matching_tags_async,
6
6
  execute_send_message_to_agent,
7
7
  fire_and_forget_send_to_agent,
8
8
  )
@@ -70,18 +70,19 @@ def send_message_to_agent_async(self: "Agent", message: str, other_agent_id: str
70
70
  return "Successfully sent message"
71
71
 
72
72
 
73
- def send_message_to_agents_matching_all_tags(self: "Agent", message: str, tags: List[str]) -> List[str]:
73
+ def send_message_to_agents_matching_tags(self: "Agent", message: str, match_all: List[str], match_some: List[str]) -> List[str]:
74
74
  """
75
- Sends a message to all agents within the same organization that match all of the specified tags. Messages are dispatched in parallel for improved performance, with retries to handle transient issues and timeouts to ensure responsiveness. This function enforces a limit of 100 agents and does not support pagination (cursor-based queries). Each agent must match all specified tags (`match_all_tags=True`) to be included.
75
+ Sends a message to all agents within the same organization that match the specified tag criteria. Agents must possess *all* of the tags in `match_all` and *at least one* of the tags in `match_some` to receive the message.
76
76
 
77
77
  Args:
78
78
  message (str): The content of the message to be sent to each matching agent.
79
- tags (List[str]): A list of tags that an agent must possess to receive the message.
79
+ match_all (List[str]): A list of tags that an agent must possess to receive the message.
80
+ match_some (List[str]): A list of tags where an agent must have at least one to qualify.
80
81
 
81
82
  Returns:
82
- List[str]: A list of responses from the agents that matched all tags. Each
83
- response corresponds to a single agent. Agents that do not respond will not
84
- have an entry in the returned list.
83
+ List[str]: A list of responses from the agents that matched the filtering criteria. Each
84
+ response corresponds to a single agent. Agents that do not respond will not have an entry
85
+ in the returned list.
85
86
  """
86
87
 
87
- return asyncio.run(_send_message_to_agents_matching_all_tags_async(self, message, tags))
88
+ return asyncio.run(_send_message_to_agents_matching_tags_async(self, message, match_all, match_some))
@@ -48,6 +48,20 @@ def generate_composio_action_from_func_name(func_name: str) -> str:
48
48
  return func_name.upper()
49
49
 
50
50
 
51
+ # TODO needed?
52
+ def generate_mcp_tool_wrapper(mcp_tool_name: str) -> tuple[str, str]:
53
+
54
+ wrapper_function_str = f"""\
55
+ def {mcp_tool_name}(**kwargs):
56
+ raise RuntimeError("Something went wrong - we should never be using the persisted source code for MCP. Please reach out to Letta team")
57
+ """
58
+
59
+ # Compile safety check
60
+ assert_code_gen_compilable(wrapper_function_str.strip())
61
+
62
+ return mcp_tool_name, wrapper_function_str.strip()
63
+
64
+
51
65
  def generate_composio_tool_wrapper(action_name: str) -> tuple[str, str]:
52
66
  # Generate func name
53
67
  func_name = generate_func_name_from_composio_action(action_name)
@@ -518,8 +532,16 @@ def fire_and_forget_send_to_agent(
518
532
  run_in_background_thread(background_task())
519
533
 
520
534
 
521
- async def _send_message_to_agents_matching_all_tags_async(sender_agent: "Agent", message: str, tags: List[str]) -> List[str]:
522
- log_telemetry(sender_agent.logger, "_send_message_to_agents_matching_all_tags_async start", message=message, tags=tags)
535
+ async def _send_message_to_agents_matching_tags_async(
536
+ sender_agent: "Agent", message: str, match_all: List[str], match_some: List[str]
537
+ ) -> List[str]:
538
+ log_telemetry(
539
+ sender_agent.logger,
540
+ "_send_message_to_agents_matching_tags_async start",
541
+ message=message,
542
+ match_all=match_all,
543
+ match_some=match_some,
544
+ )
523
545
  server = get_letta_server()
524
546
 
525
547
  augmented_message = (
@@ -529,9 +551,22 @@ async def _send_message_to_agents_matching_all_tags_async(sender_agent: "Agent",
529
551
  )
530
552
 
531
553
  # Retrieve up to 100 matching agents
532
- log_telemetry(sender_agent.logger, "_send_message_to_agents_matching_all_tags_async listing agents start", message=message, tags=tags)
533
- matching_agents = server.agent_manager.list_agents(actor=sender_agent.user, tags=tags, match_all_tags=True, limit=100)
534
- log_telemetry(sender_agent.logger, "_send_message_to_agents_matching_all_tags_async listing agents finish", message=message, tags=tags)
554
+ log_telemetry(
555
+ sender_agent.logger,
556
+ "_send_message_to_agents_matching_tags_async listing agents start",
557
+ message=message,
558
+ match_all=match_all,
559
+ match_some=match_some,
560
+ )
561
+ matching_agents = server.agent_manager.list_agents_matching_tags(actor=sender_agent.user, match_all=match_all, match_some=match_some)
562
+
563
+ log_telemetry(
564
+ sender_agent.logger,
565
+ "_send_message_to_agents_matching_tags_async listing agents finish",
566
+ message=message,
567
+ match_all=match_all,
568
+ match_some=match_some,
569
+ )
535
570
 
536
571
  # Create a system message
537
572
  messages = [MessageCreate(role=MessageRole.system, content=augmented_message, name=sender_agent.agent_state.name)]
@@ -559,7 +594,13 @@ async def _send_message_to_agents_matching_all_tags_async(sender_agent: "Agent",
559
594
  else:
560
595
  final.append(r)
561
596
 
562
- log_telemetry(sender_agent.logger, "_send_message_to_agents_matching_all_tags_async finish", message=message, tags=tags)
597
+ log_telemetry(
598
+ sender_agent.logger,
599
+ "_send_message_to_agents_matching_tags_async finish",
600
+ message=message,
601
+ match_all=match_all,
602
+ match_some=match_some,
603
+ )
563
604
  return final
564
605
 
565
606
 
@@ -6,6 +6,8 @@ from composio.client.collections import ActionParametersModel
6
6
  from docstring_parser import parse
7
7
  from pydantic import BaseModel
8
8
 
9
+ from letta.helpers.mcp_helpers import MCPTool
10
+
9
11
 
10
12
  def is_optional(annotation):
11
13
  # Check if the annotation is a Union
@@ -447,6 +449,51 @@ def generate_schema_from_args_schema_v2(
447
449
  return function_call_json
448
450
 
449
451
 
452
+ def generate_tool_schema_for_mcp(
453
+ mcp_tool: MCPTool,
454
+ append_heartbeat: bool = True,
455
+ strict: bool = False,
456
+ ) -> Dict[str, Any]:
457
+
458
+ # MCP tool.inputSchema is a JSON schema
459
+ # https://github.com/modelcontextprotocol/python-sdk/blob/775f87981300660ee957b63c2a14b448ab9c3675/src/mcp/types.py#L678
460
+ parameters_schema = mcp_tool.inputSchema
461
+ name = mcp_tool.name
462
+ description = mcp_tool.description
463
+
464
+ assert "type" in parameters_schema
465
+ assert "required" in parameters_schema
466
+ assert "properties" in parameters_schema
467
+
468
+ # Add the optional heartbeat parameter
469
+ if append_heartbeat:
470
+ parameters_schema["properties"]["request_heartbeat"] = {
471
+ "type": "boolean",
472
+ "description": "Request an immediate heartbeat after function execution. Set to `True` if you want to send a follow-up message or run a follow-up function.",
473
+ }
474
+ parameters_schema["required"].append("request_heartbeat")
475
+
476
+ # Return the final schema
477
+ if strict:
478
+ # https://platform.openai.com/docs/guides/function-calling#strict-mode
479
+
480
+ # Add additionalProperties: False
481
+ parameters_schema["additionalProperties"] = False
482
+
483
+ return {
484
+ "strict": True, # NOTE
485
+ "name": name,
486
+ "description": description,
487
+ "parameters": parameters_schema,
488
+ }
489
+ else:
490
+ return {
491
+ "name": name,
492
+ "description": description,
493
+ "parameters": parameters_schema,
494
+ }
495
+
496
+
450
497
  def generate_tool_schema_for_composio(
451
498
  parameters_model: ActionParametersModel,
452
499
  name: str,