letta-nightly 0.11.4.dev20250825104222__tar.gz → 0.11.5__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.
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/PKG-INFO +2 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/__init__.py +1 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agent.py +9 -3
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/base_agent.py +2 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/letta_agent.py +56 -45
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/voice_agent.py +2 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/data_sources/redis_client.py +146 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/errors.py +4 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/function_sets/files.py +2 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/mcp_client/types.py +30 -6
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/schema_generator.py +46 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/schema_validator.py +17 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/types.py +1 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/tool_execution_helper.py +0 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/anthropic_client.py +27 -5
- letta_nightly-0.11.5/letta/llm_api/deepseek_client.py +97 -0
- letta_nightly-0.11.5/letta/llm_api/groq_client.py +79 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/helpers.py +0 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/llm_api_tools.py +2 -113
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/llm_client.py +21 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/llm_client_base.py +11 -9
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/openai_client.py +3 -0
- letta_nightly-0.11.5/letta/llm_api/xai_client.py +85 -0
- letta_nightly-0.11.5/letta/prompts/prompt_generator.py +190 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/agent_file.py +17 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/file.py +24 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/job.py +2 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/letta_message.py +2 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/letta_request.py +22 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/message.py +10 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/bedrock.py +1 -0
- letta_nightly-0.11.5/letta/server/rest_api/redis_stream_manager.py +300 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/agents.py +129 -7
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/folders.py +15 -5
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/runs.py +101 -11
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/sources.py +21 -53
- letta_nightly-0.11.5/letta/server/rest_api/routers/v1/telemetry.py +28 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/tools.py +2 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/streaming_response.py +3 -24
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/server.py +0 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/agent_manager.py +2 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/agent_serialization_manager.py +129 -32
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_manager.py +111 -6
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/file_processor.py +5 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/files_agents_manager.py +60 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/helpers/agent_manager_helper.py +4 -205
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/helpers/tool_parser_helper.py +6 -3
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/mcp/base_client.py +7 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/mcp/sse_client.py +7 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/mcp/stdio_client.py +5 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/mcp/streamable_http_client.py +11 -2
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/mcp_manager.py +31 -30
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/source_manager.py +26 -1
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/summarizer/summarizer.py +21 -10
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/files_tool_executor.py +13 -9
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/mcp_tool_executor.py +3 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/tool_execution_manager.py +13 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_manager.py +43 -20
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/settings.py +1 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/utils.py +37 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/pyproject.toml +92 -2
- letta_nightly-0.11.4.dev20250825104222/letta/functions/mcp_client/base_client.py +0 -156
- letta_nightly-0.11.4.dev20250825104222/letta/functions/mcp_client/sse_client.py +0 -51
- letta_nightly-0.11.4.dev20250825104222/letta/functions/mcp_client/stdio_client.py +0 -109
- letta_nightly-0.11.4.dev20250825104222/letta/server/rest_api/routers/v1/telemetry.py +0 -18
- letta_nightly-0.11.4.dev20250825104222/letta/templates/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/LICENSE +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/README.md +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/ephemeral_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/ephemeral_summary_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/exceptions.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/letta_agent_batch.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/agents/voice_sleeptime_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/cli/cli.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/cli/cli_load.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/client/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/client/streaming.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/client/utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/config.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/constants.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/data_sources/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/data_sources/connectors.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/data_sources/connectors_helper.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/embeddings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/ast_parsers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/async_composio_toolset.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/composio_helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/function_sets/base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/function_sets/builtin.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/function_sets/extras.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/function_sets/multi_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/function_sets/voice.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/functions.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/mcp_client/exceptions.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/prompts.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/typescript_parser.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/groups/dynamic_multi_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/groups/helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/groups/round_robin_multi_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/groups/sleeptime_multi_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/groups/sleeptime_multi_agent_v2.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/groups/supervisor_multi_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/composio_helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/converters.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/datetime_helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/decorators.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/json_helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/message_helper.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/pinecone_utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/reasoning_helper.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/singleton.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/helpers/tool_rule_solver.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/functions/mcp_client → letta_nightly-0.11.5/letta/humans}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/humans/examples/basic.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/humans/examples/cs_phd.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/humans → letta_nightly-0.11.5/letta/interfaces}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/interfaces/anthropic_streaming_interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/interfaces/openai_chat_completions_streaming_interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/interfaces/openai_streaming_interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/interfaces/utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/interfaces → letta_nightly-0.11.5/letta/jobs}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/jobs/helpers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/jobs/llm_batch_job_polling.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/jobs/scheduler.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/jobs/types.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/jobs → letta_nightly-0.11.5/letta/llm_api}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/azure_client.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/bedrock_client.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/deepseek.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/google_ai_client.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/google_constants.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/google_vertex_client.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/mistral.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/openai.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/sample_response_jsons/aws_bedrock.json +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/sample_response_jsons/lmstudio_embedding_list.json +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/sample_response_jsons/lmstudio_model_list.json +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/llm_api/together_client.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/README.md +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/llm_api → letta_nightly-0.11.5/letta/local_llm}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/chat_completion_proxy.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/constants.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/function_parser.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/local_llm → letta_nightly-0.11.5/letta/local_llm/grammars}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/grammars/gbnf_grammar_generator.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/grammars/json.gbnf +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/grammars/json_func_calls_with_inner_thoughts.gbnf +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/json_parser.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/koboldcpp/api.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/koboldcpp/settings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llamacpp/api.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llamacpp/settings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/local_llm/grammars → letta_nightly-0.11.5/letta/local_llm/llm_chat_completion_wrappers}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/airoboros.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/chatml.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/configurable_wrapper.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/dolphin.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/llama3.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/simple_summary_wrapper.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/wrapper_base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/llm_chat_completion_wrappers/zephyr.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/lmstudio/api.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/lmstudio/settings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/ollama/api.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/ollama/settings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/local_llm/llm_chat_completion_wrappers → letta_nightly-0.11.5/letta/local_llm/settings}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/settings/deterministic_mirostat.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/settings/settings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/settings/simple.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/vllm/api.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/webui/api.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/webui/legacy_api.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/webui/legacy_settings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/local_llm/webui/settings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/log.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/main.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/memory.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/local_llm/settings → letta_nightly-0.11.5/letta/openai_backcompat}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/openai_backcompat/openai_object.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/agents_tags.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/archive.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/archives_agents.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/block.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/block_history.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/blocks_agents.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/custom_columns.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/errors.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/file.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/files_agents.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/group.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/groups_agents.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/groups_blocks.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/identities_agents.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/identities_blocks.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/identity.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/job.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/job_messages.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/llm_batch_items.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/llm_batch_job.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/mcp_oauth.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/mcp_server.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/message.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/mixins.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/organization.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/passage.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/prompt.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/provider.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/provider_trace.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/sandbox_config.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/source.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/sources_agents.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/sqlalchemy_base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/sqlite_functions.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/step.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/step_metrics.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/tool.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/tools_agents.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/orm/user.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/openai_backcompat → letta_nightly-0.11.5/letta/otel}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/context.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/db_pool_monitoring.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/events.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/metric_registry.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/metrics.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/resource.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/sqlalchemy_instrumentation.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/sqlalchemy_instrumentation_integration.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/otel/tracing.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/otel → letta_nightly-0.11.5/letta/personas}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/anna_pa.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/google_search_persona.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/memgpt_doc.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/memgpt_starter.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/o1_persona.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/sam.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/sam_pov.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/sam_simple_pov_gpt35.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/sleeptime_doc_persona.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/sleeptime_memory_persona.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/sqldb/test.db +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/personas/examples/voice_memory_persona.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/plugins/README.md +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/personas → letta_nightly-0.11.5/letta/plugins}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/plugins/defaults.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/plugins/plugins.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/plugins → letta_nightly-0.11.5/letta/prompts}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/gpt_summarize.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/gpt_system.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_base.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_chat.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_chat_compressed.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_chat_fstring.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_convo_only.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_doc.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_generate_tool.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_gpt35_extralong.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_intuitive_knowledge.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_memory_only.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_modified_chat.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_modified_o1.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_offline_memory.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_offline_memory_chat.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_sleeptime_chat.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/memgpt_v2_chat.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/react.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/sleeptime.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/sleeptime_doc_ingest.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/sleeptime_v2.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/summary_system_prompt.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/voice_chat.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/voice_sleeptime.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/prompts/system/workflow.txt +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/pytest.ini +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/archive.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/block.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/embedding_config.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/embedding_config_overrides.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/enums.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/environment_variables.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/folder.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/group.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/health.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/identity.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/letta_base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/letta_message_content.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/letta_ping.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/letta_response.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/letta_stop_reason.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/llm_batch_job.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/llm_config.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/llm_config_overrides.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/mcp.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/memory.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/npm_requirement.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/openai/chat_completion_request.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/openai/chat_completion_response.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/openai/chat_completions.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/openai/embedding_response.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/openai/openai.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/organization.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/passage.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/pip_requirement.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/prompt.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/provider_trace.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/anthropic.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/azure.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/cerebras.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/deepseek.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/google_gemini.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/google_vertex.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/groq.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/letta.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/lmstudio.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/mistral.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/ollama.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/openai.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/together.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/vllm.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers/xai.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/providers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/response_format.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/run.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/sandbox_config.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/source.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/source_metadata.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/step.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/step_metrics.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/tool.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/tool_execution_result.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/tool_rule.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/usage.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/schemas/user.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_agent.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_agent_environment_variable.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_block.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_custom_fields.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_message.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_tag.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/marshmallow_tool.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/serialize_schemas/pydantic_agent_schema.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/prompts → letta_nightly-0.11.5/letta/server}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/constants.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/db.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/generate_openapi_schema.sh +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/server → letta_nightly-0.11.5/letta/server/rest_api}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/app.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/server/rest_api → letta_nightly-0.11.5/letta/server/rest_api/auth}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/auth/index.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/auth_token.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/chat_completions_interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/json_parser.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/middleware/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/middleware/check_password.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/middleware/profiler_context.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/server/rest_api/auth → letta_nightly-0.11.5/letta/server/rest_api/routers}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/server/rest_api/routers → letta_nightly-0.11.5/letta/server/rest_api/routers/openai/chat_completions}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/openai/chat_completions/chat_completions.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/blocks.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/embeddings.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/groups.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/health.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/identities.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/jobs.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/llms.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/messages.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/organizations.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/providers.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/sandbox_configs.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/steps.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/tags.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/users.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/routers/v1/voice.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/static_files.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/rest_api/utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/startup.sh +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/static_files/assets/index-048c9598.js +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/static_files/assets/index-0e31b727.css +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/static_files/favicon.ico +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/static_files/index.html +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/static_files/memgpt_logo_transparent.png +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/server/rest_api/routers/openai/chat_completions → letta_nightly-0.11.5/letta/server/ws_api}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/ws_api/example_client.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/ws_api/interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/ws_api/protocol.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/server/ws_api/server.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/server/ws_api → letta_nightly-0.11.5/letta/services}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/agent_file_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/archive_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/block_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services → letta_nightly-0.11.5/letta/services/context_window_calculator}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/context_window_calculator/context_window_calculator.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/context_window_calculator/token_counter.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/context_window_calculator → letta_nightly-0.11.5/letta/services/file_processor}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/file_processor → letta_nightly-0.11.5/letta/services/file_processor/chunker}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/chunker/line_chunker.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/chunker/llama_index_chunker.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/file_processor/chunker → letta_nightly-0.11.5/letta/services/file_processor/embedder}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/embedder/base_embedder.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/embedder/openai_embedder.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/embedder/pinecone_embedder.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/file_types.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/file_processor/embedder → letta_nightly-0.11.5/letta/services/file_processor/parser}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/parser/base_parser.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/parser/markitdown_parser.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/parser/mistral_parser.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/file_processor/types.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/group_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/helpers/tool_execution_helper.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/identity_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/job_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/llm_batch_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/file_processor/parser → letta_nightly-0.11.5/letta/services/mcp}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/mcp/oauth_utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/mcp/types.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/message_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/organization_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/passage_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/per_agent_lock_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/provider_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/sandbox_config_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/step_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/mcp → letta_nightly-0.11.5/letta/services/summarizer}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/summarizer/enums.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/telemetry_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/summarizer → letta_nightly-0.11.5/letta/services/tool_executor}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/builtin_tool_executor.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/composio_tool_executor.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/core_tool_executor.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/multi_agent_tool_executor.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/sandbox_tool_executor.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/tool_execution_sandbox.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_executor/tool_executor_base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/tool_executor → letta_nightly-0.11.5/letta/services/tool_sandbox}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/base.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/e2b_sandbox.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/local_sandbox.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/modal_constants.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/modal_deployment_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/modal_sandbox.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/modal_sandbox_v2.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/modal_version_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/tool_sandbox/safe_pickle.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/services/user_manager.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/streaming_interface.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/streaming_utils.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/system.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222/letta/services/tool_sandbox → letta_nightly-0.11.5/letta/templates}/__init__.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/templates/sandbox_code_file.py.j2 +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/templates/sandbox_code_file_async.py.j2 +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/templates/summary_request_text.j2 +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/templates/template_helper.py +0 -0
- {letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/types/__init__.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: letta-nightly
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.5
|
4
4
|
Summary: Create LLM agents with long-term memory and custom tools
|
5
5
|
License: Apache License
|
6
6
|
Author: Letta Team
|
@@ -56,7 +56,7 @@ Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev" or extra == "all"
|
|
56
56
|
Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
|
57
57
|
Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "desktop" or extra == "all"
|
58
58
|
Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "desktop" or extra == "all"
|
59
|
-
Requires-Dist: letta_client (>=0.1.
|
59
|
+
Requires-Dist: letta_client (>=0.1.277,<0.2.0)
|
60
60
|
Requires-Dist: llama-index (>=0.12.2,<0.13.0)
|
61
61
|
Requires-Dist: llama-index-embeddings-openai (>=0.3.1,<0.4.0)
|
62
62
|
Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "desktop" or extra == "all"
|
@@ -42,6 +42,7 @@ from letta.log import get_logger
|
|
42
42
|
from letta.memory import summarize_messages
|
43
43
|
from letta.orm import User
|
44
44
|
from letta.otel.tracing import log_event, trace_method
|
45
|
+
from letta.prompts.prompt_generator import PromptGenerator
|
45
46
|
from letta.schemas.agent import AgentState, AgentStepResponse, UpdateAgent, get_prompt_template_for_agent_type
|
46
47
|
from letta.schemas.block import BlockUpdate
|
47
48
|
from letta.schemas.embedding_config import EmbeddingConfig
|
@@ -59,7 +60,7 @@ from letta.schemas.tool_rule import TerminalToolRule
|
|
59
60
|
from letta.schemas.usage import LettaUsageStatistics
|
60
61
|
from letta.services.agent_manager import AgentManager
|
61
62
|
from letta.services.block_manager import BlockManager
|
62
|
-
from letta.services.helpers.agent_manager_helper import check_supports_structured_output
|
63
|
+
from letta.services.helpers.agent_manager_helper import check_supports_structured_output
|
63
64
|
from letta.services.helpers.tool_parser_helper import runtime_override_tool_json_schema
|
64
65
|
from letta.services.job_manager import JobManager
|
65
66
|
from letta.services.mcp.base_client import AsyncBaseMCPClient
|
@@ -330,8 +331,13 @@ class Agent(BaseAgent):
|
|
330
331
|
return None
|
331
332
|
|
332
333
|
allowed_functions = [func for func in agent_state_tool_jsons if func["name"] in allowed_tool_names]
|
334
|
+
# Extract terminal tool names from tool rules
|
335
|
+
terminal_tool_names = {rule.tool_name for rule in self.tool_rules_solver.terminal_tool_rules}
|
333
336
|
allowed_functions = runtime_override_tool_json_schema(
|
334
|
-
tool_list=allowed_functions,
|
337
|
+
tool_list=allowed_functions,
|
338
|
+
response_format=self.agent_state.response_format,
|
339
|
+
request_heartbeat=True,
|
340
|
+
terminal_tools=terminal_tool_names,
|
335
341
|
)
|
336
342
|
|
337
343
|
# For the first message, force the initial tool if one is specified
|
@@ -1246,7 +1252,7 @@ class Agent(BaseAgent):
|
|
1246
1252
|
|
1247
1253
|
agent_manager_passage_size = self.agent_manager.passage_size(actor=self.user, agent_id=self.agent_state.id)
|
1248
1254
|
message_manager_size = self.message_manager.size(actor=self.user, agent_id=self.agent_state.id)
|
1249
|
-
external_memory_summary = compile_memory_metadata_block(
|
1255
|
+
external_memory_summary = PromptGenerator.compile_memory_metadata_block(
|
1250
1256
|
memory_edit_timestamp=get_utc_time(),
|
1251
1257
|
timezone=self.agent_state.timezone,
|
1252
1258
|
previous_message_count=self.message_manager.size(actor=self.user, agent_id=self.agent_state.id),
|
@@ -7,6 +7,7 @@ from letta.constants import DEFAULT_MAX_STEPS
|
|
7
7
|
from letta.helpers import ToolRulesSolver
|
8
8
|
from letta.helpers.datetime_helpers import get_utc_time
|
9
9
|
from letta.log import get_logger
|
10
|
+
from letta.prompts.prompt_generator import PromptGenerator
|
10
11
|
from letta.schemas.agent import AgentState
|
11
12
|
from letta.schemas.enums import MessageStreamStatus
|
12
13
|
from letta.schemas.letta_message import LegacyLettaMessage, LettaMessage
|
@@ -17,7 +18,6 @@ from letta.schemas.message import Message, MessageCreate, MessageUpdate
|
|
17
18
|
from letta.schemas.usage import LettaUsageStatistics
|
18
19
|
from letta.schemas.user import User
|
19
20
|
from letta.services.agent_manager import AgentManager
|
20
|
-
from letta.services.helpers.agent_manager_helper import get_system_message_from_compiled_memory
|
21
21
|
from letta.services.message_manager import MessageManager
|
22
22
|
from letta.services.passage_manager import PassageManager
|
23
23
|
from letta.utils import united_diff
|
@@ -142,7 +142,7 @@ class BaseAgent(ABC):
|
|
142
142
|
if num_archival_memories is None:
|
143
143
|
num_archival_memories = await self.passage_manager.agent_passage_size_async(actor=self.actor, agent_id=agent_state.id)
|
144
144
|
|
145
|
-
new_system_message_str = get_system_message_from_compiled_memory(
|
145
|
+
new_system_message_str = PromptGenerator.get_system_message_from_compiled_memory(
|
146
146
|
system_prompt=agent_state.system,
|
147
147
|
memory_with_sources=curr_memory_str,
|
148
148
|
in_context_memory_last_edit=memory_edit_timestamp,
|
@@ -137,6 +137,10 @@ class LettaAgent(BaseAgent):
|
|
137
137
|
message_buffer_limit=message_buffer_limit,
|
138
138
|
message_buffer_min=message_buffer_min,
|
139
139
|
partial_evict_summarizer_percentage=partial_evict_summarizer_percentage,
|
140
|
+
agent_manager=self.agent_manager,
|
141
|
+
message_manager=self.message_manager,
|
142
|
+
actor=self.actor,
|
143
|
+
agent_id=self.agent_id,
|
140
144
|
)
|
141
145
|
|
142
146
|
async def _check_run_cancellation(self) -> bool:
|
@@ -345,16 +349,17 @@ class LettaAgent(BaseAgent):
|
|
345
349
|
agent_step_span.end()
|
346
350
|
|
347
351
|
# Log LLM Trace
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
352
|
+
if settings.track_provider_trace:
|
353
|
+
await self.telemetry_manager.create_provider_trace_async(
|
354
|
+
actor=self.actor,
|
355
|
+
provider_trace_create=ProviderTraceCreate(
|
356
|
+
request_json=request_data,
|
357
|
+
response_json=response_data,
|
358
|
+
step_id=step_id, # Use original step_id for telemetry
|
359
|
+
organization_id=self.actor.organization_id,
|
360
|
+
),
|
361
|
+
)
|
362
|
+
step_progression = StepProgression.LOGGED_TRACE
|
358
363
|
|
359
364
|
# stream step
|
360
365
|
# TODO: improve TTFT
|
@@ -642,17 +647,18 @@ class LettaAgent(BaseAgent):
|
|
642
647
|
agent_step_span.end()
|
643
648
|
|
644
649
|
# Log LLM Trace
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
650
|
+
if settings.track_provider_trace:
|
651
|
+
await self.telemetry_manager.create_provider_trace_async(
|
652
|
+
actor=self.actor,
|
653
|
+
provider_trace_create=ProviderTraceCreate(
|
654
|
+
request_json=request_data,
|
655
|
+
response_json=response_data,
|
656
|
+
step_id=step_id, # Use original step_id for telemetry
|
657
|
+
organization_id=self.actor.organization_id,
|
658
|
+
),
|
659
|
+
)
|
660
|
+
step_progression = StepProgression.LOGGED_TRACE
|
654
661
|
|
655
|
-
step_progression = StepProgression.LOGGED_TRACE
|
656
662
|
MetricRegistry().step_execution_time_ms_histogram.record(get_utc_timestamp_ns() - step_start, get_ctx_attributes())
|
657
663
|
step_progression = StepProgression.FINISHED
|
658
664
|
|
@@ -1003,31 +1009,32 @@ class LettaAgent(BaseAgent):
|
|
1003
1009
|
# Log LLM Trace
|
1004
1010
|
# We are piecing together the streamed response here.
|
1005
1011
|
# Content here does not match the actual response schema as streams come in chunks.
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
"
|
1013
|
-
|
1012
|
+
if settings.track_provider_trace:
|
1013
|
+
await self.telemetry_manager.create_provider_trace_async(
|
1014
|
+
actor=self.actor,
|
1015
|
+
provider_trace_create=ProviderTraceCreate(
|
1016
|
+
request_json=request_data,
|
1017
|
+
response_json={
|
1018
|
+
"content": {
|
1019
|
+
"tool_call": tool_call.model_dump_json(),
|
1020
|
+
"reasoning": [content.model_dump_json() for content in reasoning_content],
|
1021
|
+
},
|
1022
|
+
"id": interface.message_id,
|
1023
|
+
"model": interface.model,
|
1024
|
+
"role": "assistant",
|
1025
|
+
# "stop_reason": "",
|
1026
|
+
# "stop_sequence": None,
|
1027
|
+
"type": "message",
|
1028
|
+
"usage": {
|
1029
|
+
"input_tokens": usage.prompt_tokens,
|
1030
|
+
"output_tokens": usage.completion_tokens,
|
1031
|
+
},
|
1014
1032
|
},
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
"type": "message",
|
1021
|
-
"usage": {
|
1022
|
-
"input_tokens": usage.prompt_tokens,
|
1023
|
-
"output_tokens": usage.completion_tokens,
|
1024
|
-
},
|
1025
|
-
},
|
1026
|
-
step_id=step_id, # Use original step_id for telemetry
|
1027
|
-
organization_id=self.actor.organization_id,
|
1028
|
-
),
|
1029
|
-
)
|
1030
|
-
step_progression = StepProgression.LOGGED_TRACE
|
1033
|
+
step_id=step_id, # Use original step_id for telemetry
|
1034
|
+
organization_id=self.actor.organization_id,
|
1035
|
+
),
|
1036
|
+
)
|
1037
|
+
step_progression = StepProgression.LOGGED_TRACE
|
1031
1038
|
|
1032
1039
|
# yields tool response as this is handled from Letta and not the response from the LLM provider
|
1033
1040
|
tool_return = [msg for msg in persisted_messages if msg.role == "tool"][-1].to_letta_messages()[0]
|
@@ -1352,6 +1359,7 @@ class LettaAgent(BaseAgent):
|
|
1352
1359
|
) -> list[Message]:
|
1353
1360
|
# If total tokens is reached, we truncate down
|
1354
1361
|
# TODO: This can be broken by bad configs, e.g. lower bound too high, initial messages too fat, etc.
|
1362
|
+
# TODO: `force` and `clear` seem to no longer be used, we should remove
|
1355
1363
|
if force or (total_tokens and total_tokens > llm_config.context_window):
|
1356
1364
|
self.logger.warning(
|
1357
1365
|
f"Total tokens {total_tokens} exceeds configured max tokens {llm_config.context_window}, forcefully clearing message history."
|
@@ -1363,6 +1371,7 @@ class LettaAgent(BaseAgent):
|
|
1363
1371
|
clear=True,
|
1364
1372
|
)
|
1365
1373
|
else:
|
1374
|
+
# NOTE (Sarah): Seems like this is doing nothing?
|
1366
1375
|
self.logger.info(
|
1367
1376
|
f"Total tokens {total_tokens} does not exceed configured max tokens {llm_config.context_window}, passing summarizing w/o force."
|
1368
1377
|
)
|
@@ -1453,8 +1462,10 @@ class LettaAgent(BaseAgent):
|
|
1453
1462
|
force_tool_call = valid_tool_names[0]
|
1454
1463
|
|
1455
1464
|
allowed_tools = [enable_strict_mode(t.json_schema) for t in tools if t.name in set(valid_tool_names)]
|
1465
|
+
# Extract terminal tool names from tool rules
|
1466
|
+
terminal_tool_names = {rule.tool_name for rule in tool_rules_solver.terminal_tool_rules}
|
1456
1467
|
allowed_tools = runtime_override_tool_json_schema(
|
1457
|
-
tool_list=allowed_tools, response_format=agent_state.response_format, request_heartbeat=True
|
1468
|
+
tool_list=allowed_tools, response_format=agent_state.response_format, request_heartbeat=True, terminal_tools=terminal_tool_names
|
1458
1469
|
)
|
1459
1470
|
|
1460
1471
|
return (
|
@@ -13,6 +13,7 @@ from letta.helpers.datetime_helpers import get_utc_time
|
|
13
13
|
from letta.helpers.tool_execution_helper import add_pre_execution_message, enable_strict_mode, remove_request_heartbeat
|
14
14
|
from letta.interfaces.openai_chat_completions_streaming_interface import OpenAIChatCompletionsStreamingInterface
|
15
15
|
from letta.log import get_logger
|
16
|
+
from letta.prompts.prompt_generator import PromptGenerator
|
16
17
|
from letta.schemas.agent import AgentState, AgentType
|
17
18
|
from letta.schemas.enums import MessageRole, ToolType
|
18
19
|
from letta.schemas.letta_response import LettaResponse
|
@@ -35,7 +36,6 @@ from letta.server.rest_api.utils import (
|
|
35
36
|
)
|
36
37
|
from letta.services.agent_manager import AgentManager
|
37
38
|
from letta.services.block_manager import BlockManager
|
38
|
-
from letta.services.helpers.agent_manager_helper import compile_system_message_async
|
39
39
|
from letta.services.job_manager import JobManager
|
40
40
|
from letta.services.message_manager import MessageManager
|
41
41
|
from letta.services.passage_manager import PassageManager
|
@@ -144,7 +144,7 @@ class VoiceAgent(BaseAgent):
|
|
144
144
|
|
145
145
|
in_context_messages = await self.message_manager.get_messages_by_ids_async(message_ids=agent_state.message_ids, actor=self.actor)
|
146
146
|
memory_edit_timestamp = get_utc_time()
|
147
|
-
in_context_messages[0].content[0].text = await compile_system_message_async(
|
147
|
+
in_context_messages[0].content[0].text = await PromptGenerator.compile_system_message_async(
|
148
148
|
system_prompt=agent_state.system,
|
149
149
|
in_context_memory=agent_state.memory,
|
150
150
|
in_context_memory_last_edit=memory_edit_timestamp,
|
{letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/data_sources/redis_client.py
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
import asyncio
|
2
2
|
from functools import wraps
|
3
|
-
from typing import Any, Optional, Set, Union
|
3
|
+
from typing import Any, Dict, List, Optional, Set, Union
|
4
4
|
|
5
5
|
from letta.constants import REDIS_EXCLUDE, REDIS_INCLUDE, REDIS_SET_DEFAULT_VAL
|
6
6
|
from letta.log import get_logger
|
@@ -218,6 +218,126 @@ class AsyncRedisClient:
|
|
218
218
|
client = await self.get_client()
|
219
219
|
return await client.decr(key)
|
220
220
|
|
221
|
+
# Stream operations
|
222
|
+
@with_retry()
|
223
|
+
async def xadd(self, stream: str, fields: Dict[str, Any], id: str = "*", maxlen: Optional[int] = None, approximate: bool = True) -> str:
|
224
|
+
"""Add entry to a stream.
|
225
|
+
|
226
|
+
Args:
|
227
|
+
stream: Stream name
|
228
|
+
fields: Dict of field-value pairs to add
|
229
|
+
id: Entry ID ('*' for auto-generation)
|
230
|
+
maxlen: Maximum length of the stream
|
231
|
+
approximate: Whether maxlen is approximate
|
232
|
+
|
233
|
+
Returns:
|
234
|
+
The ID of the added entry
|
235
|
+
"""
|
236
|
+
client = await self.get_client()
|
237
|
+
return await client.xadd(stream, fields, id=id, maxlen=maxlen, approximate=approximate)
|
238
|
+
|
239
|
+
@with_retry()
|
240
|
+
async def xread(self, streams: Dict[str, str], count: Optional[int] = None, block: Optional[int] = None) -> List[Dict]:
|
241
|
+
"""Read from streams.
|
242
|
+
|
243
|
+
Args:
|
244
|
+
streams: Dict mapping stream names to IDs
|
245
|
+
count: Maximum number of entries to return
|
246
|
+
block: Milliseconds to block waiting for data (None = no blocking)
|
247
|
+
|
248
|
+
Returns:
|
249
|
+
List of entries from the streams
|
250
|
+
"""
|
251
|
+
client = await self.get_client()
|
252
|
+
return await client.xread(streams, count=count, block=block)
|
253
|
+
|
254
|
+
@with_retry()
|
255
|
+
async def xrange(self, stream: str, start: str = "-", end: str = "+", count: Optional[int] = None) -> List[Dict]:
|
256
|
+
"""Read range of entries from a stream.
|
257
|
+
|
258
|
+
Args:
|
259
|
+
stream: Stream name
|
260
|
+
start: Start ID (inclusive)
|
261
|
+
end: End ID (inclusive)
|
262
|
+
count: Maximum number of entries to return
|
263
|
+
|
264
|
+
Returns:
|
265
|
+
List of entries in the specified range
|
266
|
+
"""
|
267
|
+
client = await self.get_client()
|
268
|
+
return await client.xrange(stream, start, end, count=count)
|
269
|
+
|
270
|
+
@with_retry()
|
271
|
+
async def xrevrange(self, stream: str, start: str = "+", end: str = "-", count: Optional[int] = None) -> List[Dict]:
|
272
|
+
"""Read range of entries from a stream in reverse order.
|
273
|
+
|
274
|
+
Args:
|
275
|
+
stream: Stream name
|
276
|
+
start: Start ID (inclusive)
|
277
|
+
end: End ID (inclusive)
|
278
|
+
count: Maximum number of entries to return
|
279
|
+
|
280
|
+
Returns:
|
281
|
+
List of entries in the specified range in reverse order
|
282
|
+
"""
|
283
|
+
client = await self.get_client()
|
284
|
+
return await client.xrevrange(stream, start, end, count=count)
|
285
|
+
|
286
|
+
@with_retry()
|
287
|
+
async def xlen(self, stream: str) -> int:
|
288
|
+
"""Get the length of a stream.
|
289
|
+
|
290
|
+
Args:
|
291
|
+
stream: Stream name
|
292
|
+
|
293
|
+
Returns:
|
294
|
+
Number of entries in the stream
|
295
|
+
"""
|
296
|
+
client = await self.get_client()
|
297
|
+
return await client.xlen(stream)
|
298
|
+
|
299
|
+
@with_retry()
|
300
|
+
async def xdel(self, stream: str, *ids: str) -> int:
|
301
|
+
"""Delete entries from a stream.
|
302
|
+
|
303
|
+
Args:
|
304
|
+
stream: Stream name
|
305
|
+
ids: IDs of entries to delete
|
306
|
+
|
307
|
+
Returns:
|
308
|
+
Number of entries deleted
|
309
|
+
"""
|
310
|
+
client = await self.get_client()
|
311
|
+
return await client.xdel(stream, *ids)
|
312
|
+
|
313
|
+
@with_retry()
|
314
|
+
async def xinfo_stream(self, stream: str) -> Dict:
|
315
|
+
"""Get information about a stream.
|
316
|
+
|
317
|
+
Args:
|
318
|
+
stream: Stream name
|
319
|
+
|
320
|
+
Returns:
|
321
|
+
Dict with stream information
|
322
|
+
"""
|
323
|
+
client = await self.get_client()
|
324
|
+
return await client.xinfo_stream(stream)
|
325
|
+
|
326
|
+
@with_retry()
|
327
|
+
async def xtrim(self, stream: str, maxlen: int, approximate: bool = True) -> int:
|
328
|
+
"""Trim a stream to a maximum length.
|
329
|
+
|
330
|
+
Args:
|
331
|
+
stream: Stream name
|
332
|
+
maxlen: Maximum length
|
333
|
+
approximate: Whether maxlen is approximate
|
334
|
+
|
335
|
+
Returns:
|
336
|
+
Number of entries removed
|
337
|
+
"""
|
338
|
+
client = await self.get_client()
|
339
|
+
return await client.xtrim(stream, maxlen=maxlen, approximate=approximate)
|
340
|
+
|
221
341
|
async def check_inclusion_and_exclusion(self, member: str, group: str) -> bool:
|
222
342
|
exclude_key = self._get_group_exclusion_key(group)
|
223
343
|
include_key = self._get_group_inclusion_key(group)
|
@@ -290,6 +410,31 @@ class NoopAsyncRedisClient(AsyncRedisClient):
|
|
290
410
|
async def srem(self, key: str, *members: Union[str, int, float]) -> int:
|
291
411
|
return 0
|
292
412
|
|
413
|
+
# Stream operations
|
414
|
+
async def xadd(self, stream: str, fields: Dict[str, Any], id: str = "*", maxlen: Optional[int] = None, approximate: bool = True) -> str:
|
415
|
+
return ""
|
416
|
+
|
417
|
+
async def xread(self, streams: Dict[str, str], count: Optional[int] = None, block: Optional[int] = None) -> List[Dict]:
|
418
|
+
return []
|
419
|
+
|
420
|
+
async def xrange(self, stream: str, start: str = "-", end: str = "+", count: Optional[int] = None) -> List[Dict]:
|
421
|
+
return []
|
422
|
+
|
423
|
+
async def xrevrange(self, stream: str, start: str = "+", end: str = "-", count: Optional[int] = None) -> List[Dict]:
|
424
|
+
return []
|
425
|
+
|
426
|
+
async def xlen(self, stream: str) -> int:
|
427
|
+
return 0
|
428
|
+
|
429
|
+
async def xdel(self, stream: str, *ids: str) -> int:
|
430
|
+
return 0
|
431
|
+
|
432
|
+
async def xinfo_stream(self, stream: str) -> Dict:
|
433
|
+
return {}
|
434
|
+
|
435
|
+
async def xtrim(self, stream: str, maxlen: int, approximate: bool = True) -> int:
|
436
|
+
return 0
|
437
|
+
|
293
438
|
|
294
439
|
async def get_redis_client() -> AsyncRedisClient:
|
295
440
|
global _client_instance
|
@@ -76,6 +76,10 @@ class LettaUserNotFoundError(LettaError):
|
|
76
76
|
"""Error raised when a user is not found."""
|
77
77
|
|
78
78
|
|
79
|
+
class LettaUnexpectedStreamCancellationError(LettaError):
|
80
|
+
"""Error raised when a streaming request is terminated unexpectedly."""
|
81
|
+
|
82
|
+
|
79
83
|
class LLMError(LettaError):
|
80
84
|
pass
|
81
85
|
|
@@ -21,8 +21,8 @@ async def open_files(agent_state: "AgentState", file_requests: List[FileOpenRequ
|
|
21
21
|
|
22
22
|
Open multiple files with different view ranges:
|
23
23
|
file_requests = [
|
24
|
-
FileOpenRequest(file_name="project_utils/config.py", offset=
|
25
|
-
FileOpenRequest(file_name="project_utils/main.py", offset=100, length=100), # Lines
|
24
|
+
FileOpenRequest(file_name="project_utils/config.py", offset=0, length=50), # Lines 1-50
|
25
|
+
FileOpenRequest(file_name="project_utils/main.py", offset=100, length=100), # Lines 101-200
|
26
26
|
FileOpenRequest(file_name="project_utils/utils.py") # Entire file
|
27
27
|
]
|
28
28
|
|
{letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/mcp_client/types.py
RENAMED
@@ -148,9 +148,21 @@ class SSEServerConfig(BaseServerConfig):
|
|
148
148
|
custom_headers: Optional[dict[str, str]] = Field(None, description="Custom HTTP headers to include with SSE requests")
|
149
149
|
|
150
150
|
def resolve_token(self) -> Optional[str]:
|
151
|
-
|
152
|
-
|
153
|
-
|
151
|
+
"""
|
152
|
+
Extract token for storage if auth_header/auth_token are provided
|
153
|
+
and not already in custom_headers.
|
154
|
+
|
155
|
+
Returns:
|
156
|
+
The resolved token (without Bearer prefix) if it should be stored separately, None otherwise
|
157
|
+
"""
|
158
|
+
if self.auth_token and self.auth_header:
|
159
|
+
# Check if custom_headers already has the auth header
|
160
|
+
if not self.custom_headers or self.auth_header not in self.custom_headers:
|
161
|
+
# Strip Bearer prefix if present
|
162
|
+
if self.auth_token.startswith(f"{MCP_AUTH_TOKEN_BEARER_PREFIX} "):
|
163
|
+
return self.auth_token[len(f"{MCP_AUTH_TOKEN_BEARER_PREFIX} ") :]
|
164
|
+
return self.auth_token
|
165
|
+
return None
|
154
166
|
|
155
167
|
def resolve_environment_variables(self, environment_variables: Optional[Dict[str, str]] = None) -> None:
|
156
168
|
if self.auth_token and super().is_templated_tool_variable(self.auth_token):
|
@@ -217,9 +229,21 @@ class StreamableHTTPServerConfig(BaseServerConfig):
|
|
217
229
|
custom_headers: Optional[dict[str, str]] = Field(None, description="Custom HTTP headers to include with streamable HTTP requests")
|
218
230
|
|
219
231
|
def resolve_token(self) -> Optional[str]:
|
220
|
-
|
221
|
-
|
222
|
-
|
232
|
+
"""
|
233
|
+
Extract token for storage if auth_header/auth_token are provided
|
234
|
+
and not already in custom_headers.
|
235
|
+
|
236
|
+
Returns:
|
237
|
+
The resolved token (without Bearer prefix) if it should be stored separately, None otherwise
|
238
|
+
"""
|
239
|
+
if self.auth_token and self.auth_header:
|
240
|
+
# Check if custom_headers already has the auth header
|
241
|
+
if not self.custom_headers or self.auth_header not in self.custom_headers:
|
242
|
+
# Strip Bearer prefix if present
|
243
|
+
if self.auth_token.startswith(f"{MCP_AUTH_TOKEN_BEARER_PREFIX} "):
|
244
|
+
return self.auth_token[len(f"{MCP_AUTH_TOKEN_BEARER_PREFIX} ") :]
|
245
|
+
return self.auth_token
|
246
|
+
return None
|
223
247
|
|
224
248
|
def resolve_environment_variables(self, environment_variables: Optional[Dict[str, str]] = None) -> None:
|
225
249
|
if self.auth_token and super().is_templated_tool_variable(self.auth_token):
|
{letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/schema_generator.py
RENAMED
@@ -608,13 +608,58 @@ def generate_tool_schema_for_mcp(
|
|
608
608
|
# Normalise so downstream code can treat it consistently.
|
609
609
|
parameters_schema.setdefault("required", [])
|
610
610
|
|
611
|
+
# Process properties to handle anyOf types and make optional fields strict-compatible
|
612
|
+
if "properties" in parameters_schema:
|
613
|
+
for field_name, field_props in parameters_schema["properties"].items():
|
614
|
+
# Handle anyOf types by flattening to type array
|
615
|
+
if "anyOf" in field_props and "type" not in field_props:
|
616
|
+
types = []
|
617
|
+
format_value = None
|
618
|
+
for option in field_props["anyOf"]:
|
619
|
+
if "type" in option:
|
620
|
+
types.append(option["type"])
|
621
|
+
# Capture format if present (e.g., uuid format for strings)
|
622
|
+
if "format" in option and not format_value:
|
623
|
+
format_value = option["format"]
|
624
|
+
if types:
|
625
|
+
# Deduplicate types using set
|
626
|
+
field_props["type"] = list(set(types))
|
627
|
+
# Only add format if the field is not optional (doesn't have null type)
|
628
|
+
if format_value and len(field_props["type"]) == 1 and "null" not in field_props["type"]:
|
629
|
+
field_props["format"] = format_value
|
630
|
+
# Remove the anyOf since we've flattened it
|
631
|
+
del field_props["anyOf"]
|
632
|
+
|
633
|
+
# For strict mode: heal optional fields by making them required with null type
|
634
|
+
if strict and field_name not in parameters_schema["required"]:
|
635
|
+
# Field is optional - add it to required array
|
636
|
+
parameters_schema["required"].append(field_name)
|
637
|
+
|
638
|
+
# Ensure the field can accept null to maintain optionality
|
639
|
+
if "type" in field_props:
|
640
|
+
if isinstance(field_props["type"], list):
|
641
|
+
# Already an array of types - add null if not present
|
642
|
+
if "null" not in field_props["type"]:
|
643
|
+
field_props["type"].append("null")
|
644
|
+
# Deduplicate
|
645
|
+
field_props["type"] = list(set(field_props["type"]))
|
646
|
+
elif field_props["type"] != "null":
|
647
|
+
# Single type - convert to array with null
|
648
|
+
field_props["type"] = list(set([field_props["type"], "null"]))
|
649
|
+
elif "anyOf" in field_props:
|
650
|
+
# If there's still an anyOf, ensure null is one of the options
|
651
|
+
has_null = any(opt.get("type") == "null" for opt in field_props["anyOf"])
|
652
|
+
if not has_null:
|
653
|
+
field_props["anyOf"].append({"type": "null"})
|
654
|
+
|
611
655
|
# Add the optional heartbeat parameter
|
612
656
|
if append_heartbeat:
|
613
657
|
parameters_schema["properties"][REQUEST_HEARTBEAT_PARAM] = {
|
614
658
|
"type": "boolean",
|
615
659
|
"description": REQUEST_HEARTBEAT_DESCRIPTION,
|
616
660
|
}
|
617
|
-
parameters_schema["required"]
|
661
|
+
if REQUEST_HEARTBEAT_PARAM not in parameters_schema["required"]:
|
662
|
+
parameters_schema["required"].append(REQUEST_HEARTBEAT_PARAM)
|
618
663
|
|
619
664
|
# Return the final schema
|
620
665
|
if strict:
|
{letta_nightly-0.11.4.dev20250825104222 → letta_nightly-0.11.5}/letta/functions/schema_validator.py
RENAMED
@@ -116,15 +116,21 @@ def validate_complete_json_schema(schema: Dict[str, Any]) -> Tuple[SchemaHealth,
|
|
116
116
|
|
117
117
|
required = node.get("required")
|
118
118
|
if required is None:
|
119
|
+
# TODO: @jnjpng skip this check for now, seems like OpenAI strict mode doesn't enforce this
|
119
120
|
# Only mark as non-strict for nested objects, not root
|
120
|
-
if not is_root:
|
121
|
-
|
121
|
+
# if not is_root:
|
122
|
+
# mark_non_strict(f"{path}: 'required' not specified for object")
|
122
123
|
required = []
|
123
124
|
elif not isinstance(required, list):
|
124
125
|
mark_invalid(f"{path}: 'required' must be a list if present")
|
125
126
|
required = []
|
126
127
|
|
127
128
|
# OpenAI strict-mode extra checks:
|
129
|
+
# NOTE: We no longer flag properties not in required array as non-strict
|
130
|
+
# because we can heal these schemas by adding null to the type union
|
131
|
+
# This allows MCP tools with optional fields to be used with strict mode
|
132
|
+
# The healing happens in generate_tool_schema_for_mcp() when strict=True
|
133
|
+
|
128
134
|
for req_key in required:
|
129
135
|
if props and req_key not in props:
|
130
136
|
mark_invalid(f"{path}: required contains '{req_key}' not found in properties")
|
@@ -161,6 +167,15 @@ def validate_complete_json_schema(schema: Dict[str, Any]) -> Tuple[SchemaHealth,
|
|
161
167
|
# These are generally fine, but check for specific constraints
|
162
168
|
pass
|
163
169
|
|
170
|
+
# TYPE ARRAYS (e.g., ["string", "null"] for optional fields)
|
171
|
+
elif isinstance(node_type, list):
|
172
|
+
# Type arrays are allowed in OpenAI strict mode
|
173
|
+
# They represent union types (e.g., string | null)
|
174
|
+
for t in node_type:
|
175
|
+
# TODO: @jnjpng handle enum types?
|
176
|
+
if t not in ["string", "number", "integer", "boolean", "null", "array", "object"]:
|
177
|
+
mark_invalid(f"{path}: Invalid type '{t}' in type array")
|
178
|
+
|
164
179
|
# UNION TYPES
|
165
180
|
for kw in ("anyOf", "oneOf", "allOf"):
|
166
181
|
if kw in node:
|
@@ -11,7 +11,7 @@ class SearchTask(BaseModel):
|
|
11
11
|
class FileOpenRequest(BaseModel):
|
12
12
|
file_name: str = Field(description="Name of the file to open")
|
13
13
|
offset: Optional[int] = Field(
|
14
|
-
default=None, description="Optional starting line number (
|
14
|
+
default=None, description="Optional offset for starting line number (0-indexed). If not specified, starts from beginning of file."
|
15
15
|
)
|
16
16
|
length: Optional[int] = Field(
|
17
17
|
default=None, description="Optional number of lines to view from offset (inclusive). If not specified, views to end of file."
|
@@ -39,12 +39,10 @@ def enable_strict_mode(tool_schema: Dict[str, Any]) -> Dict[str, Any]:
|
|
39
39
|
|
40
40
|
# Ensure parameters is a valid dictionary
|
41
41
|
parameters = schema.get("parameters", {})
|
42
|
-
|
43
42
|
if isinstance(parameters, dict) and parameters.get("type") == "object":
|
44
43
|
# Set additionalProperties to False
|
45
44
|
parameters["additionalProperties"] = False
|
46
45
|
schema["parameters"] = parameters
|
47
|
-
|
48
46
|
# Remove the metadata fields from the schema
|
49
47
|
schema.pop(MCP_TOOL_METADATA_SCHEMA_STATUS, None)
|
50
48
|
schema.pop(MCP_TOOL_METADATA_SCHEMA_WARNINGS, None)
|