letta-nightly 0.5.4.dev20241121104201__tar.gz → 0.5.4.dev20241123104112__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 (225) hide show
  1. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/PKG-INFO +28 -27
  2. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/agent.py +48 -25
  3. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/agent_store/db.py +1 -1
  4. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/client/client.py +361 -7
  5. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/constants.py +5 -14
  6. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/functions/helpers.py +5 -42
  7. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/functions/schema_generator.py +24 -4
  8. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/utils.py +6 -3
  9. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/log.py +7 -9
  10. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/metadata.py +17 -4
  11. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/__init__.py +2 -0
  12. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/block.py +5 -2
  13. letta_nightly-0.5.4.dev20241123104112/letta/orm/blocks_agents.py +29 -0
  14. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/mixins.py +8 -0
  15. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/organization.py +8 -1
  16. letta_nightly-0.5.4.dev20241123104112/letta/orm/sandbox_config.py +56 -0
  17. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/sqlalchemy_base.py +9 -3
  18. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/block.py +15 -1
  19. letta_nightly-0.5.4.dev20241123104112/letta/schemas/blocks_agents.py +32 -0
  20. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/letta_base.py +9 -0
  21. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/memory.py +42 -8
  22. letta_nightly-0.5.4.dev20241123104112/letta/schemas/sandbox_config.py +114 -0
  23. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/tool.py +2 -45
  24. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/__init__.py +4 -9
  25. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/agents.py +85 -1
  26. letta_nightly-0.5.4.dev20241123104112/letta/server/rest_api/routers/v1/sandbox_configs.py +108 -0
  27. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/tools.py +3 -5
  28. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/utils.py +6 -0
  29. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/server.py +159 -12
  30. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/services/block_manager.py +3 -1
  31. letta_nightly-0.5.4.dev20241123104112/letta/services/blocks_agents_manager.py +84 -0
  32. letta_nightly-0.5.4.dev20241123104112/letta/services/sandbox_config_manager.py +256 -0
  33. letta_nightly-0.5.4.dev20241123104112/letta/services/tool_execution_sandbox.py +326 -0
  34. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/services/tool_manager.py +10 -10
  35. letta_nightly-0.5.4.dev20241123104112/letta/services/tool_sandbox_env/.gitkeep +0 -0
  36. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/settings.py +4 -0
  37. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/pyproject.toml +11 -15
  38. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/LICENSE +0 -0
  39. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/README.md +0 -0
  40. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/__init__.py +0 -0
  41. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/__main__.py +0 -0
  42. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/agent_store/chroma.py +0 -0
  43. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/agent_store/lancedb.py +0 -0
  44. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/agent_store/milvus.py +0 -0
  45. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/agent_store/qdrant.py +0 -0
  46. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/agent_store/storage.py +0 -0
  47. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/benchmark/benchmark.py +0 -0
  48. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/benchmark/constants.py +0 -0
  49. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/cli/cli.py +0 -0
  50. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/cli/cli_config.py +0 -0
  51. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/cli/cli_load.py +0 -0
  52. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/client/__init__.py +0 -0
  53. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/client/streaming.py +0 -0
  54. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/client/utils.py +0 -0
  55. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/config.py +0 -0
  56. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/credentials.py +0 -0
  57. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/data_sources/connectors.py +0 -0
  58. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/data_sources/connectors_helper.py +0 -0
  59. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/embeddings.py +0 -0
  60. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/errors.py +0 -0
  61. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/functions/__init__.py +0 -0
  62. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/functions/function_sets/base.py +0 -0
  63. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/functions/function_sets/extras.py +0 -0
  64. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/functions/functions.py +0 -0
  65. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/helpers/__init__.py +0 -0
  66. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/helpers/tool_rule_solver.py +0 -0
  67. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/humans/__init__.py +0 -0
  68. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/humans/examples/basic.txt +0 -0
  69. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/humans/examples/cs_phd.txt +0 -0
  70. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/interface.py +0 -0
  71. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/__init__.py +0 -0
  72. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/anthropic.py +0 -0
  73. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/azure_openai.py +0 -0
  74. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/azure_openai_constants.py +0 -0
  75. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/cohere.py +0 -0
  76. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/google_ai.py +0 -0
  77. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/helpers.py +0 -0
  78. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/llm_api_tools.py +0 -0
  79. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/mistral.py +0 -0
  80. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/llm_api/openai.py +0 -0
  81. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/README.md +0 -0
  82. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/__init__.py +0 -0
  83. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/chat_completion_proxy.py +0 -0
  84. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/constants.py +0 -0
  85. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/function_parser.py +0 -0
  86. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/grammars/__init__.py +0 -0
  87. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/grammars/gbnf_grammar_generator.py +0 -0
  88. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/grammars/json.gbnf +0 -0
  89. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/grammars/json_func_calls_with_inner_thoughts.gbnf +0 -0
  90. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/json_parser.py +0 -0
  91. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/koboldcpp/api.py +0 -0
  92. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/koboldcpp/settings.py +0 -0
  93. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llamacpp/api.py +0 -0
  94. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llamacpp/settings.py +0 -0
  95. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/__init__.py +0 -0
  96. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/airoboros.py +0 -0
  97. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/chatml.py +0 -0
  98. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/configurable_wrapper.py +0 -0
  99. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/dolphin.py +0 -0
  100. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/llama3.py +0 -0
  101. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/simple_summary_wrapper.py +0 -0
  102. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/wrapper_base.py +0 -0
  103. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/llm_chat_completion_wrappers/zephyr.py +0 -0
  104. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/lmstudio/api.py +0 -0
  105. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/lmstudio/settings.py +0 -0
  106. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/ollama/api.py +0 -0
  107. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/ollama/settings.py +0 -0
  108. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/settings/__init__.py +0 -0
  109. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/settings/deterministic_mirostat.py +0 -0
  110. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/settings/settings.py +0 -0
  111. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/settings/simple.py +0 -0
  112. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/vllm/api.py +0 -0
  113. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/webui/api.py +0 -0
  114. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/webui/legacy_api.py +0 -0
  115. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/webui/legacy_settings.py +0 -0
  116. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/local_llm/webui/settings.py +0 -0
  117. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/main.py +0 -0
  118. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/memory.py +0 -0
  119. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/o1_agent.py +0 -0
  120. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/openai_backcompat/__init__.py +0 -0
  121. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/openai_backcompat/openai_object.py +0 -0
  122. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/__all__.py +0 -0
  123. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/agents_tags.py +0 -0
  124. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/base.py +0 -0
  125. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/enums.py +0 -0
  126. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/errors.py +0 -0
  127. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/file.py +0 -0
  128. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/source.py +0 -0
  129. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/tool.py +0 -0
  130. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/orm/user.py +0 -0
  131. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/persistence_manager.py +0 -0
  132. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/__init__.py +0 -0
  133. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/anna_pa.txt +0 -0
  134. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/google_search_persona.txt +0 -0
  135. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/memgpt_doc.txt +0 -0
  136. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/memgpt_starter.txt +0 -0
  137. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/o1_persona.txt +0 -0
  138. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/sam.txt +0 -0
  139. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/sam_pov.txt +0 -0
  140. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/sam_simple_pov_gpt35.txt +0 -0
  141. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/personas/examples/sqldb/test.db +0 -0
  142. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/__init__.py +0 -0
  143. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/gpt_summarize.py +0 -0
  144. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/gpt_system.py +0 -0
  145. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_base.txt +0 -0
  146. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_chat.txt +0 -0
  147. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_chat_compressed.txt +0 -0
  148. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_chat_fstring.txt +0 -0
  149. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_doc.txt +0 -0
  150. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_gpt35_extralong.txt +0 -0
  151. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_intuitive_knowledge.txt +0 -0
  152. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_modified_chat.txt +0 -0
  153. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/prompts/system/memgpt_modified_o1.txt +0 -0
  154. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/providers.py +0 -0
  155. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/pytest.ini +0 -0
  156. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/agent.py +0 -0
  157. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/agents_tags.py +0 -0
  158. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/api_key.py +0 -0
  159. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/embedding_config.py +0 -0
  160. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/enums.py +0 -0
  161. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/file.py +0 -0
  162. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/health.py +0 -0
  163. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/job.py +0 -0
  164. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/letta_message.py +0 -0
  165. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/letta_request.py +0 -0
  166. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/letta_response.py +0 -0
  167. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/llm_config.py +0 -0
  168. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/message.py +0 -0
  169. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/openai/chat_completion_request.py +0 -0
  170. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/openai/chat_completion_response.py +0 -0
  171. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/openai/chat_completions.py +0 -0
  172. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/openai/embedding_response.py +0 -0
  173. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/openai/openai.py +0 -0
  174. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/organization.py +0 -0
  175. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/passage.py +0 -0
  176. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/source.py +0 -0
  177. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/tool_rule.py +0 -0
  178. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/usage.py +0 -0
  179. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/schemas/user.py +0 -0
  180. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/__init__.py +0 -0
  181. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/constants.py +0 -0
  182. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/generate_openapi_schema.sh +0 -0
  183. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/__init__.py +0 -0
  184. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/app.py +0 -0
  185. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/auth/__init__.py +0 -0
  186. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/auth/index.py +0 -0
  187. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/auth_token.py +0 -0
  188. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/interface.py +0 -0
  189. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/__init__.py +0 -0
  190. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/openai/__init__.py +0 -0
  191. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/openai/assistants/__init__.py +0 -0
  192. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/openai/assistants/assistants.py +0 -0
  193. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/openai/assistants/schemas.py +0 -0
  194. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/openai/assistants/threads.py +0 -0
  195. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/openai/chat_completions/__init__.py +0 -0
  196. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/openai/chat_completions/chat_completions.py +0 -0
  197. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/blocks.py +0 -0
  198. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/health.py +0 -0
  199. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/jobs.py +0 -0
  200. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/llms.py +0 -0
  201. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/organizations.py +0 -0
  202. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/sources.py +0 -0
  203. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/routers/v1/users.py +0 -0
  204. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/rest_api/static_files.py +0 -0
  205. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/startup.sh +0 -0
  206. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/static_files/assets/index-3ab03d5b.css +0 -0
  207. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/static_files/assets/index-9fa459a2.js +0 -0
  208. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/static_files/favicon.ico +0 -0
  209. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/static_files/index.html +0 -0
  210. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/static_files/memgpt_logo_transparent.png +0 -0
  211. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/utils.py +0 -0
  212. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/ws_api/__init__.py +0 -0
  213. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/ws_api/example_client.py +0 -0
  214. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/ws_api/interface.py +0 -0
  215. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/ws_api/protocol.py +0 -0
  216. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/server/ws_api/server.py +0 -0
  217. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/services/__init__.py +0 -0
  218. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/services/agents_tags_manager.py +0 -0
  219. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/services/organization_manager.py +0 -0
  220. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/services/source_manager.py +0 -0
  221. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/services/user_manager.py +0 -0
  222. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/streaming_interface.py +0 -0
  223. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/streaming_utils.py +0 -0
  224. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/letta/system.py +0 -0
  225. {letta_nightly-0.5.4.dev20241121104201 → letta_nightly-0.5.4.dev20241123104112}/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.4.dev20241123104112
4
4
  Summary: Create LLM agents with long-term memory and custom tools
5
5
  License: Apache License
6
6
  Author: Letta Team
@@ -11,7 +11,9 @@ 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
16
+ Provides-Extra: cloud-tool-sandbox
15
17
  Provides-Extra: dev
16
18
  Provides-Extra: external-tools
17
19
  Provides-Extra: milvus
@@ -21,48 +23,47 @@ Provides-Extra: qdrant
21
23
  Provides-Extra: server
22
24
  Provides-Extra: tests
23
25
  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"
26
+ Requires-Dist: autoflake (>=2.3.0,<3.0.0) ; extra == "dev" or extra == "all"
27
+ Requires-Dist: black[jupyter] (>=24.2.0,<25.0.0) ; extra == "dev" or extra == "all"
26
28
  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"
29
+ Requires-Dist: composio-core (>=0.5.34,<0.6.0) ; extra == "external-tools" or extra == "all"
30
+ Requires-Dist: composio-langchain (>=0.5.28,<0.6.0) ; extra == "external-tools" or extra == "all"
31
+ Requires-Dist: datasets (>=2.14.6,<3.0.0) ; extra == "dev" or extra == "all"
32
32
  Requires-Dist: demjson3 (>=3.0.6,<4.0.0)
33
- Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "external-tools"
33
+ Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "external-tools" or extra == "all"
34
34
  Requires-Dist: docstring-parser (>=0.16,<0.17)
35
35
  Requires-Dist: docx2txt (>=0.8,<0.9)
36
- Requires-Dist: fastapi (>=0.104.1,<0.105.0) ; extra == "server"
36
+ Requires-Dist: e2b-code-interpreter (>=1.0.1,<2.0.0) ; extra == "cloud-tool-sandbox"
37
+ Requires-Dist: fastapi (>=0.104.1,<0.105.0) ; extra == "server" or extra == "all"
37
38
  Requires-Dist: html2text (>=2020.1.16,<2021.0.0)
38
39
  Requires-Dist: httpx (>=0.27.2,<0.28.0)
39
40
  Requires-Dist: httpx-sse (>=0.4.0,<0.5.0)
40
- Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev"
41
+ Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev" or extra == "all"
41
42
  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"
43
+ Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
44
+ Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
44
45
  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"
46
+ Requires-Dist: llama-index-embeddings-ollama (>=0.3.1,<0.4.0) ; extra == "ollama" or extra == "all"
46
47
  Requires-Dist: llama-index-embeddings-openai (>=0.2.5,<0.3.0)
47
- Requires-Dist: locust (>=2.31.5,<3.0.0)
48
+ Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "all"
48
49
  Requires-Dist: nltk (>=3.8.1,<4.0.0)
49
50
  Requires-Dist: numpy (>=1.26.2,<2.0.0)
50
51
  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"
52
+ Requires-Dist: pexpect (>=4.9.0,<5.0.0) ; extra == "dev" or extra == "all"
53
+ Requires-Dist: pg8000 (>=1.30.3,<2.0.0) ; extra == "postgres" or extra == "all"
54
+ Requires-Dist: pgvector (>=0.2.3,<0.3.0) ; extra == "postgres" or extra == "all"
55
+ Requires-Dist: pre-commit (>=3.5.0,<4.0.0) ; extra == "dev" or extra == "all"
55
56
  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"
57
+ Requires-Dist: psycopg2 (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "all"
58
+ Requires-Dist: psycopg2-binary (>=2.9.10,<3.0.0) ; extra == "postgres" or extra == "all"
58
59
  Requires-Dist: pyautogen (==0.2.22) ; extra == "autogen"
59
60
  Requires-Dist: pydantic (>=2.7.4,<2.10.0)
60
61
  Requires-Dist: pydantic-settings (>=2.2.1,<3.0.0)
61
62
  Requires-Dist: pyhumps (>=3.8.0,<4.0.0)
62
63
  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"
64
+ Requires-Dist: pyright (>=1.1.347,<2.0.0) ; extra == "dev" or extra == "all"
65
+ Requires-Dist: pytest-asyncio (>=0.23.2,<0.24.0) ; extra == "dev" or extra == "all"
66
+ Requires-Dist: pytest-order (>=1.2.0,<2.0.0) ; extra == "dev" or extra == "all"
66
67
  Requires-Dist: python-box (>=7.1.1,<8.0.0)
67
68
  Requires-Dist: python-multipart (>=0.0.9,<0.0.10)
68
69
  Requires-Dist: pytz (>=2023.3.post1,<2024.0)
@@ -77,9 +78,9 @@ Requires-Dist: sqlmodel (>=0.0.16,<0.0.17)
77
78
  Requires-Dist: tiktoken (>=0.7.0,<0.8.0)
78
79
  Requires-Dist: tqdm (>=4.66.1,<5.0.0)
79
80
  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"
81
+ Requires-Dist: uvicorn (>=0.24.0.post1,<0.25.0) ; extra == "server" or extra == "all"
82
+ Requires-Dist: websockets (>=12.0,<13.0) ; extra == "server" or extra == "all"
83
+ Requires-Dist: wikipedia (>=1.4.0,<2.0.0) ; extra == "external-tools" or extra == "tests" or extra == "all"
83
84
  Description-Content-Type: text/markdown
84
85
 
85
86
  <p align="center">
@@ -9,6 +9,7 @@ from tqdm import tqdm
9
9
 
10
10
  from letta.agent_store.storage import StorageConnector
11
11
  from letta.constants import (
12
+ BASE_TOOLS,
12
13
  CLI_WARNING_PREFIX,
13
14
  FIRST_MESSAGE_ATTEMPTS,
14
15
  FUNC_FAILED_HEARTBEAT_MESSAGE,
@@ -49,6 +50,7 @@ from letta.schemas.tool_rule import TerminalToolRule
49
50
  from letta.schemas.usage import LettaUsageStatistics
50
51
  from letta.services.block_manager import BlockManager
51
52
  from letta.services.source_manager import SourceManager
53
+ from letta.services.tool_execution_sandbox import ToolExecutionSandbox
52
54
  from letta.services.user_manager import UserManager
53
55
  from letta.streaming_interface import StreamingRefreshCLIInterface
54
56
  from letta.system import (
@@ -725,9 +727,27 @@ class Agent(BaseAgent):
725
727
  if isinstance(function_args[name], dict):
726
728
  function_args[name] = spec[name](**function_args[name])
727
729
 
728
- function_args["self"] = self # need to attach self to arg since it's dynamically linked
730
+ # TODO: This needs to be rethought, how do we allow functions that modify agent state/db?
731
+ # TODO: There should probably be two types of tools: stateless/stateful
732
+
733
+ if function_name in BASE_TOOLS:
734
+ function_args["self"] = self # need to attach self to arg since it's dynamically linked
735
+ function_response = function_to_call(**function_args)
736
+ else:
737
+ # execute tool in a sandbox
738
+ # TODO: allow agent_state to specify which sandbox to execute tools in
739
+ sandbox_run_result = ToolExecutionSandbox(function_name, function_args, self.agent_state.user_id).run(
740
+ agent_state=self.agent_state
741
+ )
742
+ function_response, updated_agent_state = sandbox_run_result.func_return, sandbox_run_result.agent_state
743
+ # update agent state
744
+ if self.agent_state != updated_agent_state and updated_agent_state is not None:
745
+ self.agent_state = updated_agent_state
746
+ self.memory = self.agent_state.memory # TODO: don't duplicate
747
+
748
+ # rebuild memory
749
+ self.rebuild_memory()
729
750
 
730
- function_response = function_to_call(**function_args)
731
751
  if function_name in ["conversation_search", "conversation_search_date", "archival_memory_search"]:
732
752
  # with certain functions we rely on the paging mechanism to handle overflow
733
753
  truncate = False
@@ -747,6 +767,7 @@ class Agent(BaseAgent):
747
767
  error_msg_user = f"{error_msg}\n{traceback.format_exc()}"
748
768
  printd(error_msg_user)
749
769
  function_response = package_function_response(False, error_msg)
770
+ # TODO: truncate error message somehow
750
771
  messages.append(
751
772
  Message.dict_to_message(
752
773
  agent_id=self.agent_state.id,
@@ -1208,6 +1229,30 @@ class Agent(BaseAgent):
1208
1229
  new_messages = [new_system_message_obj] + self._messages[1:] # swap index 0 (system)
1209
1230
  self._messages = new_messages
1210
1231
 
1232
+ def update_memory_blocks_from_db(self):
1233
+ for block in self.memory.to_dict()["memory"].values():
1234
+ if block.get("templates", False):
1235
+ # we don't expect to update shared memory blocks that
1236
+ # are templates. this is something we could update in the
1237
+ # future if we expect templates to change often.
1238
+ continue
1239
+ block_id = block.get("id")
1240
+
1241
+ # TODO: This is really hacky and we should probably figure out how to
1242
+ db_block = BlockManager().get_block_by_id(block_id=block_id, actor=self.user)
1243
+ if db_block is None:
1244
+ # this case covers if someone has deleted a shared block by interacting
1245
+ # with some other agent.
1246
+ # in that case we should remove this shared block from the agent currently being
1247
+ # evaluated.
1248
+ printd(f"removing block: {block_id=}")
1249
+ continue
1250
+ if not isinstance(db_block.value, str):
1251
+ printd(f"skipping block update, unexpected value: {block_id=}")
1252
+ continue
1253
+ # TODO: we may want to update which columns we're updating from shared memory e.g. the limit
1254
+ self.memory.update_block_value(label=block.get("label", ""), value=db_block.value)
1255
+
1211
1256
  def rebuild_memory(self, force=False, update_timestamp=True, ms: Optional[MetadataStore] = None):
1212
1257
  """Rebuilds the system message with the latest memory object and any shared memory block updates"""
1213
1258
  curr_system_message = self.messages[0] # this is the system + memory bank, not just the system prompt
@@ -1219,28 +1264,7 @@ class Agent(BaseAgent):
1219
1264
  return
1220
1265
 
1221
1266
  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)
1267
+ self.update_memory_blocks_from_db()
1244
1268
 
1245
1269
  # If the memory didn't update, we probably don't want to update the timestamp inside
1246
1270
  # For example, if we're doing a system prompt swap, this should probably be False
@@ -1281,7 +1305,6 @@ class Agent(BaseAgent):
1281
1305
  assert isinstance(new_system_prompt, str)
1282
1306
 
1283
1307
  if new_system_prompt == self.system:
1284
- input("same???")
1285
1308
  return
1286
1309
 
1287
1310
  self.system = new_system_prompt
@@ -433,7 +433,7 @@ class PostgresStorageConnector(SQLStorageConnector):
433
433
  else:
434
434
  db_record = self.db_model(**record.dict())
435
435
  session.add(db_record)
436
- print(f"Added record with id {record.id}")
436
+ # print(f"Added record with id {record.id}")
437
437
  session.commit()
438
438
 
439
439
  added_ids.append(record.id)
@@ -39,6 +39,16 @@ from letta.schemas.message import Message, MessageCreate, UpdateMessage
39
39
  from letta.schemas.openai.chat_completions import ToolCall
40
40
  from letta.schemas.organization import Organization
41
41
  from letta.schemas.passage import Passage
42
+ from letta.schemas.sandbox_config import (
43
+ E2BSandboxConfig,
44
+ LocalSandboxConfig,
45
+ SandboxConfig,
46
+ SandboxConfigCreate,
47
+ SandboxConfigUpdate,
48
+ SandboxEnvironmentVariable,
49
+ SandboxEnvironmentVariableCreate,
50
+ SandboxEnvironmentVariableUpdate,
51
+ )
42
52
  from letta.schemas.source import Source, SourceCreate, SourceUpdate
43
53
  from letta.schemas.tool import Tool, ToolCreate, ToolUpdate
44
54
  from letta.schemas.tool_rule import BaseToolRule
@@ -190,9 +200,6 @@ class AbstractClient(object):
190
200
  def load_langchain_tool(self, langchain_tool: "LangChainBaseTool", additional_imports_module_attr_map: dict[str, str] = None) -> Tool:
191
201
  raise NotImplementedError
192
202
 
193
- def load_crewai_tool(self, crewai_tool: "CrewAIBaseTool", additional_imports_module_attr_map: dict[str, str] = None) -> Tool:
194
- raise NotImplementedError
195
-
196
203
  def load_composio_tool(self, action: "ActionType") -> Tool:
197
204
  raise NotImplementedError
198
205
 
@@ -299,6 +306,112 @@ class AbstractClient(object):
299
306
  def delete_org(self, org_id: str) -> Organization:
300
307
  raise NotImplementedError
301
308
 
309
+ def create_sandbox_config(self, config: Union[LocalSandboxConfig, E2BSandboxConfig]) -> SandboxConfig:
310
+ """
311
+ Create a new sandbox configuration.
312
+
313
+ Args:
314
+ config (Union[LocalSandboxConfig, E2BSandboxConfig]): The sandbox settings.
315
+
316
+ Returns:
317
+ SandboxConfig: The created sandbox configuration.
318
+ """
319
+ raise NotImplementedError
320
+
321
+ def update_sandbox_config(self, sandbox_config_id: str, config: Union[LocalSandboxConfig, E2BSandboxConfig]) -> SandboxConfig:
322
+ """
323
+ Update an existing sandbox configuration.
324
+
325
+ Args:
326
+ sandbox_config_id (str): The ID of the sandbox configuration to update.
327
+ config (Union[LocalSandboxConfig, E2BSandboxConfig]): The updated sandbox settings.
328
+
329
+ Returns:
330
+ SandboxConfig: The updated sandbox configuration.
331
+ """
332
+ raise NotImplementedError
333
+
334
+ def delete_sandbox_config(self, sandbox_config_id: str) -> None:
335
+ """
336
+ Delete a sandbox configuration.
337
+
338
+ Args:
339
+ sandbox_config_id (str): The ID of the sandbox configuration to delete.
340
+ """
341
+ raise NotImplementedError
342
+
343
+ def list_sandbox_configs(self, limit: int = 50, cursor: Optional[str] = None) -> List[SandboxConfig]:
344
+ """
345
+ List all sandbox configurations.
346
+
347
+ Args:
348
+ limit (int, optional): The maximum number of sandbox configurations to return. Defaults to 50.
349
+ cursor (Optional[str], optional): The pagination cursor for retrieving the next set of results.
350
+
351
+ Returns:
352
+ List[SandboxConfig]: A list of sandbox configurations.
353
+ """
354
+ raise NotImplementedError
355
+
356
+ def create_sandbox_env_var(
357
+ self, sandbox_config_id: str, key: str, value: str, description: Optional[str] = None
358
+ ) -> SandboxEnvironmentVariable:
359
+ """
360
+ Create a new environment variable for a sandbox configuration.
361
+
362
+ Args:
363
+ sandbox_config_id (str): The ID of the sandbox configuration to associate the environment variable with.
364
+ key (str): The name of the environment variable.
365
+ value (str): The value of the environment variable.
366
+ description (Optional[str], optional): A description of the environment variable. Defaults to None.
367
+
368
+ Returns:
369
+ SandboxEnvironmentVariable: The created environment variable.
370
+ """
371
+ raise NotImplementedError
372
+
373
+ def update_sandbox_env_var(
374
+ self, env_var_id: str, key: Optional[str] = None, value: Optional[str] = None, description: Optional[str] = None
375
+ ) -> SandboxEnvironmentVariable:
376
+ """
377
+ Update an existing environment variable.
378
+
379
+ Args:
380
+ env_var_id (str): The ID of the environment variable to update.
381
+ key (Optional[str], optional): The updated name of the environment variable. Defaults to None.
382
+ value (Optional[str], optional): The updated value of the environment variable. Defaults to None.
383
+ description (Optional[str], optional): The updated description of the environment variable. Defaults to None.
384
+
385
+ Returns:
386
+ SandboxEnvironmentVariable: The updated environment variable.
387
+ """
388
+ raise NotImplementedError
389
+
390
+ def delete_sandbox_env_var(self, env_var_id: str) -> None:
391
+ """
392
+ Delete an environment variable by its ID.
393
+
394
+ Args:
395
+ env_var_id (str): The ID of the environment variable to delete.
396
+ """
397
+ raise NotImplementedError
398
+
399
+ def list_sandbox_env_vars(
400
+ self, sandbox_config_id: str, limit: int = 50, cursor: Optional[str] = None
401
+ ) -> List[SandboxEnvironmentVariable]:
402
+ """
403
+ List all environment variables associated with a sandbox configuration.
404
+
405
+ Args:
406
+ sandbox_config_id (str): The ID of the sandbox configuration to retrieve environment variables for.
407
+ limit (int, optional): The maximum number of environment variables to return. Defaults to 50.
408
+ cursor (Optional[str], optional): The pagination cursor for retrieving the next set of results.
409
+
410
+ Returns:
411
+ List[SandboxEnvironmentVariable]: A list of environment variables.
412
+ """
413
+ raise NotImplementedError
414
+
302
415
 
303
416
  class RESTClient(AbstractClient):
304
417
  """
@@ -899,8 +1012,8 @@ class RESTClient(AbstractClient):
899
1012
  else:
900
1013
  return Block(**response.json())
901
1014
 
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)
1015
+ def update_block(self, block_id: str, name: Optional[str] = None, text: Optional[str] = None, limit: Optional[int] = None) -> Block:
1016
+ request = BlockUpdate(id=block_id, template_name=name, value=text, limit=limit if limit else self.get_block(block_id).limit)
904
1017
  response = requests.post(f"{self.base_url}/{self.api_prefix}/blocks/{block_id}", json=request.model_dump(), headers=self.headers)
905
1018
  if response.status_code != 200:
906
1019
  raise ValueError(f"Failed to update block: {response.text}")
@@ -1568,6 +1681,161 @@ class RESTClient(AbstractClient):
1568
1681
  # Parse and return the deleted organization
1569
1682
  return Organization(**response.json())
1570
1683
 
1684
+ def create_sandbox_config(self, config: Union[LocalSandboxConfig, E2BSandboxConfig]) -> SandboxConfig:
1685
+ """
1686
+ Create a new sandbox configuration.
1687
+ """
1688
+ payload = {
1689
+ "config": config.model_dump(),
1690
+ }
1691
+ response = requests.post(f"{self.base_url}/{self.api_prefix}/sandbox-config", headers=self.headers, json=payload)
1692
+ if response.status_code != 200:
1693
+ raise ValueError(f"Failed to create sandbox config: {response.text}")
1694
+ return SandboxConfig(**response.json())
1695
+
1696
+ def update_sandbox_config(self, sandbox_config_id: str, config: Union[LocalSandboxConfig, E2BSandboxConfig]) -> SandboxConfig:
1697
+ """
1698
+ Update an existing sandbox configuration.
1699
+ """
1700
+ payload = {
1701
+ "config": config.model_dump(),
1702
+ }
1703
+ response = requests.patch(
1704
+ f"{self.base_url}/{self.api_prefix}/sandbox-config/{sandbox_config_id}",
1705
+ headers=self.headers,
1706
+ json=payload,
1707
+ )
1708
+ if response.status_code != 200:
1709
+ raise ValueError(f"Failed to update sandbox config with ID '{sandbox_config_id}': {response.text}")
1710
+ return SandboxConfig(**response.json())
1711
+
1712
+ def delete_sandbox_config(self, sandbox_config_id: str) -> None:
1713
+ """
1714
+ Delete a sandbox configuration.
1715
+ """
1716
+ response = requests.delete(f"{self.base_url}/{self.api_prefix}/sandbox-config/{sandbox_config_id}", headers=self.headers)
1717
+ if response.status_code == 404:
1718
+ raise ValueError(f"Sandbox config with ID '{sandbox_config_id}' does not exist")
1719
+ elif response.status_code != 204:
1720
+ raise ValueError(f"Failed to delete sandbox config with ID '{sandbox_config_id}': {response.text}")
1721
+
1722
+ def list_sandbox_configs(self, limit: int = 50, cursor: Optional[str] = None) -> List[SandboxConfig]:
1723
+ """
1724
+ List all sandbox configurations.
1725
+ """
1726
+ params = {"limit": limit, "cursor": cursor}
1727
+ response = requests.get(f"{self.base_url}/{self.api_prefix}/sandbox-config", headers=self.headers, params=params)
1728
+ if response.status_code != 200:
1729
+ raise ValueError(f"Failed to list sandbox configs: {response.text}")
1730
+ return [SandboxConfig(**config_data) for config_data in response.json()]
1731
+
1732
+ def create_sandbox_env_var(
1733
+ self, sandbox_config_id: str, key: str, value: str, description: Optional[str] = None
1734
+ ) -> SandboxEnvironmentVariable:
1735
+ """
1736
+ Create a new environment variable for a sandbox configuration.
1737
+ """
1738
+ payload = {"key": key, "value": value, "description": description}
1739
+ response = requests.post(
1740
+ f"{self.base_url}/{self.api_prefix}/sandbox-config/{sandbox_config_id}/environment-variable",
1741
+ headers=self.headers,
1742
+ json=payload,
1743
+ )
1744
+ if response.status_code != 200:
1745
+ raise ValueError(f"Failed to create environment variable for sandbox config ID '{sandbox_config_id}': {response.text}")
1746
+ return SandboxEnvironmentVariable(**response.json())
1747
+
1748
+ def update_sandbox_env_var(
1749
+ self, env_var_id: str, key: Optional[str] = None, value: Optional[str] = None, description: Optional[str] = None
1750
+ ) -> SandboxEnvironmentVariable:
1751
+ """
1752
+ Update an existing environment variable.
1753
+ """
1754
+ payload = {k: v for k, v in {"key": key, "value": value, "description": description}.items() if v is not None}
1755
+ response = requests.patch(
1756
+ f"{self.base_url}/{self.api_prefix}/sandbox-config/environment-variable/{env_var_id}",
1757
+ headers=self.headers,
1758
+ json=payload,
1759
+ )
1760
+ if response.status_code != 200:
1761
+ raise ValueError(f"Failed to update environment variable with ID '{env_var_id}': {response.text}")
1762
+ return SandboxEnvironmentVariable(**response.json())
1763
+
1764
+ def delete_sandbox_env_var(self, env_var_id: str) -> None:
1765
+ """
1766
+ Delete an environment variable by its ID.
1767
+ """
1768
+ response = requests.delete(
1769
+ f"{self.base_url}/{self.api_prefix}/sandbox-config/environment-variable/{env_var_id}", headers=self.headers
1770
+ )
1771
+ if response.status_code == 404:
1772
+ raise ValueError(f"Environment variable with ID '{env_var_id}' does not exist")
1773
+ elif response.status_code != 204:
1774
+ raise ValueError(f"Failed to delete environment variable with ID '{env_var_id}': {response.text}")
1775
+
1776
+ def list_sandbox_env_vars(
1777
+ self, sandbox_config_id: str, limit: int = 50, cursor: Optional[str] = None
1778
+ ) -> List[SandboxEnvironmentVariable]:
1779
+ """
1780
+ List all environment variables associated with a sandbox configuration.
1781
+ """
1782
+ params = {"limit": limit, "cursor": cursor}
1783
+ response = requests.get(
1784
+ f"{self.base_url}/{self.api_prefix}/sandbox-config/{sandbox_config_id}/environment-variable",
1785
+ headers=self.headers,
1786
+ params=params,
1787
+ )
1788
+ if response.status_code != 200:
1789
+ raise ValueError(f"Failed to list environment variables for sandbox config ID '{sandbox_config_id}': {response.text}")
1790
+ return [SandboxEnvironmentVariable(**var_data) for var_data in response.json()]
1791
+
1792
+ def update_agent_memory_label(self, agent_id: str, current_label: str, new_label: str) -> Memory:
1793
+
1794
+ # @router.patch("/{agent_id}/memory/label", response_model=Memory, operation_id="update_agent_memory_label")
1795
+ response = requests.patch(
1796
+ f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/memory/label",
1797
+ headers=self.headers,
1798
+ json={"current_label": current_label, "new_label": new_label},
1799
+ )
1800
+ if response.status_code != 200:
1801
+ raise ValueError(f"Failed to update agent memory label: {response.text}")
1802
+ return Memory(**response.json())
1803
+
1804
+ def add_agent_memory_block(self, agent_id: str, create_block: BlockCreate) -> Memory:
1805
+
1806
+ # @router.post("/{agent_id}/memory/block", response_model=Memory, operation_id="add_agent_memory_block")
1807
+ response = requests.post(
1808
+ f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/memory/block",
1809
+ headers=self.headers,
1810
+ json=create_block.model_dump(),
1811
+ )
1812
+ if response.status_code != 200:
1813
+ raise ValueError(f"Failed to add agent memory block: {response.text}")
1814
+ return Memory(**response.json())
1815
+
1816
+ def remove_agent_memory_block(self, agent_id: str, block_label: str) -> Memory:
1817
+
1818
+ # @router.delete("/{agent_id}/memory/block/{block_label}", response_model=Memory, operation_id="remove_agent_memory_block")
1819
+ response = requests.delete(
1820
+ f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/memory/block/{block_label}",
1821
+ headers=self.headers,
1822
+ )
1823
+ if response.status_code != 200:
1824
+ raise ValueError(f"Failed to remove agent memory block: {response.text}")
1825
+ return Memory(**response.json())
1826
+
1827
+ def update_agent_memory_limit(self, agent_id: str, block_label: str, limit: int) -> Memory:
1828
+
1829
+ # @router.patch("/{agent_id}/memory/limit", response_model=Memory, operation_id="update_agent_memory_limit")
1830
+ response = requests.patch(
1831
+ f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/memory/limit",
1832
+ headers=self.headers,
1833
+ json={"label": block_label, "limit": limit},
1834
+ )
1835
+ if response.status_code != 200:
1836
+ raise ValueError(f"Failed to update agent memory limit: {response.text}")
1837
+ return Memory(**response.json())
1838
+
1571
1839
 
1572
1840
  class LocalClient(AbstractClient):
1573
1841
  """
@@ -2690,7 +2958,7 @@ class LocalClient(AbstractClient):
2690
2958
  Block(label=label, template_name=template_name, value=value, is_template=is_template), actor=self.user
2691
2959
  )
2692
2960
 
2693
- def update_block(self, block_id: str, name: Optional[str] = None, text: Optional[str] = None) -> Block:
2961
+ def update_block(self, block_id: str, name: Optional[str] = None, text: Optional[str] = None, limit: Optional[int] = None) -> Block:
2694
2962
  """
2695
2963
  Update a block
2696
2964
 
@@ -2703,7 +2971,9 @@ class LocalClient(AbstractClient):
2703
2971
  block (Block): Updated block
2704
2972
  """
2705
2973
  return self.server.block_manager.update_block(
2706
- block_id=block_id, block_update=BlockUpdate(template_name=name, value=text), actor=self.user
2974
+ block_id=block_id,
2975
+ block_update=BlockUpdate(template_name=name, value=text, limit=limit if limit else self.get_block(block_id).limit),
2976
+ actor=self.user,
2707
2977
  )
2708
2978
 
2709
2979
  def get_block(self, block_id: str) -> Block:
@@ -2774,3 +3044,87 @@ class LocalClient(AbstractClient):
2774
3044
 
2775
3045
  def delete_org(self, org_id: str) -> Organization:
2776
3046
  return self.server.organization_manager.delete_organization_by_id(org_id=org_id)
3047
+
3048
+ def create_sandbox_config(self, config: Union[LocalSandboxConfig, E2BSandboxConfig]) -> SandboxConfig:
3049
+ """
3050
+ Create a new sandbox configuration.
3051
+ """
3052
+ config_create = SandboxConfigCreate(config=config)
3053
+ return self.server.sandbox_config_manager.create_or_update_sandbox_config(sandbox_config_create=config_create, actor=self.user)
3054
+
3055
+ def update_sandbox_config(self, sandbox_config_id: str, config: Union[LocalSandboxConfig, E2BSandboxConfig]) -> SandboxConfig:
3056
+ """
3057
+ Update an existing sandbox configuration.
3058
+ """
3059
+ sandbox_update = SandboxConfigUpdate(config=config)
3060
+ return self.server.sandbox_config_manager.update_sandbox_config(
3061
+ sandbox_config_id=sandbox_config_id, sandbox_update=sandbox_update, actor=self.user
3062
+ )
3063
+
3064
+ def delete_sandbox_config(self, sandbox_config_id: str) -> None:
3065
+ """
3066
+ Delete a sandbox configuration.
3067
+ """
3068
+ return self.server.sandbox_config_manager.delete_sandbox_config(sandbox_config_id=sandbox_config_id, actor=self.user)
3069
+
3070
+ def list_sandbox_configs(self, limit: int = 50, cursor: Optional[str] = None) -> List[SandboxConfig]:
3071
+ """
3072
+ List all sandbox configurations.
3073
+ """
3074
+ return self.server.sandbox_config_manager.list_sandbox_configs(actor=self.user, limit=limit, cursor=cursor)
3075
+
3076
+ def create_sandbox_env_var(
3077
+ self, sandbox_config_id: str, key: str, value: str, description: Optional[str] = None
3078
+ ) -> SandboxEnvironmentVariable:
3079
+ """
3080
+ Create a new environment variable for a sandbox configuration.
3081
+ """
3082
+ env_var_create = SandboxEnvironmentVariableCreate(key=key, value=value, description=description)
3083
+ return self.server.sandbox_config_manager.create_sandbox_env_var(
3084
+ env_var_create=env_var_create, sandbox_config_id=sandbox_config_id, actor=self.user
3085
+ )
3086
+
3087
+ def update_sandbox_env_var(
3088
+ self, env_var_id: str, key: Optional[str] = None, value: Optional[str] = None, description: Optional[str] = None
3089
+ ) -> SandboxEnvironmentVariable:
3090
+ """
3091
+ Update an existing environment variable.
3092
+ """
3093
+ env_var_update = SandboxEnvironmentVariableUpdate(key=key, value=value, description=description)
3094
+ return self.server.sandbox_config_manager.update_sandbox_env_var(
3095
+ env_var_id=env_var_id, env_var_update=env_var_update, actor=self.user
3096
+ )
3097
+
3098
+ def delete_sandbox_env_var(self, env_var_id: str) -> None:
3099
+ """
3100
+ Delete an environment variable by its ID.
3101
+ """
3102
+ return self.server.sandbox_config_manager.delete_sandbox_env_var(env_var_id=env_var_id, actor=self.user)
3103
+
3104
+ def list_sandbox_env_vars(
3105
+ self, sandbox_config_id: str, limit: int = 50, cursor: Optional[str] = None
3106
+ ) -> List[SandboxEnvironmentVariable]:
3107
+ """
3108
+ List all environment variables associated with a sandbox configuration.
3109
+ """
3110
+ return self.server.sandbox_config_manager.list_sandbox_env_vars(
3111
+ sandbox_config_id=sandbox_config_id, actor=self.user, limit=limit, cursor=cursor
3112
+ )
3113
+
3114
+ def update_agent_memory_label(self, agent_id: str, current_label: str, new_label: str) -> Memory:
3115
+ return self.server.update_agent_memory_label(
3116
+ user_id=self.user_id, agent_id=agent_id, current_block_label=current_label, new_block_label=new_label
3117
+ )
3118
+
3119
+ def add_agent_memory_block(self, agent_id: str, create_block: BlockCreate) -> Memory:
3120
+ block_req = Block(**create_block.model_dump())
3121
+ block = self.server.block_manager.create_or_update_block(actor=self.user, block=block_req)
3122
+ # Link the block to the agent
3123
+ updated_memory = self.server.link_block_to_agent_memory(user_id=self.user_id, agent_id=agent_id, block_id=block.id)
3124
+ return updated_memory
3125
+
3126
+ def remove_agent_memory_block(self, agent_id: str, block_label: str) -> Memory:
3127
+ return self.server.unlink_block_from_agent_memory(user_id=self.user_id, agent_id=agent_id, block_label=block_label)
3128
+
3129
+ def update_agent_memory_limit(self, agent_id: str, block_label: str, limit: int) -> Memory:
3130
+ return self.server.update_agent_memory_limit(user_id=self.user_id, agent_id=agent_id, block_label=block_label, limit=limit)