letta-client 0.1.87__py3-none-any.whl → 0.1.90__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/__init__.py +17 -782
- letta_client/agents/__init__.py +4 -388
- letta_client/agents/client.py +20 -0
- letta_client/agents/messages/client.py +10 -0
- letta_client/agents/types/__init__.py +4 -672
- letta_client/agents/types/agents_search_request_search_item.py +6 -2
- letta_client/agents/types/{agents_search_response_agents_item_tool_rules_item_one.py → agents_search_request_search_item_operator.py} +4 -6
- letta_client/agents/types/{agents_search_request_search_item_field.py → agents_search_request_search_item_two.py} +1 -1
- letta_client/agents/types/agents_search_response.py +2 -2
- letta_client/core/client_wrapper.py +1 -1
- letta_client/groups/__init__.py +12 -0
- letta_client/groups/client.py +158 -446
- letta_client/groups/messages/__init__.py +5 -0
- letta_client/groups/messages/client.py +820 -0
- letta_client/groups/messages/types/__init__.py +7 -0
- letta_client/groups/messages/types/letta_streaming_response.py +20 -0
- letta_client/groups/messages/types/messages_modify_request.py +11 -0
- letta_client/groups/messages/types/messages_modify_response.py +20 -0
- letta_client/groups/types/__init__.py +6 -0
- letta_client/{types → groups/types}/group_create_manager_config.py +3 -3
- letta_client/groups/types/group_update_manager_config.py +8 -0
- letta_client/templates/__init__.py +2 -392
- letta_client/templates/types/__init__.py +1 -749
- letta_client/templates/types/templates_create_agents_response.py +2 -2
- letta_client/types/__init__.py +10 -6
- letta_client/types/agent_schema.py +3 -2
- letta_client/types/agent_schema_tool_rules_item.py +11 -0
- letta_client/types/{tool_rule_schema.py → base_tool_rule_schema.py} +1 -1
- letta_client/types/{group_create.py → child_tool_rule_schema.py} +5 -17
- letta_client/{agents/types/agents_search_response_agents_item_tool_rules_item_two.py → types/conditional_tool_rule_schema.py} +7 -7
- letta_client/types/max_count_per_step_tool_rule_schema.py +21 -0
- letta_client/types/message_schema.py +0 -1
- {letta_client-0.1.87.dist-info → letta_client-0.1.90.dist-info}/METADATA +1 -1
- letta_client-0.1.90.dist-info/RECORD +327 -0
- letta_client/agents/types/agents_search_response_agents_item.py +0 -71
- letta_client/agents/types/agents_search_response_agents_item_agent_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_base_template_id.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_base_template_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_created_at.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_created_at_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_created_by_id.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_created_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_description.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_description_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_embedding_config.py +0 -48
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_deployment.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_deployment_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_endpoint.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_endpoint_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_version.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_version_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_chunk_size.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_chunk_size_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_endpoint.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_endpoint_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_endpoint_type.py +0 -28
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_handle.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_handle_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_identity_ids.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_last_updated_by_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_last_updated_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config.py +0 -54
- letta_client/agents/types/agents_search_response_agents_item_llm_config_enable_reasoner.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config_handle.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_llm_config_handle_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config_max_reasoning_tokens.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config_max_tokens.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_llm_config_max_tokens_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_endpoint.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_endpoint_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_endpoint_type.py +0 -31
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_wrapper.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_wrapper_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config_put_inner_thoughts_in_kwargs.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_llm_config_put_inner_thoughts_in_kwargs_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_llm_config_temperature.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory.py +0 -24
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item.py +0 -57
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_created_by_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_created_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_description.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_description_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_id.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_is_template.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_label.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_label_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_last_updated_by_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_last_updated_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_limit.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_metadata.py +0 -12
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_metadata_item.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_name.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_name_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_organization_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_organization_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_memory_prompt_template.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_message_buffer_autoclear.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_message_ids.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_message_ids_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_metadata.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_metadata_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group.py +0 -14
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids.py +0 -37
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_manager_agent_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_manager_agent_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_manager_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_max_turns.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_max_turns_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_termination_token.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_agent_ids_termination_token_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids.py +0 -37
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_manager_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_max_turns.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_max_turns_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_termination_token.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_multi_agent_group_item_agent_ids_termination_token_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_organization_id.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_organization_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_project_id.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_project_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item.py +0 -51
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_at.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_at_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_by_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_description.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_description_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config.py +0 -52
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_deployment.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_deployment_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_endpoint.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_endpoint_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_version.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_version_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_chunk_size.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_chunk_size_item.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_endpoint.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_endpoint_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_endpoint_type.py +0 -28
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_handle.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_handle_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_id.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_last_updated_by_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_last_updated_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_metadata.py +0 -12
- letta_client/agents/types/agents_search_response_agents_item_sources_item_metadata_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_organization_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_organization_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_sources_item_updated_at.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_sources_item_updated_at_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_template_id.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_template_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item.py +0 -53
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_at.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_at_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_by_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_description.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_description_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_id.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id_item.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_organization_id.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_organization_id_item.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_updated_at.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_updated_at_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tool_rules.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item.py +0 -8
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping.py +0 -34
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_default_child.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_default_child_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_require_output_mapping.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_children.py +0 -24
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_children_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_four.py +0 -23
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_four_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item.py +0 -30
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping.py +0 -34
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_default_child.py +0 -13
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_default_child_item.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_require_output_mapping.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_children.py +0 -24
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_children_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_four.py +0 -23
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_four_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_max_count_limit.py +0 -24
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_max_count_limit_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_one.py +0 -23
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_one_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_two.py +0 -23
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_two_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_max_count_limit.py +0 -24
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_max_count_limit_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_one_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_two_type.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tools_item.py +0 -57
- letta_client/agents/types/agents_search_response_agents_item_tools_item_args_json_schema.py +0 -12
- letta_client/agents/types/agents_search_response_agents_item_tools_item_args_json_schema_item.py +0 -7
- letta_client/agents/types/agents_search_response_agents_item_tools_item_created_by_id.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_tools_item_created_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_description.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_tools_item_description_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_json_schema.py +0 -12
- letta_client/agents/types/agents_search_response_agents_item_tools_item_json_schema_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_last_updated_by_id.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_tools_item_last_updated_by_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_metadata.py +0 -12
- letta_client/agents/types/agents_search_response_agents_item_tools_item_metadata_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_name.py +0 -8
- letta_client/agents/types/agents_search_response_agents_item_tools_item_name_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_organization_id.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_tools_item_organization_id_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_code.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_code_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_type.py +0 -10
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_type_item.py +0 -5
- letta_client/agents/types/agents_search_response_agents_item_tools_item_tool_type.py +0 -16
- letta_client/agents/types/agents_search_response_agents_item_updated_at.py +0 -11
- letta_client/agents/types/agents_search_response_agents_item_updated_at_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item.py +0 -88
- letta_client/templates/types/templates_create_agents_response_agents_item_agent_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_base_template_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_base_template_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_created_at.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_created_at_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_created_by_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_created_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_description.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_description_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config.py +0 -50
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_azure_deployment.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_azure_deployment_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_azure_endpoint.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_azure_endpoint_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_azure_version.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_azure_version_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_embedding_chunk_size.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_embedding_chunk_size_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_embedding_endpoint.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_embedding_endpoint_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_embedding_endpoint_type.py +0 -28
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_handle.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_embedding_config_handle_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_identity_ids.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_last_updated_by_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_last_updated_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config.py +0 -58
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_enable_reasoner.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_handle.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_handle_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_max_reasoning_tokens.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_max_tokens.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_max_tokens_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_model_endpoint.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_model_endpoint_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_model_endpoint_type.py +0 -31
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_model_wrapper.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_model_wrapper_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_put_inner_thoughts_in_kwargs.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_put_inner_thoughts_in_kwargs_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_llm_config_temperature.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory.py +0 -26
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item.py +0 -59
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_created_by_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_created_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_description.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_description_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_id.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_is_template.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_label.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_label_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_last_updated_by_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_last_updated_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_limit.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_metadata.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_metadata_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_name.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_name_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_organization_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_blocks_item_organization_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_memory_prompt_template.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_message_buffer_autoclear.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_message_ids.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_message_ids_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_metadata.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_metadata_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group.py +0 -16
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids.py +0 -41
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_manager_agent_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_manager_agent_id_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_manager_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_max_turns.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_max_turns_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_termination_token.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_agent_ids_termination_token_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item.py +0 -10
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids.py +0 -41
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_manager_agent_id_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_manager_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_max_turns.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_max_turns_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_termination_token.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_multi_agent_group_item_agent_ids_termination_token_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_organization_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_organization_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_project_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_project_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item.py +0 -55
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_created_at.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_created_at_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_created_by_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_created_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_description.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_description_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config.py +0 -56
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_azure_deployment.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_azure_deployment_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_azure_endpoint.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_azure_endpoint_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_azure_version.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_azure_version_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_embedding_chunk_size.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_embedding_chunk_size_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_embedding_endpoint.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_embedding_endpoint_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_embedding_endpoint_type.py +0 -28
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_handle.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_embedding_config_handle_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_id.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_last_updated_by_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_last_updated_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_metadata.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_metadata_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_organization_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_organization_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_updated_at.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_sources_item_updated_at_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_template_id.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_template_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables.py +0 -10
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item.py +0 -57
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_created_at.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_created_at_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_created_by_id.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_created_by_id_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_description.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_description_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_id.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_organization_id.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_organization_id_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_updated_at.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_exec_environment_variables_item_updated_at_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item.py +0 -10
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_child_output_mapping.py +0 -36
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_child_output_mapping_default_child.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_child_output_mapping_default_child_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_child_output_mapping_require_output_mapping.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_child_output_mapping_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_children.py +0 -24
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_children_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_four.py +0 -23
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_four_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item.py +0 -30
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_child_output_mapping.py +0 -36
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_child_output_mapping_default_child.py +0 -15
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_child_output_mapping_default_child_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_child_output_mapping_require_output_mapping.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_child_output_mapping_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_children.py +0 -24
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_children_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_four.py +0 -23
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_four_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_max_count_limit.py +0 -24
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_max_count_limit_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_one.py +0 -23
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_one_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_two.py +0 -23
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_item_two_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_max_count_limit.py +0 -24
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_max_count_limit_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_one.py +0 -23
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_one_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_two.py +0 -23
- letta_client/templates/types/templates_create_agents_response_agents_item_tool_rules_item_two_type.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item.py +0 -69
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_args_json_schema.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_args_json_schema_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_created_by_id.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_created_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_description.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_description_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_json_schema.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_json_schema_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_last_updated_by_id.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_last_updated_by_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_metadata.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_metadata_item.py +0 -7
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_name.py +0 -10
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_name_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_organization_id.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_organization_id_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_source_code.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_source_code_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_source_type.py +0 -12
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_source_type_item.py +0 -5
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_tool_type.py +0 -16
- letta_client/templates/types/templates_create_agents_response_agents_item_updated_at.py +0 -13
- letta_client/templates/types/templates_create_agents_response_agents_item_updated_at_item.py +0 -5
- letta_client-0.1.87.dist-info/RECORD +0 -701
- {letta_client-0.1.87.dist-info → letta_client-0.1.90.dist-info}/WHEEL +0 -0
letta_client/groups/client.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
from ..core.client_wrapper import SyncClientWrapper
|
|
5
|
+
from .messages.client import MessagesClient
|
|
5
6
|
from ..types.manager_type import ManagerType
|
|
6
7
|
from ..core.request_options import RequestOptions
|
|
7
8
|
from ..types.group import Group
|
|
@@ -10,13 +11,12 @@ from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
|
10
11
|
from ..types.http_validation_error import HttpValidationError
|
|
11
12
|
from json.decoder import JSONDecodeError
|
|
12
13
|
from ..core.api_error import ApiError
|
|
13
|
-
from
|
|
14
|
+
from .types.group_create_manager_config import GroupCreateManagerConfig
|
|
14
15
|
from ..core.serialization import convert_and_respect_annotation_metadata
|
|
15
16
|
from ..core.jsonable_encoder import jsonable_encoder
|
|
16
|
-
from
|
|
17
|
-
from ..types.message_create import MessageCreate
|
|
18
|
-
from ..types.letta_response import LettaResponse
|
|
17
|
+
from .types.group_update_manager_config import GroupUpdateManagerConfig
|
|
19
18
|
from ..core.client_wrapper import AsyncClientWrapper
|
|
19
|
+
from .messages.client import AsyncMessagesClient
|
|
20
20
|
|
|
21
21
|
# this is used as the default value for optional parameters
|
|
22
22
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -25,8 +25,9 @@ OMIT = typing.cast(typing.Any, ...)
|
|
|
25
25
|
class GroupsClient:
|
|
26
26
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
27
27
|
self._client_wrapper = client_wrapper
|
|
28
|
+
self.messages = MessagesClient(client_wrapper=self._client_wrapper)
|
|
28
29
|
|
|
29
|
-
def
|
|
30
|
+
def list(
|
|
30
31
|
self,
|
|
31
32
|
*,
|
|
32
33
|
manager_type: typing.Optional[ManagerType] = None,
|
|
@@ -71,7 +72,7 @@ class GroupsClient:
|
|
|
71
72
|
client = Letta(
|
|
72
73
|
token="YOUR_TOKEN",
|
|
73
74
|
)
|
|
74
|
-
client.groups.
|
|
75
|
+
client.groups.list()
|
|
75
76
|
"""
|
|
76
77
|
_response = self._client_wrapper.httpx_client.request(
|
|
77
78
|
"v1/groups/",
|
|
@@ -109,7 +110,7 @@ class GroupsClient:
|
|
|
109
110
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
110
111
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
111
112
|
|
|
112
|
-
def
|
|
113
|
+
def create(
|
|
113
114
|
self,
|
|
114
115
|
*,
|
|
115
116
|
agent_ids: typing.Sequence[str],
|
|
@@ -149,7 +150,7 @@ class GroupsClient:
|
|
|
149
150
|
client = Letta(
|
|
150
151
|
token="YOUR_TOKEN",
|
|
151
152
|
)
|
|
152
|
-
client.groups.
|
|
153
|
+
client.groups.create(
|
|
153
154
|
agent_ids=["agent_ids"],
|
|
154
155
|
description="description",
|
|
155
156
|
)
|
|
@@ -165,6 +166,7 @@ class GroupsClient:
|
|
|
165
166
|
),
|
|
166
167
|
},
|
|
167
168
|
headers={
|
|
169
|
+
"content-type": "application/json",
|
|
168
170
|
"X-Project": str(project) if project is not None else None,
|
|
169
171
|
},
|
|
170
172
|
request_options=request_options,
|
|
@@ -194,30 +196,13 @@ class GroupsClient:
|
|
|
194
196
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
195
197
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
196
198
|
|
|
197
|
-
def
|
|
198
|
-
self,
|
|
199
|
-
*,
|
|
200
|
-
agent_ids: typing.Sequence[str],
|
|
201
|
-
description: str,
|
|
202
|
-
project: typing.Optional[str] = None,
|
|
203
|
-
manager_config: typing.Optional[GroupCreateManagerConfig] = OMIT,
|
|
204
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
205
|
-
) -> Group:
|
|
199
|
+
def retrieve(self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Group:
|
|
206
200
|
"""
|
|
207
|
-
|
|
201
|
+
Retrieve the group by id.
|
|
208
202
|
|
|
209
203
|
Parameters
|
|
210
204
|
----------
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
description : str
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
project : typing.Optional[str]
|
|
218
|
-
|
|
219
|
-
manager_config : typing.Optional[GroupCreateManagerConfig]
|
|
220
|
-
|
|
205
|
+
group_id : str
|
|
221
206
|
|
|
222
207
|
request_options : typing.Optional[RequestOptions]
|
|
223
208
|
Request-specific configuration.
|
|
@@ -234,26 +219,14 @@ class GroupsClient:
|
|
|
234
219
|
client = Letta(
|
|
235
220
|
token="YOUR_TOKEN",
|
|
236
221
|
)
|
|
237
|
-
client.groups.
|
|
238
|
-
|
|
239
|
-
description="description",
|
|
222
|
+
client.groups.retrieve(
|
|
223
|
+
group_id="group_id",
|
|
240
224
|
)
|
|
241
225
|
"""
|
|
242
226
|
_response = self._client_wrapper.httpx_client.request(
|
|
243
|
-
"v1/groups/",
|
|
244
|
-
method="
|
|
245
|
-
json={
|
|
246
|
-
"agent_ids": agent_ids,
|
|
247
|
-
"description": description,
|
|
248
|
-
"manager_config": convert_and_respect_annotation_metadata(
|
|
249
|
-
object_=manager_config, annotation=GroupCreateManagerConfig, direction="write"
|
|
250
|
-
),
|
|
251
|
-
},
|
|
252
|
-
headers={
|
|
253
|
-
"X-Project": str(project) if project is not None else None,
|
|
254
|
-
},
|
|
227
|
+
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
228
|
+
method="GET",
|
|
255
229
|
request_options=request_options,
|
|
256
|
-
omit=OMIT,
|
|
257
230
|
)
|
|
258
231
|
try:
|
|
259
232
|
if 200 <= _response.status_code < 300:
|
|
@@ -279,22 +252,40 @@ class GroupsClient:
|
|
|
279
252
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
280
253
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
281
254
|
|
|
282
|
-
def
|
|
283
|
-
self,
|
|
284
|
-
|
|
255
|
+
def modify_group(
|
|
256
|
+
self,
|
|
257
|
+
group_id: str,
|
|
258
|
+
*,
|
|
259
|
+
project: typing.Optional[str] = None,
|
|
260
|
+
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
261
|
+
description: typing.Optional[str] = OMIT,
|
|
262
|
+
manager_config: typing.Optional[GroupUpdateManagerConfig] = OMIT,
|
|
263
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
264
|
+
) -> Group:
|
|
285
265
|
"""
|
|
286
|
-
|
|
266
|
+
Create a new multi-agent group with the specified configuration.
|
|
287
267
|
|
|
288
268
|
Parameters
|
|
289
269
|
----------
|
|
290
270
|
group_id : str
|
|
291
271
|
|
|
272
|
+
project : typing.Optional[str]
|
|
273
|
+
|
|
274
|
+
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
description : typing.Optional[str]
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
manager_config : typing.Optional[GroupUpdateManagerConfig]
|
|
281
|
+
|
|
282
|
+
|
|
292
283
|
request_options : typing.Optional[RequestOptions]
|
|
293
284
|
Request-specific configuration.
|
|
294
285
|
|
|
295
286
|
Returns
|
|
296
287
|
-------
|
|
297
|
-
|
|
288
|
+
Group
|
|
298
289
|
Successful Response
|
|
299
290
|
|
|
300
291
|
Examples
|
|
@@ -304,21 +295,33 @@ class GroupsClient:
|
|
|
304
295
|
client = Letta(
|
|
305
296
|
token="YOUR_TOKEN",
|
|
306
297
|
)
|
|
307
|
-
client.groups.
|
|
298
|
+
client.groups.modify_group(
|
|
308
299
|
group_id="group_id",
|
|
309
300
|
)
|
|
310
301
|
"""
|
|
311
302
|
_response = self._client_wrapper.httpx_client.request(
|
|
312
303
|
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
313
|
-
method="
|
|
304
|
+
method="PUT",
|
|
305
|
+
json={
|
|
306
|
+
"agent_ids": agent_ids,
|
|
307
|
+
"description": description,
|
|
308
|
+
"manager_config": convert_and_respect_annotation_metadata(
|
|
309
|
+
object_=manager_config, annotation=GroupUpdateManagerConfig, direction="write"
|
|
310
|
+
),
|
|
311
|
+
},
|
|
312
|
+
headers={
|
|
313
|
+
"content-type": "application/json",
|
|
314
|
+
"X-Project": str(project) if project is not None else None,
|
|
315
|
+
},
|
|
314
316
|
request_options=request_options,
|
|
317
|
+
omit=OMIT,
|
|
315
318
|
)
|
|
316
319
|
try:
|
|
317
320
|
if 200 <= _response.status_code < 300:
|
|
318
321
|
return typing.cast(
|
|
319
|
-
|
|
322
|
+
Group,
|
|
320
323
|
construct_type(
|
|
321
|
-
type_=
|
|
324
|
+
type_=Group, # type: ignore
|
|
322
325
|
object_=_response.json(),
|
|
323
326
|
),
|
|
324
327
|
)
|
|
@@ -337,49 +340,22 @@ class GroupsClient:
|
|
|
337
340
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
338
341
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
339
342
|
|
|
340
|
-
def
|
|
341
|
-
self,
|
|
342
|
-
|
|
343
|
-
*,
|
|
344
|
-
after: typing.Optional[str] = None,
|
|
345
|
-
before: typing.Optional[str] = None,
|
|
346
|
-
limit: typing.Optional[int] = None,
|
|
347
|
-
use_assistant_message: typing.Optional[bool] = None,
|
|
348
|
-
assistant_message_tool_name: typing.Optional[str] = None,
|
|
349
|
-
assistant_message_tool_kwarg: typing.Optional[str] = None,
|
|
350
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
351
|
-
) -> typing.List[LettaMessageUnion]:
|
|
343
|
+
def delete(
|
|
344
|
+
self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
345
|
+
) -> typing.Optional[typing.Any]:
|
|
352
346
|
"""
|
|
353
|
-
|
|
347
|
+
Delete a multi-agent group.
|
|
354
348
|
|
|
355
349
|
Parameters
|
|
356
350
|
----------
|
|
357
351
|
group_id : str
|
|
358
352
|
|
|
359
|
-
after : typing.Optional[str]
|
|
360
|
-
Message after which to retrieve the returned messages.
|
|
361
|
-
|
|
362
|
-
before : typing.Optional[str]
|
|
363
|
-
Message before which to retrieve the returned messages.
|
|
364
|
-
|
|
365
|
-
limit : typing.Optional[int]
|
|
366
|
-
Maximum number of messages to retrieve.
|
|
367
|
-
|
|
368
|
-
use_assistant_message : typing.Optional[bool]
|
|
369
|
-
Whether to use assistant messages
|
|
370
|
-
|
|
371
|
-
assistant_message_tool_name : typing.Optional[str]
|
|
372
|
-
The name of the designated message tool.
|
|
373
|
-
|
|
374
|
-
assistant_message_tool_kwarg : typing.Optional[str]
|
|
375
|
-
The name of the message argument.
|
|
376
|
-
|
|
377
353
|
request_options : typing.Optional[RequestOptions]
|
|
378
354
|
Request-specific configuration.
|
|
379
355
|
|
|
380
356
|
Returns
|
|
381
357
|
-------
|
|
382
|
-
typing.
|
|
358
|
+
typing.Optional[typing.Any]
|
|
383
359
|
Successful Response
|
|
384
360
|
|
|
385
361
|
Examples
|
|
@@ -389,29 +365,21 @@ class GroupsClient:
|
|
|
389
365
|
client = Letta(
|
|
390
366
|
token="YOUR_TOKEN",
|
|
391
367
|
)
|
|
392
|
-
client.groups.
|
|
368
|
+
client.groups.delete(
|
|
393
369
|
group_id="group_id",
|
|
394
370
|
)
|
|
395
371
|
"""
|
|
396
372
|
_response = self._client_wrapper.httpx_client.request(
|
|
397
|
-
f"v1/groups/{jsonable_encoder(group_id)}
|
|
398
|
-
method="
|
|
399
|
-
params={
|
|
400
|
-
"after": after,
|
|
401
|
-
"before": before,
|
|
402
|
-
"limit": limit,
|
|
403
|
-
"use_assistant_message": use_assistant_message,
|
|
404
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
405
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
406
|
-
},
|
|
373
|
+
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
374
|
+
method="DELETE",
|
|
407
375
|
request_options=request_options,
|
|
408
376
|
)
|
|
409
377
|
try:
|
|
410
378
|
if 200 <= _response.status_code < 300:
|
|
411
379
|
return typing.cast(
|
|
412
|
-
typing.
|
|
380
|
+
typing.Optional[typing.Any],
|
|
413
381
|
construct_type(
|
|
414
|
-
type_=typing.
|
|
382
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
415
383
|
object_=_response.json(),
|
|
416
384
|
),
|
|
417
385
|
)
|
|
@@ -430,188 +398,76 @@ class GroupsClient:
|
|
|
430
398
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
431
399
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
432
400
|
|
|
433
|
-
def
|
|
434
|
-
self,
|
|
435
|
-
group_id: str,
|
|
436
|
-
*,
|
|
437
|
-
agent_id: str,
|
|
438
|
-
messages: typing.Sequence[MessageCreate],
|
|
439
|
-
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
440
|
-
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
441
|
-
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
442
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
443
|
-
) -> LettaResponse:
|
|
401
|
+
def modify(self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
444
402
|
"""
|
|
445
|
-
Process a user message and return the group's response.
|
|
446
|
-
This endpoint accepts a message from a user and processes it through through agents in the group based on the specified pattern
|
|
447
|
-
|
|
448
403
|
Parameters
|
|
449
404
|
----------
|
|
450
405
|
group_id : str
|
|
451
406
|
|
|
452
|
-
agent_id : str
|
|
453
|
-
|
|
454
|
-
messages : typing.Sequence[MessageCreate]
|
|
455
|
-
The messages to be sent to the agent.
|
|
456
|
-
|
|
457
|
-
use_assistant_message : typing.Optional[bool]
|
|
458
|
-
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
459
|
-
|
|
460
|
-
assistant_message_tool_name : typing.Optional[str]
|
|
461
|
-
The name of the designated message tool.
|
|
462
|
-
|
|
463
|
-
assistant_message_tool_kwarg : typing.Optional[str]
|
|
464
|
-
The name of the message argument in the designated message tool.
|
|
465
|
-
|
|
466
407
|
request_options : typing.Optional[RequestOptions]
|
|
467
408
|
Request-specific configuration.
|
|
468
409
|
|
|
469
410
|
Returns
|
|
470
411
|
-------
|
|
471
|
-
|
|
472
|
-
Successful Response
|
|
412
|
+
None
|
|
473
413
|
|
|
474
414
|
Examples
|
|
475
415
|
--------
|
|
476
|
-
from letta_client import Letta
|
|
416
|
+
from letta_client import Letta
|
|
477
417
|
|
|
478
418
|
client = Letta(
|
|
479
419
|
token="YOUR_TOKEN",
|
|
480
420
|
)
|
|
481
|
-
client.groups.
|
|
421
|
+
client.groups.modify(
|
|
482
422
|
group_id="group_id",
|
|
483
|
-
agent_id="agent_id",
|
|
484
|
-
messages=[
|
|
485
|
-
MessageCreate(
|
|
486
|
-
role="user",
|
|
487
|
-
content=[
|
|
488
|
-
TextContent(
|
|
489
|
-
text="text",
|
|
490
|
-
)
|
|
491
|
-
],
|
|
492
|
-
)
|
|
493
|
-
],
|
|
494
423
|
)
|
|
495
424
|
"""
|
|
496
425
|
_response = self._client_wrapper.httpx_client.request(
|
|
497
|
-
f"v1/groups/{jsonable_encoder(group_id)}
|
|
498
|
-
method="
|
|
499
|
-
params={
|
|
500
|
-
"agent_id": agent_id,
|
|
501
|
-
},
|
|
502
|
-
json={
|
|
503
|
-
"messages": convert_and_respect_annotation_metadata(
|
|
504
|
-
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
505
|
-
),
|
|
506
|
-
"use_assistant_message": use_assistant_message,
|
|
507
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
508
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
509
|
-
},
|
|
426
|
+
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
427
|
+
method="PATCH",
|
|
510
428
|
request_options=request_options,
|
|
511
|
-
omit=OMIT,
|
|
512
429
|
)
|
|
513
430
|
try:
|
|
514
431
|
if 200 <= _response.status_code < 300:
|
|
515
|
-
return
|
|
516
|
-
LettaResponse,
|
|
517
|
-
construct_type(
|
|
518
|
-
type_=LettaResponse, # type: ignore
|
|
519
|
-
object_=_response.json(),
|
|
520
|
-
),
|
|
521
|
-
)
|
|
522
|
-
if _response.status_code == 422:
|
|
523
|
-
raise UnprocessableEntityError(
|
|
524
|
-
typing.cast(
|
|
525
|
-
HttpValidationError,
|
|
526
|
-
construct_type(
|
|
527
|
-
type_=HttpValidationError, # type: ignore
|
|
528
|
-
object_=_response.json(),
|
|
529
|
-
),
|
|
530
|
-
)
|
|
531
|
-
)
|
|
432
|
+
return
|
|
532
433
|
_response_json = _response.json()
|
|
533
434
|
except JSONDecodeError:
|
|
534
435
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
535
436
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
536
437
|
|
|
537
|
-
def
|
|
538
|
-
self,
|
|
539
|
-
group_id: str,
|
|
540
|
-
*,
|
|
541
|
-
messages: typing.Sequence[MessageCreate],
|
|
542
|
-
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
543
|
-
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
544
|
-
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
545
|
-
stream_tokens: typing.Optional[bool] = OMIT,
|
|
546
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
438
|
+
def reset_messages(
|
|
439
|
+
self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
547
440
|
) -> typing.Optional[typing.Any]:
|
|
548
441
|
"""
|
|
549
|
-
|
|
550
|
-
This endpoint accepts a message from a user and processes it through agents in the group based on the specified pattern.
|
|
551
|
-
It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
442
|
+
Delete the group messages for all agents that are part of the multi-agent group.
|
|
552
443
|
|
|
553
444
|
Parameters
|
|
554
445
|
----------
|
|
555
446
|
group_id : str
|
|
556
447
|
|
|
557
|
-
messages : typing.Sequence[MessageCreate]
|
|
558
|
-
The messages to be sent to the agent.
|
|
559
|
-
|
|
560
|
-
use_assistant_message : typing.Optional[bool]
|
|
561
|
-
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
562
|
-
|
|
563
|
-
assistant_message_tool_name : typing.Optional[str]
|
|
564
|
-
The name of the designated message tool.
|
|
565
|
-
|
|
566
|
-
assistant_message_tool_kwarg : typing.Optional[str]
|
|
567
|
-
The name of the message argument in the designated message tool.
|
|
568
|
-
|
|
569
|
-
stream_tokens : typing.Optional[bool]
|
|
570
|
-
Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
|
|
571
|
-
|
|
572
448
|
request_options : typing.Optional[RequestOptions]
|
|
573
449
|
Request-specific configuration.
|
|
574
450
|
|
|
575
451
|
Returns
|
|
576
452
|
-------
|
|
577
453
|
typing.Optional[typing.Any]
|
|
578
|
-
Successful
|
|
454
|
+
Successful Response
|
|
579
455
|
|
|
580
456
|
Examples
|
|
581
457
|
--------
|
|
582
|
-
from letta_client import Letta
|
|
458
|
+
from letta_client import Letta
|
|
583
459
|
|
|
584
460
|
client = Letta(
|
|
585
461
|
token="YOUR_TOKEN",
|
|
586
462
|
)
|
|
587
|
-
client.groups.
|
|
463
|
+
client.groups.reset_messages(
|
|
588
464
|
group_id="group_id",
|
|
589
|
-
messages=[
|
|
590
|
-
MessageCreate(
|
|
591
|
-
role="user",
|
|
592
|
-
content=[
|
|
593
|
-
TextContent(
|
|
594
|
-
text="text",
|
|
595
|
-
)
|
|
596
|
-
],
|
|
597
|
-
)
|
|
598
|
-
],
|
|
599
465
|
)
|
|
600
466
|
"""
|
|
601
467
|
_response = self._client_wrapper.httpx_client.request(
|
|
602
|
-
f"v1/groups/{jsonable_encoder(group_id)}/messages
|
|
603
|
-
method="
|
|
604
|
-
json={
|
|
605
|
-
"messages": convert_and_respect_annotation_metadata(
|
|
606
|
-
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
607
|
-
),
|
|
608
|
-
"use_assistant_message": use_assistant_message,
|
|
609
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
610
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
611
|
-
"stream_tokens": stream_tokens,
|
|
612
|
-
},
|
|
468
|
+
f"v1/groups/{jsonable_encoder(group_id)}/reset-messages",
|
|
469
|
+
method="PATCH",
|
|
613
470
|
request_options=request_options,
|
|
614
|
-
omit=OMIT,
|
|
615
471
|
)
|
|
616
472
|
try:
|
|
617
473
|
if 200 <= _response.status_code < 300:
|
|
@@ -641,8 +497,9 @@ class GroupsClient:
|
|
|
641
497
|
class AsyncGroupsClient:
|
|
642
498
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
643
499
|
self._client_wrapper = client_wrapper
|
|
500
|
+
self.messages = AsyncMessagesClient(client_wrapper=self._client_wrapper)
|
|
644
501
|
|
|
645
|
-
async def
|
|
502
|
+
async def list(
|
|
646
503
|
self,
|
|
647
504
|
*,
|
|
648
505
|
manager_type: typing.Optional[ManagerType] = None,
|
|
@@ -692,7 +549,7 @@ class AsyncGroupsClient:
|
|
|
692
549
|
|
|
693
550
|
|
|
694
551
|
async def main() -> None:
|
|
695
|
-
await client.groups.
|
|
552
|
+
await client.groups.list()
|
|
696
553
|
|
|
697
554
|
|
|
698
555
|
asyncio.run(main())
|
|
@@ -733,7 +590,7 @@ class AsyncGroupsClient:
|
|
|
733
590
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
734
591
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
735
592
|
|
|
736
|
-
async def
|
|
593
|
+
async def create(
|
|
737
594
|
self,
|
|
738
595
|
*,
|
|
739
596
|
agent_ids: typing.Sequence[str],
|
|
@@ -778,7 +635,7 @@ class AsyncGroupsClient:
|
|
|
778
635
|
|
|
779
636
|
|
|
780
637
|
async def main() -> None:
|
|
781
|
-
await client.groups.
|
|
638
|
+
await client.groups.create(
|
|
782
639
|
agent_ids=["agent_ids"],
|
|
783
640
|
description="description",
|
|
784
641
|
)
|
|
@@ -797,6 +654,7 @@ class AsyncGroupsClient:
|
|
|
797
654
|
),
|
|
798
655
|
},
|
|
799
656
|
headers={
|
|
657
|
+
"content-type": "application/json",
|
|
800
658
|
"X-Project": str(project) if project is not None else None,
|
|
801
659
|
},
|
|
802
660
|
request_options=request_options,
|
|
@@ -826,30 +684,13 @@ class AsyncGroupsClient:
|
|
|
826
684
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
827
685
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
828
686
|
|
|
829
|
-
async def
|
|
830
|
-
self,
|
|
831
|
-
*,
|
|
832
|
-
agent_ids: typing.Sequence[str],
|
|
833
|
-
description: str,
|
|
834
|
-
project: typing.Optional[str] = None,
|
|
835
|
-
manager_config: typing.Optional[GroupCreateManagerConfig] = OMIT,
|
|
836
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
837
|
-
) -> Group:
|
|
687
|
+
async def retrieve(self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Group:
|
|
838
688
|
"""
|
|
839
|
-
|
|
689
|
+
Retrieve the group by id.
|
|
840
690
|
|
|
841
691
|
Parameters
|
|
842
692
|
----------
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
description : str
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
project : typing.Optional[str]
|
|
850
|
-
|
|
851
|
-
manager_config : typing.Optional[GroupCreateManagerConfig]
|
|
852
|
-
|
|
693
|
+
group_id : str
|
|
853
694
|
|
|
854
695
|
request_options : typing.Optional[RequestOptions]
|
|
855
696
|
Request-specific configuration.
|
|
@@ -871,29 +712,17 @@ class AsyncGroupsClient:
|
|
|
871
712
|
|
|
872
713
|
|
|
873
714
|
async def main() -> None:
|
|
874
|
-
await client.groups.
|
|
875
|
-
|
|
876
|
-
description="description",
|
|
715
|
+
await client.groups.retrieve(
|
|
716
|
+
group_id="group_id",
|
|
877
717
|
)
|
|
878
718
|
|
|
879
719
|
|
|
880
720
|
asyncio.run(main())
|
|
881
721
|
"""
|
|
882
722
|
_response = await self._client_wrapper.httpx_client.request(
|
|
883
|
-
"v1/groups/",
|
|
884
|
-
method="
|
|
885
|
-
json={
|
|
886
|
-
"agent_ids": agent_ids,
|
|
887
|
-
"description": description,
|
|
888
|
-
"manager_config": convert_and_respect_annotation_metadata(
|
|
889
|
-
object_=manager_config, annotation=GroupCreateManagerConfig, direction="write"
|
|
890
|
-
),
|
|
891
|
-
},
|
|
892
|
-
headers={
|
|
893
|
-
"X-Project": str(project) if project is not None else None,
|
|
894
|
-
},
|
|
723
|
+
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
724
|
+
method="GET",
|
|
895
725
|
request_options=request_options,
|
|
896
|
-
omit=OMIT,
|
|
897
726
|
)
|
|
898
727
|
try:
|
|
899
728
|
if 200 <= _response.status_code < 300:
|
|
@@ -919,22 +748,40 @@ class AsyncGroupsClient:
|
|
|
919
748
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
920
749
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
921
750
|
|
|
922
|
-
async def
|
|
923
|
-
self,
|
|
924
|
-
|
|
751
|
+
async def modify_group(
|
|
752
|
+
self,
|
|
753
|
+
group_id: str,
|
|
754
|
+
*,
|
|
755
|
+
project: typing.Optional[str] = None,
|
|
756
|
+
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
757
|
+
description: typing.Optional[str] = OMIT,
|
|
758
|
+
manager_config: typing.Optional[GroupUpdateManagerConfig] = OMIT,
|
|
759
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
760
|
+
) -> Group:
|
|
925
761
|
"""
|
|
926
|
-
|
|
762
|
+
Create a new multi-agent group with the specified configuration.
|
|
927
763
|
|
|
928
764
|
Parameters
|
|
929
765
|
----------
|
|
930
766
|
group_id : str
|
|
931
767
|
|
|
768
|
+
project : typing.Optional[str]
|
|
769
|
+
|
|
770
|
+
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
description : typing.Optional[str]
|
|
774
|
+
|
|
775
|
+
|
|
776
|
+
manager_config : typing.Optional[GroupUpdateManagerConfig]
|
|
777
|
+
|
|
778
|
+
|
|
932
779
|
request_options : typing.Optional[RequestOptions]
|
|
933
780
|
Request-specific configuration.
|
|
934
781
|
|
|
935
782
|
Returns
|
|
936
783
|
-------
|
|
937
|
-
|
|
784
|
+
Group
|
|
938
785
|
Successful Response
|
|
939
786
|
|
|
940
787
|
Examples
|
|
@@ -949,7 +796,7 @@ class AsyncGroupsClient:
|
|
|
949
796
|
|
|
950
797
|
|
|
951
798
|
async def main() -> None:
|
|
952
|
-
await client.groups.
|
|
799
|
+
await client.groups.modify_group(
|
|
953
800
|
group_id="group_id",
|
|
954
801
|
)
|
|
955
802
|
|
|
@@ -958,15 +805,27 @@ class AsyncGroupsClient:
|
|
|
958
805
|
"""
|
|
959
806
|
_response = await self._client_wrapper.httpx_client.request(
|
|
960
807
|
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
961
|
-
method="
|
|
808
|
+
method="PUT",
|
|
809
|
+
json={
|
|
810
|
+
"agent_ids": agent_ids,
|
|
811
|
+
"description": description,
|
|
812
|
+
"manager_config": convert_and_respect_annotation_metadata(
|
|
813
|
+
object_=manager_config, annotation=GroupUpdateManagerConfig, direction="write"
|
|
814
|
+
),
|
|
815
|
+
},
|
|
816
|
+
headers={
|
|
817
|
+
"content-type": "application/json",
|
|
818
|
+
"X-Project": str(project) if project is not None else None,
|
|
819
|
+
},
|
|
962
820
|
request_options=request_options,
|
|
821
|
+
omit=OMIT,
|
|
963
822
|
)
|
|
964
823
|
try:
|
|
965
824
|
if 200 <= _response.status_code < 300:
|
|
966
825
|
return typing.cast(
|
|
967
|
-
|
|
826
|
+
Group,
|
|
968
827
|
construct_type(
|
|
969
|
-
type_=
|
|
828
|
+
type_=Group, # type: ignore
|
|
970
829
|
object_=_response.json(),
|
|
971
830
|
),
|
|
972
831
|
)
|
|
@@ -985,49 +844,22 @@ class AsyncGroupsClient:
|
|
|
985
844
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
986
845
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
987
846
|
|
|
988
|
-
async def
|
|
989
|
-
self,
|
|
990
|
-
|
|
991
|
-
*,
|
|
992
|
-
after: typing.Optional[str] = None,
|
|
993
|
-
before: typing.Optional[str] = None,
|
|
994
|
-
limit: typing.Optional[int] = None,
|
|
995
|
-
use_assistant_message: typing.Optional[bool] = None,
|
|
996
|
-
assistant_message_tool_name: typing.Optional[str] = None,
|
|
997
|
-
assistant_message_tool_kwarg: typing.Optional[str] = None,
|
|
998
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
999
|
-
) -> typing.List[LettaMessageUnion]:
|
|
847
|
+
async def delete(
|
|
848
|
+
self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
849
|
+
) -> typing.Optional[typing.Any]:
|
|
1000
850
|
"""
|
|
1001
|
-
|
|
851
|
+
Delete a multi-agent group.
|
|
1002
852
|
|
|
1003
853
|
Parameters
|
|
1004
854
|
----------
|
|
1005
855
|
group_id : str
|
|
1006
856
|
|
|
1007
|
-
after : typing.Optional[str]
|
|
1008
|
-
Message after which to retrieve the returned messages.
|
|
1009
|
-
|
|
1010
|
-
before : typing.Optional[str]
|
|
1011
|
-
Message before which to retrieve the returned messages.
|
|
1012
|
-
|
|
1013
|
-
limit : typing.Optional[int]
|
|
1014
|
-
Maximum number of messages to retrieve.
|
|
1015
|
-
|
|
1016
|
-
use_assistant_message : typing.Optional[bool]
|
|
1017
|
-
Whether to use assistant messages
|
|
1018
|
-
|
|
1019
|
-
assistant_message_tool_name : typing.Optional[str]
|
|
1020
|
-
The name of the designated message tool.
|
|
1021
|
-
|
|
1022
|
-
assistant_message_tool_kwarg : typing.Optional[str]
|
|
1023
|
-
The name of the message argument.
|
|
1024
|
-
|
|
1025
857
|
request_options : typing.Optional[RequestOptions]
|
|
1026
858
|
Request-specific configuration.
|
|
1027
859
|
|
|
1028
860
|
Returns
|
|
1029
861
|
-------
|
|
1030
|
-
typing.
|
|
862
|
+
typing.Optional[typing.Any]
|
|
1031
863
|
Successful Response
|
|
1032
864
|
|
|
1033
865
|
Examples
|
|
@@ -1042,7 +874,7 @@ class AsyncGroupsClient:
|
|
|
1042
874
|
|
|
1043
875
|
|
|
1044
876
|
async def main() -> None:
|
|
1045
|
-
await client.groups.
|
|
877
|
+
await client.groups.delete(
|
|
1046
878
|
group_id="group_id",
|
|
1047
879
|
)
|
|
1048
880
|
|
|
@@ -1050,24 +882,16 @@ class AsyncGroupsClient:
|
|
|
1050
882
|
asyncio.run(main())
|
|
1051
883
|
"""
|
|
1052
884
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1053
|
-
f"v1/groups/{jsonable_encoder(group_id)}
|
|
1054
|
-
method="
|
|
1055
|
-
params={
|
|
1056
|
-
"after": after,
|
|
1057
|
-
"before": before,
|
|
1058
|
-
"limit": limit,
|
|
1059
|
-
"use_assistant_message": use_assistant_message,
|
|
1060
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
1061
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
1062
|
-
},
|
|
885
|
+
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
886
|
+
method="DELETE",
|
|
1063
887
|
request_options=request_options,
|
|
1064
888
|
)
|
|
1065
889
|
try:
|
|
1066
890
|
if 200 <= _response.status_code < 300:
|
|
1067
891
|
return typing.cast(
|
|
1068
|
-
typing.
|
|
892
|
+
typing.Optional[typing.Any],
|
|
1069
893
|
construct_type(
|
|
1070
|
-
type_=typing.
|
|
894
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
1071
895
|
object_=_response.json(),
|
|
1072
896
|
),
|
|
1073
897
|
)
|
|
@@ -1086,52 +910,24 @@ class AsyncGroupsClient:
|
|
|
1086
910
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1087
911
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1088
912
|
|
|
1089
|
-
async def
|
|
1090
|
-
self,
|
|
1091
|
-
group_id: str,
|
|
1092
|
-
*,
|
|
1093
|
-
agent_id: str,
|
|
1094
|
-
messages: typing.Sequence[MessageCreate],
|
|
1095
|
-
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
1096
|
-
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
1097
|
-
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
1098
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
1099
|
-
) -> LettaResponse:
|
|
913
|
+
async def modify(self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
1100
914
|
"""
|
|
1101
|
-
Process a user message and return the group's response.
|
|
1102
|
-
This endpoint accepts a message from a user and processes it through through agents in the group based on the specified pattern
|
|
1103
|
-
|
|
1104
915
|
Parameters
|
|
1105
916
|
----------
|
|
1106
917
|
group_id : str
|
|
1107
918
|
|
|
1108
|
-
agent_id : str
|
|
1109
|
-
|
|
1110
|
-
messages : typing.Sequence[MessageCreate]
|
|
1111
|
-
The messages to be sent to the agent.
|
|
1112
|
-
|
|
1113
|
-
use_assistant_message : typing.Optional[bool]
|
|
1114
|
-
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
1115
|
-
|
|
1116
|
-
assistant_message_tool_name : typing.Optional[str]
|
|
1117
|
-
The name of the designated message tool.
|
|
1118
|
-
|
|
1119
|
-
assistant_message_tool_kwarg : typing.Optional[str]
|
|
1120
|
-
The name of the message argument in the designated message tool.
|
|
1121
|
-
|
|
1122
919
|
request_options : typing.Optional[RequestOptions]
|
|
1123
920
|
Request-specific configuration.
|
|
1124
921
|
|
|
1125
922
|
Returns
|
|
1126
923
|
-------
|
|
1127
|
-
|
|
1128
|
-
Successful Response
|
|
924
|
+
None
|
|
1129
925
|
|
|
1130
926
|
Examples
|
|
1131
927
|
--------
|
|
1132
928
|
import asyncio
|
|
1133
929
|
|
|
1134
|
-
from letta_client import AsyncLetta
|
|
930
|
+
from letta_client import AsyncLetta
|
|
1135
931
|
|
|
1136
932
|
client = AsyncLetta(
|
|
1137
933
|
token="YOUR_TOKEN",
|
|
@@ -1139,113 +935,49 @@ class AsyncGroupsClient:
|
|
|
1139
935
|
|
|
1140
936
|
|
|
1141
937
|
async def main() -> None:
|
|
1142
|
-
await client.groups.
|
|
938
|
+
await client.groups.modify(
|
|
1143
939
|
group_id="group_id",
|
|
1144
|
-
agent_id="agent_id",
|
|
1145
|
-
messages=[
|
|
1146
|
-
MessageCreate(
|
|
1147
|
-
role="user",
|
|
1148
|
-
content=[
|
|
1149
|
-
TextContent(
|
|
1150
|
-
text="text",
|
|
1151
|
-
)
|
|
1152
|
-
],
|
|
1153
|
-
)
|
|
1154
|
-
],
|
|
1155
940
|
)
|
|
1156
941
|
|
|
1157
942
|
|
|
1158
943
|
asyncio.run(main())
|
|
1159
944
|
"""
|
|
1160
945
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1161
|
-
f"v1/groups/{jsonable_encoder(group_id)}
|
|
1162
|
-
method="
|
|
1163
|
-
params={
|
|
1164
|
-
"agent_id": agent_id,
|
|
1165
|
-
},
|
|
1166
|
-
json={
|
|
1167
|
-
"messages": convert_and_respect_annotation_metadata(
|
|
1168
|
-
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
1169
|
-
),
|
|
1170
|
-
"use_assistant_message": use_assistant_message,
|
|
1171
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
1172
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
1173
|
-
},
|
|
946
|
+
f"v1/groups/{jsonable_encoder(group_id)}",
|
|
947
|
+
method="PATCH",
|
|
1174
948
|
request_options=request_options,
|
|
1175
|
-
omit=OMIT,
|
|
1176
949
|
)
|
|
1177
950
|
try:
|
|
1178
951
|
if 200 <= _response.status_code < 300:
|
|
1179
|
-
return
|
|
1180
|
-
LettaResponse,
|
|
1181
|
-
construct_type(
|
|
1182
|
-
type_=LettaResponse, # type: ignore
|
|
1183
|
-
object_=_response.json(),
|
|
1184
|
-
),
|
|
1185
|
-
)
|
|
1186
|
-
if _response.status_code == 422:
|
|
1187
|
-
raise UnprocessableEntityError(
|
|
1188
|
-
typing.cast(
|
|
1189
|
-
HttpValidationError,
|
|
1190
|
-
construct_type(
|
|
1191
|
-
type_=HttpValidationError, # type: ignore
|
|
1192
|
-
object_=_response.json(),
|
|
1193
|
-
),
|
|
1194
|
-
)
|
|
1195
|
-
)
|
|
952
|
+
return
|
|
1196
953
|
_response_json = _response.json()
|
|
1197
954
|
except JSONDecodeError:
|
|
1198
955
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1199
956
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1200
957
|
|
|
1201
|
-
async def
|
|
1202
|
-
self,
|
|
1203
|
-
group_id: str,
|
|
1204
|
-
*,
|
|
1205
|
-
messages: typing.Sequence[MessageCreate],
|
|
1206
|
-
use_assistant_message: typing.Optional[bool] = OMIT,
|
|
1207
|
-
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
1208
|
-
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
1209
|
-
stream_tokens: typing.Optional[bool] = OMIT,
|
|
1210
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
958
|
+
async def reset_messages(
|
|
959
|
+
self, group_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1211
960
|
) -> typing.Optional[typing.Any]:
|
|
1212
961
|
"""
|
|
1213
|
-
|
|
1214
|
-
This endpoint accepts a message from a user and processes it through agents in the group based on the specified pattern.
|
|
1215
|
-
It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
|
|
962
|
+
Delete the group messages for all agents that are part of the multi-agent group.
|
|
1216
963
|
|
|
1217
964
|
Parameters
|
|
1218
965
|
----------
|
|
1219
966
|
group_id : str
|
|
1220
967
|
|
|
1221
|
-
messages : typing.Sequence[MessageCreate]
|
|
1222
|
-
The messages to be sent to the agent.
|
|
1223
|
-
|
|
1224
|
-
use_assistant_message : typing.Optional[bool]
|
|
1225
|
-
Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
|
|
1226
|
-
|
|
1227
|
-
assistant_message_tool_name : typing.Optional[str]
|
|
1228
|
-
The name of the designated message tool.
|
|
1229
|
-
|
|
1230
|
-
assistant_message_tool_kwarg : typing.Optional[str]
|
|
1231
|
-
The name of the message argument in the designated message tool.
|
|
1232
|
-
|
|
1233
|
-
stream_tokens : typing.Optional[bool]
|
|
1234
|
-
Flag to determine if individual tokens should be streamed. Set to True for token streaming (requires stream_steps = True).
|
|
1235
|
-
|
|
1236
968
|
request_options : typing.Optional[RequestOptions]
|
|
1237
969
|
Request-specific configuration.
|
|
1238
970
|
|
|
1239
971
|
Returns
|
|
1240
972
|
-------
|
|
1241
973
|
typing.Optional[typing.Any]
|
|
1242
|
-
Successful
|
|
974
|
+
Successful Response
|
|
1243
975
|
|
|
1244
976
|
Examples
|
|
1245
977
|
--------
|
|
1246
978
|
import asyncio
|
|
1247
979
|
|
|
1248
|
-
from letta_client import AsyncLetta
|
|
980
|
+
from letta_client import AsyncLetta
|
|
1249
981
|
|
|
1250
982
|
client = AsyncLetta(
|
|
1251
983
|
token="YOUR_TOKEN",
|
|
@@ -1253,37 +985,17 @@ class AsyncGroupsClient:
|
|
|
1253
985
|
|
|
1254
986
|
|
|
1255
987
|
async def main() -> None:
|
|
1256
|
-
await client.groups.
|
|
988
|
+
await client.groups.reset_messages(
|
|
1257
989
|
group_id="group_id",
|
|
1258
|
-
messages=[
|
|
1259
|
-
MessageCreate(
|
|
1260
|
-
role="user",
|
|
1261
|
-
content=[
|
|
1262
|
-
TextContent(
|
|
1263
|
-
text="text",
|
|
1264
|
-
)
|
|
1265
|
-
],
|
|
1266
|
-
)
|
|
1267
|
-
],
|
|
1268
990
|
)
|
|
1269
991
|
|
|
1270
992
|
|
|
1271
993
|
asyncio.run(main())
|
|
1272
994
|
"""
|
|
1273
995
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1274
|
-
f"v1/groups/{jsonable_encoder(group_id)}/messages
|
|
1275
|
-
method="
|
|
1276
|
-
json={
|
|
1277
|
-
"messages": convert_and_respect_annotation_metadata(
|
|
1278
|
-
object_=messages, annotation=typing.Sequence[MessageCreate], direction="write"
|
|
1279
|
-
),
|
|
1280
|
-
"use_assistant_message": use_assistant_message,
|
|
1281
|
-
"assistant_message_tool_name": assistant_message_tool_name,
|
|
1282
|
-
"assistant_message_tool_kwarg": assistant_message_tool_kwarg,
|
|
1283
|
-
"stream_tokens": stream_tokens,
|
|
1284
|
-
},
|
|
996
|
+
f"v1/groups/{jsonable_encoder(group_id)}/reset-messages",
|
|
997
|
+
method="PATCH",
|
|
1285
998
|
request_options=request_options,
|
|
1286
|
-
omit=OMIT,
|
|
1287
999
|
)
|
|
1288
1000
|
try:
|
|
1289
1001
|
if 200 <= _response.status_code < 300:
|