letta-client 0.1.226__py3-none-any.whl → 1.7.2__py3-none-any.whl
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_client/__init__.py +91 -672
- letta_client/_base_client.py +2125 -0
- letta_client/_client.py +1136 -0
- letta_client/_compat.py +219 -0
- letta_client/_constants.py +14 -0
- letta_client/_exceptions.py +108 -0
- letta_client/_files.py +123 -0
- letta_client/_models.py +872 -0
- letta_client/_qs.py +150 -0
- letta_client/_resource.py +43 -0
- letta_client/_response.py +832 -0
- letta_client/_streaming.py +371 -0
- letta_client/_types.py +270 -0
- letta_client/_utils/__init__.py +64 -0
- letta_client/_utils/_compat.py +45 -0
- letta_client/_utils/_datetime_parse.py +136 -0
- letta_client/_utils/_logs.py +25 -0
- letta_client/_utils/_proxy.py +65 -0
- letta_client/_utils/_reflection.py +42 -0
- letta_client/_utils/_resources_proxy.py +24 -0
- letta_client/_utils/_streams.py +12 -0
- letta_client/_utils/_sync.py +58 -0
- letta_client/_utils/_transform.py +457 -0
- letta_client/_utils/_typing.py +156 -0
- letta_client/_utils/_utils.py +421 -0
- letta_client/_version.py +4 -0
- letta_client/lib/.keep +4 -0
- letta_client/pagination.py +280 -0
- letta_client/resources/__init__.py +215 -0
- letta_client/resources/access_tokens.py +396 -0
- letta_client/resources/agents/__init__.py +131 -0
- letta_client/resources/agents/agents.py +2148 -0
- letta_client/resources/agents/archives.py +260 -0
- letta_client/resources/agents/blocks.py +736 -0
- letta_client/resources/agents/files.py +541 -0
- letta_client/resources/agents/folders.py +422 -0
- letta_client/resources/agents/identities.py +260 -0
- letta_client/resources/agents/messages.py +1800 -0
- letta_client/resources/agents/passages.py +638 -0
- letta_client/resources/agents/tools.py +651 -0
- letta_client/resources/archives/__init__.py +33 -0
- letta_client/resources/archives/archives.py +650 -0
- letta_client/resources/archives/passages.py +309 -0
- letta_client/resources/blocks/__init__.py +33 -0
- letta_client/resources/blocks/agents.py +289 -0
- letta_client/resources/blocks/blocks.py +977 -0
- letta_client/resources/conversations/__init__.py +33 -0
- letta_client/resources/conversations/conversations.py +611 -0
- letta_client/resources/conversations/messages.py +650 -0
- letta_client/resources/folders/__init__.py +47 -0
- letta_client/resources/folders/agents.py +234 -0
- letta_client/resources/folders/files.py +581 -0
- letta_client/resources/folders/folders.py +734 -0
- letta_client/resources/mcp_servers/__init__.py +33 -0
- letta_client/resources/mcp_servers/mcp_servers.py +670 -0
- letta_client/resources/mcp_servers/tools.py +351 -0
- letta_client/resources/messages.py +455 -0
- letta_client/resources/models/__init__.py +33 -0
- letta_client/resources/models/embeddings.py +149 -0
- letta_client/resources/models/models.py +233 -0
- letta_client/resources/passages.py +259 -0
- letta_client/resources/runs/__init__.py +75 -0
- letta_client/resources/runs/messages.py +363 -0
- letta_client/resources/runs/runs.py +502 -0
- letta_client/resources/runs/steps.py +229 -0
- letta_client/resources/runs/trace.py +197 -0
- letta_client/resources/runs/usage.py +163 -0
- letta_client/resources/steps/__init__.py +75 -0
- letta_client/resources/steps/feedback.py +198 -0
- letta_client/resources/steps/messages.py +237 -0
- letta_client/resources/steps/metrics.py +167 -0
- letta_client/resources/steps/steps.py +505 -0
- letta_client/resources/steps/trace.py +169 -0
- letta_client/resources/tags.py +240 -0
- letta_client/resources/templates/__init__.py +33 -0
- letta_client/resources/templates/agents.py +229 -0
- letta_client/resources/templates/templates.py +540 -0
- letta_client/resources/tools.py +1721 -0
- letta_client/types/__init__.py +148 -530
- letta_client/types/access_token_create_params.py +32 -0
- letta_client/types/access_token_create_response.py +34 -0
- letta_client/types/access_token_delete_params.py +11 -0
- letta_client/types/access_token_list_params.py +23 -0
- letta_client/types/access_token_list_response.py +40 -0
- letta_client/types/agent_create_params.py +444 -0
- letta_client/types/agent_environment_variable.py +40 -63
- letta_client/types/agent_export_file_params.py +26 -0
- letta_client/types/agent_export_file_response.py +7 -0
- letta_client/types/agent_import_file_params.py +57 -0
- letta_client/types/agent_import_file_response.py +14 -0
- letta_client/types/agent_list_params.py +100 -0
- letta_client/types/agent_retrieve_params.py +37 -0
- letta_client/types/agent_state.py +651 -138
- letta_client/types/agent_type.py +14 -14
- letta_client/types/agent_update_params.py +386 -0
- letta_client/types/agents/__init__.py +76 -0
- letta_client/types/agents/approval_create_param.py +35 -0
- letta_client/types/agents/approval_request_message.py +57 -0
- letta_client/types/agents/approval_response_message.py +61 -0
- letta_client/types/agents/approval_return.py +22 -0
- letta_client/types/agents/approval_return_param.py +22 -0
- letta_client/types/agents/assistant_message.py +48 -0
- letta_client/types/agents/block.py +68 -0
- letta_client/types/agents/block_list_params.py +34 -0
- letta_client/types/agents/block_update_params.py +63 -0
- letta_client/types/agents/event_message.py +40 -0
- letta_client/types/agents/file_close_all_response.py +8 -0
- letta_client/types/agents/file_list_params.py +40 -0
- letta_client/types/agents/file_list_response.py +42 -0
- letta_client/types/agents/file_open_response.py +8 -0
- letta_client/types/agents/folder_list_params.py +34 -0
- letta_client/types/agents/folder_list_response.py +49 -0
- letta_client/types/agents/hidden_reasoning_message.py +49 -0
- letta_client/types/agents/image_content.py +67 -0
- letta_client/types/agents/image_content_param.py +64 -0
- letta_client/types/agents/internal_message.py +271 -0
- letta_client/types/agents/job_status.py +7 -0
- letta_client/types/agents/job_type.py +7 -0
- letta_client/types/agents/letta_assistant_message_content_union.py +19 -0
- letta_client/types/agents/letta_response.py +76 -0
- letta_client/types/agents/letta_streaming_response.py +155 -0
- letta_client/types/agents/letta_user_message_content_union.py +14 -0
- letta_client/types/agents/message.py +36 -0
- letta_client/types/agents/message_cancel_params.py +15 -0
- letta_client/types/agents/message_cancel_response.py +8 -0
- letta_client/types/agents/message_compact_params.py +145 -0
- letta_client/types/agents/message_compact_response.py +13 -0
- letta_client/types/agents/message_create_async_params.py +145 -0
- letta_client/types/agents/message_create_params.py +181 -0
- letta_client/types/agents/message_list_params.py +55 -0
- letta_client/types/agents/message_reset_params.py +12 -0
- letta_client/types/agents/message_role.py +7 -0
- letta_client/types/agents/message_stream_params.py +166 -0
- letta_client/types/agents/message_type.py +17 -0
- letta_client/types/agents/omitted_reasoning_content.py +20 -0
- letta_client/types/agents/omitted_reasoning_content_param.py +20 -0
- letta_client/types/agents/passage_create_params.py +23 -0
- letta_client/types/agents/passage_create_response.py +10 -0
- letta_client/types/agents/passage_list_params.py +28 -0
- letta_client/types/agents/passage_list_response.py +10 -0
- letta_client/types/agents/passage_search_params.py +35 -0
- letta_client/types/agents/passage_search_response.py +29 -0
- letta_client/types/agents/reasoning_content.py +27 -0
- letta_client/types/agents/reasoning_content_param.py +27 -0
- letta_client/types/agents/reasoning_message.py +50 -0
- letta_client/types/agents/redacted_reasoning_content.py +18 -0
- letta_client/types/agents/redacted_reasoning_content_param.py +17 -0
- letta_client/types/agents/run.py +91 -0
- letta_client/types/agents/summary_message.py +38 -0
- letta_client/types/agents/system_message.py +46 -0
- letta_client/types/agents/text_content.py +19 -0
- letta_client/types/agents/text_content_param.py +19 -0
- letta_client/types/agents/tool_call.py +13 -0
- letta_client/types/agents/tool_call_content.py +28 -0
- letta_client/types/agents/tool_call_content_param.py +28 -0
- letta_client/types/agents/tool_call_delta.py +15 -0
- letta_client/types/agents/tool_call_message.py +52 -0
- letta_client/types/agents/tool_execution_result.py +33 -0
- letta_client/types/agents/tool_list_params.py +34 -0
- letta_client/types/agents/tool_return.py +29 -0
- letta_client/types/agents/tool_return_content.py +22 -0
- letta_client/types/agents/tool_return_content_param.py +21 -0
- letta_client/types/agents/tool_return_param.py +30 -0
- letta_client/types/agents/tool_run_params.py +16 -0
- letta_client/types/agents/tool_update_approval_params.py +21 -0
- letta_client/types/agents/user_message.py +50 -0
- letta_client/types/anthropic_model_settings.py +62 -0
- letta_client/types/anthropic_model_settings_param.py +59 -0
- letta_client/types/archive.py +46 -0
- letta_client/types/archive_create_params.py +22 -0
- letta_client/types/archive_list_params.py +40 -0
- letta_client/types/archive_update_params.py +14 -0
- letta_client/types/archives/__init__.py +5 -0
- letta_client/types/archives/passage_create_params.py +21 -0
- letta_client/types/azure_model_settings.py +36 -0
- letta_client/types/azure_model_settings_param.py +33 -0
- letta_client/types/bedrock_model_settings.py +36 -0
- letta_client/types/bedrock_model_settings_param.py +33 -0
- letta_client/types/block_create_params.py +59 -0
- letta_client/types/block_list_params.py +102 -0
- letta_client/types/block_response.py +66 -0
- letta_client/types/block_update_params.py +60 -0
- letta_client/types/blocks/__init__.py +5 -0
- letta_client/types/blocks/agent_list_params.py +61 -0
- letta_client/types/child_tool_rule.py +37 -26
- letta_client/types/child_tool_rule_param.py +50 -0
- letta_client/types/conditional_tool_rule.py +19 -35
- letta_client/types/conditional_tool_rule_param.py +31 -0
- letta_client/types/continue_tool_rule.py +13 -23
- letta_client/types/continue_tool_rule_param.py +22 -0
- letta_client/types/conversation.py +42 -0
- letta_client/types/conversation_cancel_response.py +8 -0
- letta_client/types/conversation_create_params.py +25 -0
- letta_client/types/conversation_list_params.py +19 -0
- letta_client/types/conversation_list_response.py +10 -0
- letta_client/types/conversation_update_params.py +13 -0
- letta_client/types/conversations/__init__.py +7 -0
- letta_client/types/conversations/message_create_params.py +166 -0
- letta_client/types/conversations/message_list_params.py +43 -0
- letta_client/types/conversations/message_stream_params.py +28 -0
- letta_client/types/create_block_param.py +61 -0
- letta_client/types/create_sse_mcp_server_param.py +26 -0
- letta_client/types/create_stdio_mcp_server_param.py +25 -0
- letta_client/types/create_streamable_http_mcp_server_param.py +26 -0
- letta_client/types/deepseek_model_settings.py +36 -0
- letta_client/types/deepseek_model_settings_param.py +33 -0
- letta_client/types/embedding_config.py +47 -67
- letta_client/types/embedding_config_param.py +64 -0
- letta_client/types/embedding_model.py +81 -0
- letta_client/types/folder.py +28 -66
- letta_client/types/folder_create_params.py +33 -0
- letta_client/types/folder_list_params.py +37 -0
- letta_client/types/folder_update_params.py +27 -0
- letta_client/types/folders/__init__.py +12 -0
- letta_client/types/folders/agent_list_params.py +34 -0
- letta_client/types/folders/agent_list_response.py +8 -0
- letta_client/types/folders/file_list_params.py +37 -0
- letta_client/types/folders/file_list_response.py +70 -0
- letta_client/types/folders/file_retrieve_params.py +15 -0
- letta_client/types/folders/file_retrieve_response.py +70 -0
- letta_client/types/folders/file_upload_params.py +20 -0
- letta_client/types/folders/file_upload_response.py +70 -0
- letta_client/types/google_ai_model_settings.py +47 -0
- letta_client/types/google_ai_model_settings_param.py +44 -0
- letta_client/types/google_vertex_model_settings.py +47 -0
- letta_client/types/google_vertex_model_settings_param.py +44 -0
- letta_client/types/groq_model_settings.py +36 -0
- letta_client/types/groq_model_settings_param.py +33 -0
- letta_client/types/health_response.py +13 -0
- letta_client/types/init_tool_rule.py +24 -24
- letta_client/types/init_tool_rule_param.py +32 -0
- letta_client/types/json_object_response_format.py +9 -17
- letta_client/types/json_object_response_format_param.py +14 -0
- letta_client/types/json_schema_response_format.py +12 -21
- letta_client/types/json_schema_response_format_param.py +18 -0
- letta_client/types/letta_message_content_union_param.py +26 -0
- letta_client/types/llm_config.py +124 -75
- letta_client/types/llm_config_param.py +155 -0
- letta_client/types/max_count_per_step_tool_rule.py +16 -25
- letta_client/types/max_count_per_step_tool_rule_param.py +28 -0
- letta_client/types/mcp_server_create_params.py +23 -0
- letta_client/types/mcp_server_create_response.py +12 -0
- letta_client/types/mcp_server_list_response.py +14 -0
- letta_client/types/mcp_server_refresh_params.py +12 -0
- letta_client/types/mcp_server_retrieve_response.py +12 -0
- letta_client/types/mcp_server_update_params.py +23 -0
- letta_client/types/mcp_server_update_response.py +12 -0
- letta_client/types/mcp_servers/__init__.py +6 -0
- letta_client/types/mcp_servers/tool_list_response.py +10 -0
- letta_client/types/mcp_servers/tool_run_params.py +15 -0
- letta_client/types/message_create_param.py +38 -0
- letta_client/types/message_list_params.py +34 -0
- letta_client/types/message_list_response.py +10 -0
- letta_client/types/message_retrieve_response.py +10 -0
- letta_client/types/message_search_params.py +34 -0
- letta_client/types/message_search_response.py +124 -0
- letta_client/types/model.py +148 -0
- letta_client/types/model_list_params.py +19 -0
- letta_client/types/model_list_response.py +10 -0
- letta_client/types/models/__init__.py +5 -0
- letta_client/types/models/embedding_list_response.py +10 -0
- letta_client/types/npm_requirement.py +15 -0
- letta_client/types/npm_requirement_param.py +16 -0
- letta_client/types/openai_model_settings.py +51 -0
- letta_client/types/openai_model_settings_param.py +48 -0
- letta_client/types/parent_tool_rule.py +15 -27
- letta_client/types/parent_tool_rule_param.py +27 -0
- letta_client/types/passage.py +56 -101
- letta_client/types/passage_search_params.py +41 -0
- letta_client/types/passage_search_response.py +25 -0
- letta_client/types/pip_requirement.py +9 -21
- letta_client/types/pip_requirement_param.py +16 -0
- letta_client/types/provider_category.py +5 -3
- letta_client/types/provider_trace.py +43 -48
- letta_client/types/provider_type.py +25 -23
- letta_client/types/required_before_exit_tool_rule.py +13 -23
- letta_client/types/required_before_exit_tool_rule_param.py +22 -0
- letta_client/types/requires_approval_tool_rule.py +25 -0
- letta_client/types/requires_approval_tool_rule_param.py +25 -0
- letta_client/types/run_list_params.py +67 -0
- letta_client/types/runs/__init__.py +10 -0
- letta_client/types/runs/message_list_params.py +34 -0
- letta_client/types/runs/message_stream_params.py +28 -0
- letta_client/types/runs/step_list_params.py +28 -0
- letta_client/types/runs/trace_retrieve_params.py +12 -0
- letta_client/types/runs/trace_retrieve_response.py +8 -0
- letta_client/types/runs/usage_retrieve_response.py +31 -0
- letta_client/types/sse_mcp_server.py +32 -0
- letta_client/types/stdio_mcp_server.py +29 -0
- letta_client/types/step.py +71 -97
- letta_client/types/step_list_params.py +57 -0
- letta_client/types/steps/__init__.py +8 -0
- letta_client/types/steps/feedback_create_params.py +18 -0
- letta_client/types/steps/message_list_params.py +34 -0
- letta_client/types/steps/message_list_response.py +36 -0
- letta_client/types/steps/metric_retrieve_response.py +45 -0
- letta_client/types/stop_reason_type.py +17 -5
- letta_client/types/streamable_http_mcp_server.py +32 -0
- letta_client/types/tag_list_params.py +40 -0
- letta_client/types/tag_list_response.py +8 -0
- letta_client/types/template_create_params.py +46 -0
- letta_client/types/template_create_response.py +29 -0
- letta_client/types/template_delete_response.py +9 -0
- letta_client/types/template_update_params.py +25 -0
- letta_client/types/template_update_response.py +13 -0
- letta_client/types/templates/__init__.py +6 -0
- letta_client/types/templates/agent_create_params.py +50 -0
- letta_client/types/templates/agent_create_response.py +20 -0
- letta_client/types/terminal_tool_rule.py +13 -23
- letta_client/types/terminal_tool_rule_param.py +22 -0
- letta_client/types/text_response_format.py +9 -17
- letta_client/types/text_response_format_param.py +14 -0
- letta_client/types/together_model_settings.py +36 -0
- letta_client/types/together_model_settings_param.py +33 -0
- letta_client/types/tool.py +154 -81
- letta_client/types/tool_create_params.py +53 -0
- letta_client/types/tool_list_params.py +57 -0
- letta_client/types/tool_return_message.py +44 -31
- letta_client/types/tool_search_params.py +27 -0
- letta_client/types/tool_search_response.py +10 -0
- letta_client/types/tool_search_result.py +27 -0
- letta_client/types/tool_type.py +16 -17
- letta_client/types/tool_update_params.py +57 -0
- letta_client/types/tool_upsert_params.py +53 -0
- letta_client/types/update_sse_mcp_server_param.py +26 -0
- letta_client/types/update_stdio_mcp_server_param.py +25 -0
- letta_client/types/update_streamable_http_mcp_server_param.py +26 -0
- letta_client/types/vector_db_provider.py +7 -0
- letta_client/types/xai_model_settings.py +36 -0
- letta_client/types/xai_model_settings_param.py +33 -0
- letta_client-1.7.2.dist-info/METADATA +436 -0
- letta_client-1.7.2.dist-info/RECORD +335 -0
- {letta_client-0.1.226.dist-info → letta_client-1.7.2.dist-info}/WHEEL +1 -1
- letta_client-1.7.2.dist-info/licenses/LICENSE +201 -0
- letta_client/agents/__init__.py +0 -77
- letta_client/agents/blocks/__init__.py +0 -2
- letta_client/agents/blocks/client.py +0 -793
- letta_client/agents/client.py +0 -2371
- letta_client/agents/context/__init__.py +0 -2
- letta_client/agents/context/client.py +0 -149
- letta_client/agents/core_memory/__init__.py +0 -2
- letta_client/agents/core_memory/client.py +0 -147
- letta_client/agents/files/__init__.py +0 -2
- letta_client/agents/files/client.py +0 -430
- letta_client/agents/folders/__init__.py +0 -2
- letta_client/agents/folders/client.py +0 -412
- letta_client/agents/groups/__init__.py +0 -2
- letta_client/agents/groups/client.py +0 -169
- letta_client/agents/memory_variables/__init__.py +0 -5
- letta_client/agents/memory_variables/client.py +0 -152
- letta_client/agents/memory_variables/types/__init__.py +0 -5
- letta_client/agents/memory_variables/types/memory_variables_list_response.py +0 -19
- letta_client/agents/messages/__init__.py +0 -15
- letta_client/agents/messages/client.py +0 -1638
- letta_client/agents/messages/types/__init__.py +0 -13
- letta_client/agents/messages/types/letta_streaming_response.py +0 -22
- letta_client/agents/messages/types/messages_modify_request.py +0 -11
- letta_client/agents/messages/types/messages_modify_response.py +0 -20
- letta_client/agents/messages/types/messages_preview_raw_payload_request.py +0 -7
- letta_client/agents/passages/__init__.py +0 -2
- letta_client/agents/passages/client.py +0 -793
- letta_client/agents/sources/__init__.py +0 -2
- letta_client/agents/sources/client.py +0 -412
- letta_client/agents/templates/__init__.py +0 -5
- letta_client/agents/templates/client.py +0 -588
- letta_client/agents/templates/types/__init__.py +0 -7
- letta_client/agents/templates/types/templates_create_response.py +0 -22
- letta_client/agents/templates/types/templates_create_version_request_return_agent_state.py +0 -5
- letta_client/agents/templates/types/templates_migrate_response.py +0 -19
- letta_client/agents/tools/__init__.py +0 -2
- letta_client/agents/tools/client.py +0 -412
- letta_client/agents/types/__init__.py +0 -33
- letta_client/agents/types/agents_search_request_search_item.py +0 -16
- letta_client/agents/types/agents_search_request_search_item_field.py +0 -22
- letta_client/agents/types/agents_search_request_search_item_field_operator.py +0 -5
- letta_client/agents/types/agents_search_request_search_item_one.py +0 -22
- letta_client/agents/types/agents_search_request_search_item_one_operator.py +0 -5
- letta_client/agents/types/agents_search_request_search_item_three.py +0 -21
- letta_client/agents/types/agents_search_request_search_item_two.py +0 -21
- letta_client/agents/types/agents_search_request_search_item_zero.py +0 -20
- letta_client/agents/types/agents_search_request_sort_by.py +0 -5
- letta_client/agents/types/agents_search_response.py +0 -23
- letta_client/agents/types/create_agent_request_response_format.py +0 -8
- letta_client/agents/types/create_agent_request_tool_rules_item.py +0 -22
- letta_client/agents/types/update_agent_response_format.py +0 -8
- letta_client/agents/types/update_agent_tool_rules_item.py +0 -22
- letta_client/base_client.py +0 -232
- letta_client/batches/__init__.py +0 -2
- letta_client/batches/client.py +0 -587
- letta_client/blocks/__init__.py +0 -5
- letta_client/blocks/agents/__init__.py +0 -2
- letta_client/blocks/agents/client.py +0 -171
- letta_client/blocks/client.py +0 -1038
- letta_client/client.py +0 -661
- letta_client/client_side_access_tokens/__init__.py +0 -29
- letta_client/client_side_access_tokens/client.py +0 -524
- letta_client/client_side_access_tokens/types/__init__.py +0 -43
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_request_policy_item.py +0 -24
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_request_policy_item_access_item.py +0 -7
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response.py +0 -25
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy.py +0 -23
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item.py +0 -24
- letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py +0 -7
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response.py +0 -25
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item.py +0 -27
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy.py +0 -23
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy_data_item.py +0 -24
- letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy_data_item_access_item.py +0 -7
- letta_client/core/__init__.py +0 -51
- letta_client/core/api_error.py +0 -15
- letta_client/core/client_wrapper.py +0 -77
- letta_client/core/datetime_utils.py +0 -28
- letta_client/core/file.py +0 -67
- letta_client/core/http_client.py +0 -499
- letta_client/core/jsonable_encoder.py +0 -101
- letta_client/core/pydantic_utilities.py +0 -296
- letta_client/core/query_encoder.py +0 -58
- letta_client/core/remove_none_from_dict.py +0 -11
- letta_client/core/request_options.py +0 -35
- letta_client/core/serialization.py +0 -272
- letta_client/core/unchecked_base_model.py +0 -305
- letta_client/embedding_models/__init__.py +0 -2
- letta_client/embedding_models/client.py +0 -136
- letta_client/environment.py +0 -8
- letta_client/errors/__init__.py +0 -17
- letta_client/errors/bad_request_error.py +0 -9
- letta_client/errors/conflict_error.py +0 -9
- letta_client/errors/internal_server_error.py +0 -9
- letta_client/errors/not_found_error.py +0 -9
- letta_client/errors/payment_required_error.py +0 -9
- letta_client/errors/unprocessable_entity_error.py +0 -9
- letta_client/folders/__init__.py +0 -5
- letta_client/folders/client.py +0 -1307
- letta_client/folders/files/__init__.py +0 -2
- letta_client/folders/files/client.py +0 -474
- letta_client/folders/passages/__init__.py +0 -2
- letta_client/folders/passages/client.py +0 -189
- letta_client/groups/__init__.py +0 -14
- letta_client/groups/client.py +0 -964
- letta_client/groups/messages/__init__.py +0 -5
- letta_client/groups/messages/client.py +0 -1015
- letta_client/groups/messages/types/__init__.py +0 -7
- letta_client/groups/messages/types/letta_streaming_response.py +0 -20
- letta_client/groups/messages/types/messages_modify_request.py +0 -11
- letta_client/groups/messages/types/messages_modify_response.py +0 -20
- letta_client/groups/types/__init__.py +0 -6
- letta_client/groups/types/group_create_manager_config.py +0 -12
- letta_client/groups/types/group_update_manager_config.py +0 -16
- letta_client/health/__init__.py +0 -2
- letta_client/health/client.py +0 -110
- letta_client/identities/__init__.py +0 -5
- letta_client/identities/client.py +0 -1201
- letta_client/identities/properties/__init__.py +0 -2
- letta_client/identities/properties/client.py +0 -183
- letta_client/jobs/__init__.py +0 -2
- letta_client/jobs/client.py +0 -749
- letta_client/messages/__init__.py +0 -2
- letta_client/messages/client.py +0 -213
- letta_client/models/__init__.py +0 -2
- letta_client/models/client.py +0 -174
- letta_client/projects/__init__.py +0 -5
- letta_client/projects/client.py +0 -150
- letta_client/projects/types/__init__.py +0 -6
- letta_client/projects/types/projects_list_response.py +0 -23
- letta_client/projects/types/projects_list_response_projects_item.py +0 -21
- letta_client/providers/__init__.py +0 -2
- letta_client/providers/client.py +0 -789
- letta_client/runs/__init__.py +0 -5
- letta_client/runs/client.py +0 -551
- letta_client/runs/messages/__init__.py +0 -2
- letta_client/runs/messages/client.py +0 -236
- letta_client/runs/steps/__init__.py +0 -2
- letta_client/runs/steps/client.py +0 -219
- letta_client/runs/usage/__init__.py +0 -2
- letta_client/runs/usage/client.py +0 -147
- letta_client/sources/__init__.py +0 -5
- letta_client/sources/client.py +0 -1462
- letta_client/sources/files/__init__.py +0 -2
- letta_client/sources/files/client.py +0 -474
- letta_client/sources/passages/__init__.py +0 -2
- letta_client/sources/passages/client.py +0 -189
- letta_client/steps/__init__.py +0 -6
- letta_client/steps/client.py +0 -408
- letta_client/steps/feedback/__init__.py +0 -2
- letta_client/steps/feedback/client.py +0 -168
- letta_client/steps/types/__init__.py +0 -5
- letta_client/steps/types/steps_list_request_feedback.py +0 -5
- letta_client/tags/__init__.py +0 -2
- letta_client/tags/client.py +0 -171
- letta_client/telemetry/__init__.py +0 -2
- letta_client/telemetry/client.py +0 -145
- letta_client/templates/__init__.py +0 -18
- letta_client/templates/agents/__init__.py +0 -13
- letta_client/templates/agents/client.py +0 -256
- letta_client/templates/agents/types/__init__.py +0 -11
- letta_client/templates/agents/types/agents_create_request_initial_message_sequence_item.py +0 -26
- letta_client/templates/agents/types/agents_create_request_initial_message_sequence_item_role.py +0 -7
- letta_client/templates/agents/types/agents_create_response.py +0 -20
- letta_client/templates/client.py +0 -162
- letta_client/templates/types/__init__.py +0 -6
- letta_client/templates/types/templates_list_response.py +0 -23
- letta_client/templates/types/templates_list_response_templates_item.py +0 -20
- letta_client/tools/__init__.py +0 -27
- letta_client/tools/client.py +0 -3063
- letta_client/tools/types/__init__.py +0 -25
- letta_client/tools/types/add_mcp_server_request.py +0 -8
- letta_client/tools/types/add_mcp_server_response_item.py +0 -8
- letta_client/tools/types/connect_mcp_server_request.py +0 -8
- letta_client/tools/types/connect_mcp_server_response_event.py +0 -8
- letta_client/tools/types/delete_mcp_server_response_item.py +0 -8
- letta_client/tools/types/list_mcp_servers_response_value.py +0 -8
- letta_client/tools/types/streaming_response.py +0 -23
- letta_client/tools/types/test_mcp_server_request.py +0 -8
- letta_client/tools/types/update_mcp_server_request.py +0 -8
- letta_client/tools/types/update_mcp_server_response.py +0 -8
- letta_client/types/action_model.py +0 -38
- letta_client/types/action_parameters_model.py +0 -27
- letta_client/types/action_response_model.py +0 -27
- letta_client/types/agent_schema.py +0 -49
- letta_client/types/agent_schema_tool_rules_item.py +0 -11
- letta_client/types/agent_state_response_format.py +0 -8
- letta_client/types/agent_state_tool_rules_item.py +0 -22
- letta_client/types/app_auth_scheme.py +0 -34
- letta_client/types/app_auth_scheme_auth_mode.py +0 -19
- letta_client/types/app_model.py +0 -44
- letta_client/types/assistant_message.py +0 -42
- letta_client/types/assistant_message_content.py +0 -6
- letta_client/types/audio.py +0 -19
- letta_client/types/auth_request.py +0 -22
- letta_client/types/auth_response.py +0 -29
- letta_client/types/auth_scheme_field.py +0 -30
- letta_client/types/bad_request_error_body.py +0 -19
- letta_client/types/base_64_image.py +0 -33
- letta_client/types/base_tool_rule_schema.py +0 -20
- letta_client/types/batch_job.py +0 -81
- letta_client/types/block.py +0 -97
- letta_client/types/block_update.py +0 -71
- letta_client/types/chat_completion_assistant_message_param.py +0 -29
- letta_client/types/chat_completion_assistant_message_param_content.py +0 -8
- letta_client/types/chat_completion_assistant_message_param_content_item.py +0 -9
- letta_client/types/chat_completion_audio_param.py +0 -22
- letta_client/types/chat_completion_audio_param_format.py +0 -5
- letta_client/types/chat_completion_audio_param_voice.py +0 -18
- letta_client/types/chat_completion_content_part_image_param.py +0 -21
- letta_client/types/chat_completion_content_part_input_audio_param.py +0 -21
- letta_client/types/chat_completion_content_part_refusal_param.py +0 -20
- letta_client/types/chat_completion_content_part_text_param.py +0 -20
- letta_client/types/chat_completion_developer_message_param.py +0 -22
- letta_client/types/chat_completion_developer_message_param_content.py +0 -6
- letta_client/types/chat_completion_function_call_option_param.py +0 -19
- letta_client/types/chat_completion_function_message_param.py +0 -21
- letta_client/types/chat_completion_message_tool_call.py +0 -22
- letta_client/types/chat_completion_message_tool_call_param.py +0 -24
- letta_client/types/chat_completion_named_tool_choice_param.py +0 -23
- letta_client/types/chat_completion_prediction_content_param.py +0 -21
- letta_client/types/chat_completion_prediction_content_param_content.py +0 -6
- letta_client/types/chat_completion_stream_options_param.py +0 -19
- letta_client/types/chat_completion_system_message_param.py +0 -22
- letta_client/types/chat_completion_system_message_param_content.py +0 -6
- letta_client/types/chat_completion_tool_message_param.py +0 -22
- letta_client/types/chat_completion_tool_message_param_content.py +0 -6
- letta_client/types/chat_completion_tool_param.py +0 -21
- letta_client/types/chat_completion_user_message_param.py +0 -22
- letta_client/types/chat_completion_user_message_param_content.py +0 -6
- letta_client/types/chat_completion_user_message_param_content_item.py +0 -14
- letta_client/types/child_tool_rule_schema.py +0 -21
- letta_client/types/code_input.py +0 -22
- letta_client/types/completion_create_params_non_streaming.py +0 -64
- letta_client/types/completion_create_params_non_streaming_function_call.py +0 -8
- letta_client/types/completion_create_params_non_streaming_messages_item.py +0 -18
- letta_client/types/completion_create_params_non_streaming_modalities_item.py +0 -5
- letta_client/types/completion_create_params_non_streaming_model.py +0 -62
- letta_client/types/completion_create_params_non_streaming_reasoning_effort.py +0 -5
- letta_client/types/completion_create_params_non_streaming_response_format.py +0 -10
- letta_client/types/completion_create_params_non_streaming_service_tier.py +0 -7
- letta_client/types/completion_create_params_non_streaming_stop.py +0 -5
- letta_client/types/completion_create_params_non_streaming_tool_choice.py +0 -8
- letta_client/types/completion_create_params_streaming.py +0 -64
- letta_client/types/completion_create_params_streaming_function_call.py +0 -8
- letta_client/types/completion_create_params_streaming_messages_item.py +0 -18
- letta_client/types/completion_create_params_streaming_modalities_item.py +0 -5
- letta_client/types/completion_create_params_streaming_model.py +0 -62
- letta_client/types/completion_create_params_streaming_reasoning_effort.py +0 -5
- letta_client/types/completion_create_params_streaming_response_format.py +0 -10
- letta_client/types/completion_create_params_streaming_service_tier.py +0 -7
- letta_client/types/completion_create_params_streaming_stop.py +0 -5
- letta_client/types/completion_create_params_streaming_tool_choice.py +0 -8
- letta_client/types/components_schemas_text_content.py +0 -5
- letta_client/types/conditional_tool_rule_schema.py +0 -23
- letta_client/types/conflict_error_body.py +0 -21
- letta_client/types/context_window_overview.py +0 -108
- letta_client/types/core_memory_block_schema.py +0 -31
- letta_client/types/create_block.py +0 -67
- letta_client/types/duplicate_file_handling.py +0 -5
- letta_client/types/dynamic_manager.py +0 -33
- letta_client/types/dynamic_manager_update.py +0 -33
- letta_client/types/e_2_b_sandbox_config.py +0 -32
- letta_client/types/embedding_config_embedding_endpoint_type.py +0 -29
- letta_client/types/feedback_type.py +0 -5
- letta_client/types/file.py +0 -21
- letta_client/types/file_block.py +0 -103
- letta_client/types/file_file.py +0 -21
- letta_client/types/file_metadata.py +0 -108
- letta_client/types/file_processing_status.py +0 -5
- letta_client/types/file_stats.py +0 -36
- letta_client/types/function_call.py +0 -20
- letta_client/types/function_definition_input.py +0 -22
- letta_client/types/function_definition_output.py +0 -22
- letta_client/types/function_output.py +0 -20
- letta_client/types/function_tool.py +0 -21
- letta_client/types/generate_tool_input.py +0 -42
- letta_client/types/generate_tool_output.py +0 -33
- letta_client/types/group.py +0 -88
- letta_client/types/health.py +0 -24
- letta_client/types/hidden_reasoning_message.py +0 -43
- letta_client/types/hidden_reasoning_message_state.py +0 -5
- letta_client/types/http_validation_error.py +0 -20
- letta_client/types/identity.py +0 -59
- letta_client/types/identity_property.py +0 -38
- letta_client/types/identity_property_type.py +0 -5
- letta_client/types/identity_property_value.py +0 -5
- letta_client/types/identity_type.py +0 -5
- letta_client/types/image_content.py +0 -24
- letta_client/types/image_content_source.py +0 -8
- letta_client/types/image_url.py +0 -21
- letta_client/types/image_url_detail.py +0 -5
- letta_client/types/input_audio.py +0 -21
- letta_client/types/input_audio_format.py +0 -5
- letta_client/types/internal_server_error_body.py +0 -19
- letta_client/types/job.py +0 -96
- letta_client/types/job_status.py +0 -7
- letta_client/types/job_type.py +0 -5
- letta_client/types/json_schema.py +0 -26
- letta_client/types/letta_batch_messages.py +0 -20
- letta_client/types/letta_batch_request.py +0 -59
- letta_client/types/letta_image.py +0 -38
- letta_client/types/letta_message_content_union.py +0 -13
- letta_client/types/letta_message_union.py +0 -20
- letta_client/types/letta_request.py +0 -54
- letta_client/types/letta_request_config.py +0 -38
- letta_client/types/letta_response.py +0 -40
- letta_client/types/letta_stop_reason.py +0 -32
- letta_client/types/letta_streaming_request.py +0 -59
- letta_client/types/letta_usage_statistics.py +0 -59
- letta_client/types/letta_user_message_content_union.py +0 -7
- letta_client/types/llm_config_model_endpoint_type.py +0 -31
- letta_client/types/llm_config_reasoning_effort.py +0 -5
- letta_client/types/local_sandbox_config.py +0 -38
- letta_client/types/manager_type.py +0 -7
- letta_client/types/max_count_per_step_tool_rule_schema.py +0 -21
- letta_client/types/mcp_server_type.py +0 -5
- letta_client/types/mcp_tool.py +0 -38
- letta_client/types/memory.py +0 -38
- letta_client/types/message.py +0 -139
- letta_client/types/message_content_item.py +0 -20
- letta_client/types/message_create.py +0 -58
- letta_client/types/message_create_content.py +0 -6
- letta_client/types/message_create_role.py +0 -5
- letta_client/types/message_role.py +0 -5
- letta_client/types/message_schema.py +0 -29
- letta_client/types/message_type.py +0 -16
- letta_client/types/not_found_error_body.py +0 -19
- letta_client/types/not_found_error_body_message.py +0 -11
- letta_client/types/omitted_reasoning_content.py +0 -19
- letta_client/types/openai_types_chat_chat_completion_message_tool_call_param_function.py +0 -20
- letta_client/types/openai_types_chat_chat_completion_named_tool_choice_param_function.py +0 -19
- letta_client/types/openai_types_chat_completion_create_params_function.py +0 -21
- letta_client/types/organization.py +0 -38
- letta_client/types/organization_create.py +0 -27
- letta_client/types/organization_sources_stats.py +0 -42
- letta_client/types/organization_update.py +0 -27
- letta_client/types/parameter_properties.py +0 -20
- letta_client/types/parameters_schema.py +0 -22
- letta_client/types/payment_required_error_body.py +0 -20
- letta_client/types/provider.py +0 -65
- letta_client/types/provider_check.py +0 -38
- letta_client/types/reasoning_content.py +0 -33
- letta_client/types/reasoning_message.py +0 -44
- letta_client/types/reasoning_message_source.py +0 -5
- letta_client/types/redacted_reasoning_content.py +0 -23
- letta_client/types/response_format_json_object.py +0 -19
- letta_client/types/response_format_json_schema.py +0 -21
- letta_client/types/response_format_text.py +0 -19
- letta_client/types/round_robin_manager.py +0 -23
- letta_client/types/round_robin_manager_update.py +0 -23
- letta_client/types/run.py +0 -99
- letta_client/types/sandbox_config.py +0 -54
- letta_client/types/sandbox_config_create.py +0 -23
- letta_client/types/sandbox_config_create_config.py +0 -7
- letta_client/types/sandbox_config_update.py +0 -27
- letta_client/types/sandbox_config_update_config.py +0 -7
- letta_client/types/sandbox_environment_variable.py +0 -63
- letta_client/types/sandbox_environment_variable_create.py +0 -32
- letta_client/types/sandbox_environment_variable_update.py +0 -32
- letta_client/types/sandbox_type.py +0 -5
- letta_client/types/sleeptime_manager.py +0 -28
- letta_client/types/sleeptime_manager_update.py +0 -28
- letta_client/types/source.py +0 -81
- letta_client/types/source_create.py +0 -57
- letta_client/types/source_stats.py +0 -47
- letta_client/types/source_update.py +0 -47
- letta_client/types/sse_server_config.py +0 -55
- letta_client/types/stdio_server_config.py +0 -39
- letta_client/types/step_feedback.py +0 -5
- letta_client/types/streamable_http_server_config.py +0 -55
- letta_client/types/supervisor_manager.py +0 -23
- letta_client/types/supervisor_manager_update.py +0 -23
- letta_client/types/system_message.py +0 -41
- letta_client/types/tag_schema.py +0 -19
- letta_client/types/text_content.py +0 -23
- letta_client/types/tool_annotations.py +0 -36
- letta_client/types/tool_call.py +0 -21
- letta_client/types/tool_call_content.py +0 -33
- letta_client/types/tool_call_delta.py +0 -21
- letta_client/types/tool_call_message.py +0 -39
- letta_client/types/tool_call_message_tool_call.py +0 -7
- letta_client/types/tool_create.py +0 -58
- letta_client/types/tool_env_var_schema.py +0 -23
- letta_client/types/tool_json_schema.py +0 -24
- letta_client/types/tool_return.py +0 -33
- letta_client/types/tool_return_content.py +0 -33
- letta_client/types/tool_return_message_status.py +0 -5
- letta_client/types/tool_return_status.py +0 -5
- letta_client/types/tool_schema.py +0 -35
- letta_client/types/update_assistant_message.py +0 -24
- letta_client/types/update_assistant_message_content.py +0 -6
- letta_client/types/update_reasoning_message.py +0 -20
- letta_client/types/update_ssemcp_server.py +0 -41
- letta_client/types/update_stdio_mcp_server.py +0 -32
- letta_client/types/update_streamable_httpmcp_server.py +0 -46
- letta_client/types/update_system_message.py +0 -23
- letta_client/types/update_user_message.py +0 -24
- letta_client/types/update_user_message_content.py +0 -6
- letta_client/types/url_image.py +0 -23
- letta_client/types/usage_statistics.py +0 -25
- letta_client/types/usage_statistics_completion_token_details.py +0 -19
- letta_client/types/usage_statistics_prompt_token_details.py +0 -19
- letta_client/types/user.py +0 -52
- letta_client/types/user_create.py +0 -22
- letta_client/types/user_message.py +0 -42
- letta_client/types/user_message_content.py +0 -6
- letta_client/types/user_update.py +0 -27
- letta_client/types/validation_error.py +0 -22
- letta_client/types/validation_error_loc_item.py +0 -5
- letta_client/types/voice_sleeptime_manager.py +0 -33
- letta_client/types/voice_sleeptime_manager_update.py +0 -33
- letta_client/types/web_search_options.py +0 -22
- letta_client/types/web_search_options_search_context_size.py +0 -5
- letta_client/types/web_search_options_user_location.py +0 -21
- letta_client/types/web_search_options_user_location_approximate.py +0 -22
- letta_client/version.py +0 -3
- letta_client/voice/__init__.py +0 -2
- letta_client/voice/client.py +0 -177
- letta_client-0.1.226.dist-info/METADATA +0 -190
- letta_client-0.1.226.dist-info/RECORD +0 -452
|
@@ -1,205 +1,718 @@
|
|
|
1
|
-
#
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
from
|
|
3
|
+
from typing import Dict, List, Union, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal, Annotated, TypeAlias
|
|
6
|
+
|
|
7
|
+
from pydantic import Field as FieldInfo
|
|
8
|
+
|
|
9
|
+
from .tool import Tool
|
|
10
|
+
from .._utils import PropertyInfo
|
|
11
|
+
from .._models import BaseModel
|
|
8
12
|
from .agent_type import AgentType
|
|
9
13
|
from .llm_config import LlmConfig
|
|
14
|
+
from .agents.block import Block
|
|
15
|
+
from .init_tool_rule import InitToolRule
|
|
16
|
+
from .child_tool_rule import ChildToolRule
|
|
10
17
|
from .embedding_config import EmbeddingConfig
|
|
11
|
-
from .
|
|
12
|
-
from .
|
|
13
|
-
from .
|
|
14
|
-
from .
|
|
18
|
+
from .parent_tool_rule import ParentToolRule
|
|
19
|
+
from .stop_reason_type import StopReasonType
|
|
20
|
+
from .continue_tool_rule import ContinueToolRule
|
|
21
|
+
from .terminal_tool_rule import TerminalToolRule
|
|
22
|
+
from .vector_db_provider import VectorDBProvider
|
|
23
|
+
from .xai_model_settings import XaiModelSettings
|
|
24
|
+
from .groq_model_settings import GroqModelSettings
|
|
25
|
+
from .azure_model_settings import AzureModelSettings
|
|
26
|
+
from .text_response_format import TextResponseFormat
|
|
27
|
+
from .conditional_tool_rule import ConditionalToolRule
|
|
28
|
+
from .openai_model_settings import OpenAIModelSettings
|
|
29
|
+
from .bedrock_model_settings import BedrockModelSettings
|
|
30
|
+
from .deepseek_model_settings import DeepseekModelSettings
|
|
31
|
+
from .together_model_settings import TogetherModelSettings
|
|
32
|
+
from .anthropic_model_settings import AnthropicModelSettings
|
|
33
|
+
from .google_ai_model_settings import GoogleAIModelSettings
|
|
15
34
|
from .agent_environment_variable import AgentEnvironmentVariable
|
|
16
|
-
from .
|
|
17
|
-
from
|
|
35
|
+
from .json_object_response_format import JsonObjectResponseFormat
|
|
36
|
+
from .json_schema_response_format import JsonSchemaResponseFormat
|
|
37
|
+
from .requires_approval_tool_rule import RequiresApprovalToolRule
|
|
38
|
+
from .google_vertex_model_settings import GoogleVertexModelSettings
|
|
39
|
+
from .max_count_per_step_tool_rule import MaxCountPerStepToolRule
|
|
40
|
+
from .required_before_exit_tool_rule import RequiredBeforeExitToolRule
|
|
41
|
+
from .agents.approval_request_message import ApprovalRequestMessage
|
|
18
42
|
|
|
43
|
+
__all__ = [
|
|
44
|
+
"AgentState",
|
|
45
|
+
"Memory",
|
|
46
|
+
"MemoryFileBlock",
|
|
47
|
+
"Source",
|
|
48
|
+
"CompactionSettings",
|
|
49
|
+
"CompactionSettingsModelSettings",
|
|
50
|
+
"CompactionSettingsModelSettingsZaiModelSettings",
|
|
51
|
+
"CompactionSettingsModelSettingsZaiModelSettingsResponseFormat",
|
|
52
|
+
"CompactionSettingsModelSettingsChatGptoAuthModelSettings",
|
|
53
|
+
"CompactionSettingsModelSettingsChatGptoAuthModelSettingsReasoning",
|
|
54
|
+
"Identity",
|
|
55
|
+
"IdentityProperty",
|
|
56
|
+
"ManagedGroup",
|
|
57
|
+
"ModelSettings",
|
|
58
|
+
"ModelSettingsZaiModelSettings",
|
|
59
|
+
"ModelSettingsZaiModelSettingsResponseFormat",
|
|
60
|
+
"ModelSettingsChatGptoAuthModelSettings",
|
|
61
|
+
"ModelSettingsChatGptoAuthModelSettingsReasoning",
|
|
62
|
+
"MultiAgentGroup",
|
|
63
|
+
"ResponseFormat",
|
|
64
|
+
"ToolRule",
|
|
65
|
+
]
|
|
19
66
|
|
|
20
|
-
class AgentState(UncheckedBaseModel):
|
|
21
|
-
"""
|
|
22
|
-
Representation of an agent's state. This is the state of the agent at a given time, and is persisted in the DB backend. The state has all the information needed to recreate a persisted agent.
|
|
23
67
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
created_at (datetime): The datetime the agent was created.
|
|
28
|
-
message_ids (List[str]): The ids of the messages in the agent's in-context memory.
|
|
29
|
-
memory (Memory): The in-context memory of the agent.
|
|
30
|
-
tools (List[str]): The tools used by the agent. This includes any memory editing functions specified in `memory`.
|
|
31
|
-
system (str): The system prompt used by the agent.
|
|
32
|
-
llm_config (LLMConfig): The LLM configuration used by the agent.
|
|
33
|
-
embedding_config (EmbeddingConfig): The embedding configuration used by the agent.
|
|
34
|
-
"""
|
|
68
|
+
class MemoryFileBlock(BaseModel):
|
|
69
|
+
file_id: str
|
|
70
|
+
"""Unique identifier of the file."""
|
|
35
71
|
|
|
36
|
-
|
|
37
|
-
"""
|
|
38
|
-
The id of the user that made this object.
|
|
39
|
-
"""
|
|
72
|
+
is_open: bool
|
|
73
|
+
"""True if the agent currently has the file open."""
|
|
40
74
|
|
|
41
|
-
|
|
42
|
-
"""
|
|
43
|
-
The id of the user that made this object.
|
|
44
|
-
"""
|
|
75
|
+
source_id: str
|
|
76
|
+
"""Deprecated: Use `folder_id` field instead. Unique identifier of the source."""
|
|
45
77
|
|
|
46
|
-
|
|
47
|
-
"""
|
|
48
|
-
The timestamp when the object was created.
|
|
49
|
-
"""
|
|
78
|
+
value: str
|
|
79
|
+
"""Value of the block."""
|
|
50
80
|
|
|
51
|
-
|
|
52
|
-
"""
|
|
53
|
-
The timestamp when the object was last updated.
|
|
54
|
-
"""
|
|
81
|
+
id: Optional[str] = None
|
|
82
|
+
"""The human-friendly ID of the Block"""
|
|
55
83
|
|
|
56
|
-
|
|
57
|
-
"""
|
|
58
|
-
The id of the agent. Assigned by the database.
|
|
59
|
-
"""
|
|
84
|
+
base_template_id: Optional[str] = None
|
|
85
|
+
"""The base template id of the block."""
|
|
60
86
|
|
|
61
|
-
|
|
62
|
-
"""
|
|
63
|
-
The name of the agent.
|
|
64
|
-
"""
|
|
87
|
+
created_by_id: Optional[str] = None
|
|
88
|
+
"""The id of the user that made this Block."""
|
|
65
89
|
|
|
66
|
-
|
|
67
|
-
"""
|
|
68
|
-
The list of tool rules.
|
|
69
|
-
"""
|
|
90
|
+
deployment_id: Optional[str] = None
|
|
91
|
+
"""The id of the deployment."""
|
|
70
92
|
|
|
71
|
-
|
|
72
|
-
"""
|
|
73
|
-
The ids of the messages in the agent's in-context memory.
|
|
74
|
-
"""
|
|
93
|
+
description: Optional[str] = None
|
|
94
|
+
"""Description of the block."""
|
|
75
95
|
|
|
76
|
-
|
|
77
|
-
"""
|
|
78
|
-
The system prompt used by the agent.
|
|
79
|
-
"""
|
|
96
|
+
entity_id: Optional[str] = None
|
|
97
|
+
"""The id of the entity within the template."""
|
|
80
98
|
|
|
81
|
-
|
|
82
|
-
"""
|
|
83
|
-
The type of agent.
|
|
84
|
-
"""
|
|
99
|
+
hidden: Optional[bool] = None
|
|
100
|
+
"""If set to True, the block will be hidden."""
|
|
85
101
|
|
|
86
|
-
|
|
87
|
-
"""
|
|
88
|
-
The LLM configuration used by the agent.
|
|
89
|
-
"""
|
|
102
|
+
is_template: Optional[bool] = None
|
|
103
|
+
"""Whether the block is a template (e.g. saved human/persona options)."""
|
|
90
104
|
|
|
91
|
-
|
|
92
|
-
"""
|
|
93
|
-
The embedding configuration used by the agent.
|
|
94
|
-
"""
|
|
105
|
+
label: Optional[str] = None
|
|
106
|
+
"""Label of the block (e.g. 'human', 'persona') in the context window."""
|
|
95
107
|
|
|
96
|
-
|
|
97
|
-
"""
|
|
98
|
-
The response format used by the agent when returning from `send_message`.
|
|
99
|
-
"""
|
|
108
|
+
last_accessed_at: Optional[datetime] = None
|
|
109
|
+
"""UTC timestamp of the agent’s most recent access to this file.
|
|
100
110
|
|
|
101
|
-
|
|
102
|
-
"""
|
|
103
|
-
The description of the agent.
|
|
111
|
+
Any operations from the open, close, or search tools will update this field.
|
|
104
112
|
"""
|
|
105
113
|
|
|
106
|
-
|
|
107
|
-
"""
|
|
108
|
-
The metadata of the agent.
|
|
109
|
-
"""
|
|
114
|
+
last_updated_by_id: Optional[str] = None
|
|
115
|
+
"""The id of the user that last updated this Block."""
|
|
110
116
|
|
|
111
|
-
|
|
112
|
-
"""
|
|
113
|
-
|
|
114
|
-
|
|
117
|
+
limit: Optional[int] = None
|
|
118
|
+
"""Character limit of the block."""
|
|
119
|
+
|
|
120
|
+
metadata: Optional[Dict[str, object]] = None
|
|
121
|
+
"""Metadata of the block."""
|
|
122
|
+
|
|
123
|
+
preserve_on_migration: Optional[bool] = None
|
|
124
|
+
"""Preserve the block on template migration."""
|
|
125
|
+
|
|
126
|
+
project_id: Optional[str] = None
|
|
127
|
+
"""The associated project id."""
|
|
128
|
+
|
|
129
|
+
read_only: Optional[bool] = None
|
|
130
|
+
"""Whether the agent has read-only access to the block."""
|
|
131
|
+
|
|
132
|
+
tags: Optional[List[str]] = None
|
|
133
|
+
"""The tags associated with the block."""
|
|
115
134
|
|
|
116
|
-
|
|
135
|
+
template_id: Optional[str] = None
|
|
136
|
+
"""The id of the template."""
|
|
137
|
+
|
|
138
|
+
template_name: Optional[str] = None
|
|
139
|
+
"""Name of the block if it is a template."""
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class Memory(BaseModel):
|
|
143
|
+
"""Deprecated: Use `blocks` field instead. The in-context memory of the agent."""
|
|
144
|
+
|
|
145
|
+
blocks: List[Block]
|
|
146
|
+
"""Memory blocks contained in the agent's in-context memory"""
|
|
147
|
+
|
|
148
|
+
agent_type: Union[AgentType, str, None] = None
|
|
149
|
+
"""Agent type controlling prompt rendering."""
|
|
150
|
+
|
|
151
|
+
file_blocks: Optional[List[MemoryFileBlock]] = None
|
|
152
|
+
"""Special blocks representing the agent's in-context memory of an attached file"""
|
|
153
|
+
|
|
154
|
+
prompt_template: Optional[str] = None
|
|
155
|
+
"""Deprecated. Ignored for performance."""
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class Source(BaseModel):
|
|
117
159
|
"""
|
|
118
|
-
|
|
160
|
+
(Deprecated: Use Folder) Representation of a source, which is a collection of files and passages.
|
|
119
161
|
"""
|
|
120
162
|
|
|
121
|
-
|
|
163
|
+
id: str
|
|
164
|
+
"""The human-friendly ID of the Source"""
|
|
165
|
+
|
|
166
|
+
embedding_config: EmbeddingConfig
|
|
167
|
+
"""The embedding configuration used by the source."""
|
|
168
|
+
|
|
169
|
+
name: str
|
|
170
|
+
"""The name of the source."""
|
|
171
|
+
|
|
172
|
+
created_at: Optional[datetime] = None
|
|
173
|
+
"""The timestamp when the source was created."""
|
|
174
|
+
|
|
175
|
+
created_by_id: Optional[str] = None
|
|
176
|
+
"""The id of the user that made this Tool."""
|
|
177
|
+
|
|
178
|
+
description: Optional[str] = None
|
|
179
|
+
"""The description of the source."""
|
|
180
|
+
|
|
181
|
+
instructions: Optional[str] = None
|
|
182
|
+
"""Instructions for how to use the source."""
|
|
183
|
+
|
|
184
|
+
last_updated_by_id: Optional[str] = None
|
|
185
|
+
"""The id of the user that made this Tool."""
|
|
186
|
+
|
|
187
|
+
metadata: Optional[Dict[str, object]] = None
|
|
188
|
+
"""Metadata associated with the source."""
|
|
189
|
+
|
|
190
|
+
updated_at: Optional[datetime] = None
|
|
191
|
+
"""The timestamp when the source was last updated."""
|
|
192
|
+
|
|
193
|
+
vector_db_provider: Optional[VectorDBProvider] = None
|
|
194
|
+
"""The vector database provider used for this source's passages"""
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
CompactionSettingsModelSettingsZaiModelSettingsResponseFormat: TypeAlias = Annotated[
|
|
198
|
+
Union[TextResponseFormat, JsonSchemaResponseFormat, JsonObjectResponseFormat, None],
|
|
199
|
+
PropertyInfo(discriminator="type"),
|
|
200
|
+
]
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class CompactionSettingsModelSettingsZaiModelSettings(BaseModel):
|
|
204
|
+
"""Z.ai (ZhipuAI) model configuration (OpenAI-compatible)."""
|
|
205
|
+
|
|
206
|
+
max_output_tokens: Optional[int] = None
|
|
207
|
+
"""The maximum number of tokens the model can generate."""
|
|
208
|
+
|
|
209
|
+
parallel_tool_calls: Optional[bool] = None
|
|
210
|
+
"""Whether to enable parallel tool calling."""
|
|
211
|
+
|
|
212
|
+
provider_type: Optional[Literal["zai"]] = None
|
|
213
|
+
"""The type of the provider."""
|
|
214
|
+
|
|
215
|
+
response_format: Optional[CompactionSettingsModelSettingsZaiModelSettingsResponseFormat] = None
|
|
216
|
+
"""The response format for the model."""
|
|
217
|
+
|
|
218
|
+
temperature: Optional[float] = None
|
|
219
|
+
"""The temperature of the model."""
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
class CompactionSettingsModelSettingsChatGptoAuthModelSettingsReasoning(BaseModel):
|
|
223
|
+
"""The reasoning configuration for the model."""
|
|
224
|
+
|
|
225
|
+
reasoning_effort: Optional[Literal["none", "low", "medium", "high", "xhigh"]] = None
|
|
226
|
+
"""The reasoning effort level for GPT-5.x and o-series models."""
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class CompactionSettingsModelSettingsChatGptoAuthModelSettings(BaseModel):
|
|
230
|
+
"""ChatGPT OAuth model configuration (uses ChatGPT backend API)."""
|
|
231
|
+
|
|
232
|
+
max_output_tokens: Optional[int] = None
|
|
233
|
+
"""The maximum number of tokens the model can generate."""
|
|
234
|
+
|
|
235
|
+
parallel_tool_calls: Optional[bool] = None
|
|
236
|
+
"""Whether to enable parallel tool calling."""
|
|
237
|
+
|
|
238
|
+
provider_type: Optional[Literal["chatgpt_oauth"]] = None
|
|
239
|
+
"""The type of the provider."""
|
|
240
|
+
|
|
241
|
+
reasoning: Optional[CompactionSettingsModelSettingsChatGptoAuthModelSettingsReasoning] = None
|
|
242
|
+
"""The reasoning configuration for the model."""
|
|
243
|
+
|
|
244
|
+
temperature: Optional[float] = None
|
|
245
|
+
"""The temperature of the model."""
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
CompactionSettingsModelSettings: TypeAlias = Annotated[
|
|
249
|
+
Union[
|
|
250
|
+
OpenAIModelSettings,
|
|
251
|
+
AnthropicModelSettings,
|
|
252
|
+
GoogleAIModelSettings,
|
|
253
|
+
GoogleVertexModelSettings,
|
|
254
|
+
AzureModelSettings,
|
|
255
|
+
XaiModelSettings,
|
|
256
|
+
CompactionSettingsModelSettingsZaiModelSettings,
|
|
257
|
+
GroqModelSettings,
|
|
258
|
+
DeepseekModelSettings,
|
|
259
|
+
TogetherModelSettings,
|
|
260
|
+
BedrockModelSettings,
|
|
261
|
+
CompactionSettingsModelSettingsChatGptoAuthModelSettings,
|
|
262
|
+
None,
|
|
263
|
+
],
|
|
264
|
+
PropertyInfo(discriminator="provider_type"),
|
|
265
|
+
]
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
class CompactionSettings(BaseModel):
|
|
269
|
+
"""Configuration for conversation compaction / summarization.
|
|
270
|
+
|
|
271
|
+
``model`` is the only required user-facing field – it specifies the summarizer
|
|
272
|
+
model handle (e.g. ``"openai/gpt-4o-mini"``). Per-model settings (temperature,
|
|
273
|
+
max tokens, etc.) are derived from the default configuration for that handle.
|
|
122
274
|
"""
|
|
123
|
-
|
|
275
|
+
|
|
276
|
+
model: str
|
|
277
|
+
"""Model handle to use for summarization (format: provider/model-name)."""
|
|
278
|
+
|
|
279
|
+
clip_chars: Optional[int] = None
|
|
280
|
+
"""The maximum length of the summary in characters.
|
|
281
|
+
|
|
282
|
+
If none, no clipping is performed.
|
|
124
283
|
"""
|
|
125
284
|
|
|
126
|
-
|
|
285
|
+
mode: Optional[Literal["all", "sliding_window"]] = None
|
|
286
|
+
"""The type of summarization technique use."""
|
|
287
|
+
|
|
288
|
+
api_model_settings: Optional[CompactionSettingsModelSettings] = FieldInfo(alias="model_settings", default=None)
|
|
289
|
+
"""Optional model settings used to override defaults for the summarizer model."""
|
|
290
|
+
|
|
291
|
+
prompt: Optional[str] = None
|
|
292
|
+
"""The prompt to use for summarization."""
|
|
293
|
+
|
|
294
|
+
prompt_acknowledgement: Optional[bool] = None
|
|
127
295
|
"""
|
|
128
|
-
|
|
296
|
+
Whether to include an acknowledgement post-prompt (helps prevent non-summary
|
|
297
|
+
outputs).
|
|
129
298
|
"""
|
|
130
299
|
|
|
131
|
-
|
|
132
|
-
default=None
|
|
133
|
-
)
|
|
300
|
+
sliding_window_percentage: Optional[float] = None
|
|
134
301
|
"""
|
|
135
|
-
The
|
|
302
|
+
The percentage of the context window to keep post-summarization (only used in
|
|
303
|
+
sliding window mode).
|
|
136
304
|
"""
|
|
137
305
|
|
|
138
|
-
|
|
306
|
+
|
|
307
|
+
class IdentityProperty(BaseModel):
|
|
308
|
+
"""A property of an identity"""
|
|
309
|
+
|
|
310
|
+
key: str
|
|
311
|
+
"""The key of the property"""
|
|
312
|
+
|
|
313
|
+
type: Literal["string", "number", "boolean", "json"]
|
|
314
|
+
"""The type of the property"""
|
|
315
|
+
|
|
316
|
+
value: Union[str, float, bool, Dict[str, object]]
|
|
317
|
+
"""The value of the property"""
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
class Identity(BaseModel):
|
|
321
|
+
id: str
|
|
322
|
+
"""The human-friendly ID of the Identity"""
|
|
323
|
+
|
|
324
|
+
agent_ids: List[str]
|
|
325
|
+
"""The IDs of the agents associated with the identity."""
|
|
326
|
+
|
|
327
|
+
block_ids: List[str]
|
|
328
|
+
"""The IDs of the blocks associated with the identity."""
|
|
329
|
+
|
|
330
|
+
identifier_key: str
|
|
331
|
+
"""External, user-generated identifier key of the identity."""
|
|
332
|
+
|
|
333
|
+
identity_type: Literal["org", "user", "other"]
|
|
334
|
+
"""The type of the identity."""
|
|
335
|
+
|
|
336
|
+
name: str
|
|
337
|
+
"""The name of the identity."""
|
|
338
|
+
|
|
339
|
+
project_id: Optional[str] = None
|
|
340
|
+
"""The project id of the identity, if applicable."""
|
|
341
|
+
|
|
342
|
+
properties: Optional[List[IdentityProperty]] = None
|
|
343
|
+
"""List of properties associated with the identity"""
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
class ManagedGroup(BaseModel):
|
|
347
|
+
"""The multi-agent group that this agent manages"""
|
|
348
|
+
|
|
349
|
+
id: str
|
|
350
|
+
"""The id of the group. Assigned by the database."""
|
|
351
|
+
|
|
352
|
+
agent_ids: List[str]
|
|
353
|
+
|
|
354
|
+
description: str
|
|
355
|
+
|
|
356
|
+
manager_type: Literal["round_robin", "supervisor", "dynamic", "sleeptime", "voice_sleeptime", "swarm"]
|
|
357
|
+
|
|
358
|
+
base_template_id: Optional[str] = None
|
|
359
|
+
"""The base template id."""
|
|
360
|
+
|
|
361
|
+
deployment_id: Optional[str] = None
|
|
362
|
+
"""The id of the deployment."""
|
|
363
|
+
|
|
364
|
+
hidden: Optional[bool] = None
|
|
365
|
+
"""If set to True, the group will be hidden."""
|
|
366
|
+
|
|
367
|
+
last_processed_message_id: Optional[str] = None
|
|
368
|
+
|
|
369
|
+
manager_agent_id: Optional[str] = None
|
|
370
|
+
|
|
371
|
+
max_message_buffer_length: Optional[int] = None
|
|
372
|
+
"""The desired maximum length of messages in the context window of the convo agent.
|
|
373
|
+
|
|
374
|
+
This is a best effort, and may be off slightly due to user/assistant
|
|
375
|
+
interleaving.
|
|
139
376
|
"""
|
|
140
|
-
|
|
377
|
+
|
|
378
|
+
max_turns: Optional[int] = None
|
|
379
|
+
|
|
380
|
+
min_message_buffer_length: Optional[int] = None
|
|
381
|
+
"""The desired minimum length of messages in the context window of the convo agent.
|
|
382
|
+
|
|
383
|
+
This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
141
384
|
"""
|
|
142
385
|
|
|
143
|
-
|
|
386
|
+
project_id: Optional[str] = None
|
|
387
|
+
"""The associated project id."""
|
|
388
|
+
|
|
389
|
+
shared_block_ids: Optional[List[str]] = None
|
|
390
|
+
|
|
391
|
+
sleeptime_agent_frequency: Optional[int] = None
|
|
392
|
+
|
|
393
|
+
template_id: Optional[str] = None
|
|
394
|
+
"""The id of the template."""
|
|
395
|
+
|
|
396
|
+
termination_token: Optional[str] = None
|
|
397
|
+
|
|
398
|
+
turns_counter: Optional[int] = None
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
ModelSettingsZaiModelSettingsResponseFormat: TypeAlias = Annotated[
|
|
402
|
+
Union[TextResponseFormat, JsonSchemaResponseFormat, JsonObjectResponseFormat, None],
|
|
403
|
+
PropertyInfo(discriminator="type"),
|
|
404
|
+
]
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
class ModelSettingsZaiModelSettings(BaseModel):
|
|
408
|
+
"""Z.ai (ZhipuAI) model configuration (OpenAI-compatible)."""
|
|
409
|
+
|
|
410
|
+
max_output_tokens: Optional[int] = None
|
|
411
|
+
"""The maximum number of tokens the model can generate."""
|
|
412
|
+
|
|
413
|
+
parallel_tool_calls: Optional[bool] = None
|
|
414
|
+
"""Whether to enable parallel tool calling."""
|
|
415
|
+
|
|
416
|
+
provider_type: Optional[Literal["zai"]] = None
|
|
417
|
+
"""The type of the provider."""
|
|
418
|
+
|
|
419
|
+
response_format: Optional[ModelSettingsZaiModelSettingsResponseFormat] = None
|
|
420
|
+
"""The response format for the model."""
|
|
421
|
+
|
|
422
|
+
temperature: Optional[float] = None
|
|
423
|
+
"""The temperature of the model."""
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
class ModelSettingsChatGptoAuthModelSettingsReasoning(BaseModel):
|
|
427
|
+
"""The reasoning configuration for the model."""
|
|
428
|
+
|
|
429
|
+
reasoning_effort: Optional[Literal["none", "low", "medium", "high", "xhigh"]] = None
|
|
430
|
+
"""The reasoning effort level for GPT-5.x and o-series models."""
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
class ModelSettingsChatGptoAuthModelSettings(BaseModel):
|
|
434
|
+
"""ChatGPT OAuth model configuration (uses ChatGPT backend API)."""
|
|
435
|
+
|
|
436
|
+
max_output_tokens: Optional[int] = None
|
|
437
|
+
"""The maximum number of tokens the model can generate."""
|
|
438
|
+
|
|
439
|
+
parallel_tool_calls: Optional[bool] = None
|
|
440
|
+
"""Whether to enable parallel tool calling."""
|
|
441
|
+
|
|
442
|
+
provider_type: Optional[Literal["chatgpt_oauth"]] = None
|
|
443
|
+
"""The type of the provider."""
|
|
444
|
+
|
|
445
|
+
reasoning: Optional[ModelSettingsChatGptoAuthModelSettingsReasoning] = None
|
|
446
|
+
"""The reasoning configuration for the model."""
|
|
447
|
+
|
|
448
|
+
temperature: Optional[float] = None
|
|
449
|
+
"""The temperature of the model."""
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
ModelSettings: TypeAlias = Annotated[
|
|
453
|
+
Union[
|
|
454
|
+
OpenAIModelSettings,
|
|
455
|
+
AnthropicModelSettings,
|
|
456
|
+
GoogleAIModelSettings,
|
|
457
|
+
GoogleVertexModelSettings,
|
|
458
|
+
AzureModelSettings,
|
|
459
|
+
XaiModelSettings,
|
|
460
|
+
ModelSettingsZaiModelSettings,
|
|
461
|
+
GroqModelSettings,
|
|
462
|
+
DeepseekModelSettings,
|
|
463
|
+
TogetherModelSettings,
|
|
464
|
+
BedrockModelSettings,
|
|
465
|
+
ModelSettingsChatGptoAuthModelSettings,
|
|
466
|
+
None,
|
|
467
|
+
],
|
|
468
|
+
PropertyInfo(discriminator="provider_type"),
|
|
469
|
+
]
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
class MultiAgentGroup(BaseModel):
|
|
473
|
+
"""Deprecated: Use `managed_group` field instead.
|
|
474
|
+
|
|
475
|
+
The multi-agent group that this agent manages.
|
|
144
476
|
"""
|
|
145
|
-
|
|
477
|
+
|
|
478
|
+
id: str
|
|
479
|
+
"""The id of the group. Assigned by the database."""
|
|
480
|
+
|
|
481
|
+
agent_ids: List[str]
|
|
482
|
+
|
|
483
|
+
description: str
|
|
484
|
+
|
|
485
|
+
manager_type: Literal["round_robin", "supervisor", "dynamic", "sleeptime", "voice_sleeptime", "swarm"]
|
|
486
|
+
|
|
487
|
+
base_template_id: Optional[str] = None
|
|
488
|
+
"""The base template id."""
|
|
489
|
+
|
|
490
|
+
deployment_id: Optional[str] = None
|
|
491
|
+
"""The id of the deployment."""
|
|
492
|
+
|
|
493
|
+
hidden: Optional[bool] = None
|
|
494
|
+
"""If set to True, the group will be hidden."""
|
|
495
|
+
|
|
496
|
+
last_processed_message_id: Optional[str] = None
|
|
497
|
+
|
|
498
|
+
manager_agent_id: Optional[str] = None
|
|
499
|
+
|
|
500
|
+
max_message_buffer_length: Optional[int] = None
|
|
501
|
+
"""The desired maximum length of messages in the context window of the convo agent.
|
|
502
|
+
|
|
503
|
+
This is a best effort, and may be off slightly due to user/assistant
|
|
504
|
+
interleaving.
|
|
146
505
|
"""
|
|
147
506
|
|
|
148
|
-
|
|
507
|
+
max_turns: Optional[int] = None
|
|
508
|
+
|
|
509
|
+
min_message_buffer_length: Optional[int] = None
|
|
510
|
+
"""The desired minimum length of messages in the context window of the convo agent.
|
|
511
|
+
|
|
512
|
+
This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
149
513
|
"""
|
|
150
|
-
|
|
514
|
+
|
|
515
|
+
project_id: Optional[str] = None
|
|
516
|
+
"""The associated project id."""
|
|
517
|
+
|
|
518
|
+
shared_block_ids: Optional[List[str]] = None
|
|
519
|
+
|
|
520
|
+
sleeptime_agent_frequency: Optional[int] = None
|
|
521
|
+
|
|
522
|
+
template_id: Optional[str] = None
|
|
523
|
+
"""The id of the template."""
|
|
524
|
+
|
|
525
|
+
termination_token: Optional[str] = None
|
|
526
|
+
|
|
527
|
+
turns_counter: Optional[int] = None
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
ResponseFormat: TypeAlias = Annotated[
|
|
531
|
+
Union[TextResponseFormat, JsonSchemaResponseFormat, JsonObjectResponseFormat, None],
|
|
532
|
+
PropertyInfo(discriminator="type"),
|
|
533
|
+
]
|
|
534
|
+
|
|
535
|
+
ToolRule: TypeAlias = Annotated[
|
|
536
|
+
Union[
|
|
537
|
+
ChildToolRule,
|
|
538
|
+
InitToolRule,
|
|
539
|
+
TerminalToolRule,
|
|
540
|
+
ConditionalToolRule,
|
|
541
|
+
ContinueToolRule,
|
|
542
|
+
RequiredBeforeExitToolRule,
|
|
543
|
+
MaxCountPerStepToolRule,
|
|
544
|
+
ParentToolRule,
|
|
545
|
+
RequiresApprovalToolRule,
|
|
546
|
+
],
|
|
547
|
+
PropertyInfo(discriminator="type"),
|
|
548
|
+
]
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
class AgentState(BaseModel):
|
|
552
|
+
"""Representation of an agent's state.
|
|
553
|
+
|
|
554
|
+
This is the state of the agent at a given time, and is persisted in the DB backend. The state has all the information needed to recreate a persisted agent.
|
|
151
555
|
"""
|
|
152
556
|
|
|
153
|
-
|
|
557
|
+
id: str
|
|
558
|
+
"""The id of the agent. Assigned by the database."""
|
|
559
|
+
|
|
560
|
+
agent_type: AgentType
|
|
561
|
+
"""The type of agent."""
|
|
562
|
+
|
|
563
|
+
blocks: List[Block]
|
|
564
|
+
"""The memory blocks used by the agent."""
|
|
565
|
+
|
|
566
|
+
llm_config: LlmConfig
|
|
567
|
+
"""Deprecated: Use `model` field instead. The LLM configuration used by the agent."""
|
|
568
|
+
|
|
569
|
+
memory: Memory
|
|
570
|
+
"""Deprecated: Use `blocks` field instead. The in-context memory of the agent."""
|
|
571
|
+
|
|
572
|
+
name: str
|
|
573
|
+
"""The name of the agent."""
|
|
574
|
+
|
|
575
|
+
sources: List[Source]
|
|
576
|
+
"""Deprecated: Use `folders` field instead. The sources used by the agent."""
|
|
577
|
+
|
|
578
|
+
system: str
|
|
579
|
+
"""The system prompt used by the agent."""
|
|
580
|
+
|
|
581
|
+
tags: List[str]
|
|
582
|
+
"""The tags associated with the agent."""
|
|
583
|
+
|
|
584
|
+
tools: List[Tool]
|
|
585
|
+
"""The tools used by the agent."""
|
|
586
|
+
|
|
587
|
+
base_template_id: Optional[str] = None
|
|
588
|
+
"""The base template id of the agent."""
|
|
589
|
+
|
|
590
|
+
compaction_settings: Optional[CompactionSettings] = None
|
|
591
|
+
"""Configuration for conversation compaction / summarization.
|
|
592
|
+
|
|
593
|
+
`model` is the only required user-facing field – it specifies the summarizer
|
|
594
|
+
model handle (e.g. `"openai/gpt-4o-mini"`). Per-model settings (temperature, max
|
|
595
|
+
tokens, etc.) are derived from the default configuration for that handle.
|
|
154
596
|
"""
|
|
597
|
+
|
|
598
|
+
created_at: Optional[datetime] = None
|
|
599
|
+
"""The timestamp when the object was created."""
|
|
600
|
+
|
|
601
|
+
created_by_id: Optional[str] = None
|
|
602
|
+
"""The id of the user that made this object."""
|
|
603
|
+
|
|
604
|
+
deployment_id: Optional[str] = None
|
|
605
|
+
"""The id of the deployment."""
|
|
606
|
+
|
|
607
|
+
description: Optional[str] = None
|
|
608
|
+
"""The description of the agent."""
|
|
609
|
+
|
|
610
|
+
embedding: Optional[str] = None
|
|
611
|
+
"""The embedding model handle used by the agent (format: provider/model-name)."""
|
|
612
|
+
|
|
613
|
+
embedding_config: Optional[EmbeddingConfig] = None
|
|
614
|
+
"""Configuration for embedding model connection and processing parameters."""
|
|
615
|
+
|
|
616
|
+
enable_sleeptime: Optional[bool] = None
|
|
617
|
+
"""If set to True, memory management will move to a background agent thread."""
|
|
618
|
+
|
|
619
|
+
entity_id: Optional[str] = None
|
|
620
|
+
"""The id of the entity within the template."""
|
|
621
|
+
|
|
622
|
+
hidden: Optional[bool] = None
|
|
623
|
+
"""If set to True, the agent will be hidden."""
|
|
624
|
+
|
|
625
|
+
identities: Optional[List[Identity]] = None
|
|
626
|
+
"""The identities associated with this agent."""
|
|
627
|
+
|
|
628
|
+
identity_ids: Optional[List[str]] = None
|
|
629
|
+
"""Deprecated: Use `identities` field instead.
|
|
630
|
+
|
|
155
631
|
The ids of the identities associated with this agent.
|
|
156
632
|
"""
|
|
157
633
|
|
|
158
|
-
|
|
159
|
-
"""
|
|
160
|
-
If set to True, the agent will not remember previous messages (though the agent will still retain state via core memory blocks and archival/recall memory). Not recommended unless you have an advanced use case.
|
|
161
|
-
"""
|
|
634
|
+
last_run_completion: Optional[datetime] = None
|
|
635
|
+
"""The timestamp when the agent last completed a run."""
|
|
162
636
|
|
|
163
|
-
|
|
164
|
-
"""
|
|
165
|
-
If set to True, memory management will move to a background agent thread.
|
|
166
|
-
"""
|
|
637
|
+
last_run_duration_ms: Optional[int] = None
|
|
638
|
+
"""The duration in milliseconds of the agent's last run."""
|
|
167
639
|
|
|
168
|
-
|
|
169
|
-
"""
|
|
170
|
-
The multi-agent group that this agent manages
|
|
171
|
-
"""
|
|
640
|
+
last_stop_reason: Optional[StopReasonType] = None
|
|
641
|
+
"""The stop reason from the agent's last run."""
|
|
172
642
|
|
|
173
|
-
|
|
174
|
-
"""
|
|
175
|
-
The timestamp when the agent last completed a run.
|
|
176
|
-
"""
|
|
643
|
+
last_updated_by_id: Optional[str] = None
|
|
644
|
+
"""The id of the user that made this object."""
|
|
177
645
|
|
|
178
|
-
|
|
179
|
-
"""
|
|
180
|
-
|
|
646
|
+
managed_group: Optional[ManagedGroup] = None
|
|
647
|
+
"""The multi-agent group that this agent manages"""
|
|
648
|
+
|
|
649
|
+
max_files_open: Optional[int] = None
|
|
650
|
+
"""Maximum number of files that can be open at once for this agent.
|
|
651
|
+
|
|
652
|
+
Setting this too high may exceed the context window, which will break the agent.
|
|
181
653
|
"""
|
|
182
654
|
|
|
183
|
-
|
|
655
|
+
message_buffer_autoclear: Optional[bool] = None
|
|
184
656
|
"""
|
|
185
|
-
|
|
657
|
+
If set to True, the agent will not remember previous messages (though the agent
|
|
658
|
+
will still retain state via core memory blocks and archival/recall memory). Not
|
|
659
|
+
recommended unless you have an advanced use case.
|
|
186
660
|
"""
|
|
187
661
|
|
|
188
|
-
|
|
662
|
+
message_ids: Optional[List[str]] = None
|
|
663
|
+
"""The ids of the messages in the agent's in-context memory."""
|
|
664
|
+
|
|
665
|
+
metadata: Optional[Dict[str, object]] = None
|
|
666
|
+
"""The metadata of the agent."""
|
|
667
|
+
|
|
668
|
+
model: Optional[str] = None
|
|
669
|
+
"""The model handle used by the agent (format: provider/model-name)."""
|
|
670
|
+
|
|
671
|
+
api_model_settings: Optional[ModelSettings] = FieldInfo(alias="model_settings", default=None)
|
|
672
|
+
"""The model settings used by the agent."""
|
|
673
|
+
|
|
674
|
+
multi_agent_group: Optional[MultiAgentGroup] = None
|
|
675
|
+
"""Deprecated: Use `managed_group` field instead.
|
|
676
|
+
|
|
677
|
+
The multi-agent group that this agent manages.
|
|
189
678
|
"""
|
|
190
|
-
|
|
679
|
+
|
|
680
|
+
pending_approval: Optional[ApprovalRequestMessage] = None
|
|
191
681
|
"""
|
|
682
|
+
A message representing a request for approval to call a tool (generated by the
|
|
683
|
+
LLM to trigger tool execution).
|
|
192
684
|
|
|
193
|
-
|
|
685
|
+
Args: id (str): The ID of the message date (datetime): The date the message was
|
|
686
|
+
created in ISO format name (Optional[str]): The name of the sender of the
|
|
687
|
+
message tool_call (ToolCall): The tool call
|
|
194
688
|
"""
|
|
195
|
-
|
|
689
|
+
|
|
690
|
+
per_file_view_window_char_limit: Optional[int] = None
|
|
691
|
+
"""The per-file view window character limit for this agent.
|
|
692
|
+
|
|
693
|
+
Setting this too high may exceed the context window, which will break the agent.
|
|
196
694
|
"""
|
|
197
695
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
696
|
+
project_id: Optional[str] = None
|
|
697
|
+
"""The id of the project the agent belongs to."""
|
|
698
|
+
|
|
699
|
+
response_format: Optional[ResponseFormat] = None
|
|
700
|
+
"""The response format used by the agent"""
|
|
701
|
+
|
|
702
|
+
secrets: Optional[List[AgentEnvironmentVariable]] = None
|
|
703
|
+
"""The environment variables for tool execution specific to this agent."""
|
|
704
|
+
|
|
705
|
+
template_id: Optional[str] = None
|
|
706
|
+
"""The id of the template the agent belongs to."""
|
|
707
|
+
|
|
708
|
+
timezone: Optional[str] = None
|
|
709
|
+
"""The timezone of the agent (IANA format)."""
|
|
710
|
+
|
|
711
|
+
tool_exec_environment_variables: Optional[List[AgentEnvironmentVariable]] = None
|
|
712
|
+
"""Deprecated: use `secrets` field instead."""
|
|
713
|
+
|
|
714
|
+
tool_rules: Optional[List[ToolRule]] = None
|
|
715
|
+
"""The list of tool rules."""
|
|
201
716
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
smart_union = True
|
|
205
|
-
extra = pydantic.Extra.allow
|
|
717
|
+
updated_at: Optional[datetime] = None
|
|
718
|
+
"""The timestamp when the object was last updated."""
|