├── .fernignore ├── .github └── workflows │ ├── ci.yml │ └── tests.yml ├── .gitignore ├── README.md ├── poetry.lock ├── pyproject.toml ├── reference.md ├── requirements.txt ├── src └── letta_client │ ├── __init__.py │ ├── agents │ ├── __init__.py │ ├── blocks │ │ ├── __init__.py │ │ └── client.py │ ├── client.py │ ├── context │ │ ├── __init__.py │ │ └── client.py │ ├── core_memory │ │ ├── __init__.py │ │ └── client.py │ ├── groups │ │ ├── __init__.py │ │ └── client.py │ ├── memory_variables │ │ ├── __init__.py │ │ ├── client.py │ │ └── types │ │ │ ├── __init__.py │ │ │ └── memory_variables_list_response.py │ ├── messages │ │ ├── __init__.py │ │ ├── client.py │ │ └── types │ │ │ ├── __init__.py │ │ │ ├── letta_streaming_response.py │ │ │ ├── messages_modify_request.py │ │ │ └── messages_modify_response.py │ ├── passages │ │ ├── __init__.py │ │ └── client.py │ ├── sources │ │ ├── __init__.py │ │ └── client.py │ ├── templates │ │ ├── __init__.py │ │ ├── client.py │ │ └── types │ │ │ ├── __init__.py │ │ │ ├── templates_create_response.py │ │ │ ├── templates_create_version_request_return_agent_state.py │ │ │ └── templates_migrate_response.py │ ├── tools │ │ ├── __init__.py │ │ └── client.py │ └── types │ │ ├── __init__.py │ │ ├── agents_search_request_search_item.py │ │ ├── agents_search_request_search_item_one.py │ │ ├── agents_search_request_search_item_one_operator.py │ │ ├── agents_search_request_search_item_operator.py │ │ ├── agents_search_request_search_item_two.py │ │ ├── agents_search_request_search_item_zero.py │ │ ├── agents_search_response.py │ │ ├── create_agent_request_response_format.py │ │ ├── create_agent_request_tool_rules_item.py │ │ ├── update_agent_response_format.py │ │ └── update_agent_tool_rules_item.py │ ├── base_client.py │ ├── batches │ ├── __init__.py │ └── client.py │ ├── blocks │ ├── __init__.py │ ├── agents │ │ ├── __init__.py │ │ └── client.py │ └── client.py │ ├── client.py │ ├── client_side_access_tokens │ ├── __init__.py │ ├── client.py │ └── types │ │ ├── __init__.py │ │ ├── client_side_access_tokens_create_request_policy_item.py │ │ ├── client_side_access_tokens_create_request_policy_item_access_item.py │ │ ├── client_side_access_tokens_create_response.py │ │ ├── client_side_access_tokens_create_response_policy.py │ │ ├── client_side_access_tokens_create_response_policy_data_item.py │ │ └── client_side_access_tokens_create_response_policy_data_item_access_item.py │ ├── core │ ├── __init__.py │ ├── api_error.py │ ├── client_wrapper.py │ ├── datetime_utils.py │ ├── file.py │ ├── http_client.py │ ├── jsonable_encoder.py │ ├── pydantic_utilities.py │ ├── query_encoder.py │ ├── remove_none_from_dict.py │ ├── request_options.py │ ├── serialization.py │ └── unchecked_base_model.py │ ├── embedding_models │ ├── __init__.py │ └── client.py │ ├── environment.py │ ├── errors │ ├── __init__.py │ ├── bad_request_error.py │ ├── conflict_error.py │ ├── internal_server_error.py │ ├── not_found_error.py │ ├── payment_required_error.py │ └── unprocessable_entity_error.py │ ├── groups │ ├── __init__.py │ ├── client.py │ ├── messages │ │ ├── __init__.py │ │ ├── client.py │ │ └── types │ │ │ ├── __init__.py │ │ │ ├── letta_streaming_response.py │ │ │ ├── messages_modify_request.py │ │ │ └── messages_modify_response.py │ └── types │ │ ├── __init__.py │ │ ├── group_create_manager_config.py │ │ └── group_update_manager_config.py │ ├── health │ ├── __init__.py │ └── client.py │ ├── identities │ ├── __init__.py │ ├── client.py │ └── properties │ │ ├── __init__.py │ │ └── client.py │ ├── jobs │ ├── __init__.py │ └── client.py │ ├── messages │ ├── __init__.py │ └── client.py │ ├── models │ ├── __init__.py │ └── client.py │ ├── projects │ ├── __init__.py │ ├── client.py │ └── types │ │ ├── __init__.py │ │ ├── projects_list_response.py │ │ └── projects_list_response_projects_item.py │ ├── providers │ ├── __init__.py │ └── client.py │ ├── py.typed │ ├── runs │ ├── __init__.py │ ├── client.py │ ├── messages │ │ ├── __init__.py │ │ └── client.py │ ├── steps │ │ ├── __init__.py │ │ └── client.py │ └── usage │ │ ├── __init__.py │ │ └── client.py │ ├── sources │ ├── __init__.py │ ├── client.py │ ├── files │ │ ├── __init__.py │ │ └── client.py │ └── passages │ │ ├── __init__.py │ │ └── client.py │ ├── steps │ ├── __init__.py │ └── client.py │ ├── tags │ ├── __init__.py │ └── client.py │ ├── telemetry │ ├── __init__.py │ └── client.py │ ├── templates │ ├── __init__.py │ ├── agents │ │ ├── __init__.py │ │ ├── client.py │ │ └── types │ │ │ ├── __init__.py │ │ │ └── agents_create_response.py │ ├── client.py │ └── types │ │ ├── __init__.py │ │ ├── templates_list_response.py │ │ └── templates_list_response_templates_item.py │ ├── tools │ ├── __init__.py │ ├── client.py │ └── types │ │ ├── __init__.py │ │ ├── add_mcp_server_request.py │ │ ├── add_mcp_server_response_item.py │ │ ├── delete_mcp_server_response_item.py │ │ └── list_mcp_servers_response_value.py │ ├── types │ ├── __init__.py │ ├── action_model.py │ ├── action_parameters_model.py │ ├── action_response_model.py │ ├── agent_environment_variable.py │ ├── agent_schema.py │ ├── agent_schema_tool_rules_item.py │ ├── agent_state.py │ ├── agent_state_response_format.py │ ├── agent_state_tool_rules_item.py │ ├── agent_type.py │ ├── app_auth_scheme.py │ ├── app_auth_scheme_auth_mode.py │ ├── app_model.py │ ├── assistant_message.py │ ├── assistant_message_content.py │ ├── audio.py │ ├── auth_request.py │ ├── auth_response.py │ ├── auth_scheme_field.py │ ├── bad_request_error_body.py │ ├── base_64_image.py │ ├── base_tool_rule_schema.py │ ├── batch_job.py │ ├── block.py │ ├── block_update.py │ ├── chat_completion_assistant_message_param.py │ ├── chat_completion_assistant_message_param_content.py │ ├── chat_completion_assistant_message_param_content_item.py │ ├── chat_completion_audio_param.py │ ├── chat_completion_audio_param_format.py │ ├── chat_completion_audio_param_voice.py │ ├── chat_completion_content_part_image_param.py │ ├── chat_completion_content_part_input_audio_param.py │ ├── chat_completion_content_part_refusal_param.py │ ├── chat_completion_content_part_text_param.py │ ├── chat_completion_developer_message_param.py │ ├── chat_completion_developer_message_param_content.py │ ├── chat_completion_function_call_option_param.py │ ├── chat_completion_function_message_param.py │ ├── chat_completion_message_tool_call.py │ ├── chat_completion_message_tool_call_param.py │ ├── chat_completion_named_tool_choice_param.py │ ├── chat_completion_prediction_content_param.py │ ├── chat_completion_prediction_content_param_content.py │ ├── chat_completion_stream_options_param.py │ ├── chat_completion_system_message_param.py │ ├── chat_completion_system_message_param_content.py │ ├── chat_completion_tool_message_param.py │ ├── chat_completion_tool_message_param_content.py │ ├── chat_completion_tool_param.py │ ├── chat_completion_user_message_param.py │ ├── chat_completion_user_message_param_content.py │ ├── chat_completion_user_message_param_content_item.py │ ├── child_tool_rule.py │ ├── child_tool_rule_schema.py │ ├── completion_create_params_non_streaming.py │ ├── completion_create_params_non_streaming_function_call.py │ ├── completion_create_params_non_streaming_messages_item.py │ ├── completion_create_params_non_streaming_modalities_item.py │ ├── completion_create_params_non_streaming_model.py │ ├── completion_create_params_non_streaming_reasoning_effort.py │ ├── completion_create_params_non_streaming_response_format.py │ ├── completion_create_params_non_streaming_service_tier.py │ ├── completion_create_params_non_streaming_stop.py │ ├── completion_create_params_non_streaming_tool_choice.py │ ├── completion_create_params_streaming.py │ ├── completion_create_params_streaming_function_call.py │ ├── completion_create_params_streaming_messages_item.py │ ├── completion_create_params_streaming_modalities_item.py │ ├── completion_create_params_streaming_model.py │ ├── completion_create_params_streaming_reasoning_effort.py │ ├── completion_create_params_streaming_response_format.py │ ├── completion_create_params_streaming_service_tier.py │ ├── completion_create_params_streaming_stop.py │ ├── completion_create_params_streaming_tool_choice.py │ ├── components_schemas_text_content.py │ ├── conditional_tool_rule.py │ ├── conditional_tool_rule_schema.py │ ├── conflict_error_body.py │ ├── context_window_overview.py │ ├── continue_tool_rule.py │ ├── core_memory_block_schema.py │ ├── create_block.py │ ├── dynamic_manager.py │ ├── dynamic_manager_update.py │ ├── e_2_b_sandbox_config.py │ ├── embedding_config.py │ ├── embedding_config_embedding_endpoint_type.py │ ├── file.py │ ├── file_file.py │ ├── file_metadata.py │ ├── file_processing_status.py │ ├── function_call.py │ ├── function_definition_input.py │ ├── function_definition_output.py │ ├── function_output.py │ ├── function_tool.py │ ├── group.py │ ├── health.py │ ├── hidden_reasoning_message.py │ ├── hidden_reasoning_message_state.py │ ├── http_validation_error.py │ ├── identity.py │ ├── identity_property.py │ ├── identity_property_type.py │ ├── identity_property_value.py │ ├── identity_type.py │ ├── image_content.py │ ├── image_content_source.py │ ├── image_url.py │ ├── image_url_detail.py │ ├── init_tool_rule.py │ ├── input_audio.py │ ├── input_audio_format.py │ ├── internal_server_error_body.py │ ├── job.py │ ├── job_status.py │ ├── job_type.py │ ├── json_object_response_format.py │ ├── json_schema.py │ ├── json_schema_response_format.py │ ├── letta_batch_messages.py │ ├── letta_batch_request.py │ ├── letta_image.py │ ├── letta_message_content_union.py │ ├── letta_message_union.py │ ├── letta_request.py │ ├── letta_request_config.py │ ├── letta_response.py │ ├── letta_streaming_request.py │ ├── letta_usage_statistics.py │ ├── letta_user_message_content_union.py │ ├── llm_config.py │ ├── llm_config_model_endpoint_type.py │ ├── llm_config_reasoning_effort.py │ ├── local_sandbox_config.py │ ├── manager_type.py │ ├── max_count_per_step_tool_rule.py │ ├── max_count_per_step_tool_rule_schema.py │ ├── mcp_server_type.py │ ├── mcp_tool.py │ ├── memory.py │ ├── message.py │ ├── message_content_item.py │ ├── message_create.py │ ├── message_create_content.py │ ├── message_create_role.py │ ├── message_role.py │ ├── message_schema.py │ ├── message_type.py │ ├── not_found_error_body.py │ ├── not_found_error_body_message.py │ ├── omitted_reasoning_content.py │ ├── openai_types_chat_chat_completion_message_tool_call_param_function.py │ ├── openai_types_chat_chat_completion_named_tool_choice_param_function.py │ ├── openai_types_chat_completion_create_params_function.py │ ├── organization.py │ ├── organization_create.py │ ├── organization_update.py │ ├── parameter_properties.py │ ├── parameters_schema.py │ ├── parent_tool_rule.py │ ├── passage.py │ ├── payment_required_error_body.py │ ├── pip_requirement.py │ ├── provider.py │ ├── provider_category.py │ ├── provider_trace.py │ ├── provider_type.py │ ├── reasoning_content.py │ ├── reasoning_message.py │ ├── reasoning_message_source.py │ ├── redacted_reasoning_content.py │ ├── response_format_json_object.py │ ├── response_format_json_schema.py │ ├── response_format_text.py │ ├── round_robin_manager.py │ ├── round_robin_manager_update.py │ ├── run.py │ ├── sandbox_config.py │ ├── sandbox_config_create.py │ ├── sandbox_config_create_config.py │ ├── sandbox_config_update.py │ ├── sandbox_config_update_config.py │ ├── sandbox_environment_variable.py │ ├── sandbox_environment_variable_create.py │ ├── sandbox_environment_variable_update.py │ ├── sandbox_type.py │ ├── sleeptime_manager.py │ ├── sleeptime_manager_update.py │ ├── source.py │ ├── sse_server_config.py │ ├── stdio_server_config.py │ ├── step.py │ ├── supervisor_manager.py │ ├── supervisor_manager_update.py │ ├── system_message.py │ ├── tag_schema.py │ ├── terminal_tool_rule.py │ ├── text_content.py │ ├── text_response_format.py │ ├── tool.py │ ├── tool_call.py │ ├── tool_call_content.py │ ├── tool_call_delta.py │ ├── tool_call_message.py │ ├── tool_call_message_tool_call.py │ ├── tool_create.py │ ├── tool_env_var_schema.py │ ├── tool_json_schema.py │ ├── tool_return.py │ ├── tool_return_content.py │ ├── tool_return_message.py │ ├── tool_return_message_status.py │ ├── tool_return_status.py │ ├── tool_schema.py │ ├── tool_type.py │ ├── update_assistant_message.py │ ├── update_assistant_message_content.py │ ├── update_reasoning_message.py │ ├── update_system_message.py │ ├── update_user_message.py │ ├── update_user_message_content.py │ ├── url_image.py │ ├── usage_statistics.py │ ├── usage_statistics_completion_token_details.py │ ├── usage_statistics_prompt_token_details.py │ ├── user.py │ ├── user_create.py │ ├── user_message.py │ ├── user_message_content.py │ ├── user_update.py │ ├── validation_error.py │ ├── validation_error_loc_item.py │ ├── voice_sleeptime_manager.py │ ├── voice_sleeptime_manager_update.py │ ├── web_search_options.py │ ├── web_search_options_search_context_size.py │ ├── web_search_options_user_location.py │ └── web_search_options_user_location_approximate.py │ ├── version.py │ └── voice │ ├── __init__.py │ ├── client.py │ └── types │ ├── __init__.py │ └── create_voice_chat_completions_request_body.py └── tests ├── custom ├── conftest.py └── test_client.py └── utils ├── __init__.py ├── assets └── models │ ├── __init__.py │ ├── circle.py │ ├── color.py │ ├── object_with_defaults.py │ ├── object_with_optional_field.py │ ├── shape.py │ ├── square.py │ └── undiscriminated_shape.py ├── test_http_client.py ├── test_query_encoding.py └── test_serialization.py /.fernignore: -------------------------------------------------------------------------------- 1 | # Specify files that shouldn't be modified by Fern 2 | 3 | tests/custom/test_client.py 4 | tests/custom/conftest.py 5 | .github/workflows/ci.yml 6 | .github/workflows/tests.yml 7 | src/letta_client/client.py -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | pull_request: 7 | 8 | jobs: 9 | unit-test: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout repo 13 | uses: actions/checkout@v3 14 | - name: Set up python 15 | uses: actions/setup-python@v4 16 | with: 17 | python-version: 3.8 18 | - name: Bootstrap poetry 19 | run: | 20 | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 21 | - name: Install dependencies 22 | run: poetry install 23 | - name: Test 24 | env: 25 | LETTA_API_KEY: ${{ secrets.LETTA_API_KEY }} 26 | run: poetry run pytest -rP tests/custom/test_client.py 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | .mypy_cache/ 3 | __pycache__/ 4 | poetry.toml 5 | .ruff_cache/ 6 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | httpx>=0.21.2 2 | httpx-sse==0.4.0 3 | pydantic>= 1.9.2 4 | pydantic-core==^2.18.2 5 | typing_extensions>= 4.0.0 6 | -------------------------------------------------------------------------------- /src/letta_client/agents/blocks/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/agents/context/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/agents/core_memory/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/agents/groups/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/agents/memory_variables/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import MemoryVariablesListResponse 4 | 5 | __all__ = ["MemoryVariablesListResponse"] 6 | -------------------------------------------------------------------------------- /src/letta_client/agents/memory_variables/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .memory_variables_list_response import MemoryVariablesListResponse 4 | 5 | __all__ = ["MemoryVariablesListResponse"] 6 | -------------------------------------------------------------------------------- /src/letta_client/agents/memory_variables/types/memory_variables_list_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ....core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ....core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class MemoryVariablesListResponse(UncheckedBaseModel): 10 | variables: typing.Dict[str, str] 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/agents/messages/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import LettaStreamingResponse, MessagesModifyRequest, MessagesModifyResponse 4 | 5 | __all__ = ["LettaStreamingResponse", "MessagesModifyRequest", "MessagesModifyResponse"] 6 | -------------------------------------------------------------------------------- /src/letta_client/agents/messages/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .letta_streaming_response import LettaStreamingResponse 4 | from .messages_modify_request import MessagesModifyRequest 5 | from .messages_modify_response import MessagesModifyResponse 6 | 7 | __all__ = ["LettaStreamingResponse", "MessagesModifyRequest", "MessagesModifyResponse"] 8 | -------------------------------------------------------------------------------- /src/letta_client/agents/messages/types/letta_streaming_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ....types.system_message import SystemMessage 5 | from ....types.user_message import UserMessage 6 | from ....types.reasoning_message import ReasoningMessage 7 | from ....types.tool_call_message import ToolCallMessage 8 | from ....types.tool_return_message import ToolReturnMessage 9 | from ....types.assistant_message import AssistantMessage 10 | from ....types.letta_usage_statistics import LettaUsageStatistics 11 | 12 | LettaStreamingResponse = typing.Union[ 13 | SystemMessage, 14 | UserMessage, 15 | ReasoningMessage, 16 | ToolCallMessage, 17 | ToolReturnMessage, 18 | AssistantMessage, 19 | LettaUsageStatistics, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/agents/messages/types/messages_modify_request.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ....types.update_system_message import UpdateSystemMessage 5 | from ....types.update_user_message import UpdateUserMessage 6 | from ....types.update_reasoning_message import UpdateReasoningMessage 7 | from ....types.update_assistant_message import UpdateAssistantMessage 8 | 9 | MessagesModifyRequest = typing.Union[ 10 | UpdateSystemMessage, UpdateUserMessage, UpdateReasoningMessage, UpdateAssistantMessage 11 | ] 12 | -------------------------------------------------------------------------------- /src/letta_client/agents/messages/types/messages_modify_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ....types.system_message import SystemMessage 5 | from ....types.user_message import UserMessage 6 | from ....types.reasoning_message import ReasoningMessage 7 | from ....types.hidden_reasoning_message import HiddenReasoningMessage 8 | from ....types.tool_call_message import ToolCallMessage 9 | from ....types.tool_return_message import ToolReturnMessage 10 | from ....types.assistant_message import AssistantMessage 11 | 12 | MessagesModifyResponse = typing.Union[ 13 | SystemMessage, 14 | UserMessage, 15 | ReasoningMessage, 16 | HiddenReasoningMessage, 17 | ToolCallMessage, 18 | ToolReturnMessage, 19 | AssistantMessage, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/agents/passages/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/agents/sources/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/agents/templates/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import TemplatesCreateResponse, TemplatesCreateVersionRequestReturnAgentState, TemplatesMigrateResponse 4 | 5 | __all__ = ["TemplatesCreateResponse", "TemplatesCreateVersionRequestReturnAgentState", "TemplatesMigrateResponse"] 6 | -------------------------------------------------------------------------------- /src/letta_client/agents/templates/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .templates_create_response import TemplatesCreateResponse 4 | from .templates_create_version_request_return_agent_state import TemplatesCreateVersionRequestReturnAgentState 5 | from .templates_migrate_response import TemplatesMigrateResponse 6 | 7 | __all__ = ["TemplatesCreateResponse", "TemplatesCreateVersionRequestReturnAgentState", "TemplatesMigrateResponse"] 8 | -------------------------------------------------------------------------------- /src/letta_client/agents/templates/types/templates_create_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ....core.unchecked_base_model import UncheckedBaseModel 4 | import typing_extensions 5 | from ....core.serialization import FieldMetadata 6 | from ....core.pydantic_utilities import IS_PYDANTIC_V2 7 | import typing 8 | import pydantic 9 | 10 | 11 | class TemplatesCreateResponse(UncheckedBaseModel): 12 | template_name: typing_extensions.Annotated[str, FieldMetadata(alias="templateName")] 13 | template_id: typing_extensions.Annotated[str, FieldMetadata(alias="templateId")] 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/agents/templates/types/templates_create_version_request_return_agent_state.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | TemplatesCreateVersionRequestReturnAgentState = typing.Union[typing.Literal["true"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/agents/templates/types/templates_migrate_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ....core.unchecked_base_model import UncheckedBaseModel 4 | from ....core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class TemplatesMigrateResponse(UncheckedBaseModel): 10 | success: bool 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/agents/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/agents_search_request_search_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .agents_search_request_search_item_zero import AgentsSearchRequestSearchItemZero 5 | from .agents_search_request_search_item_one import AgentsSearchRequestSearchItemOne 6 | from .agents_search_request_search_item_two import AgentsSearchRequestSearchItemTwo 7 | from .agents_search_request_search_item_operator import AgentsSearchRequestSearchItemOperator 8 | 9 | AgentsSearchRequestSearchItem = typing.Union[ 10 | AgentsSearchRequestSearchItemZero, 11 | AgentsSearchRequestSearchItemOne, 12 | AgentsSearchRequestSearchItemTwo, 13 | AgentsSearchRequestSearchItemOperator, 14 | ] 15 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/agents_search_request_search_item_one.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .agents_search_request_search_item_one_operator import AgentsSearchRequestSearchItemOneOperator 6 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class AgentsSearchRequestSearchItemOne(UncheckedBaseModel): 11 | field: typing.Literal["name"] = "name" 12 | operator: AgentsSearchRequestSearchItemOneOperator 13 | value: str 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/agents_search_request_search_item_one_operator.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | AgentsSearchRequestSearchItemOneOperator = typing.Union[typing.Literal["eq", "contains"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/agents_search_request_search_item_operator.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class AgentsSearchRequestSearchItemOperator(UncheckedBaseModel): 10 | field: typing.Literal["identity"] = "identity" 11 | operator: typing.Literal["eq"] = "eq" 12 | value: str 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/agents_search_request_search_item_two.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class AgentsSearchRequestSearchItemTwo(UncheckedBaseModel): 10 | field: typing.Literal["tags"] = "tags" 11 | operator: typing.Literal["contains"] = "contains" 12 | value: typing.List[str] 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/agents_search_request_search_item_zero.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class AgentsSearchRequestSearchItemZero(UncheckedBaseModel): 10 | field: typing.Literal["version"] = "version" 11 | value: str 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/agents_search_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ...types.agent_state import AgentState 6 | import typing_extensions 7 | from ...core.serialization import FieldMetadata 8 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class AgentsSearchResponse(UncheckedBaseModel): 13 | agents: typing.List[AgentState] 14 | next_cursor: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="nextCursor")] = None 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/create_agent_request_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.json_object_response_format import JsonObjectResponseFormat 5 | from ...types.json_schema_response_format import JsonSchemaResponseFormat 6 | from ...types.text_response_format import TextResponseFormat 7 | 8 | CreateAgentRequestResponseFormat = typing.Union[JsonObjectResponseFormat, JsonSchemaResponseFormat, TextResponseFormat] 9 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/create_agent_request_tool_rules_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.conditional_tool_rule import ConditionalToolRule 5 | from ...types.child_tool_rule import ChildToolRule 6 | from ...types.continue_tool_rule import ContinueToolRule 7 | from ...types.terminal_tool_rule import TerminalToolRule 8 | from ...types.max_count_per_step_tool_rule import MaxCountPerStepToolRule 9 | from ...types.parent_tool_rule import ParentToolRule 10 | from ...types.init_tool_rule import InitToolRule 11 | 12 | CreateAgentRequestToolRulesItem = typing.Union[ 13 | ConditionalToolRule, 14 | ChildToolRule, 15 | ContinueToolRule, 16 | TerminalToolRule, 17 | MaxCountPerStepToolRule, 18 | ParentToolRule, 19 | InitToolRule, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/update_agent_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.json_object_response_format import JsonObjectResponseFormat 5 | from ...types.json_schema_response_format import JsonSchemaResponseFormat 6 | from ...types.text_response_format import TextResponseFormat 7 | 8 | UpdateAgentResponseFormat = typing.Union[JsonObjectResponseFormat, JsonSchemaResponseFormat, TextResponseFormat] 9 | -------------------------------------------------------------------------------- /src/letta_client/agents/types/update_agent_tool_rules_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.conditional_tool_rule import ConditionalToolRule 5 | from ...types.child_tool_rule import ChildToolRule 6 | from ...types.continue_tool_rule import ContinueToolRule 7 | from ...types.terminal_tool_rule import TerminalToolRule 8 | from ...types.max_count_per_step_tool_rule import MaxCountPerStepToolRule 9 | from ...types.parent_tool_rule import ParentToolRule 10 | from ...types.init_tool_rule import InitToolRule 11 | 12 | UpdateAgentToolRulesItem = typing.Union[ 13 | ConditionalToolRule, 14 | ChildToolRule, 15 | ContinueToolRule, 16 | TerminalToolRule, 17 | MaxCountPerStepToolRule, 18 | ParentToolRule, 19 | InitToolRule, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/batches/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/blocks/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from . import agents 4 | 5 | __all__ = ["agents"] 6 | -------------------------------------------------------------------------------- /src/letta_client/blocks/agents/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import ( 4 | ClientSideAccessTokensCreateRequestPolicyItem, 5 | ClientSideAccessTokensCreateRequestPolicyItemAccessItem, 6 | ClientSideAccessTokensCreateResponse, 7 | ClientSideAccessTokensCreateResponsePolicy, 8 | ClientSideAccessTokensCreateResponsePolicyDataItem, 9 | ClientSideAccessTokensCreateResponsePolicyDataItemAccessItem, 10 | ) 11 | 12 | __all__ = [ 13 | "ClientSideAccessTokensCreateRequestPolicyItem", 14 | "ClientSideAccessTokensCreateRequestPolicyItemAccessItem", 15 | "ClientSideAccessTokensCreateResponse", 16 | "ClientSideAccessTokensCreateResponsePolicy", 17 | "ClientSideAccessTokensCreateResponsePolicyDataItem", 18 | "ClientSideAccessTokensCreateResponsePolicyDataItemAccessItem", 19 | ] 20 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .client_side_access_tokens_create_request_policy_item import ClientSideAccessTokensCreateRequestPolicyItem 4 | from .client_side_access_tokens_create_request_policy_item_access_item import ( 5 | ClientSideAccessTokensCreateRequestPolicyItemAccessItem, 6 | ) 7 | from .client_side_access_tokens_create_response import ClientSideAccessTokensCreateResponse 8 | from .client_side_access_tokens_create_response_policy import ClientSideAccessTokensCreateResponsePolicy 9 | from .client_side_access_tokens_create_response_policy_data_item import ( 10 | ClientSideAccessTokensCreateResponsePolicyDataItem, 11 | ) 12 | from .client_side_access_tokens_create_response_policy_data_item_access_item import ( 13 | ClientSideAccessTokensCreateResponsePolicyDataItemAccessItem, 14 | ) 15 | 16 | __all__ = [ 17 | "ClientSideAccessTokensCreateRequestPolicyItem", 18 | "ClientSideAccessTokensCreateRequestPolicyItemAccessItem", 19 | "ClientSideAccessTokensCreateResponse", 20 | "ClientSideAccessTokensCreateResponsePolicy", 21 | "ClientSideAccessTokensCreateResponsePolicyDataItem", 22 | "ClientSideAccessTokensCreateResponsePolicyDataItemAccessItem", 23 | ] 24 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/types/client_side_access_tokens_create_request_policy_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .client_side_access_tokens_create_request_policy_item_access_item import ( 6 | ClientSideAccessTokensCreateRequestPolicyItemAccessItem, 7 | ) 8 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class ClientSideAccessTokensCreateRequestPolicyItem(UncheckedBaseModel): 13 | type: typing.Literal["agent"] = "agent" 14 | id: str 15 | access: typing.List[ClientSideAccessTokensCreateRequestPolicyItemAccessItem] 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/types/client_side_access_tokens_create_request_policy_item_access_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ClientSideAccessTokensCreateRequestPolicyItemAccessItem = typing.Union[ 6 | typing.Literal["read_messages", "write_messages", "read_agent", "write_agent"], typing.Any 7 | ] 8 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | from .client_side_access_tokens_create_response_policy import ClientSideAccessTokensCreateResponsePolicy 5 | import typing_extensions 6 | from ...core.serialization import FieldMetadata 7 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 8 | import typing 9 | import pydantic 10 | 11 | 12 | class ClientSideAccessTokensCreateResponse(UncheckedBaseModel): 13 | policy: ClientSideAccessTokensCreateResponsePolicy 14 | token: str 15 | hostname: str 16 | expires_at: typing_extensions.Annotated[str, FieldMetadata(alias="expiresAt")] 17 | 18 | if IS_PYDANTIC_V2: 19 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 20 | else: 21 | 22 | class Config: 23 | frozen = True 24 | smart_union = True 25 | extra = pydantic.Extra.allow 26 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .client_side_access_tokens_create_response_policy_data_item import ( 6 | ClientSideAccessTokensCreateResponsePolicyDataItem, 7 | ) 8 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class ClientSideAccessTokensCreateResponsePolicy(UncheckedBaseModel): 13 | version: typing.Literal["1"] = "1" 14 | data: typing.List[ClientSideAccessTokensCreateResponsePolicyDataItem] 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .client_side_access_tokens_create_response_policy_data_item_access_item import ( 6 | ClientSideAccessTokensCreateResponsePolicyDataItemAccessItem, 7 | ) 8 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class ClientSideAccessTokensCreateResponsePolicyDataItem(UncheckedBaseModel): 13 | type: typing.Literal["agent"] = "agent" 14 | id: str 15 | access: typing.List[ClientSideAccessTokensCreateResponsePolicyDataItemAccessItem] 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/client_side_access_tokens/types/client_side_access_tokens_create_response_policy_data_item_access_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ClientSideAccessTokensCreateResponsePolicyDataItemAccessItem = typing.Union[ 6 | typing.Literal["read_messages", "write_messages", "read_agent", "write_agent"], typing.Any 7 | ] 8 | -------------------------------------------------------------------------------- /src/letta_client/core/api_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | 6 | class ApiError(Exception): 7 | status_code: typing.Optional[int] 8 | body: typing.Any 9 | 10 | def __init__(self, *, status_code: typing.Optional[int] = None, body: typing.Any = None): 11 | self.status_code = status_code 12 | self.body = body 13 | 14 | def __str__(self) -> str: 15 | return f"status_code: {self.status_code}, body: {self.body}" 16 | -------------------------------------------------------------------------------- /src/letta_client/core/datetime_utils.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import datetime as dt 4 | 5 | 6 | def serialize_datetime(v: dt.datetime) -> str: 7 | """ 8 | Serialize a datetime including timezone info. 9 | 10 | Uses the timezone info provided if present, otherwise uses the current runtime's timezone info. 11 | 12 | UTC datetimes end in "Z" while all other timezones are represented as offset from UTC, e.g. +05:00. 13 | """ 14 | 15 | def _serialize_zoned_datetime(v: dt.datetime) -> str: 16 | if v.tzinfo is not None and v.tzinfo.tzname(None) == dt.timezone.utc.tzname(None): 17 | # UTC is a special case where we use "Z" at the end instead of "+00:00" 18 | return v.isoformat().replace("+00:00", "Z") 19 | else: 20 | # Delegate to the typical +/- offset format 21 | return v.isoformat() 22 | 23 | if v.tzinfo is not None: 24 | return _serialize_zoned_datetime(v) 25 | else: 26 | local_tz = dt.datetime.now().astimezone().tzinfo 27 | localized_dt = v.replace(tzinfo=local_tz) 28 | return _serialize_zoned_datetime(localized_dt) 29 | -------------------------------------------------------------------------------- /src/letta_client/core/remove_none_from_dict.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from typing import Any, Dict, Mapping, Optional 4 | 5 | 6 | def remove_none_from_dict(original: Mapping[str, Optional[Any]]) -> Dict[str, Any]: 7 | new: Dict[str, Any] = {} 8 | for key, value in original.items(): 9 | if value is not None: 10 | new[key] = value 11 | return new 12 | -------------------------------------------------------------------------------- /src/letta_client/embedding_models/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/environment.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import enum 4 | 5 | 6 | class LettaEnvironment(enum.Enum): 7 | LETTA_CLOUD = "https://api.letta.com" 8 | SELF_HOSTED = "http://localhost:8283" 9 | -------------------------------------------------------------------------------- /src/letta_client/errors/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .bad_request_error import BadRequestError 4 | from .conflict_error import ConflictError 5 | from .internal_server_error import InternalServerError 6 | from .not_found_error import NotFoundError 7 | from .payment_required_error import PaymentRequiredError 8 | from .unprocessable_entity_error import UnprocessableEntityError 9 | 10 | __all__ = [ 11 | "BadRequestError", 12 | "ConflictError", 13 | "InternalServerError", 14 | "NotFoundError", 15 | "PaymentRequiredError", 16 | "UnprocessableEntityError", 17 | ] 18 | -------------------------------------------------------------------------------- /src/letta_client/errors/bad_request_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.api_error import ApiError 4 | import typing 5 | 6 | 7 | class BadRequestError(ApiError): 8 | def __init__(self, body: typing.Optional[typing.Any]): 9 | super().__init__(status_code=400, body=body) 10 | -------------------------------------------------------------------------------- /src/letta_client/errors/conflict_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.api_error import ApiError 4 | from ..types.conflict_error_body import ConflictErrorBody 5 | 6 | 7 | class ConflictError(ApiError): 8 | def __init__(self, body: ConflictErrorBody): 9 | super().__init__(status_code=409, body=body) 10 | -------------------------------------------------------------------------------- /src/letta_client/errors/internal_server_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.api_error import ApiError 4 | import typing 5 | 6 | 7 | class InternalServerError(ApiError): 8 | def __init__(self, body: typing.Optional[typing.Any]): 9 | super().__init__(status_code=500, body=body) 10 | -------------------------------------------------------------------------------- /src/letta_client/errors/not_found_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.api_error import ApiError 4 | import typing 5 | 6 | 7 | class NotFoundError(ApiError): 8 | def __init__(self, body: typing.Optional[typing.Any]): 9 | super().__init__(status_code=404, body=body) 10 | -------------------------------------------------------------------------------- /src/letta_client/errors/payment_required_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.api_error import ApiError 4 | from ..types.payment_required_error_body import PaymentRequiredErrorBody 5 | 6 | 7 | class PaymentRequiredError(ApiError): 8 | def __init__(self, body: PaymentRequiredErrorBody): 9 | super().__init__(status_code=402, body=body) 10 | -------------------------------------------------------------------------------- /src/letta_client/errors/unprocessable_entity_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.api_error import ApiError 4 | from ..types.http_validation_error import HttpValidationError 5 | 6 | 7 | class UnprocessableEntityError(ApiError): 8 | def __init__(self, body: HttpValidationError): 9 | super().__init__(status_code=422, body=body) 10 | -------------------------------------------------------------------------------- /src/letta_client/groups/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import GroupCreateManagerConfig, GroupUpdateManagerConfig 4 | from . import messages 5 | from .messages import LettaStreamingResponse, MessagesModifyRequest, MessagesModifyResponse 6 | 7 | __all__ = [ 8 | "GroupCreateManagerConfig", 9 | "GroupUpdateManagerConfig", 10 | "LettaStreamingResponse", 11 | "MessagesModifyRequest", 12 | "MessagesModifyResponse", 13 | "messages", 14 | ] 15 | -------------------------------------------------------------------------------- /src/letta_client/groups/messages/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import LettaStreamingResponse, MessagesModifyRequest, MessagesModifyResponse 4 | 5 | __all__ = ["LettaStreamingResponse", "MessagesModifyRequest", "MessagesModifyResponse"] 6 | -------------------------------------------------------------------------------- /src/letta_client/groups/messages/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .letta_streaming_response import LettaStreamingResponse 4 | from .messages_modify_request import MessagesModifyRequest 5 | from .messages_modify_response import MessagesModifyResponse 6 | 7 | __all__ = ["LettaStreamingResponse", "MessagesModifyRequest", "MessagesModifyResponse"] 8 | -------------------------------------------------------------------------------- /src/letta_client/groups/messages/types/letta_streaming_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ....types.system_message import SystemMessage 5 | from ....types.user_message import UserMessage 6 | from ....types.reasoning_message import ReasoningMessage 7 | from ....types.tool_call_message import ToolCallMessage 8 | from ....types.tool_return_message import ToolReturnMessage 9 | from ....types.assistant_message import AssistantMessage 10 | from ....types.letta_usage_statistics import LettaUsageStatistics 11 | 12 | LettaStreamingResponse = typing.Union[ 13 | SystemMessage, 14 | UserMessage, 15 | ReasoningMessage, 16 | ToolCallMessage, 17 | ToolReturnMessage, 18 | AssistantMessage, 19 | LettaUsageStatistics, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/groups/messages/types/messages_modify_request.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ....types.update_system_message import UpdateSystemMessage 5 | from ....types.update_user_message import UpdateUserMessage 6 | from ....types.update_reasoning_message import UpdateReasoningMessage 7 | from ....types.update_assistant_message import UpdateAssistantMessage 8 | 9 | MessagesModifyRequest = typing.Union[ 10 | UpdateSystemMessage, UpdateUserMessage, UpdateReasoningMessage, UpdateAssistantMessage 11 | ] 12 | -------------------------------------------------------------------------------- /src/letta_client/groups/messages/types/messages_modify_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ....types.system_message import SystemMessage 5 | from ....types.user_message import UserMessage 6 | from ....types.reasoning_message import ReasoningMessage 7 | from ....types.hidden_reasoning_message import HiddenReasoningMessage 8 | from ....types.tool_call_message import ToolCallMessage 9 | from ....types.tool_return_message import ToolReturnMessage 10 | from ....types.assistant_message import AssistantMessage 11 | 12 | MessagesModifyResponse = typing.Union[ 13 | SystemMessage, 14 | UserMessage, 15 | ReasoningMessage, 16 | HiddenReasoningMessage, 17 | ToolCallMessage, 18 | ToolReturnMessage, 19 | AssistantMessage, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/groups/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .group_create_manager_config import GroupCreateManagerConfig 4 | from .group_update_manager_config import GroupUpdateManagerConfig 5 | 6 | __all__ = ["GroupCreateManagerConfig", "GroupUpdateManagerConfig"] 7 | -------------------------------------------------------------------------------- /src/letta_client/groups/types/group_create_manager_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.dynamic_manager import DynamicManager 5 | from ...types.round_robin_manager import RoundRobinManager 6 | from ...types.sleeptime_manager import SleeptimeManager 7 | from ...types.supervisor_manager import SupervisorManager 8 | from ...types.voice_sleeptime_manager import VoiceSleeptimeManager 9 | 10 | GroupCreateManagerConfig = typing.Union[ 11 | DynamicManager, RoundRobinManager, SleeptimeManager, SupervisorManager, VoiceSleeptimeManager 12 | ] 13 | -------------------------------------------------------------------------------- /src/letta_client/groups/types/group_update_manager_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.dynamic_manager_update import DynamicManagerUpdate 5 | from ...types.round_robin_manager_update import RoundRobinManagerUpdate 6 | from ...types.sleeptime_manager_update import SleeptimeManagerUpdate 7 | from ...types.supervisor_manager_update import SupervisorManagerUpdate 8 | from ...types.voice_sleeptime_manager_update import VoiceSleeptimeManagerUpdate 9 | 10 | GroupUpdateManagerConfig = typing.Union[ 11 | DynamicManagerUpdate, 12 | RoundRobinManagerUpdate, 13 | SleeptimeManagerUpdate, 14 | SupervisorManagerUpdate, 15 | VoiceSleeptimeManagerUpdate, 16 | ] 17 | -------------------------------------------------------------------------------- /src/letta_client/health/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/identities/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from . import properties 4 | 5 | __all__ = ["properties"] 6 | -------------------------------------------------------------------------------- /src/letta_client/identities/properties/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/jobs/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/messages/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/models/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/projects/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import ProjectsListResponse, ProjectsListResponseProjectsItem 4 | 5 | __all__ = ["ProjectsListResponse", "ProjectsListResponseProjectsItem"] 6 | -------------------------------------------------------------------------------- /src/letta_client/projects/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .projects_list_response import ProjectsListResponse 4 | from .projects_list_response_projects_item import ProjectsListResponseProjectsItem 5 | 6 | __all__ = ["ProjectsListResponse", "ProjectsListResponseProjectsItem"] 7 | -------------------------------------------------------------------------------- /src/letta_client/projects/types/projects_list_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .projects_list_response_projects_item import ProjectsListResponseProjectsItem 6 | import typing_extensions 7 | from ...core.serialization import FieldMetadata 8 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class ProjectsListResponse(UncheckedBaseModel): 13 | projects: typing.List[ProjectsListResponseProjectsItem] 14 | has_next_page: typing_extensions.Annotated[bool, FieldMetadata(alias="hasNextPage")] 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/projects/types/projects_list_response_projects_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class ProjectsListResponseProjectsItem(UncheckedBaseModel): 10 | name: str 11 | slug: str 12 | id: str 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/providers/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/py.typed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/letta-ai/letta-python/70c89b7b1b92a36ef4b0e80ea1581063157ce144/src/letta_client/py.typed -------------------------------------------------------------------------------- /src/letta_client/runs/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from . import messages, steps, usage 4 | 5 | __all__ = ["messages", "steps", "usage"] 6 | -------------------------------------------------------------------------------- /src/letta_client/runs/messages/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/runs/steps/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/runs/usage/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/sources/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from . import files, passages 4 | 5 | __all__ = ["files", "passages"] 6 | -------------------------------------------------------------------------------- /src/letta_client/sources/files/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/sources/passages/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/steps/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/tags/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/telemetry/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /src/letta_client/templates/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import TemplatesListResponse, TemplatesListResponseTemplatesItem 4 | from . import agents 5 | from .agents import AgentsCreateResponse 6 | 7 | __all__ = ["AgentsCreateResponse", "TemplatesListResponse", "TemplatesListResponseTemplatesItem", "agents"] 8 | -------------------------------------------------------------------------------- /src/letta_client/templates/agents/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import AgentsCreateResponse 4 | 5 | __all__ = ["AgentsCreateResponse"] 6 | -------------------------------------------------------------------------------- /src/letta_client/templates/agents/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .agents_create_response import AgentsCreateResponse 4 | 5 | __all__ = ["AgentsCreateResponse"] 6 | -------------------------------------------------------------------------------- /src/letta_client/templates/agents/types/agents_create_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ....core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ....types.agent_state import AgentState 6 | from ....core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class AgentsCreateResponse(UncheckedBaseModel): 11 | agents: typing.List[AgentState] 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/templates/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .templates_list_response import TemplatesListResponse 4 | from .templates_list_response_templates_item import TemplatesListResponseTemplatesItem 5 | 6 | __all__ = ["TemplatesListResponse", "TemplatesListResponseTemplatesItem"] 7 | -------------------------------------------------------------------------------- /src/letta_client/templates/types/templates_list_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .templates_list_response_templates_item import TemplatesListResponseTemplatesItem 6 | import typing_extensions 7 | from ...core.serialization import FieldMetadata 8 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class TemplatesListResponse(UncheckedBaseModel): 13 | templates: typing.List[TemplatesListResponseTemplatesItem] 14 | has_next_page: typing_extensions.Annotated[bool, FieldMetadata(alias="hasNextPage")] 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/templates/types/templates_list_response_templates_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ...core.unchecked_base_model import UncheckedBaseModel 4 | from ...core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class TemplatesListResponseTemplatesItem(UncheckedBaseModel): 10 | name: str 11 | id: str 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/tools/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import ( 4 | AddMcpServerRequest, 5 | AddMcpServerResponseItem, 6 | DeleteMcpServerResponseItem, 7 | ListMcpServersResponseValue, 8 | ) 9 | 10 | __all__ = [ 11 | "AddMcpServerRequest", 12 | "AddMcpServerResponseItem", 13 | "DeleteMcpServerResponseItem", 14 | "ListMcpServersResponseValue", 15 | ] 16 | -------------------------------------------------------------------------------- /src/letta_client/tools/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .add_mcp_server_request import AddMcpServerRequest 4 | from .add_mcp_server_response_item import AddMcpServerResponseItem 5 | from .delete_mcp_server_response_item import DeleteMcpServerResponseItem 6 | from .list_mcp_servers_response_value import ListMcpServersResponseValue 7 | 8 | __all__ = [ 9 | "AddMcpServerRequest", 10 | "AddMcpServerResponseItem", 11 | "DeleteMcpServerResponseItem", 12 | "ListMcpServersResponseValue", 13 | ] 14 | -------------------------------------------------------------------------------- /src/letta_client/tools/types/add_mcp_server_request.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.stdio_server_config import StdioServerConfig 5 | from ...types.sse_server_config import SseServerConfig 6 | 7 | AddMcpServerRequest = typing.Union[StdioServerConfig, SseServerConfig] 8 | -------------------------------------------------------------------------------- /src/letta_client/tools/types/add_mcp_server_response_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.stdio_server_config import StdioServerConfig 5 | from ...types.sse_server_config import SseServerConfig 6 | 7 | AddMcpServerResponseItem = typing.Union[StdioServerConfig, SseServerConfig] 8 | -------------------------------------------------------------------------------- /src/letta_client/tools/types/delete_mcp_server_response_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.stdio_server_config import StdioServerConfig 5 | from ...types.sse_server_config import SseServerConfig 6 | 7 | DeleteMcpServerResponseItem = typing.Union[StdioServerConfig, SseServerConfig] 8 | -------------------------------------------------------------------------------- /src/letta_client/tools/types/list_mcp_servers_response_value.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.sse_server_config import SseServerConfig 5 | from ...types.stdio_server_config import StdioServerConfig 6 | 7 | ListMcpServersResponseValue = typing.Union[SseServerConfig, StdioServerConfig] 8 | -------------------------------------------------------------------------------- /src/letta_client/types/action_parameters_model.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ActionParametersModel(UncheckedBaseModel): 10 | """ 11 | Action parameter data models. 12 | """ 13 | 14 | properties: typing.Dict[str, typing.Optional[typing.Any]] 15 | title: str 16 | type: str 17 | required: typing.Optional[typing.List[str]] = None 18 | examples: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/action_response_model.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ActionResponseModel(UncheckedBaseModel): 10 | """ 11 | Action response data model. 12 | """ 13 | 14 | properties: typing.Dict[str, typing.Optional[typing.Any]] 15 | title: str 16 | type: str 17 | required: typing.Optional[typing.List[str]] = None 18 | examples: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/agent_schema_tool_rules_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .base_tool_rule_schema import BaseToolRuleSchema 5 | from .child_tool_rule_schema import ChildToolRuleSchema 6 | from .max_count_per_step_tool_rule_schema import MaxCountPerStepToolRuleSchema 7 | from .conditional_tool_rule_schema import ConditionalToolRuleSchema 8 | 9 | AgentSchemaToolRulesItem = typing.Union[ 10 | BaseToolRuleSchema, ChildToolRuleSchema, MaxCountPerStepToolRuleSchema, ConditionalToolRuleSchema 11 | ] 12 | -------------------------------------------------------------------------------- /src/letta_client/types/agent_state_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .json_object_response_format import JsonObjectResponseFormat 5 | from .json_schema_response_format import JsonSchemaResponseFormat 6 | from .text_response_format import TextResponseFormat 7 | 8 | AgentStateResponseFormat = typing.Union[JsonObjectResponseFormat, JsonSchemaResponseFormat, TextResponseFormat] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/agent_state_tool_rules_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .conditional_tool_rule import ConditionalToolRule 5 | from .child_tool_rule import ChildToolRule 6 | from .continue_tool_rule import ContinueToolRule 7 | from .terminal_tool_rule import TerminalToolRule 8 | from .max_count_per_step_tool_rule import MaxCountPerStepToolRule 9 | from .parent_tool_rule import ParentToolRule 10 | from .init_tool_rule import InitToolRule 11 | 12 | AgentStateToolRulesItem = typing.Union[ 13 | ConditionalToolRule, 14 | ChildToolRule, 15 | ContinueToolRule, 16 | TerminalToolRule, 17 | MaxCountPerStepToolRule, 18 | ParentToolRule, 19 | InitToolRule, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/types/agent_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | AgentType = typing.Union[ 6 | typing.Literal[ 7 | "memgpt_agent", 8 | "memgpt_v2_agent", 9 | "split_thread_agent", 10 | "sleeptime_agent", 11 | "voice_convo_agent", 12 | "voice_sleeptime_agent", 13 | ], 14 | typing.Any, 15 | ] 16 | -------------------------------------------------------------------------------- /src/letta_client/types/app_auth_scheme.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .app_auth_scheme_auth_mode import AppAuthSchemeAuthMode 5 | import typing 6 | from .auth_scheme_field import AuthSchemeField 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | import pydantic 9 | 10 | 11 | class AppAuthScheme(UncheckedBaseModel): 12 | """ 13 | App authenticatio scheme. 14 | """ 15 | 16 | scheme_name: str 17 | auth_mode: AppAuthSchemeAuthMode 18 | fields: typing.List[AuthSchemeField] 19 | proxy: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None 20 | authorization_url: typing.Optional[str] = None 21 | token_url: typing.Optional[str] = None 22 | default_scopes: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None 23 | token_response_metadata: typing.Optional[typing.List[typing.Optional[typing.Any]]] = None 24 | client_id: typing.Optional[str] = None 25 | client_secret: typing.Optional[str] = None 26 | 27 | if IS_PYDANTIC_V2: 28 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 29 | else: 30 | 31 | class Config: 32 | frozen = True 33 | smart_union = True 34 | extra = pydantic.Extra.allow 35 | -------------------------------------------------------------------------------- /src/letta_client/types/app_auth_scheme_auth_mode.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | AppAuthSchemeAuthMode = typing.Union[ 6 | typing.Literal[ 7 | "OAUTH2", 8 | "OAUTH1", 9 | "API_KEY", 10 | "BASIC", 11 | "BEARER_TOKEN", 12 | "BASIC_WITH_JWT", 13 | "GOOGLE_SERVICE_ACCOUNT", 14 | "GOOGLEADS_AUTH", 15 | "NO_AUTH", 16 | "CALCOM_AUTH", 17 | ], 18 | typing.Any, 19 | ] 20 | -------------------------------------------------------------------------------- /src/letta_client/types/assistant_message_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .components_schemas_text_content import ComponentsSchemasTextContent 5 | 6 | AssistantMessageContent = typing.Union[typing.List[ComponentsSchemasTextContent], str] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/audio.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class Audio(UncheckedBaseModel): 10 | id: str 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/auth_request.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class AuthRequest(UncheckedBaseModel): 10 | password: typing.Optional[str] = pydantic.Field(default=None) 11 | """ 12 | Admin password provided when starting the Letta server 13 | """ 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/auth_response.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing_extensions 5 | from ..core.serialization import FieldMetadata 6 | import pydantic 7 | import typing 8 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 9 | 10 | 11 | class AuthResponse(UncheckedBaseModel): 12 | uuid_: typing_extensions.Annotated[str, FieldMetadata(alias="uuid")] = pydantic.Field() 13 | """ 14 | UUID of the user 15 | """ 16 | 17 | is_admin: typing.Optional[bool] = pydantic.Field(default=None) 18 | """ 19 | Whether the user is an admin 20 | """ 21 | 22 | if IS_PYDANTIC_V2: 23 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 24 | else: 25 | 26 | class Config: 27 | frozen = True 28 | smart_union = True 29 | extra = pydantic.Extra.allow 30 | -------------------------------------------------------------------------------- /src/letta_client/types/auth_scheme_field.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class AuthSchemeField(UncheckedBaseModel): 10 | """ 11 | Auth scheme field. 12 | """ 13 | 14 | name: str 15 | display_name: typing.Optional[str] = None 16 | description: str 17 | type: str 18 | default: typing.Optional[str] = None 19 | required: typing.Optional[bool] = None 20 | expected_from_customer: typing.Optional[bool] = None 21 | get_current_user_endpoint: typing.Optional[str] = None 22 | 23 | if IS_PYDANTIC_V2: 24 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 25 | else: 26 | 27 | class Config: 28 | frozen = True 29 | smart_union = True 30 | extra = pydantic.Extra.allow 31 | -------------------------------------------------------------------------------- /src/letta_client/types/bad_request_error_body.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class BadRequestErrorBody(UncheckedBaseModel): 10 | message: str 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/base_64_image.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class Base64Image(UncheckedBaseModel): 10 | type: typing.Literal["base64"] = "base64" 11 | media_type: str = pydantic.Field() 12 | """ 13 | The media type for the image. 14 | """ 15 | 16 | data: str = pydantic.Field() 17 | """ 18 | The base64 encoded image data. 19 | """ 20 | 21 | detail: typing.Optional[str] = pydantic.Field(default=None) 22 | """ 23 | What level of detail to use when processing and understanding the image (low, high, or auto to let the model decide) 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/base_tool_rule_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class BaseToolRuleSchema(UncheckedBaseModel): 10 | tool_name: str 11 | type: str 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_assistant_message_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .audio import Audio 6 | from .chat_completion_assistant_message_param_content import ChatCompletionAssistantMessageParamContent 7 | from .function_call import FunctionCall 8 | from .chat_completion_message_tool_call_param import ChatCompletionMessageToolCallParam 9 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 10 | import pydantic 11 | 12 | 13 | class ChatCompletionAssistantMessageParam(UncheckedBaseModel): 14 | role: typing.Literal["assistant"] = "assistant" 15 | audio: typing.Optional[Audio] = None 16 | content: typing.Optional[ChatCompletionAssistantMessageParamContent] = None 17 | function_call: typing.Optional[FunctionCall] = None 18 | name: typing.Optional[str] = None 19 | refusal: typing.Optional[str] = None 20 | tool_calls: typing.Optional[typing.List[ChatCompletionMessageToolCallParam]] = None 21 | 22 | if IS_PYDANTIC_V2: 23 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 24 | else: 25 | 26 | class Config: 27 | frozen = True 28 | smart_union = True 29 | extra = pydantic.Extra.allow 30 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_assistant_message_param_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_assistant_message_param_content_item import ChatCompletionAssistantMessageParamContentItem 5 | 6 | ChatCompletionAssistantMessageParamContent = typing.Union[ 7 | str, typing.List[ChatCompletionAssistantMessageParamContentItem] 8 | ] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_assistant_message_param_content_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam 5 | from .chat_completion_content_part_refusal_param import ChatCompletionContentPartRefusalParam 6 | 7 | ChatCompletionAssistantMessageParamContentItem = typing.Union[ 8 | ChatCompletionContentPartTextParam, ChatCompletionContentPartRefusalParam 9 | ] 10 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_audio_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .chat_completion_audio_param_format import ChatCompletionAudioParamFormat 5 | from .chat_completion_audio_param_voice import ChatCompletionAudioParamVoice 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import typing 8 | import pydantic 9 | 10 | 11 | class ChatCompletionAudioParam(UncheckedBaseModel): 12 | format: ChatCompletionAudioParamFormat 13 | voice: ChatCompletionAudioParamVoice 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_audio_param_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ChatCompletionAudioParamFormat = typing.Union[typing.Literal["wav", "mp3", "flac", "opus", "pcm16"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_audio_param_voice.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ChatCompletionAudioParamVoice = typing.Union[ 6 | str, 7 | typing.Literal["alloy"], 8 | typing.Literal["ash"], 9 | typing.Literal["ballad"], 10 | typing.Literal["coral"], 11 | typing.Literal["echo"], 12 | typing.Literal["fable"], 13 | typing.Literal["onyx"], 14 | typing.Literal["nova"], 15 | typing.Literal["sage"], 16 | typing.Literal["shimmer"], 17 | typing.Literal["verse"], 18 | ] 19 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_content_part_image_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .image_url import ImageUrl 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionContentPartImageParam(UncheckedBaseModel): 11 | image_url: ImageUrl 12 | type: typing.Literal["image_url"] = "image_url" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_content_part_input_audio_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .input_audio import InputAudio 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionContentPartInputAudioParam(UncheckedBaseModel): 11 | input_audio: InputAudio 12 | type: typing.Literal["input_audio"] = "input_audio" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_content_part_refusal_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ChatCompletionContentPartRefusalParam(UncheckedBaseModel): 10 | refusal: str 11 | type: typing.Literal["refusal"] = "refusal" 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_content_part_text_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ChatCompletionContentPartTextParam(UncheckedBaseModel): 10 | text: str 11 | type: typing.Literal["text"] = "text" 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_developer_message_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .chat_completion_developer_message_param_content import ChatCompletionDeveloperMessageParamContent 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionDeveloperMessageParam(UncheckedBaseModel): 11 | content: ChatCompletionDeveloperMessageParamContent 12 | role: typing.Literal["developer"] = "developer" 13 | name: typing.Optional[str] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_developer_message_param_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam 5 | 6 | ChatCompletionDeveloperMessageParamContent = typing.Union[str, typing.List[ChatCompletionContentPartTextParam]] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_function_call_option_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class ChatCompletionFunctionCallOptionParam(UncheckedBaseModel): 10 | name: str 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_function_message_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ChatCompletionFunctionMessageParam(UncheckedBaseModel): 10 | content: typing.Optional[str] = None 11 | name: str 12 | role: typing.Literal["function"] = "function" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_message_tool_call.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .function_output import FunctionOutput 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionMessageToolCall(UncheckedBaseModel): 11 | id: str 12 | function: FunctionOutput 13 | type: typing.Literal["function"] = "function" 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_message_tool_call_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .openai_types_chat_chat_completion_message_tool_call_param_function import ( 5 | OpenaiTypesChatChatCompletionMessageToolCallParamFunction, 6 | ) 7 | import typing 8 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class ChatCompletionMessageToolCallParam(UncheckedBaseModel): 13 | id: str 14 | function: OpenaiTypesChatChatCompletionMessageToolCallParamFunction 15 | type: typing.Literal["function"] = "function" 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_named_tool_choice_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .openai_types_chat_chat_completion_named_tool_choice_param_function import ( 5 | OpenaiTypesChatChatCompletionNamedToolChoiceParamFunction, 6 | ) 7 | import typing 8 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class ChatCompletionNamedToolChoiceParam(UncheckedBaseModel): 13 | function: OpenaiTypesChatChatCompletionNamedToolChoiceParamFunction 14 | type: typing.Literal["function"] = "function" 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_prediction_content_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .chat_completion_prediction_content_param_content import ChatCompletionPredictionContentParamContent 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionPredictionContentParam(UncheckedBaseModel): 11 | content: ChatCompletionPredictionContentParamContent 12 | type: typing.Literal["content"] = "content" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_prediction_content_param_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam 5 | 6 | ChatCompletionPredictionContentParamContent = typing.Union[str, typing.List[ChatCompletionContentPartTextParam]] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_stream_options_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ChatCompletionStreamOptionsParam(UncheckedBaseModel): 10 | include_usage: typing.Optional[bool] = None 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_system_message_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .chat_completion_system_message_param_content import ChatCompletionSystemMessageParamContent 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionSystemMessageParam(UncheckedBaseModel): 11 | content: ChatCompletionSystemMessageParamContent 12 | role: typing.Literal["system"] = "system" 13 | name: typing.Optional[str] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_system_message_param_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam 5 | 6 | ChatCompletionSystemMessageParamContent = typing.Union[str, typing.List[ChatCompletionContentPartTextParam]] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_tool_message_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .chat_completion_tool_message_param_content import ChatCompletionToolMessageParamContent 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionToolMessageParam(UncheckedBaseModel): 11 | content: ChatCompletionToolMessageParamContent 12 | role: typing.Literal["tool"] = "tool" 13 | tool_call_id: str 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_tool_message_param_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam 5 | 6 | ChatCompletionToolMessageParamContent = typing.Union[str, typing.List[ChatCompletionContentPartTextParam]] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_tool_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .function_definition_input import FunctionDefinitionInput 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionToolParam(UncheckedBaseModel): 11 | function: FunctionDefinitionInput 12 | type: typing.Literal["function"] = "function" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_user_message_param.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .chat_completion_user_message_param_content import ChatCompletionUserMessageParamContent 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ChatCompletionUserMessageParam(UncheckedBaseModel): 11 | content: ChatCompletionUserMessageParamContent 12 | role: typing.Literal["user"] = "user" 13 | name: typing.Optional[str] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_user_message_param_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_user_message_param_content_item import ChatCompletionUserMessageParamContentItem 5 | 6 | ChatCompletionUserMessageParamContent = typing.Union[str, typing.List[ChatCompletionUserMessageParamContentItem]] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/chat_completion_user_message_param_content_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_content_part_text_param import ChatCompletionContentPartTextParam 5 | from .chat_completion_content_part_image_param import ChatCompletionContentPartImageParam 6 | from .chat_completion_content_part_input_audio_param import ChatCompletionContentPartInputAudioParam 7 | from .file import File 8 | 9 | ChatCompletionUserMessageParamContentItem = typing.Union[ 10 | ChatCompletionContentPartTextParam, 11 | ChatCompletionContentPartImageParam, 12 | ChatCompletionContentPartInputAudioParam, 13 | File, 14 | ] 15 | -------------------------------------------------------------------------------- /src/letta_client/types/child_tool_rule.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class ChildToolRule(UncheckedBaseModel): 10 | """ 11 | A ToolRule represents a tool that can be invoked by the agent. 12 | """ 13 | 14 | tool_name: str = pydantic.Field() 15 | """ 16 | The name of the tool. Must exist in the database for the user's organization. 17 | """ 18 | 19 | type: typing.Literal["constrain_child_tools"] = "constrain_child_tools" 20 | children: typing.List[str] = pydantic.Field() 21 | """ 22 | The children tools that can be invoked. 23 | """ 24 | 25 | if IS_PYDANTIC_V2: 26 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 27 | else: 28 | 29 | class Config: 30 | frozen = True 31 | smart_union = True 32 | extra = pydantic.Extra.allow 33 | -------------------------------------------------------------------------------- /src/letta_client/types/child_tool_rule_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ChildToolRuleSchema(UncheckedBaseModel): 10 | tool_name: str 11 | type: str 12 | children: typing.List[str] 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_function_call.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_function_call_option_param import ChatCompletionFunctionCallOptionParam 5 | 6 | CompletionCreateParamsNonStreamingFunctionCall = typing.Union[ 7 | typing.Literal["none"], typing.Literal["auto"], ChatCompletionFunctionCallOptionParam 8 | ] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_messages_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_developer_message_param import ChatCompletionDeveloperMessageParam 5 | from .chat_completion_system_message_param import ChatCompletionSystemMessageParam 6 | from .chat_completion_user_message_param import ChatCompletionUserMessageParam 7 | from .chat_completion_assistant_message_param import ChatCompletionAssistantMessageParam 8 | from .chat_completion_tool_message_param import ChatCompletionToolMessageParam 9 | from .chat_completion_function_message_param import ChatCompletionFunctionMessageParam 10 | 11 | CompletionCreateParamsNonStreamingMessagesItem = typing.Union[ 12 | ChatCompletionDeveloperMessageParam, 13 | ChatCompletionSystemMessageParam, 14 | ChatCompletionUserMessageParam, 15 | ChatCompletionAssistantMessageParam, 16 | ChatCompletionToolMessageParam, 17 | ChatCompletionFunctionMessageParam, 18 | ] 19 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_modalities_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsNonStreamingModalitiesItem = typing.Union[typing.Literal["text", "audio"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_reasoning_effort.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsNonStreamingReasoningEffort = typing.Union[typing.Literal["low", "medium", "high"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .response_format_text import ResponseFormatText 5 | from .response_format_json_schema import ResponseFormatJsonSchema 6 | from .response_format_json_object import ResponseFormatJsonObject 7 | 8 | CompletionCreateParamsNonStreamingResponseFormat = typing.Union[ 9 | ResponseFormatText, ResponseFormatJsonSchema, ResponseFormatJsonObject 10 | ] 11 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_service_tier.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsNonStreamingServiceTier = typing.Union[typing.Literal["auto", "default"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_stop.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsNonStreamingStop = typing.Union[str, typing.List[str]] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_non_streaming_tool_choice.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_named_tool_choice_param import ChatCompletionNamedToolChoiceParam 5 | 6 | CompletionCreateParamsNonStreamingToolChoice = typing.Union[ 7 | typing.Literal["none"], typing.Literal["auto"], typing.Literal["required"], ChatCompletionNamedToolChoiceParam 8 | ] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_function_call.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_function_call_option_param import ChatCompletionFunctionCallOptionParam 5 | 6 | CompletionCreateParamsStreamingFunctionCall = typing.Union[ 7 | typing.Literal["none"], typing.Literal["auto"], ChatCompletionFunctionCallOptionParam 8 | ] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_messages_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_developer_message_param import ChatCompletionDeveloperMessageParam 5 | from .chat_completion_system_message_param import ChatCompletionSystemMessageParam 6 | from .chat_completion_user_message_param import ChatCompletionUserMessageParam 7 | from .chat_completion_assistant_message_param import ChatCompletionAssistantMessageParam 8 | from .chat_completion_tool_message_param import ChatCompletionToolMessageParam 9 | from .chat_completion_function_message_param import ChatCompletionFunctionMessageParam 10 | 11 | CompletionCreateParamsStreamingMessagesItem = typing.Union[ 12 | ChatCompletionDeveloperMessageParam, 13 | ChatCompletionSystemMessageParam, 14 | ChatCompletionUserMessageParam, 15 | ChatCompletionAssistantMessageParam, 16 | ChatCompletionToolMessageParam, 17 | ChatCompletionFunctionMessageParam, 18 | ] 19 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_modalities_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsStreamingModalitiesItem = typing.Union[typing.Literal["text", "audio"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_reasoning_effort.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsStreamingReasoningEffort = typing.Union[typing.Literal["low", "medium", "high"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .response_format_text import ResponseFormatText 5 | from .response_format_json_schema import ResponseFormatJsonSchema 6 | from .response_format_json_object import ResponseFormatJsonObject 7 | 8 | CompletionCreateParamsStreamingResponseFormat = typing.Union[ 9 | ResponseFormatText, ResponseFormatJsonSchema, ResponseFormatJsonObject 10 | ] 11 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_service_tier.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsStreamingServiceTier = typing.Union[typing.Literal["auto", "default"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_stop.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | CompletionCreateParamsStreamingStop = typing.Union[str, typing.List[str]] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/completion_create_params_streaming_tool_choice.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .chat_completion_named_tool_choice_param import ChatCompletionNamedToolChoiceParam 5 | 6 | CompletionCreateParamsStreamingToolChoice = typing.Union[ 7 | typing.Literal["none"], typing.Literal["auto"], typing.Literal["required"], ChatCompletionNamedToolChoiceParam 8 | ] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/components_schemas_text_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .text_content import TextContent 4 | 5 | ComponentsSchemasTextContent = TextContent 6 | -------------------------------------------------------------------------------- /src/letta_client/types/conditional_tool_rule_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ConditionalToolRuleSchema(UncheckedBaseModel): 10 | tool_name: str 11 | type: str 12 | default_child: typing.Optional[str] = None 13 | child_output_mapping: typing.Dict[str, str] 14 | require_output_mapping: bool 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/conflict_error_body.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ConflictErrorBody(UncheckedBaseModel): 10 | message: typing.Literal[ 11 | "You can only migrate agents to a new versioned agent template that belongs to the same project" 12 | ] = "You can only migrate agents to a new versioned agent template that belongs to the same project" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/continue_tool_rule.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class ContinueToolRule(UncheckedBaseModel): 10 | """ 11 | Represents a tool rule configuration where if this tool gets called, it must continue the agent loop. 12 | """ 13 | 14 | tool_name: str = pydantic.Field() 15 | """ 16 | The name of the tool. Must exist in the database for the user's organization. 17 | """ 18 | 19 | type: typing.Literal["continue_loop"] = "continue_loop" 20 | 21 | if IS_PYDANTIC_V2: 22 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 23 | else: 24 | 25 | class Config: 26 | frozen = True 27 | smart_union = True 28 | extra = pydantic.Extra.allow 29 | -------------------------------------------------------------------------------- /src/letta_client/types/core_memory_block_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import typing_extensions 6 | from ..core.serialization import FieldMetadata 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | import pydantic 9 | 10 | 11 | class CoreMemoryBlockSchema(UncheckedBaseModel): 12 | created_at: str 13 | description: typing.Optional[str] = None 14 | is_template: bool 15 | label: str 16 | limit: int 17 | metadata: typing_extensions.Annotated[ 18 | typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_") 19 | ] = None 20 | template_name: typing.Optional[str] = None 21 | updated_at: str 22 | value: str 23 | 24 | if IS_PYDANTIC_V2: 25 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 26 | else: 27 | 28 | class Config: 29 | frozen = True 30 | smart_union = True 31 | extra = pydantic.Extra.allow 32 | -------------------------------------------------------------------------------- /src/letta_client/types/dynamic_manager.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class DynamicManager(UncheckedBaseModel): 10 | manager_type: typing.Literal["dynamic"] = "dynamic" 11 | manager_agent_id: str = pydantic.Field() 12 | """ 13 | 14 | """ 15 | 16 | termination_token: typing.Optional[str] = pydantic.Field(default=None) 17 | """ 18 | 19 | """ 20 | 21 | max_turns: typing.Optional[int] = pydantic.Field(default=None) 22 | """ 23 | 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/dynamic_manager_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class DynamicManagerUpdate(UncheckedBaseModel): 10 | manager_type: typing.Literal["dynamic"] = "dynamic" 11 | manager_agent_id: typing.Optional[str] = pydantic.Field(default=None) 12 | """ 13 | 14 | """ 15 | 16 | termination_token: typing.Optional[str] = pydantic.Field(default=None) 17 | """ 18 | 19 | """ 20 | 21 | max_turns: typing.Optional[int] = pydantic.Field(default=None) 22 | """ 23 | 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/e_2_b_sandbox_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class E2BSandboxConfig(UncheckedBaseModel): 10 | timeout: typing.Optional[int] = pydantic.Field(default=None) 11 | """ 12 | Time limit for the sandbox (in seconds). 13 | """ 14 | 15 | template: typing.Optional[str] = pydantic.Field(default=None) 16 | """ 17 | The E2B template id (docker image). 18 | """ 19 | 20 | pip_requirements: typing.Optional[typing.List[str]] = pydantic.Field(default=None) 21 | """ 22 | A list of pip packages to install on the E2B Sandbox 23 | """ 24 | 25 | if IS_PYDANTIC_V2: 26 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 27 | else: 28 | 29 | class Config: 30 | frozen = True 31 | smart_union = True 32 | extra = pydantic.Extra.allow 33 | -------------------------------------------------------------------------------- /src/letta_client/types/embedding_config_embedding_endpoint_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | EmbeddingConfigEmbeddingEndpointType = typing.Union[ 6 | typing.Literal[ 7 | "openai", 8 | "anthropic", 9 | "bedrock", 10 | "cohere", 11 | "google_ai", 12 | "google_vertex", 13 | "azure", 14 | "groq", 15 | "ollama", 16 | "webui", 17 | "webui-legacy", 18 | "lmstudio", 19 | "lmstudio-legacy", 20 | "llamacpp", 21 | "koboldcpp", 22 | "vllm", 23 | "hugging-face", 24 | "mistral", 25 | "together", 26 | ], 27 | typing.Any, 28 | ] 29 | -------------------------------------------------------------------------------- /src/letta_client/types/file.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .file_file import FileFile 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class File(UncheckedBaseModel): 11 | file: FileFile 12 | type: typing.Literal["file"] = "file" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/file_file.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class FileFile(UncheckedBaseModel): 10 | file_data: typing.Optional[str] = None 11 | file_id: typing.Optional[str] = None 12 | filename: typing.Optional[str] = None 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/file_processing_status.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | FileProcessingStatus = typing.Union[typing.Literal["pending", "parsing", "embedding", "completed", "error"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/function_call.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class FunctionCall(UncheckedBaseModel): 10 | arguments: str 11 | name: str 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/function_definition_input.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class FunctionDefinitionInput(UncheckedBaseModel): 10 | name: str 11 | description: typing.Optional[str] = None 12 | parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None 13 | strict: typing.Optional[bool] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/function_definition_output.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class FunctionDefinitionOutput(UncheckedBaseModel): 10 | name: str 11 | description: typing.Optional[str] = None 12 | parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None 13 | strict: typing.Optional[bool] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/function_output.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class FunctionOutput(UncheckedBaseModel): 10 | arguments: str 11 | name: str 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/function_tool.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .function_definition_output import FunctionDefinitionOutput 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class FunctionTool(UncheckedBaseModel): 11 | function: FunctionDefinitionOutput 12 | type: typing.Literal["function"] = "function" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/health.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class Health(UncheckedBaseModel): 10 | """ 11 | Health check response body 12 | """ 13 | 14 | version: str 15 | status: str 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/types/hidden_reasoning_message_state.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | HiddenReasoningMessageState = typing.Union[typing.Literal["redacted", "omitted"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/http_validation_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .validation_error import ValidationError 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class HttpValidationError(UncheckedBaseModel): 11 | detail: typing.Optional[typing.List[ValidationError]] = None 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/identity_property.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | from .identity_property_value import IdentityPropertyValue 6 | from .identity_property_type import IdentityPropertyType 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | import typing 9 | 10 | 11 | class IdentityProperty(UncheckedBaseModel): 12 | """ 13 | A property of an identity 14 | """ 15 | 16 | key: str = pydantic.Field() 17 | """ 18 | The key of the property 19 | """ 20 | 21 | value: IdentityPropertyValue = pydantic.Field() 22 | """ 23 | The value of the property 24 | """ 25 | 26 | type: IdentityPropertyType = pydantic.Field() 27 | """ 28 | The type of the property 29 | """ 30 | 31 | if IS_PYDANTIC_V2: 32 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 33 | else: 34 | 35 | class Config: 36 | frozen = True 37 | smart_union = True 38 | extra = pydantic.Extra.allow 39 | -------------------------------------------------------------------------------- /src/letta_client/types/identity_property_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | IdentityPropertyType = typing.Union[typing.Literal["string", "number", "boolean", "json"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/identity_property_value.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | IdentityPropertyValue = typing.Union[str, int, float, bool, typing.Dict[str, typing.Optional[typing.Any]]] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/identity_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | IdentityType = typing.Union[typing.Literal["org", "user", "other"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/image_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .image_content_source import ImageContentSource 6 | import pydantic 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class ImageContent(UncheckedBaseModel): 11 | type: typing.Literal["image"] = "image" 12 | source: ImageContentSource = pydantic.Field() 13 | """ 14 | The source of the image. 15 | """ 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/types/image_content_source.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .base_64_image import Base64Image 5 | from .letta_image import LettaImage 6 | from .url_image import UrlImage 7 | 8 | ImageContentSource = typing.Union[Base64Image, LettaImage, UrlImage] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/image_url.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .image_url_detail import ImageUrlDetail 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ImageUrl(UncheckedBaseModel): 11 | url: str 12 | detail: typing.Optional[ImageUrlDetail] = None 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/image_url_detail.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ImageUrlDetail = typing.Union[typing.Literal["auto", "low", "high"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/init_tool_rule.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class InitToolRule(UncheckedBaseModel): 10 | """ 11 | Represents the initial tool rule configuration. 12 | """ 13 | 14 | tool_name: str = pydantic.Field() 15 | """ 16 | The name of the tool. Must exist in the database for the user's organization. 17 | """ 18 | 19 | type: typing.Literal["run_first"] = "run_first" 20 | 21 | if IS_PYDANTIC_V2: 22 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 23 | else: 24 | 25 | class Config: 26 | frozen = True 27 | smart_union = True 28 | extra = pydantic.Extra.allow 29 | -------------------------------------------------------------------------------- /src/letta_client/types/input_audio.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .input_audio_format import InputAudioFormat 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import typing 7 | import pydantic 8 | 9 | 10 | class InputAudio(UncheckedBaseModel): 11 | data: str 12 | format: InputAudioFormat 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/input_audio_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | InputAudioFormat = typing.Union[typing.Literal["wav", "mp3"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/internal_server_error_body.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class InternalServerErrorBody(UncheckedBaseModel): 10 | message: typing.Literal["Failed to create agent template"] = "Failed to create agent template" 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/job_status.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | JobStatus = typing.Union[ 6 | typing.Literal["not_started", "created", "running", "completed", "failed", "pending", "cancelled", "expired"], 7 | typing.Any, 8 | ] 9 | -------------------------------------------------------------------------------- /src/letta_client/types/job_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | JobType = typing.Union[typing.Literal["job", "run", "batch"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/json_object_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class JsonObjectResponseFormat(UncheckedBaseModel): 10 | """ 11 | Response format for JSON object responses. 12 | """ 13 | 14 | type: typing.Literal["json_object"] = "json_object" 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/json_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import typing_extensions 6 | from ..core.serialization import FieldMetadata 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | import pydantic 9 | 10 | 11 | class JsonSchema(UncheckedBaseModel): 12 | name: str 13 | description: typing.Optional[str] = None 14 | schema_: typing_extensions.Annotated[ 15 | typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="schema") 16 | ] = None 17 | strict: typing.Optional[bool] = None 18 | 19 | if IS_PYDANTIC_V2: 20 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 21 | else: 22 | 23 | class Config: 24 | frozen = True 25 | smart_union = True 26 | extra = pydantic.Extra.allow 27 | -------------------------------------------------------------------------------- /src/letta_client/types/json_schema_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class JsonSchemaResponseFormat(UncheckedBaseModel): 10 | """ 11 | Response format for JSON schema-based responses. 12 | """ 13 | 14 | type: typing.Literal["json_schema"] = "json_schema" 15 | json_schema: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() 16 | """ 17 | The JSON schema of the response. 18 | """ 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/letta_batch_messages.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .message import Message 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class LettaBatchMessages(UncheckedBaseModel): 11 | messages: typing.List[Message] 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/letta_image.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class LettaImage(UncheckedBaseModel): 10 | type: typing.Literal["letta"] = "letta" 11 | file_id: str = pydantic.Field() 12 | """ 13 | The unique identifier of the image file persisted in storage. 14 | """ 15 | 16 | media_type: typing.Optional[str] = pydantic.Field(default=None) 17 | """ 18 | The media type for the image. 19 | """ 20 | 21 | data: typing.Optional[str] = pydantic.Field(default=None) 22 | """ 23 | The base64 encoded image data. 24 | """ 25 | 26 | detail: typing.Optional[str] = pydantic.Field(default=None) 27 | """ 28 | What level of detail to use when processing and understanding the image (low, high, or auto to let the model decide) 29 | """ 30 | 31 | if IS_PYDANTIC_V2: 32 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 33 | else: 34 | 35 | class Config: 36 | frozen = True 37 | smart_union = True 38 | extra = pydantic.Extra.allow 39 | -------------------------------------------------------------------------------- /src/letta_client/types/letta_message_content_union.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .text_content import TextContent 5 | from .image_content import ImageContent 6 | from .tool_call_content import ToolCallContent 7 | from .reasoning_content import ReasoningContent 8 | from .redacted_reasoning_content import RedactedReasoningContent 9 | from .omitted_reasoning_content import OmittedReasoningContent 10 | 11 | LettaMessageContentUnion = typing.Union[ 12 | TextContent, ImageContent, ToolCallContent, ReasoningContent, RedactedReasoningContent, OmittedReasoningContent 13 | ] 14 | -------------------------------------------------------------------------------- /src/letta_client/types/letta_message_union.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .system_message import SystemMessage 5 | from .user_message import UserMessage 6 | from .reasoning_message import ReasoningMessage 7 | from .hidden_reasoning_message import HiddenReasoningMessage 8 | from .tool_call_message import ToolCallMessage 9 | from .tool_return_message import ToolReturnMessage 10 | from .assistant_message import AssistantMessage 11 | 12 | LettaMessageUnion = typing.Union[ 13 | SystemMessage, 14 | UserMessage, 15 | ReasoningMessage, 16 | HiddenReasoningMessage, 17 | ToolCallMessage, 18 | ToolReturnMessage, 19 | AssistantMessage, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/types/letta_request_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class LettaRequestConfig(UncheckedBaseModel): 10 | use_assistant_message: typing.Optional[bool] = pydantic.Field(default=None) 11 | """ 12 | Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects. 13 | """ 14 | 15 | assistant_message_tool_name: typing.Optional[str] = pydantic.Field(default=None) 16 | """ 17 | The name of the designated message tool. 18 | """ 19 | 20 | assistant_message_tool_kwarg: typing.Optional[str] = pydantic.Field(default=None) 21 | """ 22 | The name of the message argument in the designated message tool. 23 | """ 24 | 25 | if IS_PYDANTIC_V2: 26 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 27 | else: 28 | 29 | class Config: 30 | frozen = True 31 | smart_union = True 32 | extra = pydantic.Extra.allow 33 | -------------------------------------------------------------------------------- /src/letta_client/types/letta_user_message_content_union.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .text_content import TextContent 5 | from .image_content import ImageContent 6 | 7 | LettaUserMessageContentUnion = typing.Union[TextContent, ImageContent] 8 | -------------------------------------------------------------------------------- /src/letta_client/types/llm_config_model_endpoint_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | LlmConfigModelEndpointType = typing.Union[ 6 | typing.Literal[ 7 | "openai", 8 | "anthropic", 9 | "cohere", 10 | "google_ai", 11 | "google_vertex", 12 | "azure", 13 | "groq", 14 | "ollama", 15 | "webui", 16 | "webui-legacy", 17 | "lmstudio", 18 | "lmstudio-legacy", 19 | "lmstudio-chatcompletions", 20 | "llamacpp", 21 | "koboldcpp", 22 | "vllm", 23 | "hugging-face", 24 | "mistral", 25 | "together", 26 | "bedrock", 27 | "deepseek", 28 | "xai", 29 | ], 30 | typing.Any, 31 | ] 32 | -------------------------------------------------------------------------------- /src/letta_client/types/llm_config_reasoning_effort.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | LlmConfigReasoningEffort = typing.Union[typing.Literal["low", "medium", "high"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/manager_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ManagerType = typing.Union[ 6 | typing.Literal["round_robin", "supervisor", "dynamic", "sleeptime", "voice_sleeptime", "swarm"], typing.Any 7 | ] 8 | -------------------------------------------------------------------------------- /src/letta_client/types/max_count_per_step_tool_rule.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class MaxCountPerStepToolRule(UncheckedBaseModel): 10 | """ 11 | Represents a tool rule configuration which constrains the total number of times this tool can be invoked in a single step. 12 | """ 13 | 14 | tool_name: str = pydantic.Field() 15 | """ 16 | The name of the tool. Must exist in the database for the user's organization. 17 | """ 18 | 19 | type: typing.Literal["max_count_per_step"] = "max_count_per_step" 20 | max_count_limit: int = pydantic.Field() 21 | """ 22 | The max limit for the total number of times this tool can be invoked in a single step. 23 | """ 24 | 25 | if IS_PYDANTIC_V2: 26 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 27 | else: 28 | 29 | class Config: 30 | frozen = True 31 | smart_union = True 32 | extra = pydantic.Extra.allow 33 | -------------------------------------------------------------------------------- /src/letta_client/types/max_count_per_step_tool_rule_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class MaxCountPerStepToolRuleSchema(UncheckedBaseModel): 10 | tool_name: str 11 | type: str 12 | max_count_limit: int 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/mcp_server_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | McpServerType = typing.Union[typing.Literal["sse", "stdio"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/mcp_tool.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import typing_extensions 6 | from ..core.serialization import FieldMetadata 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | import pydantic 9 | 10 | 11 | class McpTool(UncheckedBaseModel): 12 | """ 13 | A simple wrapper around MCP's tool definition (to avoid conflict with our own) 14 | """ 15 | 16 | name: str 17 | description: typing.Optional[str] = None 18 | input_schema: typing_extensions.Annotated[ 19 | typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="inputSchema") 20 | ] 21 | 22 | if IS_PYDANTIC_V2: 23 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 24 | else: 25 | 26 | class Config: 27 | frozen = True 28 | smart_union = True 29 | extra = pydantic.Extra.allow 30 | -------------------------------------------------------------------------------- /src/letta_client/types/memory.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .block import Block 6 | import pydantic 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class Memory(UncheckedBaseModel): 11 | """ 12 | Represents the in-context memory (i.e. Core memory) of the agent. This includes both the `Block` objects (labelled by sections), as well as tools to edit the blocks. 13 | """ 14 | 15 | blocks: typing.List[Block] = pydantic.Field() 16 | """ 17 | Memory blocks contained in the agent's in-context memory 18 | """ 19 | 20 | file_blocks: typing.Optional[typing.List[Block]] = pydantic.Field(default=None) 21 | """ 22 | Blocks representing the agent's in-context memory of an attached file 23 | """ 24 | 25 | prompt_template: typing.Optional[str] = pydantic.Field(default=None) 26 | """ 27 | Jinja2 template for compiling memory blocks into a prompt string 28 | """ 29 | 30 | if IS_PYDANTIC_V2: 31 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 32 | else: 33 | 34 | class Config: 35 | frozen = True 36 | smart_union = True 37 | extra = pydantic.Extra.allow 38 | -------------------------------------------------------------------------------- /src/letta_client/types/message_content_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .image_content import ImageContent 5 | from .omitted_reasoning_content import OmittedReasoningContent 6 | from .reasoning_content import ReasoningContent 7 | from .redacted_reasoning_content import RedactedReasoningContent 8 | from .text_content import TextContent 9 | from .tool_call_content import ToolCallContent 10 | from .tool_return_content import ToolReturnContent 11 | 12 | MessageContentItem = typing.Union[ 13 | ImageContent, 14 | OmittedReasoningContent, 15 | ReasoningContent, 16 | RedactedReasoningContent, 17 | TextContent, 18 | ToolCallContent, 19 | ToolReturnContent, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/types/message_create_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .letta_message_content_union import LettaMessageContentUnion 5 | 6 | MessageCreateContent = typing.Union[typing.List[LettaMessageContentUnion], str] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/message_create_role.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | MessageCreateRole = typing.Union[typing.Literal["user", "system", "assistant"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/message_role.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | MessageRole = typing.Union[typing.Literal["assistant", "user", "tool", "function", "system"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/message_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .text_content import TextContent 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class MessageSchema(UncheckedBaseModel): 11 | created_at: str 12 | group_id: typing.Optional[str] = None 13 | model: typing.Optional[str] = None 14 | name: typing.Optional[str] = None 15 | role: str 16 | content: typing.List[TextContent] 17 | tool_call_id: typing.Optional[str] = None 18 | tool_calls: typing.List[typing.Optional[typing.Any]] 19 | tool_returns: typing.List[typing.Optional[typing.Any]] 20 | updated_at: str 21 | 22 | if IS_PYDANTIC_V2: 23 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 24 | else: 25 | 26 | class Config: 27 | frozen = True 28 | smart_union = True 29 | extra = pydantic.Extra.allow 30 | -------------------------------------------------------------------------------- /src/letta_client/types/message_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | MessageType = typing.Union[ 6 | typing.Literal[ 7 | "system_message", 8 | "user_message", 9 | "assistant_message", 10 | "reasoning_message", 11 | "hidden_reasoning_message", 12 | "tool_call_message", 13 | "tool_return_message", 14 | ], 15 | typing.Any, 16 | ] 17 | -------------------------------------------------------------------------------- /src/letta_client/types/not_found_error_body.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class NotFoundErrorBody(UncheckedBaseModel): 10 | message: typing.Literal["Agent not found"] = "Agent not found" 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/not_found_error_body_message.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | NotFoundErrorBodyMessage = typing.Union[ 6 | typing.Literal[ 7 | "Agent provided is a template or not found, you can only migrate deployed agents", 8 | "Template version provided does not exist", 9 | ], 10 | typing.Any, 11 | ] 12 | -------------------------------------------------------------------------------- /src/letta_client/types/omitted_reasoning_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class OmittedReasoningContent(UncheckedBaseModel): 10 | type: typing.Literal["omitted_reasoning"] = "omitted_reasoning" 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/openai_types_chat_chat_completion_message_tool_call_param_function.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class OpenaiTypesChatChatCompletionMessageToolCallParamFunction(UncheckedBaseModel): 10 | arguments: str 11 | name: str 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/openai_types_chat_chat_completion_named_tool_choice_param_function.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class OpenaiTypesChatChatCompletionNamedToolChoiceParamFunction(UncheckedBaseModel): 10 | name: str 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/openai_types_chat_completion_create_params_function.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class OpenaiTypesChatCompletionCreateParamsFunction(UncheckedBaseModel): 10 | name: str 11 | description: typing.Optional[str] = None 12 | parameters: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/organization.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | import datetime as dt 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class Organization(UncheckedBaseModel): 11 | id: typing.Optional[str] = pydantic.Field(default=None) 12 | """ 13 | The human-friendly ID of the Org 14 | """ 15 | 16 | name: typing.Optional[str] = pydantic.Field(default=None) 17 | """ 18 | The name of the organization. 19 | """ 20 | 21 | created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None) 22 | """ 23 | The creation date of the organization. 24 | """ 25 | 26 | privileged_tools: typing.Optional[bool] = pydantic.Field(default=None) 27 | """ 28 | Whether the organization has access to privileged tools. 29 | """ 30 | 31 | if IS_PYDANTIC_V2: 32 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 33 | else: 34 | 35 | class Config: 36 | frozen = True 37 | smart_union = True 38 | extra = pydantic.Extra.allow 39 | -------------------------------------------------------------------------------- /src/letta_client/types/organization_create.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class OrganizationCreate(UncheckedBaseModel): 10 | name: typing.Optional[str] = pydantic.Field(default=None) 11 | """ 12 | The name of the organization. 13 | """ 14 | 15 | privileged_tools: typing.Optional[bool] = pydantic.Field(default=None) 16 | """ 17 | Whether the organization has access to privileged tools. 18 | """ 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/organization_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class OrganizationUpdate(UncheckedBaseModel): 10 | name: typing.Optional[str] = pydantic.Field(default=None) 11 | """ 12 | The name of the organization. 13 | """ 14 | 15 | privileged_tools: typing.Optional[bool] = pydantic.Field(default=None) 16 | """ 17 | Whether the organization has access to privileged tools. 18 | """ 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/parameter_properties.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ParameterProperties(UncheckedBaseModel): 10 | type: str 11 | description: typing.Optional[str] = None 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/parameters_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .parameter_properties import ParameterProperties 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ParametersSchema(UncheckedBaseModel): 11 | type: typing.Optional[str] = None 12 | properties: typing.Dict[str, ParameterProperties] 13 | required: typing.Optional[typing.List[str]] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/parent_tool_rule.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class ParentToolRule(UncheckedBaseModel): 10 | """ 11 | A ToolRule that only allows a child tool to be called if the parent has been called. 12 | """ 13 | 14 | tool_name: str = pydantic.Field() 15 | """ 16 | The name of the tool. Must exist in the database for the user's organization. 17 | """ 18 | 19 | type: typing.Literal["parent_last_tool"] = "parent_last_tool" 20 | children: typing.List[str] = pydantic.Field() 21 | """ 22 | The children tools that can be invoked. 23 | """ 24 | 25 | if IS_PYDANTIC_V2: 26 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 27 | else: 28 | 29 | class Config: 30 | frozen = True 31 | smart_union = True 32 | extra = pydantic.Extra.allow 33 | -------------------------------------------------------------------------------- /src/letta_client/types/payment_required_error_body.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class PaymentRequiredErrorBody(UncheckedBaseModel): 10 | message: str 11 | limit: float 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/pip_requirement.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class PipRequirement(UncheckedBaseModel): 10 | name: str = pydantic.Field() 11 | """ 12 | Name of the pip package. 13 | """ 14 | 15 | version: typing.Optional[str] = pydantic.Field(default=None) 16 | """ 17 | Optional version of the package, following semantic versioning. 18 | """ 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/provider_category.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ProviderCategory = typing.Union[typing.Literal["base", "byok"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/provider_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ProviderType = typing.Union[ 6 | typing.Literal[ 7 | "anthropic", 8 | "bedrock", 9 | "google_ai", 10 | "google_vertex", 11 | "openai", 12 | "letta", 13 | "deepseek", 14 | "lmstudio_openai", 15 | "xai", 16 | "mistral", 17 | "ollama", 18 | "groq", 19 | "together", 20 | "azure", 21 | "vllm", 22 | ], 23 | typing.Any, 24 | ] 25 | -------------------------------------------------------------------------------- /src/letta_client/types/reasoning_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class ReasoningContent(UncheckedBaseModel): 10 | type: typing.Literal["reasoning"] = "reasoning" 11 | is_native: bool = pydantic.Field() 12 | """ 13 | Whether the reasoning content was generated by a reasoner model that processed this step. 14 | """ 15 | 16 | reasoning: str = pydantic.Field() 17 | """ 18 | The intermediate reasoning or thought process content. 19 | """ 20 | 21 | signature: typing.Optional[str] = pydantic.Field(default=None) 22 | """ 23 | A unique identifier for this reasoning step. 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/reasoning_message_source.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ReasoningMessageSource = typing.Union[typing.Literal["reasoner_model", "non_reasoner_model"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/redacted_reasoning_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class RedactedReasoningContent(UncheckedBaseModel): 10 | type: typing.Literal["redacted_reasoning"] = "redacted_reasoning" 11 | data: str = pydantic.Field() 12 | """ 13 | The redacted or filtered intermediate reasoning content. 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/response_format_json_object.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ResponseFormatJsonObject(UncheckedBaseModel): 10 | type: typing.Literal["json_object"] = "json_object" 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/response_format_json_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .json_schema import JsonSchema 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ResponseFormatJsonSchema(UncheckedBaseModel): 11 | json_schema: JsonSchema 12 | type: typing.Literal["json_schema"] = "json_schema" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/response_format_text.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ResponseFormatText(UncheckedBaseModel): 10 | type: typing.Literal["text"] = "text" 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/round_robin_manager.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class RoundRobinManager(UncheckedBaseModel): 10 | manager_type: typing.Literal["round_robin"] = "round_robin" 11 | max_turns: typing.Optional[int] = pydantic.Field(default=None) 12 | """ 13 | 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/round_robin_manager_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class RoundRobinManagerUpdate(UncheckedBaseModel): 10 | manager_type: typing.Literal["round_robin"] = "round_robin" 11 | max_turns: typing.Optional[int] = pydantic.Field(default=None) 12 | """ 13 | 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/sandbox_config_create.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .sandbox_config_create_config import SandboxConfigCreateConfig 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import typing 8 | 9 | 10 | class SandboxConfigCreate(UncheckedBaseModel): 11 | config: SandboxConfigCreateConfig = pydantic.Field() 12 | """ 13 | The configuration for the sandbox. 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/sandbox_config_create_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .local_sandbox_config import LocalSandboxConfig 5 | from .e_2_b_sandbox_config import E2BSandboxConfig 6 | 7 | SandboxConfigCreateConfig = typing.Union[LocalSandboxConfig, E2BSandboxConfig] 8 | -------------------------------------------------------------------------------- /src/letta_client/types/sandbox_config_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .sandbox_config_update_config import SandboxConfigUpdateConfig 6 | import pydantic 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class SandboxConfigUpdate(UncheckedBaseModel): 11 | """ 12 | Pydantic model for updating SandboxConfig fields. 13 | """ 14 | 15 | config: typing.Optional[SandboxConfigUpdateConfig] = pydantic.Field(default=None) 16 | """ 17 | The JSON configuration data for the sandbox. 18 | """ 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/sandbox_config_update_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .local_sandbox_config import LocalSandboxConfig 5 | from .e_2_b_sandbox_config import E2BSandboxConfig 6 | 7 | SandboxConfigUpdateConfig = typing.Union[LocalSandboxConfig, E2BSandboxConfig] 8 | -------------------------------------------------------------------------------- /src/letta_client/types/sandbox_environment_variable_create.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class SandboxEnvironmentVariableCreate(UncheckedBaseModel): 10 | key: str = pydantic.Field() 11 | """ 12 | The name of the environment variable. 13 | """ 14 | 15 | value: str = pydantic.Field() 16 | """ 17 | The value of the environment variable. 18 | """ 19 | 20 | description: typing.Optional[str] = pydantic.Field(default=None) 21 | """ 22 | An optional description of the environment variable. 23 | """ 24 | 25 | if IS_PYDANTIC_V2: 26 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 27 | else: 28 | 29 | class Config: 30 | frozen = True 31 | smart_union = True 32 | extra = pydantic.Extra.allow 33 | -------------------------------------------------------------------------------- /src/letta_client/types/sandbox_environment_variable_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class SandboxEnvironmentVariableUpdate(UncheckedBaseModel): 10 | key: typing.Optional[str] = pydantic.Field(default=None) 11 | """ 12 | The name of the environment variable. 13 | """ 14 | 15 | value: typing.Optional[str] = pydantic.Field(default=None) 16 | """ 17 | The value of the environment variable. 18 | """ 19 | 20 | description: typing.Optional[str] = pydantic.Field(default=None) 21 | """ 22 | An optional description of the environment variable. 23 | """ 24 | 25 | if IS_PYDANTIC_V2: 26 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 27 | else: 28 | 29 | class Config: 30 | frozen = True 31 | smart_union = True 32 | extra = pydantic.Extra.allow 33 | -------------------------------------------------------------------------------- /src/letta_client/types/sandbox_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | SandboxType = typing.Union[typing.Literal["e2b", "local"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/sleeptime_manager.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class SleeptimeManager(UncheckedBaseModel): 10 | manager_type: typing.Literal["sleeptime"] = "sleeptime" 11 | manager_agent_id: str = pydantic.Field() 12 | """ 13 | 14 | """ 15 | 16 | sleeptime_agent_frequency: typing.Optional[int] = pydantic.Field(default=None) 17 | """ 18 | 19 | """ 20 | 21 | if IS_PYDANTIC_V2: 22 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 23 | else: 24 | 25 | class Config: 26 | frozen = True 27 | smart_union = True 28 | extra = pydantic.Extra.allow 29 | -------------------------------------------------------------------------------- /src/letta_client/types/sleeptime_manager_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class SleeptimeManagerUpdate(UncheckedBaseModel): 10 | manager_type: typing.Literal["sleeptime"] = "sleeptime" 11 | manager_agent_id: typing.Optional[str] = pydantic.Field(default=None) 12 | """ 13 | 14 | """ 15 | 16 | sleeptime_agent_frequency: typing.Optional[int] = pydantic.Field(default=None) 17 | """ 18 | 19 | """ 20 | 21 | if IS_PYDANTIC_V2: 22 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 23 | else: 24 | 25 | class Config: 26 | frozen = True 27 | smart_union = True 28 | extra = pydantic.Extra.allow 29 | -------------------------------------------------------------------------------- /src/letta_client/types/sse_server_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from .mcp_server_type import McpServerType 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class SseServerConfig(UncheckedBaseModel): 11 | server_name: str = pydantic.Field() 12 | """ 13 | The name of the server 14 | """ 15 | 16 | type: typing.Optional[McpServerType] = None 17 | server_url: str = pydantic.Field() 18 | """ 19 | The URL of the server (MCP SSE client will connect to this URL) 20 | """ 21 | 22 | if IS_PYDANTIC_V2: 23 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 24 | else: 25 | 26 | class Config: 27 | frozen = True 28 | smart_union = True 29 | extra = pydantic.Extra.allow 30 | -------------------------------------------------------------------------------- /src/letta_client/types/stdio_server_config.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from .mcp_server_type import McpServerType 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class StdioServerConfig(UncheckedBaseModel): 11 | server_name: str = pydantic.Field() 12 | """ 13 | The name of the server 14 | """ 15 | 16 | type: typing.Optional[McpServerType] = None 17 | command: str = pydantic.Field() 18 | """ 19 | The command to run (MCP 'local' client will run this command) 20 | """ 21 | 22 | args: typing.List[str] = pydantic.Field() 23 | """ 24 | The arguments to pass to the command 25 | """ 26 | 27 | env: typing.Optional[typing.Dict[str, typing.Optional[str]]] = pydantic.Field(default=None) 28 | """ 29 | Environment variables to set 30 | """ 31 | 32 | if IS_PYDANTIC_V2: 33 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 34 | else: 35 | 36 | class Config: 37 | frozen = True 38 | smart_union = True 39 | extra = pydantic.Extra.allow 40 | -------------------------------------------------------------------------------- /src/letta_client/types/supervisor_manager.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class SupervisorManager(UncheckedBaseModel): 10 | manager_type: typing.Literal["supervisor"] = "supervisor" 11 | manager_agent_id: str = pydantic.Field() 12 | """ 13 | 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/supervisor_manager_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class SupervisorManagerUpdate(UncheckedBaseModel): 10 | manager_type: typing.Literal["supervisor"] = "supervisor" 11 | manager_agent_id: typing.Optional[str] = pydantic.Field(default=None) 12 | """ 13 | 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/tag_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class TagSchema(UncheckedBaseModel): 10 | tag: str 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/terminal_tool_rule.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class TerminalToolRule(UncheckedBaseModel): 10 | """ 11 | Represents a terminal tool rule configuration where if this tool gets called, it must end the agent loop. 12 | """ 13 | 14 | tool_name: str = pydantic.Field() 15 | """ 16 | The name of the tool. Must exist in the database for the user's organization. 17 | """ 18 | 19 | type: typing.Literal["exit_loop"] = "exit_loop" 20 | 21 | if IS_PYDANTIC_V2: 22 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 23 | else: 24 | 25 | class Config: 26 | frozen = True 27 | smart_union = True 28 | extra = pydantic.Extra.allow 29 | -------------------------------------------------------------------------------- /src/letta_client/types/text_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class TextContent(UncheckedBaseModel): 10 | type: typing.Literal["text"] = "text" 11 | text: str = pydantic.Field() 12 | """ 13 | The text content of the message. 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/text_response_format.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class TextResponseFormat(UncheckedBaseModel): 10 | """ 11 | Response format for plain text responses. 12 | """ 13 | 14 | type: typing.Literal["text"] = "text" 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_call.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 5 | import typing 6 | import pydantic 7 | 8 | 9 | class ToolCall(UncheckedBaseModel): 10 | name: str 11 | arguments: str 12 | tool_call_id: str 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_call_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class ToolCallContent(UncheckedBaseModel): 10 | type: typing.Literal["tool_return"] = "tool_return" 11 | id: str = pydantic.Field() 12 | """ 13 | A unique identifier for this specific tool call instance. 14 | """ 15 | 16 | name: str = pydantic.Field() 17 | """ 18 | The name of the tool being called. 19 | """ 20 | 21 | input: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field() 22 | """ 23 | The parameters being passed to the tool, structured as a dictionary of parameter names to values. 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_call_delta.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ToolCallDelta(UncheckedBaseModel): 10 | name: typing.Optional[str] = None 11 | arguments: typing.Optional[str] = None 12 | tool_call_id: typing.Optional[str] = None 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_call_message_tool_call.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .tool_call import ToolCall 5 | from .tool_call_delta import ToolCallDelta 6 | 7 | ToolCallMessageToolCall = typing.Union[ToolCall, ToolCallDelta] 8 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_env_var_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class ToolEnvVarSchema(UncheckedBaseModel): 10 | created_at: str 11 | description: typing.Optional[str] = None 12 | key: str 13 | updated_at: str 14 | value: str 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_json_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .parameters_schema import ParametersSchema 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ToolJsonSchema(UncheckedBaseModel): 11 | name: str 12 | description: str 13 | parameters: ParametersSchema 14 | type: typing.Optional[str] = None 15 | required: typing.Optional[typing.List[str]] = None 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_return.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .tool_return_status import ToolReturnStatus 5 | import pydantic 6 | import typing 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class ToolReturn(UncheckedBaseModel): 11 | status: ToolReturnStatus = pydantic.Field() 12 | """ 13 | The status of the tool call 14 | """ 15 | 16 | stdout: typing.Optional[typing.List[str]] = pydantic.Field(default=None) 17 | """ 18 | Captured stdout (e.g. prints, logs) from the tool invocation 19 | """ 20 | 21 | stderr: typing.Optional[typing.List[str]] = pydantic.Field(default=None) 22 | """ 23 | Captured stderr from the tool invocation 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_return_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class ToolReturnContent(UncheckedBaseModel): 10 | type: typing.Literal["tool_return"] = "tool_return" 11 | tool_call_id: str = pydantic.Field() 12 | """ 13 | References the ID of the ToolCallContent that initiated this tool call. 14 | """ 15 | 16 | content: str = pydantic.Field() 17 | """ 18 | The content returned by the tool execution. 19 | """ 20 | 21 | is_error: bool = pydantic.Field() 22 | """ 23 | Indicates whether the tool execution resulted in an error. 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_return_message_status.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ToolReturnMessageStatus = typing.Union[typing.Literal["success", "error"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_return_status.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ToolReturnStatus = typing.Union[typing.Literal["success", "error"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_schema.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .tool_json_schema import ToolJsonSchema 6 | import typing_extensions 7 | from ..core.serialization import FieldMetadata 8 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 9 | import pydantic 10 | 11 | 12 | class ToolSchema(UncheckedBaseModel): 13 | args_json_schema: typing.Optional[typing.Any] = None 14 | created_at: str 15 | description: str 16 | json_schema: ToolJsonSchema 17 | name: str 18 | return_char_limit: int 19 | source_code: typing.Optional[str] = None 20 | source_type: str 21 | tags: typing.List[str] 22 | tool_type: str 23 | updated_at: str 24 | metadata: typing_extensions.Annotated[ 25 | typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]], FieldMetadata(alias="metadata_") 26 | ] = None 27 | 28 | if IS_PYDANTIC_V2: 29 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 30 | else: 31 | 32 | class Config: 33 | frozen = True 34 | smart_union = True 35 | extra = pydantic.Extra.allow 36 | -------------------------------------------------------------------------------- /src/letta_client/types/tool_type.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ToolType = typing.Union[ 6 | typing.Literal[ 7 | "custom", 8 | "letta_core", 9 | "letta_memory_core", 10 | "letta_multi_agent_core", 11 | "letta_sleeptime_core", 12 | "letta_voice_sleeptime_core", 13 | "letta_builtin", 14 | "letta_files_core", 15 | "external_composio", 16 | "external_langchain", 17 | "external_mcp", 18 | ], 19 | typing.Any, 20 | ] 21 | -------------------------------------------------------------------------------- /src/letta_client/types/update_assistant_message.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .update_assistant_message_content import UpdateAssistantMessageContent 6 | import pydantic 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class UpdateAssistantMessage(UncheckedBaseModel): 11 | message_type: typing.Optional[typing.Literal["assistant_message"]] = None 12 | content: UpdateAssistantMessageContent = pydantic.Field() 13 | """ 14 | The message content sent by the assistant (can be a string or an array of content parts) 15 | """ 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/types/update_assistant_message_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .components_schemas_text_content import ComponentsSchemasTextContent 5 | 6 | UpdateAssistantMessageContent = typing.Union[typing.List[ComponentsSchemasTextContent], str] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/update_reasoning_message.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class UpdateReasoningMessage(UncheckedBaseModel): 10 | reasoning: str 11 | message_type: typing.Optional[typing.Literal["reasoning_message"]] = None 12 | 13 | if IS_PYDANTIC_V2: 14 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 15 | else: 16 | 17 | class Config: 18 | frozen = True 19 | smart_union = True 20 | extra = pydantic.Extra.allow 21 | -------------------------------------------------------------------------------- /src/letta_client/types/update_system_message.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class UpdateSystemMessage(UncheckedBaseModel): 10 | message_type: typing.Optional[typing.Literal["system_message"]] = None 11 | content: str = pydantic.Field() 12 | """ 13 | The message content sent by the system (can be a string or an array of multi-modal content parts) 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/update_user_message.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .update_user_message_content import UpdateUserMessageContent 6 | import pydantic 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | 9 | 10 | class UpdateUserMessage(UncheckedBaseModel): 11 | message_type: typing.Optional[typing.Literal["user_message"]] = None 12 | content: UpdateUserMessageContent = pydantic.Field() 13 | """ 14 | The message content sent by the user (can be a string or an array of multi-modal content parts) 15 | """ 16 | 17 | if IS_PYDANTIC_V2: 18 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 19 | else: 20 | 21 | class Config: 22 | frozen = True 23 | smart_union = True 24 | extra = pydantic.Extra.allow 25 | -------------------------------------------------------------------------------- /src/letta_client/types/update_user_message_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .letta_user_message_content_union import LettaUserMessageContentUnion 5 | 6 | UpdateUserMessageContent = typing.Union[typing.List[LettaUserMessageContentUnion], str] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/url_image.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class UrlImage(UncheckedBaseModel): 10 | type: typing.Literal["url"] = "url" 11 | url: str = pydantic.Field() 12 | """ 13 | The URL of the image. 14 | """ 15 | 16 | if IS_PYDANTIC_V2: 17 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 18 | else: 19 | 20 | class Config: 21 | frozen = True 22 | smart_union = True 23 | extra = pydantic.Extra.allow 24 | -------------------------------------------------------------------------------- /src/letta_client/types/usage_statistics.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .usage_statistics_prompt_token_details import UsageStatisticsPromptTokenDetails 6 | from .usage_statistics_completion_token_details import UsageStatisticsCompletionTokenDetails 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | import pydantic 9 | 10 | 11 | class UsageStatistics(UncheckedBaseModel): 12 | completion_tokens: typing.Optional[int] = None 13 | prompt_tokens: typing.Optional[int] = None 14 | total_tokens: typing.Optional[int] = None 15 | prompt_tokens_details: typing.Optional[UsageStatisticsPromptTokenDetails] = None 16 | completion_tokens_details: typing.Optional[UsageStatisticsCompletionTokenDetails] = None 17 | 18 | if IS_PYDANTIC_V2: 19 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 20 | else: 21 | 22 | class Config: 23 | frozen = True 24 | smart_union = True 25 | extra = pydantic.Extra.allow 26 | -------------------------------------------------------------------------------- /src/letta_client/types/usage_statistics_completion_token_details.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class UsageStatisticsCompletionTokenDetails(UncheckedBaseModel): 10 | reasoning_tokens: typing.Optional[int] = None 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/usage_statistics_prompt_token_details.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class UsageStatisticsPromptTokenDetails(UncheckedBaseModel): 10 | cached_tokens: typing.Optional[int] = None 11 | 12 | if IS_PYDANTIC_V2: 13 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 14 | else: 15 | 16 | class Config: 17 | frozen = True 18 | smart_union = True 19 | extra = pydantic.Extra.allow 20 | -------------------------------------------------------------------------------- /src/letta_client/types/user_create.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import typing 7 | 8 | 9 | class UserCreate(UncheckedBaseModel): 10 | name: str = pydantic.Field() 11 | """ 12 | The name of the user. 13 | """ 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/user_message_content.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from .letta_user_message_content_union import LettaUserMessageContentUnion 5 | 6 | UserMessageContent = typing.Union[typing.List[LettaUserMessageContentUnion], str] 7 | -------------------------------------------------------------------------------- /src/letta_client/types/user_update.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import pydantic 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class UserUpdate(UncheckedBaseModel): 10 | id: str = pydantic.Field() 11 | """ 12 | The id of the user to update. 13 | """ 14 | 15 | name: typing.Optional[str] = pydantic.Field(default=None) 16 | """ 17 | The new name of the user. 18 | """ 19 | 20 | if IS_PYDANTIC_V2: 21 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 22 | else: 23 | 24 | class Config: 25 | frozen = True 26 | smart_union = True 27 | extra = pydantic.Extra.allow 28 | -------------------------------------------------------------------------------- /src/letta_client/types/validation_error.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .validation_error_loc_item import ValidationErrorLocItem 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class ValidationError(UncheckedBaseModel): 11 | loc: typing.List[ValidationErrorLocItem] 12 | msg: str 13 | type: str 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/validation_error_loc_item.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | ValidationErrorLocItem = typing.Union[str, int] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/voice_sleeptime_manager.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | import pydantic 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | 8 | 9 | class VoiceSleeptimeManager(UncheckedBaseModel): 10 | manager_type: typing.Literal["voice_sleeptime"] = "voice_sleeptime" 11 | manager_agent_id: str = pydantic.Field() 12 | """ 13 | 14 | """ 15 | 16 | max_message_buffer_length: typing.Optional[int] = pydantic.Field(default=None) 17 | """ 18 | The desired maximum length of messages in the context window of the convo agent. This is a best effort, and may be off slightly due to user/assistant interleaving. 19 | """ 20 | 21 | min_message_buffer_length: typing.Optional[int] = pydantic.Field(default=None) 22 | """ 23 | The desired minimum length of messages in the context window of the convo agent. This is a best effort, and may be off-by-one due to user/assistant interleaving. 24 | """ 25 | 26 | if IS_PYDANTIC_V2: 27 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 28 | else: 29 | 30 | class Config: 31 | frozen = True 32 | smart_union = True 33 | extra = pydantic.Extra.allow 34 | -------------------------------------------------------------------------------- /src/letta_client/types/web_search_options.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from .web_search_options_search_context_size import WebSearchOptionsSearchContextSize 6 | from .web_search_options_user_location import WebSearchOptionsUserLocation 7 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 8 | import pydantic 9 | 10 | 11 | class WebSearchOptions(UncheckedBaseModel): 12 | search_context_size: typing.Optional[WebSearchOptionsSearchContextSize] = None 13 | user_location: typing.Optional[WebSearchOptionsUserLocation] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/types/web_search_options_search_context_size.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | 5 | WebSearchOptionsSearchContextSize = typing.Union[typing.Literal["low", "medium", "high"], typing.Any] 6 | -------------------------------------------------------------------------------- /src/letta_client/types/web_search_options_user_location.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | from .web_search_options_user_location_approximate import WebSearchOptionsUserLocationApproximate 5 | import typing 6 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 7 | import pydantic 8 | 9 | 10 | class WebSearchOptionsUserLocation(UncheckedBaseModel): 11 | approximate: WebSearchOptionsUserLocationApproximate 12 | type: typing.Literal["approximate"] = "approximate" 13 | 14 | if IS_PYDANTIC_V2: 15 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 16 | else: 17 | 18 | class Config: 19 | frozen = True 20 | smart_union = True 21 | extra = pydantic.Extra.allow 22 | -------------------------------------------------------------------------------- /src/letta_client/types/web_search_options_user_location_approximate.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from ..core.unchecked_base_model import UncheckedBaseModel 4 | import typing 5 | from ..core.pydantic_utilities import IS_PYDANTIC_V2 6 | import pydantic 7 | 8 | 9 | class WebSearchOptionsUserLocationApproximate(UncheckedBaseModel): 10 | city: typing.Optional[str] = None 11 | country: typing.Optional[str] = None 12 | region: typing.Optional[str] = None 13 | timezone: typing.Optional[str] = None 14 | 15 | if IS_PYDANTIC_V2: 16 | model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2 17 | else: 18 | 19 | class Config: 20 | frozen = True 21 | smart_union = True 22 | extra = pydantic.Extra.allow 23 | -------------------------------------------------------------------------------- /src/letta_client/version.py: -------------------------------------------------------------------------------- 1 | from importlib import metadata 2 | 3 | __version__ = metadata.version("letta-client") 4 | -------------------------------------------------------------------------------- /src/letta_client/voice/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .types import CreateVoiceChatCompletionsRequestBody 4 | 5 | __all__ = ["CreateVoiceChatCompletionsRequestBody"] 6 | -------------------------------------------------------------------------------- /src/letta_client/voice/types/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | from .create_voice_chat_completions_request_body import CreateVoiceChatCompletionsRequestBody 4 | 5 | __all__ = ["CreateVoiceChatCompletionsRequestBody"] 6 | -------------------------------------------------------------------------------- /src/letta_client/voice/types/create_voice_chat_completions_request_body.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | import typing 4 | from ...types.completion_create_params_non_streaming import CompletionCreateParamsNonStreaming 5 | from ...types.completion_create_params_streaming import CompletionCreateParamsStreaming 6 | 7 | CreateVoiceChatCompletionsRequestBody = typing.Union[ 8 | CompletionCreateParamsNonStreaming, CompletionCreateParamsStreaming 9 | ] 10 | -------------------------------------------------------------------------------- /tests/custom/conftest.py: -------------------------------------------------------------------------------- 1 | import os 2 | import pytest 3 | from typing import Generator 4 | from letta_client import Letta, LettaEnvironment 5 | 6 | 7 | def pytest_addoption(parser): 8 | parser.addoption( 9 | "--env", 10 | default="cloud", 11 | choices=["cloud", "localhost"], 12 | help="Specify the Letta environment (cloud, localhost)", 13 | ) 14 | 15 | 16 | @pytest.fixture(scope="session") 17 | def letta_env(pytestconfig) -> LettaEnvironment: 18 | env_map = { 19 | "cloud": LettaEnvironment.LETTA_CLOUD, 20 | "localhost": LettaEnvironment.SELF_HOSTED, 21 | } 22 | env_name = pytestconfig.getoption("env") 23 | return env_map[env_name] 24 | 25 | 26 | @pytest.fixture(scope="session") 27 | def client(letta_env) -> Generator[Letta, None, None]: 28 | api_key = os.getenv('LETTA_API_KEY') 29 | client = Letta(environment=letta_env, token=api_key) 30 | yield client -------------------------------------------------------------------------------- /tests/utils/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | -------------------------------------------------------------------------------- /tests/utils/assets/models/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | # This file was auto-generated by Fern from our API Definition. 4 | 5 | from .circle import CircleParams 6 | from .object_with_defaults import ObjectWithDefaultsParams 7 | from .object_with_optional_field import ObjectWithOptionalFieldParams 8 | from .shape import ShapeParams, Shape_CircleParams, Shape_SquareParams 9 | from .square import SquareParams 10 | from .undiscriminated_shape import UndiscriminatedShapeParams 11 | 12 | __all__ = [ 13 | "CircleParams", 14 | "ObjectWithDefaultsParams", 15 | "ObjectWithOptionalFieldParams", 16 | "ShapeParams", 17 | "Shape_CircleParams", 18 | "Shape_SquareParams", 19 | "SquareParams", 20 | "UndiscriminatedShapeParams", 21 | ] 22 | -------------------------------------------------------------------------------- /tests/utils/assets/models/circle.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | # This file was auto-generated by Fern from our API Definition. 4 | 5 | import typing_extensions 6 | import typing_extensions 7 | from letta_client.core.serialization import FieldMetadata 8 | 9 | 10 | class CircleParams(typing_extensions.TypedDict): 11 | radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")] 12 | -------------------------------------------------------------------------------- /tests/utils/assets/models/color.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | # This file was auto-generated by Fern from our API Definition. 4 | 5 | import typing 6 | 7 | Color = typing.Union[typing.Literal["red", "blue"], typing.Any] 8 | -------------------------------------------------------------------------------- /tests/utils/assets/models/object_with_defaults.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | # This file was auto-generated by Fern from our API Definition. 4 | 5 | import typing_extensions 6 | import typing_extensions 7 | 8 | 9 | class ObjectWithDefaultsParams(typing_extensions.TypedDict): 10 | """ 11 | Defines properties with default values and validation rules. 12 | """ 13 | 14 | decimal: typing_extensions.NotRequired[float] 15 | string: typing_extensions.NotRequired[str] 16 | required_string: str 17 | -------------------------------------------------------------------------------- /tests/utils/assets/models/shape.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | # This file was auto-generated by Fern from our API Definition. 4 | 5 | from __future__ import annotations 6 | import typing_extensions 7 | import typing_extensions 8 | import typing 9 | from letta_client.core.serialization import FieldMetadata 10 | 11 | 12 | class Base(typing_extensions.TypedDict): 13 | id: str 14 | 15 | 16 | class Shape_CircleParams(Base): 17 | shape_type: typing_extensions.Annotated[typing.Literal["circle"], FieldMetadata(alias="shapeType")] 18 | radius_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="radiusMeasurement")] 19 | 20 | 21 | class Shape_SquareParams(Base): 22 | shape_type: typing_extensions.Annotated[typing.Literal["square"], FieldMetadata(alias="shapeType")] 23 | length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")] 24 | 25 | 26 | ShapeParams = typing.Union[Shape_CircleParams, Shape_SquareParams] 27 | -------------------------------------------------------------------------------- /tests/utils/assets/models/square.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | # This file was auto-generated by Fern from our API Definition. 4 | 5 | import typing_extensions 6 | import typing_extensions 7 | from letta_client.core.serialization import FieldMetadata 8 | 9 | 10 | class SquareParams(typing_extensions.TypedDict): 11 | length_measurement: typing_extensions.Annotated[float, FieldMetadata(alias="lengthMeasurement")] 12 | -------------------------------------------------------------------------------- /tests/utils/assets/models/undiscriminated_shape.py: -------------------------------------------------------------------------------- 1 | # This file was auto-generated by Fern from our API Definition. 2 | 3 | # This file was auto-generated by Fern from our API Definition. 4 | 5 | import typing 6 | from .circle import CircleParams 7 | from .square import SquareParams 8 | 9 | UndiscriminatedShapeParams = typing.Union[CircleParams, SquareParams] 10 | --------------------------------------------------------------------------------