letta-nightly 0.6.9.dev20250120104049__tar.gz → 0.6.11.dev20250120212046__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.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/PKG-INFO +9 -6
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/__init__.py +1 -1
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/agent.py +40 -23
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/client/client.py +10 -2
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/errors.py +14 -0
- letta_nightly-0.6.11.dev20250120212046/letta/functions/ast_parsers.py +105 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/anthropic.py +130 -82
- letta_nightly-0.6.11.dev20250120212046/letta/llm_api/aws_bedrock.py +134 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/llm_api_tools.py +30 -7
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/__init__.py +1 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/job.py +2 -4
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/message.py +5 -1
- letta_nightly-0.6.11.dev20250120212046/letta/orm/step.py +54 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/embedding_config.py +1 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/letta_message.py +24 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/letta_response.py +1 -9
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/llm_config.py +1 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/message.py +1 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/providers.py +60 -3
- letta_nightly-0.6.11.dev20250120212046/letta/schemas/step.py +31 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/app.py +21 -6
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/agents.py +15 -2
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/llms.py +2 -2
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/runs.py +12 -2
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/server.py +9 -3
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/agent_manager.py +4 -3
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/job_manager.py +11 -13
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/provider_manager.py +19 -7
- letta_nightly-0.6.11.dev20250120212046/letta/services/step_manager.py +87 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/settings.py +21 -1
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/pyproject.toml +9 -6
- letta_nightly-0.6.9.dev20250120104049/letta/credentials.py +0 -149
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/LICENSE +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/README.md +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/__main__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/benchmark/benchmark.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/benchmark/constants.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/chat_only_agent.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/cli/cli.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/cli/cli_config.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/cli/cli_load.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/client/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/client/streaming.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/client/utils.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/config.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/constants.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/data_sources/connectors.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/data_sources/connectors_helper.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/embeddings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/functions/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/functions/function_sets/base.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/functions/function_sets/extras.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/functions/function_sets/multi_agent.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/functions/functions.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/functions/helpers.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/functions/schema_generator.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/helpers/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/helpers/tool_rule_solver.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/humans/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/humans/examples/basic.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/humans/examples/cs_phd.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/interface.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/azure_openai.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/azure_openai_constants.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/cohere.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/google_ai.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/helpers.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/mistral.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/llm_api/openai.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/README.md +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/chat_completion_proxy.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/constants.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/function_parser.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/grammars/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/grammars/gbnf_grammar_generator.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/grammars/json.gbnf +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/grammars/json_func_calls_with_inner_thoughts.gbnf +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/json_parser.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/koboldcpp/api.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/koboldcpp/settings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llamacpp/api.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llamacpp/settings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/airoboros.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/chatml.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/configurable_wrapper.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/dolphin.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/llama3.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/simple_summary_wrapper.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/wrapper_base.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/llm_chat_completion_wrappers/zephyr.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/lmstudio/api.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/lmstudio/settings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/ollama/api.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/ollama/settings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/settings/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/settings/deterministic_mirostat.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/settings/settings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/settings/simple.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/utils.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/vllm/api.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/webui/api.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/webui/legacy_api.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/webui/legacy_settings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/local_llm/webui/settings.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/log.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/main.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/memory.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/offline_memory_agent.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/openai_backcompat/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/openai_backcompat/openai_object.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/__all__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/agent.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/agents_tags.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/base.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/block.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/blocks_agents.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/custom_columns.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/enums.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/errors.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/file.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/job_messages.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/job_usage_statistics.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/mixins.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/organization.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/passage.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/provider.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/sandbox_config.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/source.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/sources_agents.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/sqlalchemy_base.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/sqlite_functions.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/tool.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/tools_agents.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/orm/user.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/anna_pa.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/google_search_persona.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/memgpt_doc.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/memgpt_starter.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/o1_persona.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/offline_memory_persona.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/sam.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/sam_pov.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/sam_simple_pov_gpt35.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/personas/examples/sqldb/test.db +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/gpt_summarize.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/gpt_system.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_base.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_chat.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_chat_compressed.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_chat_fstring.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_convo_only.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_doc.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_gpt35_extralong.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_intuitive_knowledge.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_modified_chat.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_modified_o1.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_offline_memory.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/prompts/system/memgpt_offline_memory_chat.txt +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/pytest.ini +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/agent.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/block.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/enums.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/environment_variables.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/file.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/health.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/job.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/letta_base.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/letta_request.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/memory.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/openai/chat_completion_request.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/openai/chat_completion_response.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/openai/chat_completions.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/openai/embedding_response.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/openai/openai.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/organization.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/passage.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/run.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/sandbox_config.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/source.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/tool.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/tool_rule.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/usage.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/schemas/user.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/constants.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/generate_openapi_schema.sh +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/auth/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/auth/index.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/auth_token.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/interface.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/openai/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/openai/assistants/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/openai/assistants/assistants.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/openai/assistants/schemas.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/openai/chat_completions/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/openai/chat_completions/chat_completions.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/blocks.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/health.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/jobs.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/organizations.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/providers.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/sandbox_configs.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/sources.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/tags.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/tools.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/routers/v1/users.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/static_files.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/rest_api/utils.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/startup.sh +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/static_files/assets/index-048c9598.js +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/static_files/assets/index-0e31b727.css +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/static_files/favicon.ico +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/static_files/index.html +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/static_files/memgpt_logo_transparent.png +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/utils.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/ws_api/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/ws_api/example_client.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/ws_api/interface.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/ws_api/protocol.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/server/ws_api/server.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/__init__.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/block_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/helpers/agent_manager_helper.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/message_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/organization_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/passage_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/per_agent_lock_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/sandbox_config_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/source_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/tool_execution_sandbox.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/tool_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/services/user_manager.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/streaming_interface.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/streaming_utils.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/system.py +0 -0
- {letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: letta-nightly
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.11.dev20250120212046
|
|
4
4
|
Summary: Create LLM agents with long-term memory and custom tools
|
|
5
5
|
License: Apache License
|
|
6
6
|
Author: Letta Team
|
|
@@ -12,6 +12,7 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
14
14
|
Provides-Extra: all
|
|
15
|
+
Provides-Extra: bedrock
|
|
15
16
|
Provides-Extra: cloud-tool-sandbox
|
|
16
17
|
Provides-Extra: dev
|
|
17
18
|
Provides-Extra: external-tools
|
|
@@ -20,9 +21,11 @@ Provides-Extra: qdrant
|
|
|
20
21
|
Provides-Extra: server
|
|
21
22
|
Provides-Extra: tests
|
|
22
23
|
Requires-Dist: alembic (>=1.13.3,<2.0.0)
|
|
24
|
+
Requires-Dist: anthropic (>=0.43.0,<0.44.0)
|
|
23
25
|
Requires-Dist: autoflake (>=2.3.0,<3.0.0) ; extra == "dev" or extra == "all"
|
|
24
26
|
Requires-Dist: black[jupyter] (>=24.2.0,<25.0.0) ; extra == "dev" or extra == "all"
|
|
25
27
|
Requires-Dist: brotli (>=1.1.0,<2.0.0)
|
|
28
|
+
Requires-Dist: colorama (>=0.4.6,<0.5.0)
|
|
26
29
|
Requires-Dist: composio-core (>=0.6.15,<0.7.0)
|
|
27
30
|
Requires-Dist: composio-langchain (>=0.6.15,<0.7.0)
|
|
28
31
|
Requires-Dist: datasets (>=2.14.6,<3.0.0) ; extra == "dev" or extra == "all"
|
|
@@ -38,10 +41,10 @@ Requires-Dist: html2text (>=2020.1.16,<2021.0.0)
|
|
|
38
41
|
Requires-Dist: httpx (>=0.28.0,<0.29.0)
|
|
39
42
|
Requires-Dist: httpx-sse (>=0.4.0,<0.5.0)
|
|
40
43
|
Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev" or extra == "all"
|
|
41
|
-
Requires-Dist: jinja2 (>=3.1.
|
|
44
|
+
Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
|
|
42
45
|
Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
|
|
43
46
|
Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
|
|
44
|
-
Requires-Dist: letta_client (>=0.1.
|
|
47
|
+
Requires-Dist: letta_client (>=0.1.16,<0.2.0)
|
|
45
48
|
Requires-Dist: llama-index (>=0.12.2,<0.13.0)
|
|
46
49
|
Requires-Dist: llama-index-embeddings-openai (>=0.3.1,<0.4.0)
|
|
47
50
|
Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "all"
|
|
@@ -62,20 +65,20 @@ Requires-Dist: pyright (>=1.1.347,<2.0.0) ; extra == "dev" or extra == "all"
|
|
|
62
65
|
Requires-Dist: pytest-asyncio (>=0.23.2,<0.24.0) ; extra == "dev" or extra == "all"
|
|
63
66
|
Requires-Dist: pytest-order (>=1.2.0,<2.0.0) ; extra == "dev" or extra == "all"
|
|
64
67
|
Requires-Dist: python-box (>=7.1.1,<8.0.0)
|
|
65
|
-
Requires-Dist: python-multipart (>=0.0.
|
|
68
|
+
Requires-Dist: python-multipart (>=0.0.19,<0.0.20)
|
|
66
69
|
Requires-Dist: pytz (>=2023.3.post1,<2024.0)
|
|
67
70
|
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
|
|
68
71
|
Requires-Dist: qdrant-client (>=1.9.1,<2.0.0) ; extra == "qdrant"
|
|
69
72
|
Requires-Dist: questionary (>=2.0.1,<3.0.0)
|
|
70
73
|
Requires-Dist: rich (>=13.9.4,<14.0.0)
|
|
71
74
|
Requires-Dist: sentry-sdk[fastapi] (==2.19.1)
|
|
72
|
-
Requires-Dist: setuptools (>=
|
|
75
|
+
Requires-Dist: setuptools (>=70,<71)
|
|
73
76
|
Requires-Dist: sqlalchemy (>=2.0.25,<3.0.0)
|
|
74
77
|
Requires-Dist: sqlalchemy-json (>=0.7.0,<0.8.0)
|
|
75
78
|
Requires-Dist: sqlalchemy-utils (>=0.41.2,<0.42.0)
|
|
76
79
|
Requires-Dist: sqlmodel (>=0.0.16,<0.0.17)
|
|
77
80
|
Requires-Dist: tqdm (>=4.66.1,<5.0.0)
|
|
78
|
-
Requires-Dist: typer
|
|
81
|
+
Requires-Dist: typer (>=0.12,<1.0)
|
|
79
82
|
Requires-Dist: uvicorn (>=0.24.0.post1,<0.25.0) ; extra == "server" or extra == "all"
|
|
80
83
|
Requires-Dist: websockets (>=12.0,<13.0) ; extra == "server" or extra == "all"
|
|
81
84
|
Requires-Dist: wikipedia (>=1.4.0,<2.0.0) ; extra == "external-tools" or extra == "tests" or extra == "all"
|
{letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/agent.py
RENAMED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import inspect
|
|
2
1
|
import json
|
|
3
2
|
import time
|
|
4
3
|
import traceback
|
|
@@ -20,6 +19,7 @@ from letta.constants import (
|
|
|
20
19
|
REQ_HEARTBEAT_MESSAGE,
|
|
21
20
|
)
|
|
22
21
|
from letta.errors import ContextWindowExceededError
|
|
22
|
+
from letta.functions.ast_parsers import coerce_dict_args_by_annotations, get_function_annotations_from_source
|
|
23
23
|
from letta.functions.functions import get_function_from_module
|
|
24
24
|
from letta.helpers import ToolRulesSolver
|
|
25
25
|
from letta.interface import AgentInterface
|
|
@@ -49,6 +49,8 @@ from letta.services.helpers.agent_manager_helper import check_supports_structure
|
|
|
49
49
|
from letta.services.job_manager import JobManager
|
|
50
50
|
from letta.services.message_manager import MessageManager
|
|
51
51
|
from letta.services.passage_manager import PassageManager
|
|
52
|
+
from letta.services.provider_manager import ProviderManager
|
|
53
|
+
from letta.services.step_manager import StepManager
|
|
52
54
|
from letta.services.tool_execution_sandbox import ToolExecutionSandbox
|
|
53
55
|
from letta.streaming_interface import StreamingRefreshCLIInterface
|
|
54
56
|
from letta.system import get_heartbeat, get_token_limit_warning, package_function_response, package_summarize_message, package_user_message
|
|
@@ -130,8 +132,10 @@ class Agent(BaseAgent):
|
|
|
130
132
|
# Create the persistence manager object based on the AgentState info
|
|
131
133
|
self.message_manager = MessageManager()
|
|
132
134
|
self.passage_manager = PassageManager()
|
|
135
|
+
self.provider_manager = ProviderManager()
|
|
133
136
|
self.agent_manager = AgentManager()
|
|
134
137
|
self.job_manager = JobManager()
|
|
138
|
+
self.step_manager = StepManager()
|
|
135
139
|
|
|
136
140
|
# State needed for heartbeat pausing
|
|
137
141
|
|
|
@@ -223,15 +227,10 @@ class Agent(BaseAgent):
|
|
|
223
227
|
function_response = callable_func(**function_args)
|
|
224
228
|
self.update_memory_if_changed(agent_state_copy.memory)
|
|
225
229
|
else:
|
|
226
|
-
#
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
callable_func = env[target_letta_tool.json_schema["name"]]
|
|
231
|
-
spec = inspect.getfullargspec(callable_func).annotations
|
|
232
|
-
for name, arg in function_args.items():
|
|
233
|
-
if isinstance(function_args[name], dict):
|
|
234
|
-
function_args[name] = spec[name](**function_args[name])
|
|
230
|
+
# Parse the source code to extract function annotations
|
|
231
|
+
annotations = get_function_annotations_from_source(target_letta_tool.source_code, function_name)
|
|
232
|
+
# Coerce the function arguments to the correct types based on the annotations
|
|
233
|
+
function_args = coerce_dict_args_by_annotations(function_args, annotations)
|
|
235
234
|
|
|
236
235
|
# execute tool in a sandbox
|
|
237
236
|
# TODO: allow agent_state to specify which sandbox to execute tools in
|
|
@@ -355,7 +354,7 @@ class Agent(BaseAgent):
|
|
|
355
354
|
if response_message.tool_calls is not None and len(response_message.tool_calls) > 1:
|
|
356
355
|
# raise NotImplementedError(f">1 tool call not supported")
|
|
357
356
|
# TODO eventually support sequential tool calling
|
|
358
|
-
|
|
357
|
+
self.logger.warning(f">1 tool call not supported, using index=0 only\n{response_message.tool_calls}")
|
|
359
358
|
response_message.tool_calls = [response_message.tool_calls[0]]
|
|
360
359
|
assert response_message.tool_calls is not None and len(response_message.tool_calls) > 0
|
|
361
360
|
|
|
@@ -384,7 +383,7 @@ class Agent(BaseAgent):
|
|
|
384
383
|
openai_message_dict=response_message.model_dump(),
|
|
385
384
|
)
|
|
386
385
|
) # extend conversation with assistant's reply
|
|
387
|
-
|
|
386
|
+
self.logger.info(f"Function call message: {messages[-1]}")
|
|
388
387
|
|
|
389
388
|
nonnull_content = False
|
|
390
389
|
if response_message.content:
|
|
@@ -401,7 +400,7 @@ class Agent(BaseAgent):
|
|
|
401
400
|
|
|
402
401
|
# Get the name of the function
|
|
403
402
|
function_name = function_call.name
|
|
404
|
-
|
|
403
|
+
self.logger.info(f"Request to call function {function_name} with tool_call_id: {tool_call_id}")
|
|
405
404
|
|
|
406
405
|
# Failure case 1: function name is wrong (not in agent_state.tools)
|
|
407
406
|
target_letta_tool = None
|
|
@@ -467,7 +466,7 @@ class Agent(BaseAgent):
|
|
|
467
466
|
heartbeat_request = True
|
|
468
467
|
|
|
469
468
|
if not isinstance(heartbeat_request, bool) or heartbeat_request is None:
|
|
470
|
-
|
|
469
|
+
self.logger.warning(
|
|
471
470
|
f"{CLI_WARNING_PREFIX}'request_heartbeat' arg parsed was not a bool or None, type={type(heartbeat_request)}, value={heartbeat_request}"
|
|
472
471
|
)
|
|
473
472
|
heartbeat_request = False
|
|
@@ -503,7 +502,7 @@ class Agent(BaseAgent):
|
|
|
503
502
|
# Less detailed - don't provide full args, idea is that it should be in recent context so no need (just adds noise)
|
|
504
503
|
error_msg = get_friendly_error_msg(function_name=function_name, exception_name=type(e).__name__, exception_message=str(e))
|
|
505
504
|
error_msg_user = f"{error_msg}\n{traceback.format_exc()}"
|
|
506
|
-
|
|
505
|
+
self.logger.error(error_msg_user)
|
|
507
506
|
function_response = package_function_response(False, error_msg)
|
|
508
507
|
self.last_function_response = function_response
|
|
509
508
|
# TODO: truncate error message somehow
|
|
@@ -630,10 +629,10 @@ class Agent(BaseAgent):
|
|
|
630
629
|
|
|
631
630
|
# Chain stops
|
|
632
631
|
if not chaining:
|
|
633
|
-
|
|
632
|
+
self.logger.info("No chaining, stopping after one step")
|
|
634
633
|
break
|
|
635
634
|
elif max_chaining_steps is not None and counter > max_chaining_steps:
|
|
636
|
-
|
|
635
|
+
self.logger.info(f"Hit max chaining steps, stopping after {counter} steps")
|
|
637
636
|
break
|
|
638
637
|
# Chain handlers
|
|
639
638
|
elif token_warning:
|
|
@@ -713,7 +712,7 @@ class Agent(BaseAgent):
|
|
|
713
712
|
input_message_sequence = in_context_messages + messages
|
|
714
713
|
|
|
715
714
|
if len(input_message_sequence) > 1 and input_message_sequence[-1].role != "user":
|
|
716
|
-
|
|
715
|
+
self.logger.warning(f"{CLI_WARNING_PREFIX}Attempting to run ChatCompletion without user as the last message in the queue")
|
|
717
716
|
|
|
718
717
|
# Step 2: send the conversation and available functions to the LLM
|
|
719
718
|
response = self._get_ai_reply(
|
|
@@ -755,7 +754,7 @@ class Agent(BaseAgent):
|
|
|
755
754
|
)
|
|
756
755
|
|
|
757
756
|
if current_total_tokens > MESSAGE_SUMMARY_WARNING_FRAC * int(self.agent_state.llm_config.context_window):
|
|
758
|
-
|
|
757
|
+
self.logger.warning(
|
|
759
758
|
f"{CLI_WARNING_PREFIX}last response total_tokens ({current_total_tokens}) > {MESSAGE_SUMMARY_WARNING_FRAC * int(self.agent_state.llm_config.context_window)}"
|
|
760
759
|
)
|
|
761
760
|
|
|
@@ -765,10 +764,28 @@ class Agent(BaseAgent):
|
|
|
765
764
|
self.agent_alerted_about_memory_pressure = True # it's up to the outer loop to handle this
|
|
766
765
|
|
|
767
766
|
else:
|
|
768
|
-
|
|
767
|
+
self.logger.warning(
|
|
769
768
|
f"last response total_tokens ({current_total_tokens}) < {MESSAGE_SUMMARY_WARNING_FRAC * int(self.agent_state.llm_config.context_window)}"
|
|
770
769
|
)
|
|
771
770
|
|
|
771
|
+
# Log step - this must happen before messages are persisted
|
|
772
|
+
step = self.step_manager.log_step(
|
|
773
|
+
actor=self.user,
|
|
774
|
+
provider_name=self.agent_state.llm_config.model_endpoint_type,
|
|
775
|
+
model=self.agent_state.llm_config.model,
|
|
776
|
+
context_window_limit=self.agent_state.llm_config.context_window,
|
|
777
|
+
usage=response.usage,
|
|
778
|
+
# TODO(@caren): Add full provider support - this line is a workaround for v0 BYOK feature
|
|
779
|
+
provider_id=(
|
|
780
|
+
self.provider_manager.get_anthropic_override_provider_id()
|
|
781
|
+
if self.agent_state.llm_config.model_endpoint_type == "anthropic"
|
|
782
|
+
else None
|
|
783
|
+
),
|
|
784
|
+
job_id=job_id,
|
|
785
|
+
)
|
|
786
|
+
for message in all_new_messages:
|
|
787
|
+
message.step_id = step.id
|
|
788
|
+
|
|
772
789
|
# Persisting into Messages
|
|
773
790
|
self.agent_state = self.agent_manager.append_to_in_context_messages(
|
|
774
791
|
all_new_messages, agent_id=self.agent_state.id, actor=self.user
|
|
@@ -790,11 +807,11 @@ class Agent(BaseAgent):
|
|
|
790
807
|
)
|
|
791
808
|
|
|
792
809
|
except Exception as e:
|
|
793
|
-
|
|
810
|
+
self.logger.error(f"step() failed\nmessages = {messages}\nerror = {e}")
|
|
794
811
|
|
|
795
812
|
# If we got a context alert, try trimming the messages length, then try again
|
|
796
813
|
if is_context_overflow_error(e):
|
|
797
|
-
|
|
814
|
+
self.logger.warning(
|
|
798
815
|
f"context window exceeded with limit {self.agent_state.llm_config.context_window}, running summarizer to trim messages"
|
|
799
816
|
)
|
|
800
817
|
# A separate API call to run a summarizer
|
|
@@ -811,7 +828,7 @@ class Agent(BaseAgent):
|
|
|
811
828
|
)
|
|
812
829
|
|
|
813
830
|
else:
|
|
814
|
-
|
|
831
|
+
self.logger.error(f"step() failed with an unrecognized exception: '{str(e)}'")
|
|
815
832
|
raise e
|
|
816
833
|
|
|
817
834
|
def step_user_message(self, user_message_str: str, **kwargs) -> AgentStepResponse:
|
|
@@ -410,7 +410,8 @@ class RESTClient(AbstractClient):
|
|
|
410
410
|
def __init__(
|
|
411
411
|
self,
|
|
412
412
|
base_url: str,
|
|
413
|
-
token: str,
|
|
413
|
+
token: Optional[str] = None,
|
|
414
|
+
password: Optional[str] = None,
|
|
414
415
|
api_prefix: str = "v1",
|
|
415
416
|
debug: bool = False,
|
|
416
417
|
default_llm_config: Optional[LLMConfig] = None,
|
|
@@ -426,11 +427,18 @@ class RESTClient(AbstractClient):
|
|
|
426
427
|
default_llm_config (Optional[LLMConfig]): The default LLM configuration.
|
|
427
428
|
default_embedding_config (Optional[EmbeddingConfig]): The default embedding configuration.
|
|
428
429
|
headers (Optional[Dict]): The additional headers for the REST API.
|
|
430
|
+
token (Optional[str]): The token for the REST API when using managed letta service.
|
|
431
|
+
password (Optional[str]): The password for the REST API when using self hosted letta service.
|
|
429
432
|
"""
|
|
430
433
|
super().__init__(debug=debug)
|
|
431
434
|
self.base_url = base_url
|
|
432
435
|
self.api_prefix = api_prefix
|
|
433
|
-
|
|
436
|
+
if token:
|
|
437
|
+
self.headers = {"accept": "application/json", "Authorization": f"Bearer {token}"}
|
|
438
|
+
elif password:
|
|
439
|
+
self.headers = {"accept": "application/json", "X-BARE-PASSWORD": f"password {password}"}
|
|
440
|
+
else:
|
|
441
|
+
self.headers = {"accept": "application/json"}
|
|
434
442
|
if headers:
|
|
435
443
|
self.headers.update(headers)
|
|
436
444
|
self._default_llm_config = default_llm_config
|
{letta_nightly-0.6.9.dev20250120104049 → letta_nightly-0.6.11.dev20250120212046}/letta/errors.py
RENAMED
|
@@ -62,6 +62,20 @@ class LLMError(LettaError):
|
|
|
62
62
|
pass
|
|
63
63
|
|
|
64
64
|
|
|
65
|
+
class BedrockPermissionError(LettaError):
|
|
66
|
+
"""Exception raised for errors in the Bedrock permission process."""
|
|
67
|
+
|
|
68
|
+
def __init__(self, message="User does not have access to the Bedrock model with the specified ID."):
|
|
69
|
+
super().__init__(message=message)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class BedrockError(LettaError):
|
|
73
|
+
"""Exception raised for errors in the Bedrock process."""
|
|
74
|
+
|
|
75
|
+
def __init__(self, message="Error with Bedrock model."):
|
|
76
|
+
super().__init__(message=message)
|
|
77
|
+
|
|
78
|
+
|
|
65
79
|
class LLMJSONParsingError(LettaError):
|
|
66
80
|
"""Exception raised for errors in the JSON parsing process."""
|
|
67
81
|
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import ast
|
|
2
|
+
import json
|
|
3
|
+
from typing import Dict
|
|
4
|
+
|
|
5
|
+
# Registry of known types for annotation resolution
|
|
6
|
+
BUILTIN_TYPES = {
|
|
7
|
+
"int": int,
|
|
8
|
+
"float": float,
|
|
9
|
+
"str": str,
|
|
10
|
+
"dict": dict,
|
|
11
|
+
"list": list,
|
|
12
|
+
"set": set,
|
|
13
|
+
"tuple": tuple,
|
|
14
|
+
"bool": bool,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def resolve_type(annotation: str):
|
|
19
|
+
"""
|
|
20
|
+
Resolve a type annotation string into a Python type.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
annotation (str): The annotation string (e.g., 'int', 'list', etc.).
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
type: The corresponding Python type.
|
|
27
|
+
|
|
28
|
+
Raises:
|
|
29
|
+
ValueError: If the annotation is unsupported or invalid.
|
|
30
|
+
"""
|
|
31
|
+
if annotation in BUILTIN_TYPES:
|
|
32
|
+
return BUILTIN_TYPES[annotation]
|
|
33
|
+
|
|
34
|
+
try:
|
|
35
|
+
parsed = ast.literal_eval(annotation)
|
|
36
|
+
if isinstance(parsed, type):
|
|
37
|
+
return parsed
|
|
38
|
+
raise ValueError(f"Annotation '{annotation}' is not a recognized type.")
|
|
39
|
+
except (ValueError, SyntaxError):
|
|
40
|
+
raise ValueError(f"Unsupported annotation: {annotation}")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def get_function_annotations_from_source(source_code: str, function_name: str) -> Dict[str, str]:
|
|
44
|
+
"""
|
|
45
|
+
Parse the source code to extract annotations for a given function name.
|
|
46
|
+
|
|
47
|
+
Args:
|
|
48
|
+
source_code (str): The Python source code containing the function.
|
|
49
|
+
function_name (str): The name of the function to extract annotations for.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Dict[str, str]: A dictionary of argument names to their annotation strings.
|
|
53
|
+
|
|
54
|
+
Raises:
|
|
55
|
+
ValueError: If the function is not found in the source code.
|
|
56
|
+
"""
|
|
57
|
+
tree = ast.parse(source_code)
|
|
58
|
+
for node in ast.iter_child_nodes(tree):
|
|
59
|
+
if isinstance(node, ast.FunctionDef) and node.name == function_name:
|
|
60
|
+
annotations = {}
|
|
61
|
+
for arg in node.args.args:
|
|
62
|
+
if arg.annotation is not None:
|
|
63
|
+
annotation_str = ast.unparse(arg.annotation)
|
|
64
|
+
annotations[arg.arg] = annotation_str
|
|
65
|
+
return annotations
|
|
66
|
+
raise ValueError(f"Function '{function_name}' not found in the provided source code.")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def coerce_dict_args_by_annotations(function_args: dict, annotations: Dict[str, str]) -> dict:
|
|
70
|
+
"""
|
|
71
|
+
Coerce arguments in a dictionary to their annotated types.
|
|
72
|
+
|
|
73
|
+
Args:
|
|
74
|
+
function_args (dict): The original function arguments.
|
|
75
|
+
annotations (Dict[str, str]): Argument annotations as strings.
|
|
76
|
+
|
|
77
|
+
Returns:
|
|
78
|
+
dict: The updated dictionary with coerced argument types.
|
|
79
|
+
|
|
80
|
+
Raises:
|
|
81
|
+
ValueError: If type coercion fails for an argument.
|
|
82
|
+
"""
|
|
83
|
+
coerced_args = dict(function_args) # Shallow copy for mutation safety
|
|
84
|
+
|
|
85
|
+
for arg_name, value in coerced_args.items():
|
|
86
|
+
if arg_name in annotations:
|
|
87
|
+
annotation_str = annotations[arg_name]
|
|
88
|
+
try:
|
|
89
|
+
# Resolve the type from the annotation
|
|
90
|
+
arg_type = resolve_type(annotation_str)
|
|
91
|
+
|
|
92
|
+
# Handle JSON-like inputs for dict and list types
|
|
93
|
+
if arg_type in {dict, list} and isinstance(value, str):
|
|
94
|
+
try:
|
|
95
|
+
# First, try JSON parsing
|
|
96
|
+
value = json.loads(value)
|
|
97
|
+
except json.JSONDecodeError:
|
|
98
|
+
# Fall back to literal_eval for Python-specific literals
|
|
99
|
+
value = ast.literal_eval(value)
|
|
100
|
+
|
|
101
|
+
# Coerce the value to the resolved type
|
|
102
|
+
coerced_args[arg_name] = arg_type(value)
|
|
103
|
+
except (TypeError, ValueError, json.JSONDecodeError, SyntaxError) as e:
|
|
104
|
+
raise ValueError(f"Failed to coerce argument '{arg_name}' to {annotation_str}: {e}")
|
|
105
|
+
return coerced_args
|