letta-nightly 0.5.4.dev20241121104201__tar.gz → 0.5.5.dev20241122170327__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 (216) hide show
  1. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/PKG-INFO +26 -27
  2. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/__init__.py +1 -1
  3. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/agent.py +25 -22
  4. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/client/client.py +6 -7
  5. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/functions/helpers.py +5 -38
  6. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/tool.py +2 -45
  7. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/server.py +12 -2
  8. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/services/block_manager.py +1 -1
  9. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/pyproject.toml +9 -15
  10. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/LICENSE +0 -0
  11. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/README.md +0 -0
  12. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/__main__.py +0 -0
  13. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/agent_store/chroma.py +0 -0
  14. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/agent_store/db.py +0 -0
  15. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/agent_store/lancedb.py +0 -0
  16. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/agent_store/milvus.py +0 -0
  17. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/agent_store/qdrant.py +0 -0
  18. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/agent_store/storage.py +0 -0
  19. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/benchmark/benchmark.py +0 -0
  20. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/benchmark/constants.py +0 -0
  21. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/cli/cli.py +0 -0
  22. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/cli/cli_config.py +0 -0
  23. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/cli/cli_load.py +0 -0
  24. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/client/__init__.py +0 -0
  25. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/client/streaming.py +0 -0
  26. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/client/utils.py +0 -0
  27. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/config.py +0 -0
  28. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/constants.py +0 -0
  29. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/credentials.py +0 -0
  30. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/data_sources/connectors.py +0 -0
  31. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/data_sources/connectors_helper.py +0 -0
  32. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/embeddings.py +0 -0
  33. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/errors.py +0 -0
  34. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/functions/__init__.py +0 -0
  35. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/functions/function_sets/base.py +0 -0
  36. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/functions/function_sets/extras.py +0 -0
  37. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/functions/functions.py +0 -0
  38. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/functions/schema_generator.py +0 -0
  39. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/helpers/__init__.py +0 -0
  40. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/helpers/tool_rule_solver.py +0 -0
  41. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/humans/__init__.py +0 -0
  42. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/humans/examples/basic.txt +0 -0
  43. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/humans/examples/cs_phd.txt +0 -0
  44. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/interface.py +0 -0
  45. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/__init__.py +0 -0
  46. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/anthropic.py +0 -0
  47. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/azure_openai.py +0 -0
  48. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/azure_openai_constants.py +0 -0
  49. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/cohere.py +0 -0
  50. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/google_ai.py +0 -0
  51. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/helpers.py +0 -0
  52. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/llm_api_tools.py +0 -0
  53. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/mistral.py +0 -0
  54. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/llm_api/openai.py +0 -0
  55. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/README.md +0 -0
  56. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/__init__.py +0 -0
  57. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/chat_completion_proxy.py +0 -0
  58. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/constants.py +0 -0
  59. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/function_parser.py +0 -0
  60. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/grammars/__init__.py +0 -0
  61. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/grammars/gbnf_grammar_generator.py +0 -0
  62. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/grammars/json.gbnf +0 -0
  63. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/grammars/json_func_calls_with_inner_thoughts.gbnf +0 -0
  64. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/json_parser.py +0 -0
  65. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/koboldcpp/api.py +0 -0
  66. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/koboldcpp/settings.py +0 -0
  67. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llamacpp/api.py +0 -0
  68. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llamacpp/settings.py +0 -0
  69. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/__init__.py +0 -0
  70. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/airoboros.py +0 -0
  71. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/chatml.py +0 -0
  72. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/configurable_wrapper.py +0 -0
  73. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/dolphin.py +0 -0
  74. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/llama3.py +0 -0
  75. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/simple_summary_wrapper.py +0 -0
  76. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/wrapper_base.py +0 -0
  77. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/llm_chat_completion_wrappers/zephyr.py +0 -0
  78. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/lmstudio/api.py +0 -0
  79. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/lmstudio/settings.py +0 -0
  80. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/ollama/api.py +0 -0
  81. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/ollama/settings.py +0 -0
  82. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/settings/__init__.py +0 -0
  83. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/settings/deterministic_mirostat.py +0 -0
  84. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/settings/settings.py +0 -0
  85. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/settings/simple.py +0 -0
  86. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/utils.py +0 -0
  87. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/vllm/api.py +0 -0
  88. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/webui/api.py +0 -0
  89. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/webui/legacy_api.py +0 -0
  90. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/webui/legacy_settings.py +0 -0
  91. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/local_llm/webui/settings.py +0 -0
  92. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/log.py +0 -0
  93. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/main.py +0 -0
  94. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/memory.py +0 -0
  95. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/metadata.py +0 -0
  96. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/o1_agent.py +0 -0
  97. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/openai_backcompat/__init__.py +0 -0
  98. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/openai_backcompat/openai_object.py +0 -0
  99. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/__all__.py +0 -0
  100. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/__init__.py +0 -0
  101. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/agents_tags.py +0 -0
  102. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/base.py +0 -0
  103. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/block.py +0 -0
  104. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/enums.py +0 -0
  105. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/errors.py +0 -0
  106. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/file.py +0 -0
  107. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/mixins.py +0 -0
  108. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/organization.py +0 -0
  109. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/source.py +0 -0
  110. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/sqlalchemy_base.py +0 -0
  111. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/tool.py +0 -0
  112. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/orm/user.py +0 -0
  113. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/persistence_manager.py +0 -0
  114. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/__init__.py +0 -0
  115. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/anna_pa.txt +0 -0
  116. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/google_search_persona.txt +0 -0
  117. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/memgpt_doc.txt +0 -0
  118. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/memgpt_starter.txt +0 -0
  119. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/o1_persona.txt +0 -0
  120. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/sam.txt +0 -0
  121. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/sam_pov.txt +0 -0
  122. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/sam_simple_pov_gpt35.txt +0 -0
  123. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/personas/examples/sqldb/test.db +0 -0
  124. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/__init__.py +0 -0
  125. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/gpt_summarize.py +0 -0
  126. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/gpt_system.py +0 -0
  127. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_base.txt +0 -0
  128. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_chat.txt +0 -0
  129. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_chat_compressed.txt +0 -0
  130. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_chat_fstring.txt +0 -0
  131. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_doc.txt +0 -0
  132. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_gpt35_extralong.txt +0 -0
  133. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_intuitive_knowledge.txt +0 -0
  134. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_modified_chat.txt +0 -0
  135. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/prompts/system/memgpt_modified_o1.txt +0 -0
  136. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/providers.py +0 -0
  137. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/pytest.ini +0 -0
  138. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/agent.py +0 -0
  139. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/agents_tags.py +0 -0
  140. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/api_key.py +0 -0
  141. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/block.py +0 -0
  142. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/embedding_config.py +0 -0
  143. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/enums.py +0 -0
  144. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/file.py +0 -0
  145. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/health.py +0 -0
  146. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/job.py +0 -0
  147. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/letta_base.py +0 -0
  148. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/letta_message.py +0 -0
  149. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/letta_request.py +0 -0
  150. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/letta_response.py +0 -0
  151. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/llm_config.py +0 -0
  152. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/memory.py +0 -0
  153. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/message.py +0 -0
  154. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/openai/chat_completion_request.py +0 -0
  155. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/openai/chat_completion_response.py +0 -0
  156. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/openai/chat_completions.py +0 -0
  157. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/openai/embedding_response.py +0 -0
  158. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/openai/openai.py +0 -0
  159. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/organization.py +0 -0
  160. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/passage.py +0 -0
  161. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/source.py +0 -0
  162. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/tool_rule.py +0 -0
  163. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/usage.py +0 -0
  164. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/schemas/user.py +0 -0
  165. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/__init__.py +0 -0
  166. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/constants.py +0 -0
  167. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/generate_openapi_schema.sh +0 -0
  168. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/__init__.py +0 -0
  169. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/app.py +0 -0
  170. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/auth/__init__.py +0 -0
  171. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/auth/index.py +0 -0
  172. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/auth_token.py +0 -0
  173. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/interface.py +0 -0
  174. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/__init__.py +0 -0
  175. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/openai/__init__.py +0 -0
  176. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/openai/assistants/__init__.py +0 -0
  177. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/openai/assistants/assistants.py +0 -0
  178. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/openai/assistants/schemas.py +0 -0
  179. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/openai/assistants/threads.py +0 -0
  180. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/openai/chat_completions/__init__.py +0 -0
  181. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/openai/chat_completions/chat_completions.py +0 -0
  182. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/__init__.py +0 -0
  183. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/agents.py +0 -0
  184. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/blocks.py +0 -0
  185. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/health.py +0 -0
  186. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/jobs.py +0 -0
  187. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/llms.py +0 -0
  188. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/organizations.py +0 -0
  189. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/sources.py +0 -0
  190. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/tools.py +0 -0
  191. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/routers/v1/users.py +0 -0
  192. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/static_files.py +0 -0
  193. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/rest_api/utils.py +0 -0
  194. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/startup.sh +0 -0
  195. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/static_files/assets/index-3ab03d5b.css +0 -0
  196. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/static_files/assets/index-9fa459a2.js +0 -0
  197. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/static_files/favicon.ico +0 -0
  198. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/static_files/index.html +0 -0
  199. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/static_files/memgpt_logo_transparent.png +0 -0
  200. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/utils.py +0 -0
  201. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/ws_api/__init__.py +0 -0
  202. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/ws_api/example_client.py +0 -0
  203. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/ws_api/interface.py +0 -0
  204. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/ws_api/protocol.py +0 -0
  205. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/server/ws_api/server.py +0 -0
  206. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/services/__init__.py +0 -0
  207. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/services/agents_tags_manager.py +0 -0
  208. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/services/organization_manager.py +0 -0
  209. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/services/source_manager.py +0 -0
  210. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/services/tool_manager.py +0 -0
  211. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/services/user_manager.py +0 -0
  212. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/settings.py +0 -0
  213. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/streaming_interface.py +0 -0
  214. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/streaming_utils.py +0 -0
  215. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/system.py +0 -0
  216. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.5.dev20241122170327}/letta/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: letta-nightly
3
- Version: 0.5.4.dev20241121104201
3
+ Version: 0.5.5.dev20241122170327
4
4
  Summary: Create LLM agents with long-term memory and custom tools
5
5
  License: Apache License
6
6
  Author: Letta Team
@@ -11,6 +11,7 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
+ Provides-Extra: all
14
15
  Provides-Extra: autogen
15
16
  Provides-Extra: dev
16
17
  Provides-Extra: external-tools
@@ -21,48 +22,46 @@ Provides-Extra: qdrant
21
22
  Provides-Extra: server
22
23
  Provides-Extra: tests
23
24
  Requires-Dist: alembic (>=1.13.3,<2.0.0)
24
- Requires-Dist: autoflake (>=2.3.0,<3.0.0) ; extra == "dev"
25
- Requires-Dist: black[jupyter] (>=24.2.0,<25.0.0) ; extra == "dev"
25
+ Requires-Dist: autoflake (>=2.3.0,<3.0.0) ; extra == "dev" or extra == "all"
26
+ Requires-Dist: black[jupyter] (>=24.2.0,<25.0.0) ; extra == "dev" or extra == "all"
26
27
  Requires-Dist: chromadb (>=0.4.24,<0.5.0)
27
- Requires-Dist: composio-core (>=0.5.34,<0.6.0) ; extra == "external-tools"
28
- Requires-Dist: composio-langchain (>=0.5.28,<0.6.0) ; extra == "external-tools"
29
- Requires-Dist: crewai (>=0.41.1,<0.42.0) ; extra == "external-tools"
30
- Requires-Dist: crewai-tools (>=0.8.3,<0.9.0) ; extra == "external-tools"
31
- Requires-Dist: datasets (>=2.14.6,<3.0.0) ; extra == "dev"
28
+ Requires-Dist: composio-core (>=0.5.34,<0.6.0) ; extra == "external-tools" or extra == "all"
29
+ Requires-Dist: composio-langchain (>=0.5.28,<0.6.0) ; extra == "external-tools" or extra == "all"
30
+ Requires-Dist: datasets (>=2.14.6,<3.0.0) ; extra == "dev" or extra == "all"
32
31
  Requires-Dist: demjson3 (>=3.0.6,<4.0.0)
33
- Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "external-tools"
32
+ Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "external-tools" or extra == "all"
34
33
  Requires-Dist: docstring-parser (>=0.16,<0.17)
35
34
  Requires-Dist: docx2txt (>=0.8,<0.9)
36
- Requires-Dist: fastapi (>=0.104.1,<0.105.0) ; extra == "server"
35
+ Requires-Dist: fastapi (>=0.104.1,<0.105.0) ; extra == "server" or extra == "all"
37
36
  Requires-Dist: html2text (>=2020.1.16,<2021.0.0)
38
37
  Requires-Dist: httpx (>=0.27.2,<0.28.0)
39
38
  Requires-Dist: httpx-sse (>=0.4.0,<0.5.0)
40
- Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev"
39
+ Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev" or extra == "all"
41
40
  Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
42
- Requires-Dist: langchain (>=0.2.16,<0.3.0) ; extra == "external-tools"
43
- Requires-Dist: langchain-community (>=0.2.17,<0.3.0) ; extra == "external-tools"
41
+ Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
42
+ Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
44
43
  Requires-Dist: llama-index (>=0.11.9,<0.12.0)
45
- Requires-Dist: llama-index-embeddings-ollama (>=0.3.1,<0.4.0) ; extra == "ollama"
44
+ Requires-Dist: llama-index-embeddings-ollama (>=0.3.1,<0.4.0) ; extra == "ollama" or extra == "all"
46
45
  Requires-Dist: llama-index-embeddings-openai (>=0.2.5,<0.3.0)
47
- Requires-Dist: locust (>=2.31.5,<3.0.0)
46
+ Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "all"
48
47
  Requires-Dist: nltk (>=3.8.1,<4.0.0)
49
48
  Requires-Dist: numpy (>=1.26.2,<2.0.0)
50
49
  Requires-Dist: pathvalidate (>=3.2.1,<4.0.0)
51
- Requires-Dist: pexpect (>=4.9.0,<5.0.0) ; extra == "dev"
52
- Requires-Dist: pg8000 (>=1.30.3,<2.0.0) ; extra == "postgres"
53
- Requires-Dist: pgvector (>=0.2.3,<0.3.0) ; extra == "postgres"
54
- Requires-Dist: pre-commit (>=3.5.0,<4.0.0) ; extra == "dev"
50
+ Requires-Dist: pexpect (>=4.9.0,<5.0.0) ; extra == "dev" or extra == "all"
51
+ Requires-Dist: pg8000 (>=1.30.3,<2.0.0) ; extra == "postgres" or extra == "all"
52
+ Requires-Dist: pgvector (>=0.2.3,<0.3.0) ; extra == "postgres" or extra == "all"
53
+ Requires-Dist: pre-commit (>=3.5.0,<4.0.0) ; extra == "dev" or extra == "all"
55
54
  Requires-Dist: prettytable (>=3.9.0,<4.0.0)
56
- Requires-Dist: psycopg2 (>=2.9.10,<3.0.0) ; extra == "postgres"
57
- Requires-Dist: psycopg2-binary (>=2.9.10,<3.0.0) ; extra == "postgres"
55
+ Requires-Dist: psycopg2 (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "all"
56
+ Requires-Dist: psycopg2-binary (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "all"
58
57
  Requires-Dist: pyautogen (==0.2.22) ; extra == "autogen"
59
58
  Requires-Dist: pydantic (>=2.7.4,<2.10.0)
60
59
  Requires-Dist: pydantic-settings (>=2.2.1,<3.0.0)
61
60
  Requires-Dist: pyhumps (>=3.8.0,<4.0.0)
62
61
  Requires-Dist: pymilvus (>=2.4.3,<3.0.0) ; extra == "milvus"
63
- Requires-Dist: pyright (>=1.1.347,<2.0.0) ; extra == "dev"
64
- Requires-Dist: pytest-asyncio (>=0.23.2,<0.24.0) ; extra == "dev"
65
- Requires-Dist: pytest-order (>=1.2.0,<2.0.0) ; extra == "dev"
62
+ Requires-Dist: pyright (>=1.1.347,<2.0.0) ; extra == "dev" or extra == "all"
63
+ Requires-Dist: pytest-asyncio (>=0.23.2,<0.24.0) ; extra == "dev" or extra == "all"
64
+ Requires-Dist: pytest-order (>=1.2.0,<2.0.0) ; extra == "dev" or extra == "all"
66
65
  Requires-Dist: python-box (>=7.1.1,<8.0.0)
67
66
  Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
68
67
  Requires-Dist: pytz (>=2023.3.post1,<2024.0)
@@ -77,9 +76,9 @@ Requires-Dist: sqlmodel (>=0.0.16,<0.0.17)
77
76
  Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
78
77
  Requires-Dist: tqdm (>=4.66.1,<5.0.0)
79
78
  Requires-Dist: typer[all] (>=0.9.0,<0.10.0)
80
- Requires-Dist: uvicorn (>=0.24.0.post1,<0.25.0) ; extra == "server"
81
- Requires-Dist: websockets (>=12.0,<13.0) ; extra == "server"
82
- Requires-Dist: wikipedia (>=1.4.0,<2.0.0) ; extra == "external-tools" or extra == "tests"
79
+ Requires-Dist: uvicorn (>=0.24.0.post1,<0.25.0) ; extra == "server" or extra == "all"
80
+ Requires-Dist: websockets (>=12.0,<13.0) ; extra == "server" or extra == "all"
81
+ Requires-Dist: wikipedia (>=1.4.0,<2.0.0) ; extra == "external-tools" or extra == "tests" or extra == "all"
83
82
  Description-Content-Type: text/markdown
84
83
 
85
84
  <p align="center">
@@ -1,4 +1,4 @@
1
- __version__ = "0.5.4"
1
+ __version__ = "0.5.5"
2
2
 
3
3
  # import clients
4
4
  from letta.client.client import LocalClient, RESTClient, create_client
@@ -1208,6 +1208,30 @@ class Agent(BaseAgent):
1208
1208
  new_messages = [new_system_message_obj] + self._messages[1:] # swap index 0 (system)
1209
1209
  self._messages = new_messages
1210
1210
 
1211
+ def update_memory_blocks_from_db(self):
1212
+ for block in self.memory.to_dict()["memory"].values():
1213
+ if block.get("templates", False):
1214
+ # we don't expect to update shared memory blocks that
1215
+ # are templates. this is something we could update in the
1216
+ # future if we expect templates to change often.
1217
+ continue
1218
+ block_id = block.get("id")
1219
+
1220
+ # TODO: This is really hacky and we should probably figure out how to
1221
+ db_block = BlockManager().get_block_by_id(block_id=block_id, actor=self.user)
1222
+ if db_block is None:
1223
+ # this case covers if someone has deleted a shared block by interacting
1224
+ # with some other agent.
1225
+ # in that case we should remove this shared block from the agent currently being
1226
+ # evaluated.
1227
+ printd(f"removing block: {block_id=}")
1228
+ continue
1229
+ if not isinstance(db_block.value, str):
1230
+ printd(f"skipping block update, unexpected value: {block_id=}")
1231
+ continue
1232
+ # TODO: we may want to update which columns we're updating from shared memory e.g. the limit
1233
+ self.memory.update_block_value(label=block.get("label", ""), value=db_block.value)
1234
+
1211
1235
  def rebuild_memory(self, force=False, update_timestamp=True, ms: Optional[MetadataStore] = None):
1212
1236
  """Rebuilds the system message with the latest memory object and any shared memory block updates"""
1213
1237
  curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
@@ -1219,28 +1243,7 @@ class Agent(BaseAgent):
1219
1243
  return
1220
1244
 
1221
1245
  if ms:
1222
- for block in self.memory.to_dict()["memory"].values():
1223
- if block.get("templates", False):
1224
- # we don't expect to update shared memory blocks that
1225
- # are templates. this is something we could update in the
1226
- # future if we expect templates to change often.
1227
- continue
1228
- block_id = block.get("id")
1229
-
1230
- # TODO: This is really hacky and we should probably figure out how to
1231
- db_block = BlockManager().get_block_by_id(block_id=block_id, actor=self.user)
1232
- if db_block is None:
1233
- # this case covers if someone has deleted a shared block by interacting
1234
- # with some other agent.
1235
- # in that case we should remove this shared block from the agent currently being
1236
- # evaluated.
1237
- printd(f"removing block: {block_id=}")
1238
- continue
1239
- if not isinstance(db_block.value, str):
1240
- printd(f"skipping block update, unexpected value: {block_id=}")
1241
- continue
1242
- # TODO: we may want to update which columns we're updating from shared memory e.g. the limit
1243
- self.memory.update_block_value(label=block.get("label", ""), value=db_block.value)
1246
+ self.update_memory_blocks_from_db()
1244
1247
 
1245
1248
  # If the memory didn't update, we probably don't want to update the timestamp inside
1246
1249
  # For example, if we're doing a system prompt swap, this should probably be False
@@ -190,9 +190,6 @@ class AbstractClient(object):
190
190
  def load_langchain_tool(self, langchain_tool: "LangChainBaseTool", additional_imports_module_attr_map: dict[str, str] = None) -> Tool:
191
191
  raise NotImplementedError
192
192
 
193
- def load_crewai_tool(self, crewai_tool: "CrewAIBaseTool", additional_imports_module_attr_map: dict[str, str] = None) -> Tool:
194
- raise NotImplementedError
195
-
196
193
  def load_composio_tool(self, action: "ActionType") -> Tool:
197
194
  raise NotImplementedError
198
195
 
@@ -899,8 +896,8 @@ class RESTClient(AbstractClient):
899
896
  else:
900
897
  return Block(**response.json())
901
898
 
902
- def update_block(self, block_id: str, name: Optional[str] = None, text: Optional[str] = None) -> Block:
903
- request = BlockUpdate(id=block_id, template_name=name, value=text)
899
+ def update_block(self, block_id: str, name: Optional[str] = None, text: Optional[str] = None, limit: Optional[int] = None) -> Block:
900
+ request = BlockUpdate(id=block_id, template_name=name, value=text, limit=limit if limit else self.get_block(block_id).limit)
904
901
  response = requests.post(f"{self.base_url}/{self.api_prefix}/blocks/{block_id}", json=request.model_dump(), headers=self.headers)
905
902
  if response.status_code != 200:
906
903
  raise ValueError(f"Failed to update block: {response.text}")
@@ -2690,7 +2687,7 @@ class LocalClient(AbstractClient):
2690
2687
  Block(label=label, template_name=template_name, value=value, is_template=is_template), actor=self.user
2691
2688
  )
2692
2689
 
2693
- def update_block(self, block_id: str, name: Optional[str] = None, text: Optional[str] = None) -> Block:
2690
+ def update_block(self, block_id: str, name: Optional[str] = None, text: Optional[str] = None, limit: Optional[int] = None) -> Block:
2694
2691
  """
2695
2692
  Update a block
2696
2693
 
@@ -2703,7 +2700,9 @@ class LocalClient(AbstractClient):
2703
2700
  block (Block): Updated block
2704
2701
  """
2705
2702
  return self.server.block_manager.update_block(
2706
- block_id=block_id, block_update=BlockUpdate(template_name=name, value=text), actor=self.user
2703
+ block_id=block_id,
2704
+ block_update=BlockUpdate(template_name=name, value=text, limit=limit if limit else self.get_block(block_id).limit),
2705
+ actor=self.user,
2707
2706
  )
2708
2707
 
2709
2708
  def get_block(self, block_id: str) -> Block:
@@ -61,36 +61,6 @@ def {func_name}(**kwargs):
61
61
  return func_name, wrapper_function_str
62
62
 
63
63
 
64
- def generate_crewai_tool_wrapper(tool: "CrewAIBaseTool", additional_imports_module_attr_map: dict[str, str] = None) -> tuple[str, str]:
65
- tool_name = tool.__class__.__name__
66
- import_statement = f"from crewai_tools import {tool_name}"
67
- extra_module_imports = generate_import_code(additional_imports_module_attr_map)
68
-
69
- # Safety check that user has passed in all required imports:
70
- assert_all_classes_are_imported(tool, additional_imports_module_attr_map)
71
-
72
- tool_instantiation = f"tool = {generate_imported_tool_instantiation_call_str(tool)}"
73
- run_call = f"return tool._run(**kwargs)"
74
- func_name = humps.decamelize(tool_name)
75
-
76
- # Combine all parts into the wrapper function
77
- wrapper_function_str = f"""
78
- def {func_name}(**kwargs):
79
- if 'self' in kwargs:
80
- del kwargs['self']
81
- import importlib
82
- {import_statement}
83
- {extra_module_imports}
84
- {tool_instantiation}
85
- {run_call}
86
- """
87
-
88
- # Compile safety check
89
- assert_code_gen_compilable(wrapper_function_str)
90
-
91
- return func_name, wrapper_function_str
92
-
93
-
94
64
  def assert_code_gen_compilable(code_str):
95
65
  try:
96
66
  compile(code_str, "<string>", "exec")
@@ -98,9 +68,7 @@ def assert_code_gen_compilable(code_str):
98
68
  print(f"Syntax error in code: {e}")
99
69
 
100
70
 
101
- def assert_all_classes_are_imported(
102
- tool: Union["LangChainBaseTool", "CrewAIBaseTool"], additional_imports_module_attr_map: dict[str, str]
103
- ) -> None:
71
+ def assert_all_classes_are_imported(tool: Union["LangChainBaseTool"], additional_imports_module_attr_map: dict[str, str]) -> None:
104
72
  # Safety check that user has passed in all required imports:
105
73
  tool_name = tool.__class__.__name__
106
74
  current_class_imports = {tool_name}
@@ -114,7 +82,7 @@ def assert_all_classes_are_imported(
114
82
  raise RuntimeError(err_msg)
115
83
 
116
84
 
117
- def find_required_class_names_for_import(obj: Union["LangChainBaseTool", "CrewAIBaseTool", BaseModel]) -> list[str]:
85
+ def find_required_class_names_for_import(obj: Union["LangChainBaseTool", BaseModel]) -> list[str]:
118
86
  """
119
87
  Finds all the class names for required imports when instantiating the `obj`.
120
88
  NOTE: This does not return the full import path, only the class name.
@@ -202,10 +170,10 @@ def generate_imported_tool_instantiation_call_str(obj: Any) -> Optional[str]:
202
170
  else:
203
171
  # Otherwise, if it is none of the above, that usually means it is a custom Python class that is NOT a BaseModel
204
172
  # Thus, we cannot get enough information about it to stringify it
205
- # This may cause issues, but we are making the assumption that any of these custom Python types are handled correctly by the parent library, such as LangChain or CrewAI
173
+ # This may cause issues, but we are making the assumption that any of these custom Python types are handled correctly by the parent library, such as LangChain
206
174
  # An example would be that WikipediaAPIWrapper has an argument that is a wikipedia (pip install wikipedia) object
207
175
  # We cannot stringify this easily, but WikipediaAPIWrapper handles the setting of this parameter internally
208
- # This assumption seems fair to me, since usually they are external imports, and LangChain and CrewAI should be bundling those as module-level imports within the tool
176
+ # This assumption seems fair to me, since usually they are external imports, and LangChain should be bundling those as module-level imports within the tool
209
177
  # We throw a warning here anyway and provide the class name
210
178
  print(
211
179
  f"[WARNING] Skipping parsing unknown class {obj.__class__.__name__} (does not inherit from the Pydantic BaseModel and is not a basic Python type)"
@@ -219,10 +187,9 @@ def generate_imported_tool_instantiation_call_str(obj: Any) -> Optional[str]:
219
187
 
220
188
 
221
189
  def is_base_model(obj: Any):
222
- from crewai_tools.tools.base_tool import BaseModel as CrewAiBaseModel
223
190
  from langchain_core.pydantic_v1 import BaseModel as LangChainBaseModel
224
191
 
225
- return isinstance(obj, BaseModel) or isinstance(obj, LangChainBaseModel) or isinstance(obj, CrewAiBaseModel)
192
+ return isinstance(obj, BaseModel) or isinstance(obj, LangChainBaseModel)
226
193
 
227
194
 
228
195
  def generate_import_code(module_attr_map: Optional[dict]):
@@ -4,13 +4,9 @@ from pydantic import Field
4
4
 
5
5
  from letta.functions.helpers import (
6
6
  generate_composio_tool_wrapper,
7
- generate_crewai_tool_wrapper,
8
7
  generate_langchain_tool_wrapper,
9
8
  )
10
- from letta.functions.schema_generator import (
11
- generate_schema_from_args_schema_v1,
12
- generate_schema_from_args_schema_v2,
13
- )
9
+ from letta.functions.schema_generator import generate_schema_from_args_schema_v2
14
10
  from letta.schemas.letta_base import LettaBase
15
11
  from letta.schemas.openai.chat_completions import ToolCall
16
12
 
@@ -132,37 +128,7 @@ class ToolCreate(LettaBase):
132
128
  tags = ["langchain"]
133
129
  # NOTE: langchain tools may come from different packages
134
130
  wrapper_func_name, wrapper_function_str = generate_langchain_tool_wrapper(langchain_tool, additional_imports_module_attr_map)
135
- json_schema = generate_schema_from_args_schema_v1(langchain_tool.args_schema, name=wrapper_func_name, description=description)
136
-
137
- return cls(
138
- name=wrapper_func_name,
139
- description=description,
140
- source_type=source_type,
141
- tags=tags,
142
- source_code=wrapper_function_str,
143
- json_schema=json_schema,
144
- )
145
-
146
- @classmethod
147
- def from_crewai(
148
- cls,
149
- crewai_tool: "CrewAIBaseTool",
150
- additional_imports_module_attr_map: dict[str, str] = None,
151
- ) -> "ToolCreate":
152
- """
153
- Class method to create an instance of Tool from a crewAI BaseTool object.
154
-
155
- Args:
156
- crewai_tool (CrewAIBaseTool): An instance of a crewAI BaseTool (BaseTool from crewai)
157
-
158
- Returns:
159
- Tool: A Letta Tool initialized with attributes derived from the provided crewAI BaseTool object.
160
- """
161
- description = crewai_tool.description
162
- source_type = "python"
163
- tags = ["crew-ai"]
164
- wrapper_func_name, wrapper_function_str = generate_crewai_tool_wrapper(crewai_tool, additional_imports_module_attr_map)
165
- json_schema = generate_schema_from_args_schema_v1(crewai_tool.args_schema, name=wrapper_func_name, description=description)
131
+ json_schema = generate_schema_from_args_schema_v2(langchain_tool.args_schema, name=wrapper_func_name, description=description)
166
132
 
167
133
  return cls(
168
134
  name=wrapper_func_name,
@@ -185,15 +151,6 @@ class ToolCreate(LettaBase):
185
151
 
186
152
  return [wikipedia_tool]
187
153
 
188
- @classmethod
189
- def load_default_crewai_tools(cls) -> List["ToolCreate"]:
190
- # For now, we only support scrape website tool
191
- from crewai_tools import ScrapeWebsiteTool
192
-
193
- web_scrape_tool = ToolCreate.from_crewai(ScrapeWebsiteTool())
194
-
195
- return [web_scrape_tool]
196
-
197
154
  @classmethod
198
155
  def load_default_composio_tools(cls) -> List["ToolCreate"]:
199
156
  from composio_langchain import Action
@@ -328,6 +328,15 @@ class SyncServer(Server):
328
328
  )
329
329
  )
330
330
 
331
+ def save_agents(self):
332
+ """Saves all the agents that are in the in-memory object store"""
333
+ for agent_d in self.active_agents:
334
+ try:
335
+ save_agent(agent_d["agent"], self.ms)
336
+ logger.info(f"Saved agent {agent_d['agent_id']}")
337
+ except Exception as e:
338
+ logger.exception(f"Error occurred while trying to save agent {agent_d['agent_id']}:\n{e}")
339
+
331
340
  def _get_agent(self, user_id: str, agent_id: str) -> Union[Agent, None]:
332
341
  """Get the agent object from the in-memory object store"""
333
342
  for d in self.active_agents:
@@ -1376,8 +1385,9 @@ class SyncServer(Server):
1376
1385
  # Get the agent object (loaded in memory)
1377
1386
  letta_agent = self._get_or_load_agent(agent_id=agent_id)
1378
1387
  assert isinstance(letta_agent.memory, Memory)
1379
- agent_state = letta_agent.agent_state.model_copy(deep=True)
1380
1388
 
1389
+ letta_agent.update_memory_blocks_from_db()
1390
+ agent_state = letta_agent.agent_state.model_copy(deep=True)
1381
1391
  # Load the tags in for the agent_state
1382
1392
  agent_state.tags = self.agents_tags_manager.get_tags_for_agent(agent_id=agent_id, actor=user)
1383
1393
  return agent_state
@@ -1723,7 +1733,7 @@ class SyncServer(Server):
1723
1733
  def add_default_external_tools(self, actor: User) -> bool:
1724
1734
  """Add default langchain tools. Return true if successful, false otherwise."""
1725
1735
  success = True
1726
- tool_creates = ToolCreate.load_default_langchain_tools() + ToolCreate.load_default_crewai_tools()
1736
+ tool_creates = ToolCreate.load_default_langchain_tools()
1727
1737
  if tool_settings.composio_api_key:
1728
1738
  tool_creates += ToolCreate.load_default_composio_tools()
1729
1739
  for tool_create in tool_creates:
@@ -34,7 +34,7 @@ class BlockManager:
34
34
  return block.to_pydantic()
35
35
 
36
36
  @enforce_types
37
- def update_block(self, block_id: str, block_update: BlockUpdate, actor: PydanticUser) -> PydanticBlock:
37
+ def update_block(self, block_id: str, block_update: BlockUpdate, actor: PydanticUser, limit: Optional[int] = None) -> PydanticBlock:
38
38
  """Update a block by its ID with the given BlockUpdate object."""
39
39
  with self.session_maker() as session:
40
40
  block = BlockModel.read(db_session=session, identifier=block_id, actor=actor)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "letta-nightly"
3
- version = "0.5.4.dev20241121104201"
3
+ version = "0.5.5.dev20241122170327"
4
4
  packages = [
5
5
  {include = "letta"}
6
6
  ]
@@ -38,7 +38,6 @@ chromadb = ">=0.4.24,<0.5.0"
38
38
  sqlalchemy-json = "^0.7.0"
39
39
  fastapi = {version = "^0.104.1", optional = true}
40
40
  uvicorn = {version = "^0.24.0.post1", optional = true}
41
- #pydantic = "^2.7.4"
42
41
  pydantic = ">=2.7.4,<2.10.0"
43
42
  pyautogen = {version = "0.2.22", optional = true}
44
43
  html2text = "^2020.1.16"
@@ -51,9 +50,6 @@ pymilvus = {version ="^2.4.3", optional = true}
51
50
  python-box = "^7.1.1"
52
51
  sqlmodel = "^0.0.16"
53
52
  autoflake = {version = "^2.3.0", optional = true}
54
- #llama-index-embeddings-huggingface = {version = "^0.2.0", optional = true}
55
- #llama-index-embeddings-azure-openai = "^0.1.6"
56
- #llama-index-embeddings-ollama = {version = "^0.1.2", optional = true}
57
53
  python-multipart = "^0.0.9"
58
54
  sqlalchemy-utils = "^0.41.2"
59
55
  pytest-order = {version = "^1.2.0", optional = true}
@@ -61,39 +57,37 @@ pytest-asyncio = {version = "^0.23.2", optional = true}
61
57
  pydantic-settings = "^2.2.1"
62
58
  httpx-sse = "^0.4.0"
63
59
  isort = { version = "^5.13.2", optional = true }
64
- crewai = {version = "^0.41.1", optional = true}
65
- crewai-tools = {version = "^0.8.3", optional = true}
66
60
  docker = {version = "^7.1.0", optional = true}
67
61
  tiktoken = "^0.7.0"
68
62
  nltk = "^3.8.1"
69
63
  jinja2 = "^3.1.4"
70
- locust = "^2.31.5"
64
+ locust = {version = "^2.31.5", optional = true}
71
65
  llama-index = "^0.11.9"
72
66
  llama-index-embeddings-openai = "^0.2.5"
73
67
  llama-index-embeddings-ollama = "^0.3.1"
74
- #llama-index-embeddings-huggingface = {version = "^0.2.0", optional = true}
75
68
  wikipedia = {version = "^1.4.0", optional = true}
76
- langchain = {version = "^0.2.16", optional = true}
77
- langchain-community = {version = "^0.2.17", optional = true}
78
- composio-langchain = "^0.5.28"
79
- composio-core = "^0.5.34"
69
+ composio-langchain = {version = "^0.5.28", optional = true}
70
+ composio-core = {version = "^0.5.34", optional = true}
80
71
  alembic = "^1.13.3"
81
72
  pyhumps = "^3.8.0"
82
73
  psycopg2 = "^2.9.10"
83
74
  psycopg2-binary = "^2.9.10"
84
75
  pathvalidate = "^3.2.1"
76
+ langchain-community = {version = "^0.3.7", optional = true}
77
+ langchain = {version = "^0.3.7", optional = true}
85
78
 
86
79
  [tool.poetry.extras]
87
80
  #local = ["llama-index-embeddings-huggingface"]
88
81
  postgres = ["pgvector", "pg8000", "psycopg2-binary", "psycopg2"]
89
82
  milvus = ["pymilvus"]
90
- dev = ["pytest", "pytest-asyncio", "pexpect", "black", "pre-commit", "datasets", "pyright", "pytest-order", "autoflake", "isort"]
83
+ dev = ["pytest", "pytest-asyncio", "pexpect", "black", "pre-commit", "datasets", "pyright", "pytest-order", "autoflake", "isort", "locust"]
91
84
  server = ["websockets", "fastapi", "uvicorn"]
92
85
  autogen = ["pyautogen"]
93
86
  qdrant = ["qdrant-client"]
94
87
  ollama = ["llama-index-embeddings-ollama"]
95
- external-tools = ["crewai", "docker", "crewai-tools", "langchain", "wikipedia", "langchain-community", "composio-core", "composio-langchain"]
88
+ external-tools = ["docker", "langchain", "wikipedia", "langchain-community", "composio-core", "composio-langchain"]
96
89
  tests = ["wikipedia"]
90
+ all = ["pgvector", "pg8000", "psycopg2-binary", "psycopg2", "pytest", "pytest-asyncio", "pexpect", "black", "pre-commit", "datasets", "pyright", "pytest-order", "autoflake", "isort", "websockets", "fastapi", "uvicorn", "llama-index-embeddings-ollama", "docker", "langchain", "wikipedia", "langchain-community", "composio-core", "composio-langchain", "locust"]
97
91
 
98
92
  [tool.poetry.group.dev.dependencies]
99
93
  black = "^24.4.2"