letta-nightly 0.6.7.dev20250106104119__tar.gz → 0.6.7.dev20250107104137__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.
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/PKG-INFO +1 -1
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/client/client.py +6 -10
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/client/streaming.py +0 -1
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/agent.py +9 -1
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/organization.py +4 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/sandbox_config.py +22 -2
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/agent.py +10 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/enums.py +2 -2
- letta_nightly-0.6.7.dev20250107104137/letta/schemas/environment_variables.py +62 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/letta_response.py +8 -7
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/sandbox_config.py +0 -28
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/interface.py +7 -7
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/sandbox_configs.py +3 -3
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/server.py +2 -1
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/agent_manager.py +54 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/sandbox_config_manager.py +3 -3
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/tool_execution_sandbox.py +5 -2
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/pyproject.toml +1 -1
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/LICENSE +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/README.md +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/__main__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/agent.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/benchmark/benchmark.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/benchmark/constants.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/chat_only_agent.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/cli/cli.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/cli/cli_config.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/cli/cli_load.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/client/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/client/utils.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/config.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/constants.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/credentials.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/data_sources/connectors.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/data_sources/connectors_helper.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/embeddings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/errors.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/functions/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/functions/function_sets/base.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/functions/function_sets/extras.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/functions/functions.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/functions/helpers.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/functions/schema_generator.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/helpers/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/helpers/tool_rule_solver.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/humans/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/humans/examples/basic.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/humans/examples/cs_phd.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/interface.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/anthropic.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/azure_openai.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/azure_openai_constants.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/cohere.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/google_ai.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/helpers.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/llm_api_tools.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/mistral.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/llm_api/openai.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/README.md +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/chat_completion_proxy.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/constants.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/function_parser.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/grammars/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/grammars/gbnf_grammar_generator.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/grammars/json.gbnf +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/grammars/json_func_calls_with_inner_thoughts.gbnf +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/json_parser.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/koboldcpp/api.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/koboldcpp/settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llamacpp/api.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llamacpp/settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/airoboros.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/chatml.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/configurable_wrapper.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/dolphin.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/llama3.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/simple_summary_wrapper.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/wrapper_base.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/llm_chat_completion_wrappers/zephyr.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/lmstudio/api.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/lmstudio/settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/ollama/api.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/ollama/settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/settings/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/settings/deterministic_mirostat.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/settings/settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/settings/simple.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/utils.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/vllm/api.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/webui/api.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/webui/legacy_api.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/webui/legacy_settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/local_llm/webui/settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/log.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/main.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/memory.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/o1_agent.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/offline_memory_agent.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/openai_backcompat/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/openai_backcompat/openai_object.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/__all__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/agents_tags.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/base.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/block.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/blocks_agents.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/custom_columns.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/enums.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/errors.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/file.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/job.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/message.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/mixins.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/passage.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/source.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/sources_agents.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/sqlalchemy_base.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/sqlite_functions.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/tool.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/tools_agents.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/user.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/anna_pa.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/google_search_persona.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/memgpt_doc.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/memgpt_starter.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/o1_persona.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/offline_memory_persona.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/sam.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/sam_pov.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/sam_simple_pov_gpt35.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/personas/examples/sqldb/test.db +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/gpt_summarize.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/gpt_system.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_base.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_chat.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_chat_compressed.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_chat_fstring.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_convo_only.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_doc.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_gpt35_extralong.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_intuitive_knowledge.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_modified_chat.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_modified_o1.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_offline_memory.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/prompts/system/memgpt_offline_memory_chat.txt +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/providers.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/pytest.ini +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/block.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/embedding_config.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/file.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/health.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/job.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/letta_base.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/letta_message.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/letta_request.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/llm_config.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/memory.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/message.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/openai/chat_completion_request.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/openai/chat_completion_response.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/openai/chat_completions.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/openai/embedding_response.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/openai/openai.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/organization.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/passage.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/source.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/tool.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/tool_rule.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/usage.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/schemas/user.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/constants.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/generate_openapi_schema.sh +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/app.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/auth/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/auth/index.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/auth_token.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/openai/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/openai/assistants/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/openai/assistants/assistants.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/openai/assistants/schemas.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/openai/chat_completions/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/openai/chat_completions/chat_completions.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/agents.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/blocks.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/health.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/jobs.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/llms.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/organizations.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/sources.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/tools.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/routers/v1/users.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/static_files.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/rest_api/utils.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/startup.sh +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/static_files/assets/index-048c9598.js +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/static_files/assets/index-0e31b727.css +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/static_files/favicon.ico +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/static_files/index.html +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/static_files/memgpt_logo_transparent.png +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/utils.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/ws_api/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/ws_api/example_client.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/ws_api/interface.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/ws_api/protocol.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/server/ws_api/server.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/__init__.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/block_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/helpers/agent_manager_helper.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/job_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/message_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/organization_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/passage_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/per_agent_lock_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/source_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/tool_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/tool_sandbox_env/.gitkeep +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/services/user_manager.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/settings.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/streaming_interface.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/streaming_utils.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/system.py +0 -0
- {letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/utils.py +0 -0
|
@@ -15,6 +15,11 @@ from letta.schemas.embedding_config import EmbeddingConfig
|
|
|
15
15
|
|
|
16
16
|
# new schemas
|
|
17
17
|
from letta.schemas.enums import JobStatus, MessageRole
|
|
18
|
+
from letta.schemas.environment_variables import (
|
|
19
|
+
SandboxEnvironmentVariable,
|
|
20
|
+
SandboxEnvironmentVariableCreate,
|
|
21
|
+
SandboxEnvironmentVariableUpdate,
|
|
22
|
+
)
|
|
18
23
|
from letta.schemas.file import FileMetadata
|
|
19
24
|
from letta.schemas.job import Job
|
|
20
25
|
from letta.schemas.letta_request import LettaRequest, LettaStreamingRequest
|
|
@@ -25,16 +30,7 @@ from letta.schemas.message import Message, MessageCreate, MessageUpdate
|
|
|
25
30
|
from letta.schemas.openai.chat_completions import ToolCall
|
|
26
31
|
from letta.schemas.organization import Organization
|
|
27
32
|
from letta.schemas.passage import Passage
|
|
28
|
-
from letta.schemas.sandbox_config import
|
|
29
|
-
E2BSandboxConfig,
|
|
30
|
-
LocalSandboxConfig,
|
|
31
|
-
SandboxConfig,
|
|
32
|
-
SandboxConfigCreate,
|
|
33
|
-
SandboxConfigUpdate,
|
|
34
|
-
SandboxEnvironmentVariable,
|
|
35
|
-
SandboxEnvironmentVariableCreate,
|
|
36
|
-
SandboxEnvironmentVariableUpdate,
|
|
37
|
-
)
|
|
33
|
+
from letta.schemas.sandbox_config import E2BSandboxConfig, LocalSandboxConfig, SandboxConfig, SandboxConfigCreate, SandboxConfigUpdate
|
|
38
34
|
from letta.schemas.source import Source, SourceCreate, SourceUpdate
|
|
39
35
|
from letta.schemas.tool import Tool, ToolCreate, ToolUpdate
|
|
40
36
|
from letta.schemas.tool_rule import BaseToolRule
|
|
@@ -45,7 +45,6 @@ def _sse_post(url: str, data: dict, headers: dict) -> Generator[LettaStreamingRe
|
|
|
45
45
|
# break
|
|
46
46
|
if sse.data in [status.value for status in MessageStreamStatus]:
|
|
47
47
|
# break
|
|
48
|
-
# print("sse.data::", sse.data)
|
|
49
48
|
yield MessageStreamStatus(sse.data)
|
|
50
49
|
else:
|
|
51
50
|
chunk_data = json.loads(sse.data)
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/orm/agent.py
RENAMED
|
@@ -31,7 +31,7 @@ class Agent(SqlalchemyBase, OrganizationMixin):
|
|
|
31
31
|
|
|
32
32
|
# agent generates its own id
|
|
33
33
|
# TODO: We want to migrate all the ORM models to do this, so we will need to move this to the SqlalchemyBase
|
|
34
|
-
# TODO:
|
|
34
|
+
# TODO: Some still rely on the Pydantic object to do this
|
|
35
35
|
id: Mapped[str] = mapped_column(String, primary_key=True, default=lambda: f"agent-{uuid.uuid4()}")
|
|
36
36
|
|
|
37
37
|
# Descriptor fields
|
|
@@ -61,6 +61,13 @@ class Agent(SqlalchemyBase, OrganizationMixin):
|
|
|
61
61
|
|
|
62
62
|
# relationships
|
|
63
63
|
organization: Mapped["Organization"] = relationship("Organization", back_populates="agents")
|
|
64
|
+
tool_exec_environment_variables: Mapped[List["AgentEnvironmentVariable"]] = relationship(
|
|
65
|
+
"AgentEnvironmentVariable",
|
|
66
|
+
back_populates="agent",
|
|
67
|
+
cascade="all, delete-orphan",
|
|
68
|
+
lazy="selectin",
|
|
69
|
+
doc="Environment variables associated with this agent.",
|
|
70
|
+
)
|
|
64
71
|
tools: Mapped[List["Tool"]] = relationship("Tool", secondary="tools_agents", lazy="selectin", passive_deletes=True)
|
|
65
72
|
sources: Mapped[List["Source"]] = relationship("Source", secondary="sources_agents", lazy="selectin")
|
|
66
73
|
core_memory: Mapped[List["Block"]] = relationship("Block", secondary="blocks_agents", lazy="selectin")
|
|
@@ -119,5 +126,6 @@ class Agent(SqlalchemyBase, OrganizationMixin):
|
|
|
119
126
|
"last_updated_by_id": self.last_updated_by_id,
|
|
120
127
|
"created_at": self.created_at,
|
|
121
128
|
"updated_at": self.updated_at,
|
|
129
|
+
"tool_exec_environment_variables": self.tool_exec_environment_variables,
|
|
122
130
|
}
|
|
123
131
|
return self.__pydantic_model__(**state)
|
|
@@ -9,6 +9,7 @@ if TYPE_CHECKING:
|
|
|
9
9
|
|
|
10
10
|
from letta.orm.agent import Agent
|
|
11
11
|
from letta.orm.file import FileMetadata
|
|
12
|
+
from letta.orm.sandbox_config import AgentEnvironmentVariable
|
|
12
13
|
from letta.orm.tool import Tool
|
|
13
14
|
from letta.orm.user import User
|
|
14
15
|
|
|
@@ -33,6 +34,9 @@ class Organization(SqlalchemyBase):
|
|
|
33
34
|
sandbox_environment_variables: Mapped[List["SandboxEnvironmentVariable"]] = relationship(
|
|
34
35
|
"SandboxEnvironmentVariable", back_populates="organization", cascade="all, delete-orphan"
|
|
35
36
|
)
|
|
37
|
+
agent_environment_variables: Mapped[List["AgentEnvironmentVariable"]] = relationship(
|
|
38
|
+
"AgentEnvironmentVariable", back_populates="organization", cascade="all, delete-orphan"
|
|
39
|
+
)
|
|
36
40
|
|
|
37
41
|
# relationships
|
|
38
42
|
agents: Mapped[List["Agent"]] = relationship("Agent", back_populates="organization", cascade="all, delete-orphan")
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import uuid
|
|
1
2
|
from typing import TYPE_CHECKING, Dict, List, Optional
|
|
2
3
|
|
|
3
4
|
from sqlalchemy import JSON
|
|
@@ -5,13 +6,14 @@ from sqlalchemy import Enum as SqlEnum
|
|
|
5
6
|
from sqlalchemy import String, UniqueConstraint
|
|
6
7
|
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
|
7
8
|
|
|
8
|
-
from letta.orm.mixins import OrganizationMixin, SandboxConfigMixin
|
|
9
|
+
from letta.orm.mixins import AgentMixin, OrganizationMixin, SandboxConfigMixin
|
|
9
10
|
from letta.orm.sqlalchemy_base import SqlalchemyBase
|
|
11
|
+
from letta.schemas.environment_variables import SandboxEnvironmentVariable as PydanticSandboxEnvironmentVariable
|
|
10
12
|
from letta.schemas.sandbox_config import SandboxConfig as PydanticSandboxConfig
|
|
11
|
-
from letta.schemas.sandbox_config import SandboxEnvironmentVariable as PydanticSandboxEnvironmentVariable
|
|
12
13
|
from letta.schemas.sandbox_config import SandboxType
|
|
13
14
|
|
|
14
15
|
if TYPE_CHECKING:
|
|
16
|
+
from letta.orm.agent import Agent
|
|
15
17
|
from letta.orm.organization import Organization
|
|
16
18
|
|
|
17
19
|
|
|
@@ -52,3 +54,21 @@ class SandboxEnvironmentVariable(SqlalchemyBase, OrganizationMixin, SandboxConfi
|
|
|
52
54
|
# relationships
|
|
53
55
|
organization: Mapped["Organization"] = relationship("Organization", back_populates="sandbox_environment_variables")
|
|
54
56
|
sandbox_config: Mapped["SandboxConfig"] = relationship("SandboxConfig", back_populates="sandbox_environment_variables")
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class AgentEnvironmentVariable(SqlalchemyBase, OrganizationMixin, AgentMixin):
|
|
60
|
+
"""ORM model for environment variables associated with agents."""
|
|
61
|
+
|
|
62
|
+
__tablename__ = "agent_environment_variables"
|
|
63
|
+
# We cannot have duplicate key names for the same agent, the env var would get overwritten
|
|
64
|
+
__table_args__ = (UniqueConstraint("key", "agent_id", name="uix_key_agent"),)
|
|
65
|
+
|
|
66
|
+
# agent_env_var generates its own id
|
|
67
|
+
# TODO: We want to migrate all the ORM models to do this, so we will need to move this to the SqlalchemyBase
|
|
68
|
+
id: Mapped[str] = mapped_column(String, primary_key=True, default=lambda: f"agent-env-{uuid.uuid4()}")
|
|
69
|
+
key: Mapped[str] = mapped_column(String, nullable=False, doc="The name of the environment variable.")
|
|
70
|
+
value: Mapped[str] = mapped_column(String, nullable=False, doc="The value of the environment variable.")
|
|
71
|
+
description: Mapped[Optional[str]] = mapped_column(String, nullable=True, doc="An optional description of the environment variable.")
|
|
72
|
+
|
|
73
|
+
organization: Mapped["Organization"] = relationship("Organization", back_populates="agent_environment_variables")
|
|
74
|
+
agent: Mapped[List["Agent"]] = relationship("Agent", back_populates="tool_exec_environment_variables")
|
|
@@ -6,6 +6,7 @@ from pydantic import BaseModel, Field, field_validator
|
|
|
6
6
|
from letta.constants import DEFAULT_EMBEDDING_CHUNK_SIZE
|
|
7
7
|
from letta.schemas.block import CreateBlock
|
|
8
8
|
from letta.schemas.embedding_config import EmbeddingConfig
|
|
9
|
+
from letta.schemas.environment_variables import AgentEnvironmentVariable
|
|
9
10
|
from letta.schemas.letta_base import OrmMetadataBase
|
|
10
11
|
from letta.schemas.llm_config import LLMConfig
|
|
11
12
|
from letta.schemas.memory import Memory
|
|
@@ -78,6 +79,9 @@ class AgentState(OrmMetadataBase, validate_assignment=True):
|
|
|
78
79
|
tools: List[Tool] = Field(..., description="The tools used by the agent.")
|
|
79
80
|
sources: List[Source] = Field(..., description="The sources used by the agent.")
|
|
80
81
|
tags: List[str] = Field(..., description="The tags associated with the agent.")
|
|
82
|
+
tool_exec_environment_variables: List[AgentEnvironmentVariable] = Field(
|
|
83
|
+
..., description="The environment variables for tool execution specific to this agent."
|
|
84
|
+
)
|
|
81
85
|
|
|
82
86
|
|
|
83
87
|
class CreateAgent(BaseModel, validate_assignment=True): #
|
|
@@ -120,6 +124,9 @@ class CreateAgent(BaseModel, validate_assignment=True): #
|
|
|
120
124
|
embedding_chunk_size: Optional[int] = Field(DEFAULT_EMBEDDING_CHUNK_SIZE, description="The embedding chunk size used by the agent.")
|
|
121
125
|
from_template: Optional[str] = Field(None, description="The template id used to configure the agent")
|
|
122
126
|
project_id: Optional[str] = Field(None, description="The project id that the agent will be associated with.")
|
|
127
|
+
tool_exec_environment_variables: Optional[Dict[str, str]] = Field(
|
|
128
|
+
None, description="The environment variables for tool execution specific to this agent."
|
|
129
|
+
)
|
|
123
130
|
|
|
124
131
|
@field_validator("name")
|
|
125
132
|
@classmethod
|
|
@@ -184,6 +191,9 @@ class UpdateAgent(BaseModel):
|
|
|
184
191
|
message_ids: Optional[List[str]] = Field(None, description="The ids of the messages in the agent's in-context memory.")
|
|
185
192
|
description: Optional[str] = Field(None, description="The description of the agent.")
|
|
186
193
|
metadata_: Optional[Dict] = Field(None, description="The metadata of the agent.", alias="metadata_")
|
|
194
|
+
tool_exec_environment_variables: Optional[Dict[str, str]] = Field(
|
|
195
|
+
None, description="The environment variables for tool execution specific to this agent."
|
|
196
|
+
)
|
|
187
197
|
|
|
188
198
|
class Config:
|
|
189
199
|
extra = "ignore" # Ignores extra fields
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from letta.schemas.letta_base import LettaBase, OrmMetadataBase
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
# Base Environment Variable
|
|
9
|
+
class EnvironmentVariableBase(OrmMetadataBase):
|
|
10
|
+
id: str = Field(..., description="The unique identifier for the environment variable.")
|
|
11
|
+
key: str = Field(..., description="The name of the environment variable.")
|
|
12
|
+
value: str = Field(..., description="The value of the environment variable.")
|
|
13
|
+
description: Optional[str] = Field(None, description="An optional description of the environment variable.")
|
|
14
|
+
organization_id: Optional[str] = Field(None, description="The ID of the organization this environment variable belongs to.")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class EnvironmentVariableCreateBase(LettaBase):
|
|
18
|
+
key: str = Field(..., description="The name of the environment variable.")
|
|
19
|
+
value: str = Field(..., description="The value of the environment variable.")
|
|
20
|
+
description: Optional[str] = Field(None, description="An optional description of the environment variable.")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class EnvironmentVariableUpdateBase(LettaBase):
|
|
24
|
+
key: Optional[str] = Field(None, description="The name of the environment variable.")
|
|
25
|
+
value: Optional[str] = Field(None, description="The value of the environment variable.")
|
|
26
|
+
description: Optional[str] = Field(None, description="An optional description of the environment variable.")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Sandbox-Specific Environment Variable
|
|
30
|
+
class SandboxEnvironmentVariableBase(EnvironmentVariableBase):
|
|
31
|
+
__id_prefix__ = "sandbox-env"
|
|
32
|
+
sandbox_config_id: str = Field(..., description="The ID of the sandbox config this environment variable belongs to.")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class SandboxEnvironmentVariable(SandboxEnvironmentVariableBase):
|
|
36
|
+
id: str = SandboxEnvironmentVariableBase.generate_id_field()
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class SandboxEnvironmentVariableCreate(EnvironmentVariableCreateBase):
|
|
40
|
+
pass
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class SandboxEnvironmentVariableUpdate(EnvironmentVariableUpdateBase):
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Agent-Specific Environment Variable
|
|
48
|
+
class AgentEnvironmentVariableBase(EnvironmentVariableBase):
|
|
49
|
+
__id_prefix__ = "agent-env"
|
|
50
|
+
agent_id: str = Field(..., description="The ID of the agent this environment variable belongs to.")
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class AgentEnvironmentVariable(AgentEnvironmentVariableBase):
|
|
54
|
+
id: str = AgentEnvironmentVariableBase.generate_id_field()
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class AgentEnvironmentVariableCreate(EnvironmentVariableCreateBase):
|
|
58
|
+
pass
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class AgentEnvironmentVariableUpdate(EnvironmentVariableUpdateBase):
|
|
62
|
+
pass
|
|
@@ -29,19 +29,20 @@ class LettaResponse(BaseModel):
|
|
|
29
29
|
json_schema_extra={
|
|
30
30
|
"items": {
|
|
31
31
|
"oneOf": [
|
|
32
|
-
{"
|
|
33
|
-
{"
|
|
34
|
-
{"
|
|
35
|
-
{"
|
|
36
|
-
{"
|
|
37
|
-
{"
|
|
32
|
+
{"$ref": "#/components/schemas/SystemMessage-Output"},
|
|
33
|
+
{"$ref": "#/components/schemas/UserMessage-Output"},
|
|
34
|
+
{"$ref": "#/components/schemas/ReasoningMessage"},
|
|
35
|
+
{"$ref": "#/components/schemas/ToolCallMessage"},
|
|
36
|
+
{"$ref": "#/components/schemas/ToolReturnMessage"},
|
|
37
|
+
{"$ref": "#/components/schemas/AssistantMessage-Output"},
|
|
38
38
|
],
|
|
39
39
|
"discriminator": {"propertyName": "message_type"},
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
)
|
|
43
43
|
usage: LettaUsageStatistics = Field(
|
|
44
|
-
...,
|
|
44
|
+
...,
|
|
45
|
+
description="The usage statistics of the agent.",
|
|
45
46
|
)
|
|
46
47
|
|
|
47
48
|
def __str__(self):
|
|
@@ -102,31 +102,3 @@ class SandboxConfigUpdate(LettaBase):
|
|
|
102
102
|
"""Pydantic model for updating SandboxConfig fields."""
|
|
103
103
|
|
|
104
104
|
config: Union[LocalSandboxConfig, E2BSandboxConfig] = Field(None, description="The JSON configuration data for the sandbox.")
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
# Environment Variable
|
|
108
|
-
class SandboxEnvironmentVariableBase(OrmMetadataBase):
|
|
109
|
-
__id_prefix__ = "sandbox-env"
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class SandboxEnvironmentVariable(SandboxEnvironmentVariableBase):
|
|
113
|
-
id: str = SandboxEnvironmentVariableBase.generate_id_field()
|
|
114
|
-
key: str = Field(..., description="The name of the environment variable.")
|
|
115
|
-
value: str = Field(..., description="The value of the environment variable.")
|
|
116
|
-
description: Optional[str] = Field(None, description="An optional description of the environment variable.")
|
|
117
|
-
sandbox_config_id: str = Field(..., description="The ID of the sandbox config this environment variable belongs to.")
|
|
118
|
-
organization_id: Optional[str] = Field(None, description="The ID of the organization this environment variable belongs to.")
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
class SandboxEnvironmentVariableCreate(LettaBase):
|
|
122
|
-
key: str = Field(..., description="The name of the environment variable.")
|
|
123
|
-
value: str = Field(..., description="The value of the environment variable.")
|
|
124
|
-
description: Optional[str] = Field(None, description="An optional description of the environment variable.")
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
class SandboxEnvironmentVariableUpdate(LettaBase):
|
|
128
|
-
"""Pydantic model for updating SandboxEnvironmentVariable fields."""
|
|
129
|
-
|
|
130
|
-
key: Optional[str] = Field(None, description="The name of the environment variable.")
|
|
131
|
-
value: Optional[str] = Field(None, description="The value of the environment variable.")
|
|
132
|
-
description: Optional[str] = Field(None, description="An optional description of the environment variable.")
|
|
@@ -292,8 +292,8 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
|
|
|
292
292
|
# if multi_step = True, the stream ends when the agent yields
|
|
293
293
|
# if multi_step = False, the stream ends when the step ends
|
|
294
294
|
self.multi_step = multi_step
|
|
295
|
-
self.multi_step_indicator = MessageStreamStatus.done_step
|
|
296
|
-
self.multi_step_gen_indicator = MessageStreamStatus.done_generation
|
|
295
|
+
# self.multi_step_indicator = MessageStreamStatus.done_step
|
|
296
|
+
# self.multi_step_gen_indicator = MessageStreamStatus.done_generation
|
|
297
297
|
|
|
298
298
|
# Support for AssistantMessage
|
|
299
299
|
self.use_assistant_message = False # TODO: Remove this
|
|
@@ -378,8 +378,8 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
|
|
|
378
378
|
"""Clean up the stream by deactivating and clearing chunks."""
|
|
379
379
|
self.streaming_chat_completion_mode_function_name = None
|
|
380
380
|
|
|
381
|
-
if not self.streaming_chat_completion_mode and not self.nonstreaming_legacy_mode:
|
|
382
|
-
|
|
381
|
+
# if not self.streaming_chat_completion_mode and not self.nonstreaming_legacy_mode:
|
|
382
|
+
# self._push_to_buffer(self.multi_step_gen_indicator)
|
|
383
383
|
|
|
384
384
|
# Wipe the inner thoughts buffers
|
|
385
385
|
self._reset_inner_thoughts_json_reader()
|
|
@@ -390,9 +390,9 @@ class StreamingServerInterface(AgentChunkStreamingInterface):
|
|
|
390
390
|
# end the stream
|
|
391
391
|
self._active = False
|
|
392
392
|
self._event.set() # Unblock the generator if it's waiting to allow it to complete
|
|
393
|
-
elif not self.streaming_chat_completion_mode and not self.nonstreaming_legacy_mode:
|
|
394
|
-
|
|
395
|
-
|
|
393
|
+
# elif not self.streaming_chat_completion_mode and not self.nonstreaming_legacy_mode:
|
|
394
|
+
# # signal that a new step has started in the stream
|
|
395
|
+
# self._push_to_buffer(self.multi_step_indicator)
|
|
396
396
|
|
|
397
397
|
# Wipe the inner thoughts buffers
|
|
398
398
|
self._reset_inner_thoughts_json_reader()
|
|
@@ -2,10 +2,10 @@ from typing import List, Optional
|
|
|
2
2
|
|
|
3
3
|
from fastapi import APIRouter, Depends, Query
|
|
4
4
|
|
|
5
|
+
from letta.schemas.environment_variables import SandboxEnvironmentVariable as PydanticEnvVar
|
|
6
|
+
from letta.schemas.environment_variables import SandboxEnvironmentVariableCreate, SandboxEnvironmentVariableUpdate
|
|
5
7
|
from letta.schemas.sandbox_config import SandboxConfig as PydanticSandboxConfig
|
|
6
|
-
from letta.schemas.sandbox_config import SandboxConfigCreate, SandboxConfigUpdate
|
|
7
|
-
from letta.schemas.sandbox_config import SandboxEnvironmentVariable as PydanticEnvVar
|
|
8
|
-
from letta.schemas.sandbox_config import SandboxEnvironmentVariableCreate, SandboxEnvironmentVariableUpdate, SandboxType
|
|
8
|
+
from letta.schemas.sandbox_config import SandboxConfigCreate, SandboxConfigUpdate, SandboxType
|
|
9
9
|
from letta.server.rest_api.utils import get_letta_server, get_user_id
|
|
10
10
|
from letta.server.server import SyncServer
|
|
11
11
|
|
|
@@ -46,6 +46,7 @@ from letta.schemas.embedding_config import EmbeddingConfig
|
|
|
46
46
|
|
|
47
47
|
# openai schemas
|
|
48
48
|
from letta.schemas.enums import JobStatus
|
|
49
|
+
from letta.schemas.environment_variables import SandboxEnvironmentVariableCreate
|
|
49
50
|
from letta.schemas.job import Job, JobUpdate
|
|
50
51
|
from letta.schemas.letta_message import LettaMessage, ToolReturnMessage
|
|
51
52
|
from letta.schemas.llm_config import LLMConfig
|
|
@@ -53,7 +54,7 @@ from letta.schemas.memory import ArchivalMemorySummary, ContextWindowOverview, M
|
|
|
53
54
|
from letta.schemas.message import Message, MessageCreate, MessageRole, MessageUpdate
|
|
54
55
|
from letta.schemas.organization import Organization
|
|
55
56
|
from letta.schemas.passage import Passage
|
|
56
|
-
from letta.schemas.sandbox_config import
|
|
57
|
+
from letta.schemas.sandbox_config import SandboxType
|
|
57
58
|
from letta.schemas.source import Source
|
|
58
59
|
from letta.schemas.tool import Tool
|
|
59
60
|
from letta.schemas.usage import LettaUsageStatistics
|
|
@@ -14,6 +14,7 @@ from letta.orm import Source as SourceModel
|
|
|
14
14
|
from letta.orm import SourcePassage, SourcesAgents
|
|
15
15
|
from letta.orm import Tool as ToolModel
|
|
16
16
|
from letta.orm.errors import NoResultFound
|
|
17
|
+
from letta.orm.sandbox_config import AgentEnvironmentVariable as AgentEnvironmentVariableModel
|
|
17
18
|
from letta.orm.sqlite_functions import adapt_array
|
|
18
19
|
from letta.schemas.agent import AgentState as PydanticAgentState
|
|
19
20
|
from letta.schemas.agent import AgentType, CreateAgent, UpdateAgent
|
|
@@ -116,6 +117,14 @@ class AgentManager:
|
|
|
116
117
|
actor=actor,
|
|
117
118
|
)
|
|
118
119
|
|
|
120
|
+
# If there are provided environment variables, add them in
|
|
121
|
+
if agent_create.tool_exec_environment_variables:
|
|
122
|
+
agent_state = self._set_environment_variables(
|
|
123
|
+
agent_id=agent_state.id,
|
|
124
|
+
env_vars=agent_create.tool_exec_environment_variables,
|
|
125
|
+
actor=actor,
|
|
126
|
+
)
|
|
127
|
+
|
|
119
128
|
# TODO: See if we can merge this into the above SQL create call for performance reasons
|
|
120
129
|
# Generate a sequence of initial messages to put in the buffer
|
|
121
130
|
init_messages = initialize_message_sequence(
|
|
@@ -192,6 +201,14 @@ class AgentManager:
|
|
|
192
201
|
def update_agent(self, agent_id: str, agent_update: UpdateAgent, actor: PydanticUser) -> PydanticAgentState:
|
|
193
202
|
agent_state = self._update_agent(agent_id=agent_id, agent_update=agent_update, actor=actor)
|
|
194
203
|
|
|
204
|
+
# If there are provided environment variables, add them in
|
|
205
|
+
if agent_update.tool_exec_environment_variables:
|
|
206
|
+
agent_state = self._set_environment_variables(
|
|
207
|
+
agent_id=agent_state.id,
|
|
208
|
+
env_vars=agent_update.tool_exec_environment_variables,
|
|
209
|
+
actor=actor,
|
|
210
|
+
)
|
|
211
|
+
|
|
195
212
|
# Rebuild the system prompt if it's different
|
|
196
213
|
if agent_update.system and agent_update.system != agent_state.system:
|
|
197
214
|
agent_state = self.rebuild_system_prompt(agent_id=agent_state.id, actor=actor, force=True, update_timestamp=False)
|
|
@@ -296,6 +313,43 @@ class AgentManager:
|
|
|
296
313
|
agent = AgentModel.read(db_session=session, identifier=agent_id, actor=actor)
|
|
297
314
|
agent.hard_delete(session)
|
|
298
315
|
|
|
316
|
+
# ======================================================================================================================
|
|
317
|
+
# Per Agent Environment Variable Management
|
|
318
|
+
# ======================================================================================================================
|
|
319
|
+
@enforce_types
|
|
320
|
+
def _set_environment_variables(
|
|
321
|
+
self,
|
|
322
|
+
agent_id: str,
|
|
323
|
+
env_vars: Dict[str, str],
|
|
324
|
+
actor: PydanticUser,
|
|
325
|
+
) -> PydanticAgentState:
|
|
326
|
+
"""
|
|
327
|
+
Adds or replaces the environment variables for the specified agent.
|
|
328
|
+
|
|
329
|
+
Args:
|
|
330
|
+
agent_id: The agent id.
|
|
331
|
+
env_vars: A dictionary of environment variable key-value pairs.
|
|
332
|
+
actor: The user performing the action.
|
|
333
|
+
|
|
334
|
+
Returns:
|
|
335
|
+
PydanticAgentState: The updated agent as a Pydantic model.
|
|
336
|
+
"""
|
|
337
|
+
with self.session_maker() as session:
|
|
338
|
+
# Retrieve the agent
|
|
339
|
+
agent = AgentModel.read(db_session=session, identifier=agent_id, actor=actor)
|
|
340
|
+
|
|
341
|
+
# Replace the environment variables
|
|
342
|
+
agent.tool_exec_environment_variables = [
|
|
343
|
+
AgentEnvironmentVariableModel(key=key, value=value, agent_id=agent_id, organization_id=actor.organization_id)
|
|
344
|
+
for key, value in env_vars.items()
|
|
345
|
+
]
|
|
346
|
+
|
|
347
|
+
# Update the agent in the database
|
|
348
|
+
agent.update(session, actor=actor)
|
|
349
|
+
|
|
350
|
+
# Return the updated agent state
|
|
351
|
+
return agent.to_pydantic()
|
|
352
|
+
|
|
299
353
|
# ======================================================================================================================
|
|
300
354
|
# In Context Messages Management
|
|
301
355
|
# ======================================================================================================================
|
|
@@ -5,11 +5,11 @@ from letta.log import get_logger
|
|
|
5
5
|
from letta.orm.errors import NoResultFound
|
|
6
6
|
from letta.orm.sandbox_config import SandboxConfig as SandboxConfigModel
|
|
7
7
|
from letta.orm.sandbox_config import SandboxEnvironmentVariable as SandboxEnvVarModel
|
|
8
|
+
from letta.schemas.environment_variables import SandboxEnvironmentVariable as PydanticEnvVar
|
|
9
|
+
from letta.schemas.environment_variables import SandboxEnvironmentVariableCreate, SandboxEnvironmentVariableUpdate
|
|
8
10
|
from letta.schemas.sandbox_config import LocalSandboxConfig
|
|
9
11
|
from letta.schemas.sandbox_config import SandboxConfig as PydanticSandboxConfig
|
|
10
|
-
from letta.schemas.sandbox_config import SandboxConfigCreate, SandboxConfigUpdate
|
|
11
|
-
from letta.schemas.sandbox_config import SandboxEnvironmentVariable as PydanticEnvVar
|
|
12
|
-
from letta.schemas.sandbox_config import SandboxEnvironmentVariableCreate, SandboxEnvironmentVariableUpdate, SandboxType
|
|
12
|
+
from letta.schemas.sandbox_config import SandboxConfigCreate, SandboxConfigUpdate, SandboxType
|
|
13
13
|
from letta.schemas.user import User as PydanticUser
|
|
14
14
|
from letta.utils import enforce_types, printd
|
|
15
15
|
|
|
@@ -278,11 +278,14 @@ class ToolExecutionSandbox:
|
|
|
278
278
|
sbx = self.get_running_e2b_sandbox_with_same_state(sbx_config)
|
|
279
279
|
if not sbx or self.force_recreate:
|
|
280
280
|
if not sbx:
|
|
281
|
-
|
|
281
|
+
logger.info(f"No running e2b sandbox found with the same state: {sbx_config}")
|
|
282
282
|
else:
|
|
283
|
-
|
|
283
|
+
logger.info(f"Force recreated e2b sandbox with state: {sbx_config}")
|
|
284
284
|
sbx = self.create_e2b_sandbox_with_metadata_hash(sandbox_config=sbx_config)
|
|
285
285
|
|
|
286
|
+
logger.info(f"E2B Sandbox configurations: {sbx_config}")
|
|
287
|
+
logger.info(f"E2B Sandbox ID: {sbx.sandbox_id}")
|
|
288
|
+
|
|
286
289
|
# Since this sandbox was used, we extend its lifecycle by the timeout
|
|
287
290
|
sbx.set_timeout(sbx_config.get_e2b_config().timeout)
|
|
288
291
|
|
|
File without changes
|
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/__init__.py
RENAMED
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/__main__.py
RENAMED
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/cli/cli.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/config.py
RENAMED
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/constants.py
RENAMED
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/credentials.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/embeddings.py
RENAMED
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{letta_nightly-0.6.7.dev20250106104119 → letta_nightly-0.6.7.dev20250107104137}/letta/interface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|