letta-client 1.0.0a6__py3-none-any.whl → 1.0.0a8__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_sdk → letta_client}/__init__.py +8 -8
- {letta_sdk → letta_client}/_base_client.py +1 -1
- {letta_sdk → letta_client}/_client.py +124 -171
- {letta_sdk → letta_client}/_exceptions.py +2 -2
- {letta_sdk → letta_client}/_resource.py +5 -5
- {letta_sdk → letta_client}/_response.py +8 -6
- {letta_sdk → letta_client}/_streaming.py +3 -3
- {letta_sdk → letta_client}/_types.py +1 -1
- {letta_sdk → letta_client}/_utils/_logs.py +3 -3
- {letta_sdk → letta_client}/_utils/_resources_proxy.py +4 -4
- {letta_sdk → letta_client}/_version.py +2 -2
- letta_client/pagination.py +107 -0
- {letta_sdk → letta_client}/resources/__init__.py +14 -154
- {letta_sdk → letta_client}/resources/agents/__init__.py +28 -42
- {letta_sdk → letta_client}/resources/agents/agents.py +228 -744
- {letta_sdk/resources/agents/core_memory → letta_client/resources/agents}/blocks.py +112 -19
- {letta_sdk → letta_client}/resources/agents/files.py +71 -8
- {letta_sdk → letta_client}/resources/agents/folders.py +101 -11
- letta_client/resources/agents/groups.py +245 -0
- {letta_sdk → letta_client}/resources/agents/messages.py +265 -490
- {letta_sdk → letta_client}/resources/agents/tools.py +147 -31
- letta_sdk/resources/jobs.py → letta_client/resources/archives.py +268 -280
- {letta_sdk/resources/messages → letta_client/resources/batches}/batches.py +46 -161
- letta_client/resources/batches/messages.py +238 -0
- {letta_sdk/resources/agents/core_memory → letta_client/resources/blocks}/__init__.py +14 -14
- letta_client/resources/blocks/agents.py +287 -0
- {letta_sdk/resources → letta_client/resources/blocks}/blocks.py +64 -175
- letta_client/resources/folders/__init__.py +47 -0
- letta_client/resources/folders/agents.py +237 -0
- letta_client/resources/folders/files.py +472 -0
- letta_sdk/resources/providers.py → letta_client/resources/folders/folders.py +298 -313
- {letta_sdk → letta_client}/resources/groups/groups.py +24 -88
- {letta_sdk → letta_client}/resources/groups/messages.py +178 -37
- letta_client/resources/identities/__init__.py +61 -0
- letta_client/resources/identities/agents.py +269 -0
- letta_client/resources/identities/blocks.py +237 -0
- {letta_sdk/resources → letta_client/resources/identities}/identities.py +277 -533
- letta_client/resources/identities/properties.py +174 -0
- letta_client/resources/models/__init__.py +33 -0
- {letta_sdk/resources → letta_client/resources/models}/embeddings.py +26 -49
- {letta_sdk/resources → letta_client/resources/models}/models.py +42 -117
- letta_client/resources/runs/__init__.py +61 -0
- letta_sdk/resources/archives.py → letta_client/resources/runs/messages.py +189 -157
- letta_client/resources/runs/runs.py +462 -0
- letta_client/resources/runs/steps.py +229 -0
- letta_sdk/resources/voice_beta/chat.py → letta_client/resources/runs/usage.py +50 -57
- letta_client/resources/steps/__init__.py +75 -0
- letta_client/resources/steps/feedback.py +198 -0
- letta_client/resources/steps/messages.py +237 -0
- letta_client/resources/steps/metrics.py +167 -0
- letta_client/resources/steps/steps.py +513 -0
- letta_sdk/resources/telemetry.py → letta_client/resources/steps/trace.py +45 -56
- {letta_sdk → letta_client}/resources/tags.py +13 -10
- letta_client/resources/templates/__init__.py +33 -0
- letta_client/resources/templates/agents.py +236 -0
- letta_client/resources/templates/templates.py +102 -0
- {letta_sdk/resources/tools → letta_client/resources}/tools.py +249 -433
- letta_client/types/__init__.py +111 -0
- {letta_sdk → letta_client}/types/agent_create_params.py +5 -2
- {letta_sdk → letta_client}/types/agent_environment_variable.py +3 -0
- letta_client/types/agent_export_file_params.py +18 -0
- letta_sdk/types/agent_export_response.py → letta_client/types/agent_export_file_response.py +2 -2
- letta_sdk/types/agent_import_params.py → letta_client/types/agent_import_file_params.py +5 -2
- letta_sdk/types/agent_import_response.py → letta_client/types/agent_import_file_response.py +2 -2
- {letta_sdk → letta_client}/types/agent_list_params.py +19 -2
- {letta_sdk → letta_client}/types/agent_retrieve_params.py +20 -3
- {letta_sdk → letta_client}/types/agent_state.py +131 -3
- {letta_sdk → letta_client}/types/agent_type.py +1 -0
- {letta_sdk → letta_client}/types/agent_update_params.py +12 -0
- {letta_sdk → letta_client}/types/agents/__init__.py +10 -21
- letta_client/types/agents/approval_create_param.py +44 -0
- {letta_sdk → letta_client}/types/agents/approval_request_message.py +10 -2
- letta_client/types/agents/approval_response_message.py +63 -0
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block.py +1 -1
- letta_sdk/types/identity_list_blocks_params.py → letta_client/types/agents/block_list_params.py +2 -2
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block_update_params.py +1 -0
- letta_client/types/agents/file_list_params.py +40 -0
- letta_client/types/agents/folder_list_params.py +34 -0
- letta_sdk/types/source.py → letta_client/types/agents/folder_list_response.py +5 -5
- letta_client/types/agents/group_list_params.py +37 -0
- {letta_sdk → letta_client}/types/agents/letta_assistant_message_content_union.py +3 -0
- {letta_sdk → letta_client}/types/agents/letta_assistant_message_content_union_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/letta_response.py +0 -4
- {letta_sdk → letta_client}/types/agents/message.py +93 -2
- {letta_sdk → letta_client}/types/agents/message_list_params.py +20 -5
- letta_sdk/types/agent_reset_messages_params.py → letta_client/types/agents/message_reset_params.py +2 -2
- {letta_sdk → letta_client}/types/agents/message_send_async_params.py +12 -3
- {letta_sdk → letta_client}/types/agents/message_send_params.py +12 -3
- letta_sdk/types/agents/message_send_stream_params.py → letta_client/types/agents/message_stream_params.py +14 -5
- {letta_sdk → letta_client}/types/agents/message_update_params.py +4 -0
- {letta_sdk → letta_client}/types/agents/omitted_reasoning_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/omitted_reasoning_content_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/run.py +16 -19
- {letta_sdk → letta_client}/types/agents/text_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/text_content_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/tool_call_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/tool_call_content_param.py +4 -1
- {letta_sdk → letta_client}/types/agents/tool_call_message.py +6 -2
- letta_client/types/agents/tool_list_params.py +34 -0
- {letta_sdk → letta_client}/types/agents/tool_return.py +7 -3
- letta_client/types/agents/tool_return_param.py +25 -0
- letta_client/types/agents/tool_update_approval_params.py +21 -0
- {letta_sdk → letta_client}/types/archive.py +4 -0
- letta_client/types/archive_create_params.py +19 -0
- letta_sdk/types/archive_retrieve_params.py → letta_client/types/archive_list_params.py +2 -2
- letta_sdk/types/archive_retrieve_response.py → letta_client/types/archive_list_response.py +2 -2
- {letta_sdk → letta_client}/types/archive_update_params.py +3 -3
- {letta_sdk/types/messages → letta_client/types}/batch_create_params.py +15 -6
- letta_sdk/types/job.py → letta_client/types/batch_job.py +8 -3
- letta_client/types/batches/__init__.py +6 -0
- letta_sdk/types/messages/batch_list_messages_params.py → letta_client/types/batches/message_list_params.py +2 -2
- letta_sdk/types/messages/batch_list_messages_response.py → letta_client/types/batches/message_list_response.py +2 -2
- {letta_sdk/types/tools → letta_client/types/blocks}/__init__.py +2 -0
- letta_sdk/types/block_list_agents_params.py → letta_client/types/blocks/agent_list_params.py +22 -5
- letta_client/types/child_tool_rule.py +40 -0
- letta_client/types/child_tool_rule_param.py +42 -0
- letta_client/types/folders/__init__.py +10 -0
- letta_sdk/types/folder_list_agents_params.py → letta_client/types/folders/agent_list_params.py +2 -2
- letta_client/types/folders/agent_list_response.py +7 -0
- letta_sdk/types/folder_list_files_params.py → letta_client/types/folders/file_list_params.py +2 -2
- letta_sdk/types/file_metadata.py → letta_client/types/folders/file_list_response.py +5 -5
- letta_sdk/types/source_upload_file_params.py → letta_client/types/folders/file_upload_params.py +5 -6
- letta_client/types/folders/file_upload_response.py +65 -0
- {letta_sdk → letta_client}/types/groups/__init__.py +1 -2
- {letta_sdk → letta_client}/types/groups/message_send_params.py +12 -3
- letta_sdk/types/groups/message_send_stream_params.py → letta_client/types/groups/message_stream_params.py +14 -5
- {letta_sdk → letta_client}/types/groups/message_update_params.py +4 -0
- letta_sdk/types/health_check_response.py → letta_client/types/health_response.py +2 -2
- letta_client/types/identities/__init__.py +7 -0
- letta_sdk/types/identity_list_agents_params.py → letta_client/types/identities/agent_list_params.py +19 -3
- letta_client/types/identities/block_list_params.py +34 -0
- letta_sdk/types/identity_upsert_properties_params.py → letta_client/types/identities/property_upsert_params.py +3 -3
- letta_sdk/types/identity_modify_params.py → letta_client/types/identity_update_params.py +2 -2
- {letta_sdk → letta_client}/types/init_tool_rule.py +10 -1
- {letta_sdk → letta_client}/types/init_tool_rule_param.py +10 -1
- {letta_sdk → letta_client}/types/llm_config.py +6 -0
- {letta_sdk → letta_client}/types/llm_config_param.py +6 -0
- {letta_sdk/types/voice_beta → letta_client/types/models}/__init__.py +1 -1
- letta_sdk/types/agents/archival_memory_create_response.py → letta_client/types/models/embedding_list_response.py +3 -3
- {letta_sdk → letta_client}/types/run_list_params.py +29 -5
- letta_client/types/runs/__init__.py +8 -0
- letta_sdk/types/run_list_messages_params.py → letta_client/types/runs/message_list_params.py +5 -2
- letta_sdk/types/run_retrieve_stream_params.py → letta_client/types/runs/message_stream_params.py +2 -2
- letta_sdk/types/run_list_steps_params.py → letta_client/types/runs/step_list_params.py +9 -6
- letta_sdk/types/run_retrieve_usage_response.py → letta_client/types/runs/usage_retrieve_response.py +3 -3
- {letta_sdk → letta_client}/types/step.py +6 -6
- letta_client/types/steps/__init__.py +8 -0
- letta_sdk/types/step_update_feedback_params.py → letta_client/types/steps/feedback_create_params.py +3 -3
- letta_sdk/types/step_list_messages_params.py → letta_client/types/steps/message_list_params.py +2 -2
- letta_client/types/steps/message_list_response.py +32 -0
- letta_sdk/types/step_retrieve_metrics_response.py → letta_client/types/steps/metric_retrieve_response.py +6 -6
- {letta_sdk → letta_client}/types/tag_list_response.py +1 -2
- letta_client/types/templates/__init__.py +5 -0
- letta_sdk/types/template_create_agents_params.py → letta_client/types/templates/agent_create_params.py +4 -4
- {letta_sdk → letta_client}/types/tool.py +6 -0
- {letta_sdk → letta_client}/types/tool_create_params.py +6 -0
- {letta_sdk → letta_client}/types/tool_return_message.py +3 -0
- letta_sdk/types/tool_modify_params.py → letta_client/types/tool_update_params.py +8 -2
- letta_sdk/types/tool_list_response.py → letta_client/types/tool_upsert_base_tools_response.py +2 -2
- {letta_sdk → letta_client}/types/tool_upsert_params.py +6 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a8.dist-info}/METADATA +110 -70
- letta_client-1.0.0a8.dist-info/RECORD +289 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a8.dist-info}/licenses/LICENSE +1 -1
- letta_client-1.0.0a6.dist-info/RECORD +0 -420
- letta_sdk/resources/_internal_templates/__init__.py +0 -33
- letta_sdk/resources/_internal_templates/_internal_templates.py +0 -961
- letta_sdk/resources/_internal_templates/deployment.py +0 -268
- letta_sdk/resources/agents/archival_memory.py +0 -581
- letta_sdk/resources/agents/core_memory/core_memory.py +0 -278
- letta_sdk/resources/agents/sources.py +0 -332
- letta_sdk/resources/client_side_access_tokens.py +0 -402
- letta_sdk/resources/folders.py +0 -1562
- letta_sdk/resources/health.py +0 -135
- letta_sdk/resources/messages/messages.py +0 -102
- letta_sdk/resources/projects.py +0 -189
- letta_sdk/resources/runs.py +0 -1016
- letta_sdk/resources/sources/__init__.py +0 -33
- letta_sdk/resources/sources/files.py +0 -341
- letta_sdk/resources/sources/sources.py +0 -1371
- letta_sdk/resources/steps.py +0 -784
- letta_sdk/resources/templates.py +0 -1310
- letta_sdk/resources/tools/__init__.py +0 -47
- letta_sdk/resources/tools/composio/__init__.py +0 -33
- letta_sdk/resources/tools/composio/apps.py +0 -214
- letta_sdk/resources/tools/composio/composio.py +0 -201
- letta_sdk/resources/tools/mcp/__init__.py +0 -47
- letta_sdk/resources/tools/mcp/mcp.py +0 -134
- letta_sdk/resources/tools/mcp/oauth.py +0 -214
- letta_sdk/resources/tools/mcp/servers/__init__.py +0 -33
- letta_sdk/resources/tools/mcp/servers/servers.py +0 -1785
- letta_sdk/resources/tools/mcp/servers/tools.py +0 -263
- letta_sdk/resources/voice_beta/__init__.py +0 -33
- letta_sdk/resources/voice_beta/voice_beta.py +0 -102
- letta_sdk/types/__init__.py +0 -226
- letta_sdk/types/_internal_templates/__init__.py +0 -7
- letta_sdk/types/_internal_templates/deployment_delete_response.py +0 -17
- letta_sdk/types/_internal_templates/deployment_list_entities_params.py +0 -15
- letta_sdk/types/_internal_templates/deployment_list_entities_response.py +0 -31
- letta_sdk/types/agent_export_params.py +0 -17
- letta_sdk/types/agent_list_groups_params.py +0 -13
- letta_sdk/types/agent_list_groups_response.py +0 -10
- letta_sdk/types/agent_list_response.py +0 -10
- letta_sdk/types/agent_migrate_params.py +0 -19
- letta_sdk/types/agent_migrate_response.py +0 -11
- letta_sdk/types/agent_retrieve_context_response.py +0 -110
- letta_sdk/types/agent_search_params.py +0 -78
- letta_sdk/types/agent_search_response.py +0 -16
- letta_sdk/types/agent_summarize_params.py +0 -12
- letta_sdk/types/agents/approval_create_param.py +0 -22
- letta_sdk/types/agents/approval_response_message.py +0 -41
- letta_sdk/types/agents/archival_memory_create_params.py +0 -23
- letta_sdk/types/agents/archival_memory_list_params.py +0 -28
- letta_sdk/types/agents/archival_memory_list_response.py +0 -10
- letta_sdk/types/agents/archival_memory_search_params.py +0 -35
- letta_sdk/types/agents/archival_memory_search_response.py +0 -26
- letta_sdk/types/agents/core_memory/__init__.py +0 -7
- letta_sdk/types/agents/core_memory/block_list_response.py +0 -10
- letta_sdk/types/agents/core_memory_retrieve_variables_response.py +0 -11
- letta_sdk/types/agents/file_list_params.py +0 -19
- letta_sdk/types/agents/folder_list_response.py +0 -10
- letta_sdk/types/agents/letta_request_param.py +0 -45
- letta_sdk/types/agents/letta_streaming_request_param.py +0 -60
- letta_sdk/types/agents/memory.py +0 -92
- letta_sdk/types/agents/message_list_response.py +0 -10
- letta_sdk/types/agents/message_preview_raw_payload_params.py +0 -103
- letta_sdk/types/agents/message_preview_raw_payload_response.py +0 -8
- letta_sdk/types/agents/message_search_params.py +0 -38
- letta_sdk/types/agents/message_search_response.py +0 -29
- letta_sdk/types/agents/source_list_response.py +0 -10
- letta_sdk/types/agents/tool_list_response.py +0 -10
- letta_sdk/types/agents/tool_modify_approval_params.py +0 -13
- letta_sdk/types/block_list_agents_response.py +0 -10
- letta_sdk/types/block_list_response.py +0 -10
- letta_sdk/types/child_tool_rule.py +0 -21
- letta_sdk/types/child_tool_rule_param.py +0 -23
- letta_sdk/types/client_side_access_token_create_params.py +0 -32
- letta_sdk/types/client_side_access_token_create_response.py +0 -34
- letta_sdk/types/client_side_access_token_delete_params.py +0 -11
- letta_sdk/types/client_side_access_token_list_params.py +0 -23
- letta_sdk/types/client_side_access_token_list_response.py +0 -40
- letta_sdk/types/duplicate_file_handling.py +0 -7
- letta_sdk/types/embedding_get_total_storage_size_response.py +0 -7
- letta_sdk/types/file_processing_status.py +0 -7
- letta_sdk/types/folder_get_by_name_response.py +0 -7
- letta_sdk/types/folder_list_agents_response.py +0 -8
- letta_sdk/types/folder_list_files_response.py +0 -10
- letta_sdk/types/folder_list_passages_params.py +0 -34
- letta_sdk/types/folder_list_passages_response.py +0 -10
- letta_sdk/types/folder_list_response.py +0 -10
- letta_sdk/types/folder_retrieve_metadata_params.py +0 -11
- letta_sdk/types/folder_upload_file_params.py +0 -21
- letta_sdk/types/group_list_response.py +0 -10
- letta_sdk/types/groups/message_list_response.py +0 -10
- letta_sdk/types/identity_list_agents_response.py +0 -10
- letta_sdk/types/identity_list_blocks_response.py +0 -10
- letta_sdk/types/identity_list_response.py +0 -10
- letta_sdk/types/internal_template_create_agent_params.py +0 -217
- letta_sdk/types/internal_template_create_block_params.py +0 -54
- letta_sdk/types/internal_template_create_group_params.py +0 -49
- letta_sdk/types/job_list_active_params.py +0 -28
- letta_sdk/types/job_list_active_response.py +0 -10
- letta_sdk/types/job_list_params.py +0 -31
- letta_sdk/types/job_list_response.py +0 -10
- letta_sdk/types/messages/__init__.py +0 -10
- letta_sdk/types/messages/batch_job.py +0 -60
- letta_sdk/types/messages/batch_list_response.py +0 -10
- letta_sdk/types/model_list_embedding_response.py +0 -10
- letta_sdk/types/organization_sources_stats.py +0 -49
- letta_sdk/types/passage.py +0 -56
- letta_sdk/types/project_list_params.py +0 -16
- letta_sdk/types/project_list_response.py +0 -23
- letta_sdk/types/provider.py +0 -42
- letta_sdk/types/provider_check_params.py +0 -30
- letta_sdk/types/provider_create_params.py +0 -33
- letta_sdk/types/provider_list_params.py +0 -42
- letta_sdk/types/provider_list_response.py +0 -10
- letta_sdk/types/provider_update_params.py +0 -25
- letta_sdk/types/run_list_active_params.py +0 -18
- letta_sdk/types/run_list_active_response.py +0 -10
- letta_sdk/types/run_list_messages_response.py +0 -10
- letta_sdk/types/run_list_response.py +0 -10
- letta_sdk/types/run_list_steps_response.py +0 -10
- letta_sdk/types/source_count_response.py +0 -7
- letta_sdk/types/source_create_params.py +0 -33
- letta_sdk/types/source_get_agents_response.py +0 -8
- letta_sdk/types/source_get_by_name_response.py +0 -7
- letta_sdk/types/source_get_metadata_params.py +0 -11
- letta_sdk/types/source_list_passages_params.py +0 -19
- letta_sdk/types/source_list_passages_response.py +0 -10
- letta_sdk/types/source_list_response.py +0 -10
- letta_sdk/types/source_update_params.py +0 -27
- letta_sdk/types/sources/__init__.py +0 -7
- letta_sdk/types/sources/file_list_params.py +0 -26
- letta_sdk/types/sources/file_list_response.py +0 -10
- letta_sdk/types/sources/file_retrieve_params.py +0 -14
- letta_sdk/types/step_list_messages_response.py +0 -34
- letta_sdk/types/step_list_response.py +0 -10
- letta_sdk/types/template_create_agents_response.py +0 -12
- letta_sdk/types/template_create_params.py +0 -40
- letta_sdk/types/template_create_response.py +0 -29
- letta_sdk/types/template_delete_response.py +0 -9
- letta_sdk/types/template_fork_params.py +0 -17
- letta_sdk/types/template_fork_response.py +0 -29
- letta_sdk/types/template_get_snapshot_response.py +0 -258
- letta_sdk/types/template_list_params.py +0 -34
- letta_sdk/types/template_list_response.py +0 -35
- letta_sdk/types/template_list_versions_params.py +0 -16
- letta_sdk/types/template_list_versions_response.py +0 -29
- letta_sdk/types/template_rename_params.py +0 -14
- letta_sdk/types/template_rename_response.py +0 -9
- letta_sdk/types/template_save_version_params.py +0 -32
- letta_sdk/types/template_save_version_response.py +0 -29
- letta_sdk/types/template_update_description_params.py +0 -14
- letta_sdk/types/template_update_description_response.py +0 -9
- letta_sdk/types/tool_run_params.py +0 -43
- letta_sdk/types/tool_upsert_base_response.py +0 -10
- letta_sdk/types/tools/composio/__init__.py +0 -6
- letta_sdk/types/tools/composio/app_list_actions_response.py +0 -70
- letta_sdk/types/tools/composio/app_list_response.py +0 -103
- letta_sdk/types/tools/mcp/__init__.py +0 -21
- letta_sdk/types/tools/mcp/mcp_server_type.py +0 -7
- letta_sdk/types/tools/mcp/oauth_callback_params.py +0 -22
- letta_sdk/types/tools/mcp/server_add_params.py +0 -68
- letta_sdk/types/tools/mcp/server_add_response.py +0 -14
- letta_sdk/types/tools/mcp/server_connect_params.py +0 -68
- letta_sdk/types/tools/mcp/server_delete_response.py +0 -14
- letta_sdk/types/tools/mcp/server_list_response.py +0 -14
- letta_sdk/types/tools/mcp/server_resync_params.py +0 -12
- letta_sdk/types/tools/mcp/server_test_params.py +0 -68
- letta_sdk/types/tools/mcp/server_update_params.py +0 -43
- letta_sdk/types/tools/mcp/server_update_response.py +0 -12
- letta_sdk/types/tools/mcp/servers/__init__.py +0 -6
- letta_sdk/types/tools/mcp/servers/tool_execute_params.py +0 -15
- letta_sdk/types/tools/mcp/servers/tool_list_response.py +0 -85
- letta_sdk/types/tools/mcp/sse_server_config.py +0 -27
- letta_sdk/types/tools/mcp/sse_server_config_param.py +0 -29
- letta_sdk/types/tools/mcp/stdio_server_config.py +0 -24
- letta_sdk/types/tools/mcp/stdio_server_config_param.py +0 -27
- letta_sdk/types/tools/mcp/streamable_http_server_config.py +0 -27
- letta_sdk/types/tools/mcp/streamable_http_server_config_param.py +0 -29
- letta_sdk/types/voice_beta/chat_create_completion_params.py +0 -12
- {letta_sdk → letta_client}/_compat.py +0 -0
- {letta_sdk → letta_client}/_constants.py +0 -0
- {letta_sdk → letta_client}/_files.py +0 -0
- {letta_sdk → letta_client}/_models.py +0 -0
- {letta_sdk → letta_client}/_qs.py +0 -0
- {letta_sdk → letta_client}/_utils/__init__.py +0 -0
- {letta_sdk → letta_client}/_utils/_compat.py +0 -0
- {letta_sdk → letta_client}/_utils/_datetime_parse.py +0 -0
- {letta_sdk → letta_client}/_utils/_proxy.py +0 -0
- {letta_sdk → letta_client}/_utils/_reflection.py +0 -0
- {letta_sdk → letta_client}/_utils/_streams.py +0 -0
- {letta_sdk → letta_client}/_utils/_sync.py +0 -0
- {letta_sdk → letta_client}/_utils/_transform.py +0 -0
- {letta_sdk → letta_client}/_utils/_typing.py +0 -0
- {letta_sdk → letta_client}/_utils/_utils.py +0 -0
- {letta_sdk → letta_client}/lib/.keep +0 -0
- {letta_sdk → letta_client}/py.typed +0 -0
- {letta_sdk/resources/messages → letta_client/resources/batches}/__init__.py +6 -6
- {letta_sdk → letta_client}/resources/groups/__init__.py +0 -0
- {letta_sdk → letta_client}/types/agent_count_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/assistant_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_close_all_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_open_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/hidden_reasoning_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/image_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/image_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/job_status.py +0 -0
- {letta_sdk → letta_client}/types/agents/job_type.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_message_union.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_user_message_content_union.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_user_message_content_union_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_cancel_params.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_cancel_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_role.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_type.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_update_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/redacted_reasoning_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/redacted_reasoning_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/system_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_call.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_call_delta.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_return_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_return_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_assistant_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_reasoning_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_system_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_user_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/user_message.py +0 -0
- {letta_sdk/types/messages → letta_client/types}/batch_list_params.py +0 -0
- {letta_sdk → letta_client}/types/block_count_response.py +0 -0
- {letta_sdk → letta_client}/types/block_create_params.py +0 -0
- {letta_sdk → letta_client}/types/block_list_params.py +0 -0
- {letta_sdk → letta_client}/types/block_update_params.py +0 -0
- {letta_sdk → letta_client}/types/conditional_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/conditional_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/continue_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/continue_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/create_block_param.py +0 -0
- {letta_sdk → letta_client}/types/dynamic_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/embedding_config.py +0 -0
- {letta_sdk → letta_client}/types/embedding_config_param.py +0 -0
- {letta_sdk → letta_client}/types/folder.py +0 -0
- {letta_sdk → letta_client}/types/folder_count_response.py +0 -0
- {letta_sdk → letta_client}/types/folder_create_params.py +0 -0
- {letta_sdk → letta_client}/types/folder_list_params.py +0 -0
- {letta_sdk → letta_client}/types/folder_update_params.py +0 -0
- {letta_sdk → letta_client}/types/group.py +0 -0
- {letta_sdk → letta_client}/types/group_count_response.py +0 -0
- {letta_sdk → letta_client}/types/group_create_params.py +0 -0
- {letta_sdk → letta_client}/types/group_list_params.py +0 -0
- {letta_sdk → letta_client}/types/group_update_params.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_list_params.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_update_response.py +0 -0
- {letta_sdk → letta_client}/types/identity.py +0 -0
- {letta_sdk → letta_client}/types/identity_count_response.py +0 -0
- {letta_sdk → letta_client}/types/identity_create_params.py +0 -0
- {letta_sdk → letta_client}/types/identity_list_params.py +0 -0
- {letta_sdk → letta_client}/types/identity_property.py +0 -0
- {letta_sdk → letta_client}/types/identity_property_param.py +0 -0
- {letta_sdk → letta_client}/types/identity_type.py +0 -0
- {letta_sdk → letta_client}/types/identity_upsert_params.py +0 -0
- {letta_sdk → letta_client}/types/json_object_response_format.py +0 -0
- {letta_sdk → letta_client}/types/json_object_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/json_schema_response_format.py +0 -0
- {letta_sdk → letta_client}/types/json_schema_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/letta_message_content_union_param.py +0 -0
- {letta_sdk → letta_client}/types/manager_type.py +0 -0
- {letta_sdk → letta_client}/types/max_count_per_step_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/max_count_per_step_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/message_create_param.py +0 -0
- {letta_sdk → letta_client}/types/model_list_params.py +0 -0
- {letta_sdk → letta_client}/types/model_list_response.py +0 -0
- {letta_sdk → letta_client}/types/npm_requirement.py +0 -0
- {letta_sdk → letta_client}/types/npm_requirement_param.py +0 -0
- {letta_sdk → letta_client}/types/parent_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/parent_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/pip_requirement.py +0 -0
- {letta_sdk → letta_client}/types/pip_requirement_param.py +0 -0
- {letta_sdk → letta_client}/types/provider_category.py +0 -0
- {letta_sdk → letta_client}/types/provider_trace.py +0 -0
- {letta_sdk → letta_client}/types/provider_type.py +0 -0
- {letta_sdk → letta_client}/types/required_before_exit_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/required_before_exit_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/requires_approval_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/requires_approval_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/round_robin_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/sleeptime_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/step_list_params.py +0 -0
- {letta_sdk → letta_client}/types/stop_reason_type.py +0 -0
- {letta_sdk → letta_client}/types/supervisor_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/tag_list_params.py +0 -0
- {letta_sdk → letta_client}/types/terminal_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/terminal_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/text_response_format.py +0 -0
- {letta_sdk → letta_client}/types/text_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/tool_count_params.py +0 -0
- {letta_sdk → letta_client}/types/tool_count_response.py +0 -0
- {letta_sdk → letta_client}/types/tool_list_params.py +0 -0
- {letta_sdk → letta_client}/types/tool_type.py +1 -1
- {letta_sdk → letta_client}/types/vector_db_provider.py +0 -0
- {letta_sdk → letta_client}/types/voice_sleeptime_manager_param.py +0 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a8.dist-info}/WHEEL +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from typing import Dict, Union, Mapping, Iterable, Optional, cast
|
|
5
|
+
from typing import Dict, List, Union, Mapping, Iterable, Optional, cast
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing_extensions import Literal
|
|
8
8
|
|
|
@@ -24,19 +24,30 @@ from .tools import (
|
|
|
24
24
|
ToolsResourceWithStreamingResponse,
|
|
25
25
|
AsyncToolsResourceWithStreamingResponse,
|
|
26
26
|
)
|
|
27
|
+
from .blocks import (
|
|
28
|
+
BlocksResource,
|
|
29
|
+
AsyncBlocksResource,
|
|
30
|
+
BlocksResourceWithRawResponse,
|
|
31
|
+
AsyncBlocksResourceWithRawResponse,
|
|
32
|
+
BlocksResourceWithStreamingResponse,
|
|
33
|
+
AsyncBlocksResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
35
|
+
from .groups import (
|
|
36
|
+
GroupsResource,
|
|
37
|
+
AsyncGroupsResource,
|
|
38
|
+
GroupsResourceWithRawResponse,
|
|
39
|
+
AsyncGroupsResourceWithRawResponse,
|
|
40
|
+
GroupsResourceWithStreamingResponse,
|
|
41
|
+
AsyncGroupsResourceWithStreamingResponse,
|
|
42
|
+
)
|
|
27
43
|
from ...types import (
|
|
28
44
|
AgentType,
|
|
29
45
|
agent_list_params,
|
|
30
46
|
agent_create_params,
|
|
31
|
-
agent_export_params,
|
|
32
|
-
agent_import_params,
|
|
33
|
-
agent_search_params,
|
|
34
47
|
agent_update_params,
|
|
35
|
-
agent_migrate_params,
|
|
36
48
|
agent_retrieve_params,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
agent_reset_messages_params,
|
|
49
|
+
agent_export_file_params,
|
|
50
|
+
agent_import_file_params,
|
|
40
51
|
)
|
|
41
52
|
from .folders import (
|
|
42
53
|
FoldersResource,
|
|
@@ -46,20 +57,11 @@ from .folders import (
|
|
|
46
57
|
FoldersResourceWithStreamingResponse,
|
|
47
58
|
AsyncFoldersResourceWithStreamingResponse,
|
|
48
59
|
)
|
|
49
|
-
from .sources import (
|
|
50
|
-
SourcesResource,
|
|
51
|
-
AsyncSourcesResource,
|
|
52
|
-
SourcesResourceWithRawResponse,
|
|
53
|
-
AsyncSourcesResourceWithRawResponse,
|
|
54
|
-
SourcesResourceWithStreamingResponse,
|
|
55
|
-
AsyncSourcesResourceWithStreamingResponse,
|
|
56
|
-
)
|
|
57
60
|
from ..._types import (
|
|
58
61
|
Body,
|
|
59
62
|
Omit,
|
|
60
63
|
Query,
|
|
61
64
|
Headers,
|
|
62
|
-
NoneType,
|
|
63
65
|
NotGiven,
|
|
64
66
|
FileTypes,
|
|
65
67
|
SequenceNotStr,
|
|
@@ -83,36 +85,16 @@ from ..._response import (
|
|
|
83
85
|
async_to_raw_response_wrapper,
|
|
84
86
|
async_to_streamed_response_wrapper,
|
|
85
87
|
)
|
|
86
|
-
from ...
|
|
87
|
-
from
|
|
88
|
-
ArchivalMemoryResource,
|
|
89
|
-
AsyncArchivalMemoryResource,
|
|
90
|
-
ArchivalMemoryResourceWithRawResponse,
|
|
91
|
-
AsyncArchivalMemoryResourceWithRawResponse,
|
|
92
|
-
ArchivalMemoryResourceWithStreamingResponse,
|
|
93
|
-
AsyncArchivalMemoryResourceWithStreamingResponse,
|
|
94
|
-
)
|
|
88
|
+
from ...pagination import SyncArrayPage, AsyncArrayPage
|
|
89
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
95
90
|
from ...types.agent_type import AgentType
|
|
96
91
|
from ...types.agent_state import AgentState
|
|
97
|
-
from .core_memory.core_memory import (
|
|
98
|
-
CoreMemoryResource,
|
|
99
|
-
AsyncCoreMemoryResource,
|
|
100
|
-
CoreMemoryResourceWithRawResponse,
|
|
101
|
-
AsyncCoreMemoryResourceWithRawResponse,
|
|
102
|
-
CoreMemoryResourceWithStreamingResponse,
|
|
103
|
-
AsyncCoreMemoryResourceWithStreamingResponse,
|
|
104
|
-
)
|
|
105
92
|
from ...types.llm_config_param import LlmConfigParam
|
|
106
93
|
from ...types.create_block_param import CreateBlockParam
|
|
107
|
-
from ...types.agent_list_response import AgentListResponse
|
|
108
94
|
from ...types.agent_count_response import AgentCountResponse
|
|
109
95
|
from ...types.message_create_param import MessageCreateParam
|
|
110
|
-
from ...types.agent_import_response import AgentImportResponse
|
|
111
|
-
from ...types.agent_search_response import AgentSearchResponse
|
|
112
|
-
from ...types.agent_migrate_response import AgentMigrateResponse
|
|
113
96
|
from ...types.embedding_config_param import EmbeddingConfigParam
|
|
114
|
-
from ...types.
|
|
115
|
-
from ...types.agent_retrieve_context_response import AgentRetrieveContextResponse
|
|
97
|
+
from ...types.agent_import_file_response import AgentImportFileResponse
|
|
116
98
|
|
|
117
99
|
__all__ = ["AgentsResource", "AsyncAgentsResource"]
|
|
118
100
|
|
|
@@ -122,10 +104,6 @@ class AgentsResource(SyncAPIResource):
|
|
|
122
104
|
def tools(self) -> ToolsResource:
|
|
123
105
|
return ToolsResource(self._client)
|
|
124
106
|
|
|
125
|
-
@cached_property
|
|
126
|
-
def sources(self) -> SourcesResource:
|
|
127
|
-
return SourcesResource(self._client)
|
|
128
|
-
|
|
129
107
|
@cached_property
|
|
130
108
|
def folders(self) -> FoldersResource:
|
|
131
109
|
return FoldersResource(self._client)
|
|
@@ -135,12 +113,12 @@ class AgentsResource(SyncAPIResource):
|
|
|
135
113
|
return FilesResource(self._client)
|
|
136
114
|
|
|
137
115
|
@cached_property
|
|
138
|
-
def
|
|
139
|
-
return
|
|
116
|
+
def blocks(self) -> BlocksResource:
|
|
117
|
+
return BlocksResource(self._client)
|
|
140
118
|
|
|
141
119
|
@cached_property
|
|
142
|
-
def
|
|
143
|
-
return
|
|
120
|
+
def groups(self) -> GroupsResource:
|
|
121
|
+
return GroupsResource(self._client)
|
|
144
122
|
|
|
145
123
|
@cached_property
|
|
146
124
|
def messages(self) -> MessagesResource:
|
|
@@ -196,6 +174,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
196
174
|
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
197
175
|
model: Optional[str] | Omit = omit,
|
|
198
176
|
name: str | Omit = omit,
|
|
177
|
+
parallel_tool_calls: Optional[bool] | Omit = omit,
|
|
199
178
|
per_file_view_window_char_limit: Optional[int] | Omit = omit,
|
|
200
179
|
project: Optional[str] | Omit = omit,
|
|
201
180
|
project_id: Optional[str] | Omit = omit,
|
|
@@ -245,7 +224,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
245
224
|
|
|
246
225
|
enable_sleeptime: If set to True, memory management will move to a background agent thread.
|
|
247
226
|
|
|
248
|
-
from_template:
|
|
227
|
+
from_template: Deprecated: please use the 'create agents from a template' endpoint instead.
|
|
249
228
|
|
|
250
229
|
hidden: If set to True, the agent will be hidden.
|
|
251
230
|
|
|
@@ -290,6 +269,8 @@ class AgentsResource(SyncAPIResource):
|
|
|
290
269
|
|
|
291
270
|
name: The name of the agent.
|
|
292
271
|
|
|
272
|
+
parallel_tool_calls: If set to True, enables parallel tool calling. Defaults to False.
|
|
273
|
+
|
|
293
274
|
per_file_view_window_char_limit: The per-file view window character limit for this agent. Setting this too high
|
|
294
275
|
may exceed the context window, which will break the agent.
|
|
295
276
|
|
|
@@ -311,7 +292,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
311
292
|
|
|
312
293
|
tags: The tags associated with the agent.
|
|
313
294
|
|
|
314
|
-
template:
|
|
295
|
+
template: Deprecated: No longer used
|
|
315
296
|
|
|
316
297
|
template_id: The id of the template the agent belongs to.
|
|
317
298
|
|
|
@@ -368,6 +349,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
368
349
|
"metadata": metadata,
|
|
369
350
|
"model": model,
|
|
370
351
|
"name": name,
|
|
352
|
+
"parallel_tool_calls": parallel_tool_calls,
|
|
371
353
|
"per_file_view_window_char_limit": per_file_view_window_char_limit,
|
|
372
354
|
"project": project,
|
|
373
355
|
"project_id": project_id,
|
|
@@ -397,6 +379,18 @@ class AgentsResource(SyncAPIResource):
|
|
|
397
379
|
self,
|
|
398
380
|
agent_id: str,
|
|
399
381
|
*,
|
|
382
|
+
include: List[
|
|
383
|
+
Literal[
|
|
384
|
+
"agent.blocks",
|
|
385
|
+
"agent.identities",
|
|
386
|
+
"agent.managed_group",
|
|
387
|
+
"agent.secrets",
|
|
388
|
+
"agent.sources",
|
|
389
|
+
"agent.tags",
|
|
390
|
+
"agent.tools",
|
|
391
|
+
]
|
|
392
|
+
]
|
|
393
|
+
| Omit = omit,
|
|
400
394
|
include_relationships: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
401
395
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
402
396
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -409,9 +403,15 @@ class AgentsResource(SyncAPIResource):
|
|
|
409
403
|
Get the state of the agent.
|
|
410
404
|
|
|
411
405
|
Args:
|
|
406
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
407
|
+
|
|
408
|
+
include: Specify which relational fields to include in the response. No relationships are
|
|
409
|
+
included by default.
|
|
410
|
+
|
|
412
411
|
include_relationships: Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include
|
|
413
412
|
in the response. If not provided, all relationships are loaded by default. Using
|
|
414
|
-
this can optimize performance by reducing unnecessary joins.
|
|
413
|
+
this can optimize performance by reducing unnecessary joins.This is a legacy
|
|
414
|
+
parameter, and no longer supported after 1.0.0 SDK versions.
|
|
415
415
|
|
|
416
416
|
extra_headers: Send extra headers
|
|
417
417
|
|
|
@@ -431,7 +431,11 @@ class AgentsResource(SyncAPIResource):
|
|
|
431
431
|
extra_body=extra_body,
|
|
432
432
|
timeout=timeout,
|
|
433
433
|
query=maybe_transform(
|
|
434
|
-
{
|
|
434
|
+
{
|
|
435
|
+
"include": include,
|
|
436
|
+
"include_relationships": include_relationships,
|
|
437
|
+
},
|
|
438
|
+
agent_retrieve_params.AgentRetrieveParams,
|
|
435
439
|
),
|
|
436
440
|
),
|
|
437
441
|
cast_to=AgentState,
|
|
@@ -443,6 +447,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
443
447
|
*,
|
|
444
448
|
base_template_id: Optional[str] | Omit = omit,
|
|
445
449
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
450
|
+
context_window_limit: Optional[int] | Omit = omit,
|
|
446
451
|
description: Optional[str] | Omit = omit,
|
|
447
452
|
embedding: Optional[str] | Omit = omit,
|
|
448
453
|
embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
|
|
@@ -453,11 +458,13 @@ class AgentsResource(SyncAPIResource):
|
|
|
453
458
|
last_run_duration_ms: Optional[int] | Omit = omit,
|
|
454
459
|
llm_config: Optional[LlmConfigParam] | Omit = omit,
|
|
455
460
|
max_files_open: Optional[int] | Omit = omit,
|
|
461
|
+
max_tokens: Optional[int] | Omit = omit,
|
|
456
462
|
message_buffer_autoclear: Optional[bool] | Omit = omit,
|
|
457
463
|
message_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
458
464
|
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
459
465
|
model: Optional[str] | Omit = omit,
|
|
460
466
|
name: Optional[str] | Omit = omit,
|
|
467
|
+
parallel_tool_calls: Optional[bool] | Omit = omit,
|
|
461
468
|
per_file_view_window_char_limit: Optional[int] | Omit = omit,
|
|
462
469
|
project_id: Optional[str] | Omit = omit,
|
|
463
470
|
reasoning: Optional[bool] | Omit = omit,
|
|
@@ -482,10 +489,14 @@ class AgentsResource(SyncAPIResource):
|
|
|
482
489
|
Update an existing agent.
|
|
483
490
|
|
|
484
491
|
Args:
|
|
492
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
493
|
+
|
|
485
494
|
base_template_id: The base template id of the agent.
|
|
486
495
|
|
|
487
496
|
block_ids: The ids of the blocks used by the agent.
|
|
488
497
|
|
|
498
|
+
context_window_limit: The context window limit used by the agent.
|
|
499
|
+
|
|
489
500
|
description: The description of the agent.
|
|
490
501
|
|
|
491
502
|
embedding: The embedding configuration handle used by the agent, specified in the format
|
|
@@ -508,6 +519,9 @@ class AgentsResource(SyncAPIResource):
|
|
|
508
519
|
max_files_open: Maximum number of files that can be open at once for this agent. Setting this
|
|
509
520
|
too high may exceed the context window, which will break the agent.
|
|
510
521
|
|
|
522
|
+
max_tokens: The maximum number of tokens to generate, including reasoning step. If not set,
|
|
523
|
+
the model will use its default value.
|
|
524
|
+
|
|
511
525
|
message_buffer_autoclear: If set to True, the agent will not remember previous messages (though the agent
|
|
512
526
|
will still retain state via core memory blocks and archival/recall memory). Not
|
|
513
527
|
recommended unless you have an advanced use case.
|
|
@@ -521,6 +535,8 @@ class AgentsResource(SyncAPIResource):
|
|
|
521
535
|
|
|
522
536
|
name: The name of the agent.
|
|
523
537
|
|
|
538
|
+
parallel_tool_calls: If set to True, enables parallel tool calling. Defaults to False.
|
|
539
|
+
|
|
524
540
|
per_file_view_window_char_limit: The per-file view window character limit for this agent. Setting this too high
|
|
525
541
|
may exceed the context window, which will break the agent.
|
|
526
542
|
|
|
@@ -564,6 +580,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
564
580
|
{
|
|
565
581
|
"base_template_id": base_template_id,
|
|
566
582
|
"block_ids": block_ids,
|
|
583
|
+
"context_window_limit": context_window_limit,
|
|
567
584
|
"description": description,
|
|
568
585
|
"embedding": embedding,
|
|
569
586
|
"embedding_config": embedding_config,
|
|
@@ -574,11 +591,13 @@ class AgentsResource(SyncAPIResource):
|
|
|
574
591
|
"last_run_duration_ms": last_run_duration_ms,
|
|
575
592
|
"llm_config": llm_config,
|
|
576
593
|
"max_files_open": max_files_open,
|
|
594
|
+
"max_tokens": max_tokens,
|
|
577
595
|
"message_buffer_autoclear": message_buffer_autoclear,
|
|
578
596
|
"message_ids": message_ids,
|
|
579
597
|
"metadata": metadata,
|
|
580
598
|
"model": model,
|
|
581
599
|
"name": name,
|
|
600
|
+
"parallel_tool_calls": parallel_tool_calls,
|
|
582
601
|
"per_file_view_window_char_limit": per_file_view_window_char_limit,
|
|
583
602
|
"project_id": project_id,
|
|
584
603
|
"reasoning": reasoning,
|
|
@@ -610,6 +629,18 @@ class AgentsResource(SyncAPIResource):
|
|
|
610
629
|
before: Optional[str] | Omit = omit,
|
|
611
630
|
identifier_keys: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
612
631
|
identity_id: Optional[str] | Omit = omit,
|
|
632
|
+
include: List[
|
|
633
|
+
Literal[
|
|
634
|
+
"agent.blocks",
|
|
635
|
+
"agent.identities",
|
|
636
|
+
"agent.managed_group",
|
|
637
|
+
"agent.secrets",
|
|
638
|
+
"agent.sources",
|
|
639
|
+
"agent.tags",
|
|
640
|
+
"agent.tools",
|
|
641
|
+
]
|
|
642
|
+
]
|
|
643
|
+
| Omit = omit,
|
|
613
644
|
include_relationships: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
614
645
|
limit: Optional[int] | Omit = omit,
|
|
615
646
|
match_all_tags: bool | Omit = omit,
|
|
@@ -627,7 +658,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
627
658
|
extra_query: Query | None = None,
|
|
628
659
|
extra_body: Body | None = None,
|
|
629
660
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
630
|
-
) ->
|
|
661
|
+
) -> SyncArrayPage[AgentState]:
|
|
631
662
|
"""
|
|
632
663
|
Get a list of all agents.
|
|
633
664
|
|
|
@@ -645,9 +676,13 @@ class AgentsResource(SyncAPIResource):
|
|
|
645
676
|
|
|
646
677
|
identity_id: Search agents by identity ID
|
|
647
678
|
|
|
679
|
+
include: Specify which relational fields to include in the response. No relationships are
|
|
680
|
+
included by default.
|
|
681
|
+
|
|
648
682
|
include_relationships: Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include
|
|
649
683
|
in the response. If not provided, all relationships are loaded by default. Using
|
|
650
|
-
this can optimize performance by reducing unnecessary joins.
|
|
684
|
+
this can optimize performance by reducing unnecessary joins.This is a legacy
|
|
685
|
+
parameter, and no longer supported after 1.0.0 SDK versions.
|
|
651
686
|
|
|
652
687
|
limit: Limit for pagination
|
|
653
688
|
|
|
@@ -679,8 +714,9 @@ class AgentsResource(SyncAPIResource):
|
|
|
679
714
|
|
|
680
715
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
681
716
|
"""
|
|
682
|
-
return self.
|
|
717
|
+
return self._get_api_list(
|
|
683
718
|
"/v1/agents/",
|
|
719
|
+
page=SyncArrayPage[AgentState],
|
|
684
720
|
options=make_request_options(
|
|
685
721
|
extra_headers=extra_headers,
|
|
686
722
|
extra_query=extra_query,
|
|
@@ -694,6 +730,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
694
730
|
"before": before,
|
|
695
731
|
"identifier_keys": identifier_keys,
|
|
696
732
|
"identity_id": identity_id,
|
|
733
|
+
"include": include,
|
|
697
734
|
"include_relationships": include_relationships,
|
|
698
735
|
"limit": limit,
|
|
699
736
|
"match_all_tags": match_all_tags,
|
|
@@ -709,7 +746,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
709
746
|
agent_list_params.AgentListParams,
|
|
710
747
|
),
|
|
711
748
|
),
|
|
712
|
-
|
|
749
|
+
model=AgentState,
|
|
713
750
|
)
|
|
714
751
|
|
|
715
752
|
def delete(
|
|
@@ -727,6 +764,8 @@ class AgentsResource(SyncAPIResource):
|
|
|
727
764
|
Delete an agent.
|
|
728
765
|
|
|
729
766
|
Args:
|
|
767
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
768
|
+
|
|
730
769
|
extra_headers: Send extra headers
|
|
731
770
|
|
|
732
771
|
extra_query: Add additional query parameters to the request
|
|
@@ -764,7 +803,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
764
803
|
cast_to=int,
|
|
765
804
|
)
|
|
766
805
|
|
|
767
|
-
def
|
|
806
|
+
def export_file(
|
|
768
807
|
self,
|
|
769
808
|
agent_id: str,
|
|
770
809
|
*,
|
|
@@ -781,15 +820,10 @@ class AgentsResource(SyncAPIResource):
|
|
|
781
820
|
Export the serialized JSON representation of an agent, formatted with
|
|
782
821
|
indentation.
|
|
783
822
|
|
|
784
|
-
Supports two export formats:
|
|
785
|
-
|
|
786
|
-
- Legacy format (use_legacy_format=true): Single agent with inline tools/blocks
|
|
787
|
-
- New format (default): Multi-entity format with separate agents, tools, blocks,
|
|
788
|
-
files, etc.
|
|
789
|
-
|
|
790
823
|
Args:
|
|
791
|
-
use_legacy_format: If
|
|
792
|
-
using the new multi-entity format
|
|
824
|
+
use_legacy_format: If True, exports using the legacy single-agent 'v1' format with inline
|
|
825
|
+
tools/blocks. If False, exports using the new multi-entity 'v2' format, with
|
|
826
|
+
separate agents, tools, blocks, files, etc.
|
|
793
827
|
|
|
794
828
|
extra_headers: Send extra headers
|
|
795
829
|
|
|
@@ -813,13 +847,13 @@ class AgentsResource(SyncAPIResource):
|
|
|
813
847
|
"max_steps": max_steps,
|
|
814
848
|
"use_legacy_format": use_legacy_format,
|
|
815
849
|
},
|
|
816
|
-
|
|
850
|
+
agent_export_file_params.AgentExportFileParams,
|
|
817
851
|
),
|
|
818
852
|
),
|
|
819
853
|
cast_to=str,
|
|
820
854
|
)
|
|
821
855
|
|
|
822
|
-
def
|
|
856
|
+
def import_file(
|
|
823
857
|
self,
|
|
824
858
|
*,
|
|
825
859
|
file: FileTypes,
|
|
@@ -827,6 +861,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
827
861
|
env_vars_json: Optional[str] | Omit = omit,
|
|
828
862
|
override_embedding_handle: Optional[str] | Omit = omit,
|
|
829
863
|
override_existing_tools: bool | Omit = omit,
|
|
864
|
+
override_name: Optional[str] | Omit = omit,
|
|
830
865
|
project_id: Optional[str] | Omit = omit,
|
|
831
866
|
strip_messages: bool | Omit = omit,
|
|
832
867
|
x_override_embedding_model: str | Omit = omit,
|
|
@@ -836,7 +871,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
836
871
|
extra_query: Query | None = None,
|
|
837
872
|
extra_body: Body | None = None,
|
|
838
873
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
839
|
-
) ->
|
|
874
|
+
) -> AgentImportFileResponse:
|
|
840
875
|
"""Import a serialized agent file and recreate the agent(s) in the system.
|
|
841
876
|
|
|
842
877
|
Returns
|
|
@@ -853,6 +888,8 @@ class AgentsResource(SyncAPIResource):
|
|
|
853
888
|
uploaded tool definitions. Note that Letta core tools can never be updated
|
|
854
889
|
externally.
|
|
855
890
|
|
|
891
|
+
override_name: If provided, overrides the agent name with this value.
|
|
892
|
+
|
|
856
893
|
project_id: The project ID to associate the uploaded agent with.
|
|
857
894
|
|
|
858
895
|
strip_messages: If set to True, strips all messages from the agent before importing.
|
|
@@ -876,6 +913,7 @@ class AgentsResource(SyncAPIResource):
|
|
|
876
913
|
"env_vars_json": env_vars_json,
|
|
877
914
|
"override_embedding_handle": override_embedding_handle,
|
|
878
915
|
"override_existing_tools": override_existing_tools,
|
|
916
|
+
"override_name": override_name,
|
|
879
917
|
"project_id": project_id,
|
|
880
918
|
"strip_messages": strip_messages,
|
|
881
919
|
}
|
|
@@ -887,272 +925,12 @@ class AgentsResource(SyncAPIResource):
|
|
|
887
925
|
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
|
|
888
926
|
return self._post(
|
|
889
927
|
"/v1/agents/import",
|
|
890
|
-
body=maybe_transform(body,
|
|
928
|
+
body=maybe_transform(body, agent_import_file_params.AgentImportFileParams),
|
|
891
929
|
files=files,
|
|
892
930
|
options=make_request_options(
|
|
893
931
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
894
932
|
),
|
|
895
|
-
cast_to=
|
|
896
|
-
)
|
|
897
|
-
|
|
898
|
-
def list_groups(
|
|
899
|
-
self,
|
|
900
|
-
agent_id: str,
|
|
901
|
-
*,
|
|
902
|
-
manager_type: Optional[str] | Omit = omit,
|
|
903
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
904
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
905
|
-
extra_headers: Headers | None = None,
|
|
906
|
-
extra_query: Query | None = None,
|
|
907
|
-
extra_body: Body | None = None,
|
|
908
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
909
|
-
) -> AgentListGroupsResponse:
|
|
910
|
-
"""
|
|
911
|
-
Lists the groups for an agent
|
|
912
|
-
|
|
913
|
-
Args:
|
|
914
|
-
manager_type: Manager type to filter groups by
|
|
915
|
-
|
|
916
|
-
extra_headers: Send extra headers
|
|
917
|
-
|
|
918
|
-
extra_query: Add additional query parameters to the request
|
|
919
|
-
|
|
920
|
-
extra_body: Add additional JSON properties to the request
|
|
921
|
-
|
|
922
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
923
|
-
"""
|
|
924
|
-
if not agent_id:
|
|
925
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
926
|
-
return self._get(
|
|
927
|
-
f"/v1/agents/{agent_id}/groups",
|
|
928
|
-
options=make_request_options(
|
|
929
|
-
extra_headers=extra_headers,
|
|
930
|
-
extra_query=extra_query,
|
|
931
|
-
extra_body=extra_body,
|
|
932
|
-
timeout=timeout,
|
|
933
|
-
query=maybe_transform({"manager_type": manager_type}, agent_list_groups_params.AgentListGroupsParams),
|
|
934
|
-
),
|
|
935
|
-
cast_to=AgentListGroupsResponse,
|
|
936
|
-
)
|
|
937
|
-
|
|
938
|
-
def migrate(
|
|
939
|
-
self,
|
|
940
|
-
agent_id: str,
|
|
941
|
-
*,
|
|
942
|
-
preserve_core_memories: bool,
|
|
943
|
-
to_template: str,
|
|
944
|
-
preserve_tool_variables: bool | Omit = omit,
|
|
945
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
946
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
947
|
-
extra_headers: Headers | None = None,
|
|
948
|
-
extra_query: Query | None = None,
|
|
949
|
-
extra_body: Body | None = None,
|
|
950
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
951
|
-
) -> AgentMigrateResponse:
|
|
952
|
-
"""Migrate an agent to a new versioned agent template.
|
|
953
|
-
|
|
954
|
-
This will only work for
|
|
955
|
-
"classic" and non-multiagent agent templates.
|
|
956
|
-
|
|
957
|
-
Args:
|
|
958
|
-
preserve_tool_variables: If true, preserves the existing agent's tool environment variables instead of
|
|
959
|
-
using the template's variables
|
|
960
|
-
|
|
961
|
-
extra_headers: Send extra headers
|
|
962
|
-
|
|
963
|
-
extra_query: Add additional query parameters to the request
|
|
964
|
-
|
|
965
|
-
extra_body: Add additional JSON properties to the request
|
|
966
|
-
|
|
967
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
968
|
-
"""
|
|
969
|
-
if not agent_id:
|
|
970
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
971
|
-
return self._post(
|
|
972
|
-
f"/v1/agents/{agent_id}/migrate",
|
|
973
|
-
body=maybe_transform(
|
|
974
|
-
{
|
|
975
|
-
"preserve_core_memories": preserve_core_memories,
|
|
976
|
-
"to_template": to_template,
|
|
977
|
-
"preserve_tool_variables": preserve_tool_variables,
|
|
978
|
-
},
|
|
979
|
-
agent_migrate_params.AgentMigrateParams,
|
|
980
|
-
),
|
|
981
|
-
options=make_request_options(
|
|
982
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
983
|
-
),
|
|
984
|
-
cast_to=AgentMigrateResponse,
|
|
985
|
-
)
|
|
986
|
-
|
|
987
|
-
def reset_messages(
|
|
988
|
-
self,
|
|
989
|
-
agent_id: str,
|
|
990
|
-
*,
|
|
991
|
-
add_default_initial_messages: bool | Omit = omit,
|
|
992
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
993
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
994
|
-
extra_headers: Headers | None = None,
|
|
995
|
-
extra_query: Query | None = None,
|
|
996
|
-
extra_body: Body | None = None,
|
|
997
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
998
|
-
) -> AgentState:
|
|
999
|
-
"""
|
|
1000
|
-
Resets the messages for an agent
|
|
1001
|
-
|
|
1002
|
-
Args:
|
|
1003
|
-
add_default_initial_messages: If true, adds the default initial messages after resetting.
|
|
1004
|
-
|
|
1005
|
-
extra_headers: Send extra headers
|
|
1006
|
-
|
|
1007
|
-
extra_query: Add additional query parameters to the request
|
|
1008
|
-
|
|
1009
|
-
extra_body: Add additional JSON properties to the request
|
|
1010
|
-
|
|
1011
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1012
|
-
"""
|
|
1013
|
-
if not agent_id:
|
|
1014
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
1015
|
-
return self._patch(
|
|
1016
|
-
f"/v1/agents/{agent_id}/reset-messages",
|
|
1017
|
-
options=make_request_options(
|
|
1018
|
-
extra_headers=extra_headers,
|
|
1019
|
-
extra_query=extra_query,
|
|
1020
|
-
extra_body=extra_body,
|
|
1021
|
-
timeout=timeout,
|
|
1022
|
-
query=maybe_transform(
|
|
1023
|
-
{"add_default_initial_messages": add_default_initial_messages},
|
|
1024
|
-
agent_reset_messages_params.AgentResetMessagesParams,
|
|
1025
|
-
),
|
|
1026
|
-
),
|
|
1027
|
-
cast_to=AgentState,
|
|
1028
|
-
)
|
|
1029
|
-
|
|
1030
|
-
def retrieve_context(
|
|
1031
|
-
self,
|
|
1032
|
-
agent_id: str,
|
|
1033
|
-
*,
|
|
1034
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1035
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1036
|
-
extra_headers: Headers | None = None,
|
|
1037
|
-
extra_query: Query | None = None,
|
|
1038
|
-
extra_body: Body | None = None,
|
|
1039
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1040
|
-
) -> AgentRetrieveContextResponse:
|
|
1041
|
-
"""
|
|
1042
|
-
Retrieve the context window of a specific agent.
|
|
1043
|
-
|
|
1044
|
-
Args:
|
|
1045
|
-
extra_headers: Send extra headers
|
|
1046
|
-
|
|
1047
|
-
extra_query: Add additional query parameters to the request
|
|
1048
|
-
|
|
1049
|
-
extra_body: Add additional JSON properties to the request
|
|
1050
|
-
|
|
1051
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1052
|
-
"""
|
|
1053
|
-
if not agent_id:
|
|
1054
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
1055
|
-
return self._get(
|
|
1056
|
-
f"/v1/agents/{agent_id}/context",
|
|
1057
|
-
options=make_request_options(
|
|
1058
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1059
|
-
),
|
|
1060
|
-
cast_to=AgentRetrieveContextResponse,
|
|
1061
|
-
)
|
|
1062
|
-
|
|
1063
|
-
def search(
|
|
1064
|
-
self,
|
|
1065
|
-
*,
|
|
1066
|
-
after: Optional[str] | Omit = omit,
|
|
1067
|
-
ascending: bool | Omit = omit,
|
|
1068
|
-
combinator: Literal["AND"] | Omit = omit,
|
|
1069
|
-
limit: float | Omit = omit,
|
|
1070
|
-
project_id: str | Omit = omit,
|
|
1071
|
-
search: Iterable[agent_search_params.Search] | Omit = omit,
|
|
1072
|
-
sort_by: Literal["created_at", "last_run_completion"] | Omit = omit,
|
|
1073
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1074
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1075
|
-
extra_headers: Headers | None = None,
|
|
1076
|
-
extra_query: Query | None = None,
|
|
1077
|
-
extra_body: Body | None = None,
|
|
1078
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1079
|
-
) -> AgentSearchResponse:
|
|
1080
|
-
"""
|
|
1081
|
-
Search deployed agents
|
|
1082
|
-
|
|
1083
|
-
Args:
|
|
1084
|
-
extra_headers: Send extra headers
|
|
1085
|
-
|
|
1086
|
-
extra_query: Add additional query parameters to the request
|
|
1087
|
-
|
|
1088
|
-
extra_body: Add additional JSON properties to the request
|
|
1089
|
-
|
|
1090
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1091
|
-
"""
|
|
1092
|
-
return self._post(
|
|
1093
|
-
"/v1/agents/search",
|
|
1094
|
-
body=maybe_transform(
|
|
1095
|
-
{
|
|
1096
|
-
"after": after,
|
|
1097
|
-
"ascending": ascending,
|
|
1098
|
-
"combinator": combinator,
|
|
1099
|
-
"limit": limit,
|
|
1100
|
-
"project_id": project_id,
|
|
1101
|
-
"search": search,
|
|
1102
|
-
"sort_by": sort_by,
|
|
1103
|
-
},
|
|
1104
|
-
agent_search_params.AgentSearchParams,
|
|
1105
|
-
),
|
|
1106
|
-
options=make_request_options(
|
|
1107
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1108
|
-
),
|
|
1109
|
-
cast_to=AgentSearchResponse,
|
|
1110
|
-
)
|
|
1111
|
-
|
|
1112
|
-
def summarize(
|
|
1113
|
-
self,
|
|
1114
|
-
agent_id: str,
|
|
1115
|
-
*,
|
|
1116
|
-
max_message_length: int,
|
|
1117
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1118
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1119
|
-
extra_headers: Headers | None = None,
|
|
1120
|
-
extra_query: Query | None = None,
|
|
1121
|
-
extra_body: Body | None = None,
|
|
1122
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1123
|
-
) -> None:
|
|
1124
|
-
"""
|
|
1125
|
-
Summarize an agent's conversation history to a target message length.
|
|
1126
|
-
|
|
1127
|
-
This endpoint summarizes the current message history for a given agent,
|
|
1128
|
-
truncating and compressing it down to the specified `max_message_length`.
|
|
1129
|
-
|
|
1130
|
-
Args:
|
|
1131
|
-
max_message_length: Maximum number of messages to retain after summarization.
|
|
1132
|
-
|
|
1133
|
-
extra_headers: Send extra headers
|
|
1134
|
-
|
|
1135
|
-
extra_query: Add additional query parameters to the request
|
|
1136
|
-
|
|
1137
|
-
extra_body: Add additional JSON properties to the request
|
|
1138
|
-
|
|
1139
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1140
|
-
"""
|
|
1141
|
-
if not agent_id:
|
|
1142
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
1143
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
1144
|
-
return self._post(
|
|
1145
|
-
f"/v1/agents/{agent_id}/summarize",
|
|
1146
|
-
options=make_request_options(
|
|
1147
|
-
extra_headers=extra_headers,
|
|
1148
|
-
extra_query=extra_query,
|
|
1149
|
-
extra_body=extra_body,
|
|
1150
|
-
timeout=timeout,
|
|
1151
|
-
query=maybe_transform(
|
|
1152
|
-
{"max_message_length": max_message_length}, agent_summarize_params.AgentSummarizeParams
|
|
1153
|
-
),
|
|
1154
|
-
),
|
|
1155
|
-
cast_to=NoneType,
|
|
933
|
+
cast_to=AgentImportFileResponse,
|
|
1156
934
|
)
|
|
1157
935
|
|
|
1158
936
|
|
|
@@ -1161,10 +939,6 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1161
939
|
def tools(self) -> AsyncToolsResource:
|
|
1162
940
|
return AsyncToolsResource(self._client)
|
|
1163
941
|
|
|
1164
|
-
@cached_property
|
|
1165
|
-
def sources(self) -> AsyncSourcesResource:
|
|
1166
|
-
return AsyncSourcesResource(self._client)
|
|
1167
|
-
|
|
1168
942
|
@cached_property
|
|
1169
943
|
def folders(self) -> AsyncFoldersResource:
|
|
1170
944
|
return AsyncFoldersResource(self._client)
|
|
@@ -1174,12 +948,12 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1174
948
|
return AsyncFilesResource(self._client)
|
|
1175
949
|
|
|
1176
950
|
@cached_property
|
|
1177
|
-
def
|
|
1178
|
-
return
|
|
951
|
+
def blocks(self) -> AsyncBlocksResource:
|
|
952
|
+
return AsyncBlocksResource(self._client)
|
|
1179
953
|
|
|
1180
954
|
@cached_property
|
|
1181
|
-
def
|
|
1182
|
-
return
|
|
955
|
+
def groups(self) -> AsyncGroupsResource:
|
|
956
|
+
return AsyncGroupsResource(self._client)
|
|
1183
957
|
|
|
1184
958
|
@cached_property
|
|
1185
959
|
def messages(self) -> AsyncMessagesResource:
|
|
@@ -1235,6 +1009,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1235
1009
|
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
1236
1010
|
model: Optional[str] | Omit = omit,
|
|
1237
1011
|
name: str | Omit = omit,
|
|
1012
|
+
parallel_tool_calls: Optional[bool] | Omit = omit,
|
|
1238
1013
|
per_file_view_window_char_limit: Optional[int] | Omit = omit,
|
|
1239
1014
|
project: Optional[str] | Omit = omit,
|
|
1240
1015
|
project_id: Optional[str] | Omit = omit,
|
|
@@ -1284,7 +1059,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1284
1059
|
|
|
1285
1060
|
enable_sleeptime: If set to True, memory management will move to a background agent thread.
|
|
1286
1061
|
|
|
1287
|
-
from_template:
|
|
1062
|
+
from_template: Deprecated: please use the 'create agents from a template' endpoint instead.
|
|
1288
1063
|
|
|
1289
1064
|
hidden: If set to True, the agent will be hidden.
|
|
1290
1065
|
|
|
@@ -1329,6 +1104,8 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1329
1104
|
|
|
1330
1105
|
name: The name of the agent.
|
|
1331
1106
|
|
|
1107
|
+
parallel_tool_calls: If set to True, enables parallel tool calling. Defaults to False.
|
|
1108
|
+
|
|
1332
1109
|
per_file_view_window_char_limit: The per-file view window character limit for this agent. Setting this too high
|
|
1333
1110
|
may exceed the context window, which will break the agent.
|
|
1334
1111
|
|
|
@@ -1350,7 +1127,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1350
1127
|
|
|
1351
1128
|
tags: The tags associated with the agent.
|
|
1352
1129
|
|
|
1353
|
-
template:
|
|
1130
|
+
template: Deprecated: No longer used
|
|
1354
1131
|
|
|
1355
1132
|
template_id: The id of the template the agent belongs to.
|
|
1356
1133
|
|
|
@@ -1407,6 +1184,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1407
1184
|
"metadata": metadata,
|
|
1408
1185
|
"model": model,
|
|
1409
1186
|
"name": name,
|
|
1187
|
+
"parallel_tool_calls": parallel_tool_calls,
|
|
1410
1188
|
"per_file_view_window_char_limit": per_file_view_window_char_limit,
|
|
1411
1189
|
"project": project,
|
|
1412
1190
|
"project_id": project_id,
|
|
@@ -1436,6 +1214,18 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1436
1214
|
self,
|
|
1437
1215
|
agent_id: str,
|
|
1438
1216
|
*,
|
|
1217
|
+
include: List[
|
|
1218
|
+
Literal[
|
|
1219
|
+
"agent.blocks",
|
|
1220
|
+
"agent.identities",
|
|
1221
|
+
"agent.managed_group",
|
|
1222
|
+
"agent.secrets",
|
|
1223
|
+
"agent.sources",
|
|
1224
|
+
"agent.tags",
|
|
1225
|
+
"agent.tools",
|
|
1226
|
+
]
|
|
1227
|
+
]
|
|
1228
|
+
| Omit = omit,
|
|
1439
1229
|
include_relationships: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
1440
1230
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1441
1231
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
@@ -1448,9 +1238,15 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1448
1238
|
Get the state of the agent.
|
|
1449
1239
|
|
|
1450
1240
|
Args:
|
|
1241
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1242
|
+
|
|
1243
|
+
include: Specify which relational fields to include in the response. No relationships are
|
|
1244
|
+
included by default.
|
|
1245
|
+
|
|
1451
1246
|
include_relationships: Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include
|
|
1452
1247
|
in the response. If not provided, all relationships are loaded by default. Using
|
|
1453
|
-
this can optimize performance by reducing unnecessary joins.
|
|
1248
|
+
this can optimize performance by reducing unnecessary joins.This is a legacy
|
|
1249
|
+
parameter, and no longer supported after 1.0.0 SDK versions.
|
|
1454
1250
|
|
|
1455
1251
|
extra_headers: Send extra headers
|
|
1456
1252
|
|
|
@@ -1470,7 +1266,11 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1470
1266
|
extra_body=extra_body,
|
|
1471
1267
|
timeout=timeout,
|
|
1472
1268
|
query=await async_maybe_transform(
|
|
1473
|
-
{
|
|
1269
|
+
{
|
|
1270
|
+
"include": include,
|
|
1271
|
+
"include_relationships": include_relationships,
|
|
1272
|
+
},
|
|
1273
|
+
agent_retrieve_params.AgentRetrieveParams,
|
|
1474
1274
|
),
|
|
1475
1275
|
),
|
|
1476
1276
|
cast_to=AgentState,
|
|
@@ -1482,6 +1282,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1482
1282
|
*,
|
|
1483
1283
|
base_template_id: Optional[str] | Omit = omit,
|
|
1484
1284
|
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
1285
|
+
context_window_limit: Optional[int] | Omit = omit,
|
|
1485
1286
|
description: Optional[str] | Omit = omit,
|
|
1486
1287
|
embedding: Optional[str] | Omit = omit,
|
|
1487
1288
|
embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
|
|
@@ -1492,11 +1293,13 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1492
1293
|
last_run_duration_ms: Optional[int] | Omit = omit,
|
|
1493
1294
|
llm_config: Optional[LlmConfigParam] | Omit = omit,
|
|
1494
1295
|
max_files_open: Optional[int] | Omit = omit,
|
|
1296
|
+
max_tokens: Optional[int] | Omit = omit,
|
|
1495
1297
|
message_buffer_autoclear: Optional[bool] | Omit = omit,
|
|
1496
1298
|
message_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
1497
1299
|
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
1498
1300
|
model: Optional[str] | Omit = omit,
|
|
1499
1301
|
name: Optional[str] | Omit = omit,
|
|
1302
|
+
parallel_tool_calls: Optional[bool] | Omit = omit,
|
|
1500
1303
|
per_file_view_window_char_limit: Optional[int] | Omit = omit,
|
|
1501
1304
|
project_id: Optional[str] | Omit = omit,
|
|
1502
1305
|
reasoning: Optional[bool] | Omit = omit,
|
|
@@ -1521,10 +1324,14 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1521
1324
|
Update an existing agent.
|
|
1522
1325
|
|
|
1523
1326
|
Args:
|
|
1327
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1328
|
+
|
|
1524
1329
|
base_template_id: The base template id of the agent.
|
|
1525
1330
|
|
|
1526
1331
|
block_ids: The ids of the blocks used by the agent.
|
|
1527
1332
|
|
|
1333
|
+
context_window_limit: The context window limit used by the agent.
|
|
1334
|
+
|
|
1528
1335
|
description: The description of the agent.
|
|
1529
1336
|
|
|
1530
1337
|
embedding: The embedding configuration handle used by the agent, specified in the format
|
|
@@ -1547,6 +1354,9 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1547
1354
|
max_files_open: Maximum number of files that can be open at once for this agent. Setting this
|
|
1548
1355
|
too high may exceed the context window, which will break the agent.
|
|
1549
1356
|
|
|
1357
|
+
max_tokens: The maximum number of tokens to generate, including reasoning step. If not set,
|
|
1358
|
+
the model will use its default value.
|
|
1359
|
+
|
|
1550
1360
|
message_buffer_autoclear: If set to True, the agent will not remember previous messages (though the agent
|
|
1551
1361
|
will still retain state via core memory blocks and archival/recall memory). Not
|
|
1552
1362
|
recommended unless you have an advanced use case.
|
|
@@ -1560,6 +1370,8 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1560
1370
|
|
|
1561
1371
|
name: The name of the agent.
|
|
1562
1372
|
|
|
1373
|
+
parallel_tool_calls: If set to True, enables parallel tool calling. Defaults to False.
|
|
1374
|
+
|
|
1563
1375
|
per_file_view_window_char_limit: The per-file view window character limit for this agent. Setting this too high
|
|
1564
1376
|
may exceed the context window, which will break the agent.
|
|
1565
1377
|
|
|
@@ -1603,6 +1415,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1603
1415
|
{
|
|
1604
1416
|
"base_template_id": base_template_id,
|
|
1605
1417
|
"block_ids": block_ids,
|
|
1418
|
+
"context_window_limit": context_window_limit,
|
|
1606
1419
|
"description": description,
|
|
1607
1420
|
"embedding": embedding,
|
|
1608
1421
|
"embedding_config": embedding_config,
|
|
@@ -1613,11 +1426,13 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1613
1426
|
"last_run_duration_ms": last_run_duration_ms,
|
|
1614
1427
|
"llm_config": llm_config,
|
|
1615
1428
|
"max_files_open": max_files_open,
|
|
1429
|
+
"max_tokens": max_tokens,
|
|
1616
1430
|
"message_buffer_autoclear": message_buffer_autoclear,
|
|
1617
1431
|
"message_ids": message_ids,
|
|
1618
1432
|
"metadata": metadata,
|
|
1619
1433
|
"model": model,
|
|
1620
1434
|
"name": name,
|
|
1435
|
+
"parallel_tool_calls": parallel_tool_calls,
|
|
1621
1436
|
"per_file_view_window_char_limit": per_file_view_window_char_limit,
|
|
1622
1437
|
"project_id": project_id,
|
|
1623
1438
|
"reasoning": reasoning,
|
|
@@ -1640,7 +1455,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1640
1455
|
cast_to=AgentState,
|
|
1641
1456
|
)
|
|
1642
1457
|
|
|
1643
|
-
|
|
1458
|
+
def list(
|
|
1644
1459
|
self,
|
|
1645
1460
|
*,
|
|
1646
1461
|
after: Optional[str] | Omit = omit,
|
|
@@ -1649,6 +1464,18 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1649
1464
|
before: Optional[str] | Omit = omit,
|
|
1650
1465
|
identifier_keys: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
1651
1466
|
identity_id: Optional[str] | Omit = omit,
|
|
1467
|
+
include: List[
|
|
1468
|
+
Literal[
|
|
1469
|
+
"agent.blocks",
|
|
1470
|
+
"agent.identities",
|
|
1471
|
+
"agent.managed_group",
|
|
1472
|
+
"agent.secrets",
|
|
1473
|
+
"agent.sources",
|
|
1474
|
+
"agent.tags",
|
|
1475
|
+
"agent.tools",
|
|
1476
|
+
]
|
|
1477
|
+
]
|
|
1478
|
+
| Omit = omit,
|
|
1652
1479
|
include_relationships: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
1653
1480
|
limit: Optional[int] | Omit = omit,
|
|
1654
1481
|
match_all_tags: bool | Omit = omit,
|
|
@@ -1666,7 +1493,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1666
1493
|
extra_query: Query | None = None,
|
|
1667
1494
|
extra_body: Body | None = None,
|
|
1668
1495
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1669
|
-
) ->
|
|
1496
|
+
) -> AsyncPaginator[AgentState, AsyncArrayPage[AgentState]]:
|
|
1670
1497
|
"""
|
|
1671
1498
|
Get a list of all agents.
|
|
1672
1499
|
|
|
@@ -1684,9 +1511,13 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1684
1511
|
|
|
1685
1512
|
identity_id: Search agents by identity ID
|
|
1686
1513
|
|
|
1514
|
+
include: Specify which relational fields to include in the response. No relationships are
|
|
1515
|
+
included by default.
|
|
1516
|
+
|
|
1687
1517
|
include_relationships: Specify which relational fields (e.g., 'tools', 'sources', 'memory') to include
|
|
1688
1518
|
in the response. If not provided, all relationships are loaded by default. Using
|
|
1689
|
-
this can optimize performance by reducing unnecessary joins.
|
|
1519
|
+
this can optimize performance by reducing unnecessary joins.This is a legacy
|
|
1520
|
+
parameter, and no longer supported after 1.0.0 SDK versions.
|
|
1690
1521
|
|
|
1691
1522
|
limit: Limit for pagination
|
|
1692
1523
|
|
|
@@ -1718,14 +1549,15 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1718
1549
|
|
|
1719
1550
|
timeout: Override the client-level default timeout for this request, in seconds
|
|
1720
1551
|
"""
|
|
1721
|
-
return
|
|
1552
|
+
return self._get_api_list(
|
|
1722
1553
|
"/v1/agents/",
|
|
1554
|
+
page=AsyncArrayPage[AgentState],
|
|
1723
1555
|
options=make_request_options(
|
|
1724
1556
|
extra_headers=extra_headers,
|
|
1725
1557
|
extra_query=extra_query,
|
|
1726
1558
|
extra_body=extra_body,
|
|
1727
1559
|
timeout=timeout,
|
|
1728
|
-
query=
|
|
1560
|
+
query=maybe_transform(
|
|
1729
1561
|
{
|
|
1730
1562
|
"after": after,
|
|
1731
1563
|
"ascending": ascending,
|
|
@@ -1733,6 +1565,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1733
1565
|
"before": before,
|
|
1734
1566
|
"identifier_keys": identifier_keys,
|
|
1735
1567
|
"identity_id": identity_id,
|
|
1568
|
+
"include": include,
|
|
1736
1569
|
"include_relationships": include_relationships,
|
|
1737
1570
|
"limit": limit,
|
|
1738
1571
|
"match_all_tags": match_all_tags,
|
|
@@ -1748,7 +1581,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1748
1581
|
agent_list_params.AgentListParams,
|
|
1749
1582
|
),
|
|
1750
1583
|
),
|
|
1751
|
-
|
|
1584
|
+
model=AgentState,
|
|
1752
1585
|
)
|
|
1753
1586
|
|
|
1754
1587
|
async def delete(
|
|
@@ -1766,6 +1599,8 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1766
1599
|
Delete an agent.
|
|
1767
1600
|
|
|
1768
1601
|
Args:
|
|
1602
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
1603
|
+
|
|
1769
1604
|
extra_headers: Send extra headers
|
|
1770
1605
|
|
|
1771
1606
|
extra_query: Add additional query parameters to the request
|
|
@@ -1803,7 +1638,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1803
1638
|
cast_to=int,
|
|
1804
1639
|
)
|
|
1805
1640
|
|
|
1806
|
-
async def
|
|
1641
|
+
async def export_file(
|
|
1807
1642
|
self,
|
|
1808
1643
|
agent_id: str,
|
|
1809
1644
|
*,
|
|
@@ -1820,15 +1655,10 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1820
1655
|
Export the serialized JSON representation of an agent, formatted with
|
|
1821
1656
|
indentation.
|
|
1822
1657
|
|
|
1823
|
-
Supports two export formats:
|
|
1824
|
-
|
|
1825
|
-
- Legacy format (use_legacy_format=true): Single agent with inline tools/blocks
|
|
1826
|
-
- New format (default): Multi-entity format with separate agents, tools, blocks,
|
|
1827
|
-
files, etc.
|
|
1828
|
-
|
|
1829
1658
|
Args:
|
|
1830
|
-
use_legacy_format: If
|
|
1831
|
-
using the new multi-entity format
|
|
1659
|
+
use_legacy_format: If True, exports using the legacy single-agent 'v1' format with inline
|
|
1660
|
+
tools/blocks. If False, exports using the new multi-entity 'v2' format, with
|
|
1661
|
+
separate agents, tools, blocks, files, etc.
|
|
1832
1662
|
|
|
1833
1663
|
extra_headers: Send extra headers
|
|
1834
1664
|
|
|
@@ -1852,13 +1682,13 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1852
1682
|
"max_steps": max_steps,
|
|
1853
1683
|
"use_legacy_format": use_legacy_format,
|
|
1854
1684
|
},
|
|
1855
|
-
|
|
1685
|
+
agent_export_file_params.AgentExportFileParams,
|
|
1856
1686
|
),
|
|
1857
1687
|
),
|
|
1858
1688
|
cast_to=str,
|
|
1859
1689
|
)
|
|
1860
1690
|
|
|
1861
|
-
async def
|
|
1691
|
+
async def import_file(
|
|
1862
1692
|
self,
|
|
1863
1693
|
*,
|
|
1864
1694
|
file: FileTypes,
|
|
@@ -1866,6 +1696,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1866
1696
|
env_vars_json: Optional[str] | Omit = omit,
|
|
1867
1697
|
override_embedding_handle: Optional[str] | Omit = omit,
|
|
1868
1698
|
override_existing_tools: bool | Omit = omit,
|
|
1699
|
+
override_name: Optional[str] | Omit = omit,
|
|
1869
1700
|
project_id: Optional[str] | Omit = omit,
|
|
1870
1701
|
strip_messages: bool | Omit = omit,
|
|
1871
1702
|
x_override_embedding_model: str | Omit = omit,
|
|
@@ -1875,7 +1706,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1875
1706
|
extra_query: Query | None = None,
|
|
1876
1707
|
extra_body: Body | None = None,
|
|
1877
1708
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1878
|
-
) ->
|
|
1709
|
+
) -> AgentImportFileResponse:
|
|
1879
1710
|
"""Import a serialized agent file and recreate the agent(s) in the system.
|
|
1880
1711
|
|
|
1881
1712
|
Returns
|
|
@@ -1892,6 +1723,8 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1892
1723
|
uploaded tool definitions. Note that Letta core tools can never be updated
|
|
1893
1724
|
externally.
|
|
1894
1725
|
|
|
1726
|
+
override_name: If provided, overrides the agent name with this value.
|
|
1727
|
+
|
|
1895
1728
|
project_id: The project ID to associate the uploaded agent with.
|
|
1896
1729
|
|
|
1897
1730
|
strip_messages: If set to True, strips all messages from the agent before importing.
|
|
@@ -1915,6 +1748,7 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1915
1748
|
"env_vars_json": env_vars_json,
|
|
1916
1749
|
"override_embedding_handle": override_embedding_handle,
|
|
1917
1750
|
"override_existing_tools": override_existing_tools,
|
|
1751
|
+
"override_name": override_name,
|
|
1918
1752
|
"project_id": project_id,
|
|
1919
1753
|
"strip_messages": strip_messages,
|
|
1920
1754
|
}
|
|
@@ -1926,274 +1760,12 @@ class AsyncAgentsResource(AsyncAPIResource):
|
|
|
1926
1760
|
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
|
|
1927
1761
|
return await self._post(
|
|
1928
1762
|
"/v1/agents/import",
|
|
1929
|
-
body=await async_maybe_transform(body,
|
|
1763
|
+
body=await async_maybe_transform(body, agent_import_file_params.AgentImportFileParams),
|
|
1930
1764
|
files=files,
|
|
1931
1765
|
options=make_request_options(
|
|
1932
1766
|
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
1933
1767
|
),
|
|
1934
|
-
cast_to=
|
|
1935
|
-
)
|
|
1936
|
-
|
|
1937
|
-
async def list_groups(
|
|
1938
|
-
self,
|
|
1939
|
-
agent_id: str,
|
|
1940
|
-
*,
|
|
1941
|
-
manager_type: Optional[str] | Omit = omit,
|
|
1942
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1943
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1944
|
-
extra_headers: Headers | None = None,
|
|
1945
|
-
extra_query: Query | None = None,
|
|
1946
|
-
extra_body: Body | None = None,
|
|
1947
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1948
|
-
) -> AgentListGroupsResponse:
|
|
1949
|
-
"""
|
|
1950
|
-
Lists the groups for an agent
|
|
1951
|
-
|
|
1952
|
-
Args:
|
|
1953
|
-
manager_type: Manager type to filter groups by
|
|
1954
|
-
|
|
1955
|
-
extra_headers: Send extra headers
|
|
1956
|
-
|
|
1957
|
-
extra_query: Add additional query parameters to the request
|
|
1958
|
-
|
|
1959
|
-
extra_body: Add additional JSON properties to the request
|
|
1960
|
-
|
|
1961
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
1962
|
-
"""
|
|
1963
|
-
if not agent_id:
|
|
1964
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
1965
|
-
return await self._get(
|
|
1966
|
-
f"/v1/agents/{agent_id}/groups",
|
|
1967
|
-
options=make_request_options(
|
|
1968
|
-
extra_headers=extra_headers,
|
|
1969
|
-
extra_query=extra_query,
|
|
1970
|
-
extra_body=extra_body,
|
|
1971
|
-
timeout=timeout,
|
|
1972
|
-
query=await async_maybe_transform(
|
|
1973
|
-
{"manager_type": manager_type}, agent_list_groups_params.AgentListGroupsParams
|
|
1974
|
-
),
|
|
1975
|
-
),
|
|
1976
|
-
cast_to=AgentListGroupsResponse,
|
|
1977
|
-
)
|
|
1978
|
-
|
|
1979
|
-
async def migrate(
|
|
1980
|
-
self,
|
|
1981
|
-
agent_id: str,
|
|
1982
|
-
*,
|
|
1983
|
-
preserve_core_memories: bool,
|
|
1984
|
-
to_template: str,
|
|
1985
|
-
preserve_tool_variables: bool | Omit = omit,
|
|
1986
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
1987
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
1988
|
-
extra_headers: Headers | None = None,
|
|
1989
|
-
extra_query: Query | None = None,
|
|
1990
|
-
extra_body: Body | None = None,
|
|
1991
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
1992
|
-
) -> AgentMigrateResponse:
|
|
1993
|
-
"""Migrate an agent to a new versioned agent template.
|
|
1994
|
-
|
|
1995
|
-
This will only work for
|
|
1996
|
-
"classic" and non-multiagent agent templates.
|
|
1997
|
-
|
|
1998
|
-
Args:
|
|
1999
|
-
preserve_tool_variables: If true, preserves the existing agent's tool environment variables instead of
|
|
2000
|
-
using the template's variables
|
|
2001
|
-
|
|
2002
|
-
extra_headers: Send extra headers
|
|
2003
|
-
|
|
2004
|
-
extra_query: Add additional query parameters to the request
|
|
2005
|
-
|
|
2006
|
-
extra_body: Add additional JSON properties to the request
|
|
2007
|
-
|
|
2008
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
2009
|
-
"""
|
|
2010
|
-
if not agent_id:
|
|
2011
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
2012
|
-
return await self._post(
|
|
2013
|
-
f"/v1/agents/{agent_id}/migrate",
|
|
2014
|
-
body=await async_maybe_transform(
|
|
2015
|
-
{
|
|
2016
|
-
"preserve_core_memories": preserve_core_memories,
|
|
2017
|
-
"to_template": to_template,
|
|
2018
|
-
"preserve_tool_variables": preserve_tool_variables,
|
|
2019
|
-
},
|
|
2020
|
-
agent_migrate_params.AgentMigrateParams,
|
|
2021
|
-
),
|
|
2022
|
-
options=make_request_options(
|
|
2023
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
2024
|
-
),
|
|
2025
|
-
cast_to=AgentMigrateResponse,
|
|
2026
|
-
)
|
|
2027
|
-
|
|
2028
|
-
async def reset_messages(
|
|
2029
|
-
self,
|
|
2030
|
-
agent_id: str,
|
|
2031
|
-
*,
|
|
2032
|
-
add_default_initial_messages: bool | Omit = omit,
|
|
2033
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2034
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2035
|
-
extra_headers: Headers | None = None,
|
|
2036
|
-
extra_query: Query | None = None,
|
|
2037
|
-
extra_body: Body | None = None,
|
|
2038
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2039
|
-
) -> AgentState:
|
|
2040
|
-
"""
|
|
2041
|
-
Resets the messages for an agent
|
|
2042
|
-
|
|
2043
|
-
Args:
|
|
2044
|
-
add_default_initial_messages: If true, adds the default initial messages after resetting.
|
|
2045
|
-
|
|
2046
|
-
extra_headers: Send extra headers
|
|
2047
|
-
|
|
2048
|
-
extra_query: Add additional query parameters to the request
|
|
2049
|
-
|
|
2050
|
-
extra_body: Add additional JSON properties to the request
|
|
2051
|
-
|
|
2052
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
2053
|
-
"""
|
|
2054
|
-
if not agent_id:
|
|
2055
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
2056
|
-
return await self._patch(
|
|
2057
|
-
f"/v1/agents/{agent_id}/reset-messages",
|
|
2058
|
-
options=make_request_options(
|
|
2059
|
-
extra_headers=extra_headers,
|
|
2060
|
-
extra_query=extra_query,
|
|
2061
|
-
extra_body=extra_body,
|
|
2062
|
-
timeout=timeout,
|
|
2063
|
-
query=await async_maybe_transform(
|
|
2064
|
-
{"add_default_initial_messages": add_default_initial_messages},
|
|
2065
|
-
agent_reset_messages_params.AgentResetMessagesParams,
|
|
2066
|
-
),
|
|
2067
|
-
),
|
|
2068
|
-
cast_to=AgentState,
|
|
2069
|
-
)
|
|
2070
|
-
|
|
2071
|
-
async def retrieve_context(
|
|
2072
|
-
self,
|
|
2073
|
-
agent_id: str,
|
|
2074
|
-
*,
|
|
2075
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2076
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2077
|
-
extra_headers: Headers | None = None,
|
|
2078
|
-
extra_query: Query | None = None,
|
|
2079
|
-
extra_body: Body | None = None,
|
|
2080
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2081
|
-
) -> AgentRetrieveContextResponse:
|
|
2082
|
-
"""
|
|
2083
|
-
Retrieve the context window of a specific agent.
|
|
2084
|
-
|
|
2085
|
-
Args:
|
|
2086
|
-
extra_headers: Send extra headers
|
|
2087
|
-
|
|
2088
|
-
extra_query: Add additional query parameters to the request
|
|
2089
|
-
|
|
2090
|
-
extra_body: Add additional JSON properties to the request
|
|
2091
|
-
|
|
2092
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
2093
|
-
"""
|
|
2094
|
-
if not agent_id:
|
|
2095
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
2096
|
-
return await self._get(
|
|
2097
|
-
f"/v1/agents/{agent_id}/context",
|
|
2098
|
-
options=make_request_options(
|
|
2099
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
2100
|
-
),
|
|
2101
|
-
cast_to=AgentRetrieveContextResponse,
|
|
2102
|
-
)
|
|
2103
|
-
|
|
2104
|
-
async def search(
|
|
2105
|
-
self,
|
|
2106
|
-
*,
|
|
2107
|
-
after: Optional[str] | Omit = omit,
|
|
2108
|
-
ascending: bool | Omit = omit,
|
|
2109
|
-
combinator: Literal["AND"] | Omit = omit,
|
|
2110
|
-
limit: float | Omit = omit,
|
|
2111
|
-
project_id: str | Omit = omit,
|
|
2112
|
-
search: Iterable[agent_search_params.Search] | Omit = omit,
|
|
2113
|
-
sort_by: Literal["created_at", "last_run_completion"] | Omit = omit,
|
|
2114
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2115
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2116
|
-
extra_headers: Headers | None = None,
|
|
2117
|
-
extra_query: Query | None = None,
|
|
2118
|
-
extra_body: Body | None = None,
|
|
2119
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2120
|
-
) -> AgentSearchResponse:
|
|
2121
|
-
"""
|
|
2122
|
-
Search deployed agents
|
|
2123
|
-
|
|
2124
|
-
Args:
|
|
2125
|
-
extra_headers: Send extra headers
|
|
2126
|
-
|
|
2127
|
-
extra_query: Add additional query parameters to the request
|
|
2128
|
-
|
|
2129
|
-
extra_body: Add additional JSON properties to the request
|
|
2130
|
-
|
|
2131
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
2132
|
-
"""
|
|
2133
|
-
return await self._post(
|
|
2134
|
-
"/v1/agents/search",
|
|
2135
|
-
body=await async_maybe_transform(
|
|
2136
|
-
{
|
|
2137
|
-
"after": after,
|
|
2138
|
-
"ascending": ascending,
|
|
2139
|
-
"combinator": combinator,
|
|
2140
|
-
"limit": limit,
|
|
2141
|
-
"project_id": project_id,
|
|
2142
|
-
"search": search,
|
|
2143
|
-
"sort_by": sort_by,
|
|
2144
|
-
},
|
|
2145
|
-
agent_search_params.AgentSearchParams,
|
|
2146
|
-
),
|
|
2147
|
-
options=make_request_options(
|
|
2148
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
2149
|
-
),
|
|
2150
|
-
cast_to=AgentSearchResponse,
|
|
2151
|
-
)
|
|
2152
|
-
|
|
2153
|
-
async def summarize(
|
|
2154
|
-
self,
|
|
2155
|
-
agent_id: str,
|
|
2156
|
-
*,
|
|
2157
|
-
max_message_length: int,
|
|
2158
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
2159
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
2160
|
-
extra_headers: Headers | None = None,
|
|
2161
|
-
extra_query: Query | None = None,
|
|
2162
|
-
extra_body: Body | None = None,
|
|
2163
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
2164
|
-
) -> None:
|
|
2165
|
-
"""
|
|
2166
|
-
Summarize an agent's conversation history to a target message length.
|
|
2167
|
-
|
|
2168
|
-
This endpoint summarizes the current message history for a given agent,
|
|
2169
|
-
truncating and compressing it down to the specified `max_message_length`.
|
|
2170
|
-
|
|
2171
|
-
Args:
|
|
2172
|
-
max_message_length: Maximum number of messages to retain after summarization.
|
|
2173
|
-
|
|
2174
|
-
extra_headers: Send extra headers
|
|
2175
|
-
|
|
2176
|
-
extra_query: Add additional query parameters to the request
|
|
2177
|
-
|
|
2178
|
-
extra_body: Add additional JSON properties to the request
|
|
2179
|
-
|
|
2180
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
2181
|
-
"""
|
|
2182
|
-
if not agent_id:
|
|
2183
|
-
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
2184
|
-
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
2185
|
-
return await self._post(
|
|
2186
|
-
f"/v1/agents/{agent_id}/summarize",
|
|
2187
|
-
options=make_request_options(
|
|
2188
|
-
extra_headers=extra_headers,
|
|
2189
|
-
extra_query=extra_query,
|
|
2190
|
-
extra_body=extra_body,
|
|
2191
|
-
timeout=timeout,
|
|
2192
|
-
query=await async_maybe_transform(
|
|
2193
|
-
{"max_message_length": max_message_length}, agent_summarize_params.AgentSummarizeParams
|
|
2194
|
-
),
|
|
2195
|
-
),
|
|
2196
|
-
cast_to=NoneType,
|
|
1768
|
+
cast_to=AgentImportFileResponse,
|
|
2197
1769
|
)
|
|
2198
1770
|
|
|
2199
1771
|
|
|
@@ -2219,39 +1791,17 @@ class AgentsResourceWithRawResponse:
|
|
|
2219
1791
|
self.count = to_raw_response_wrapper(
|
|
2220
1792
|
agents.count,
|
|
2221
1793
|
)
|
|
2222
|
-
self.
|
|
2223
|
-
agents.
|
|
2224
|
-
)
|
|
2225
|
-
self.import_ = to_raw_response_wrapper(
|
|
2226
|
-
agents.import_,
|
|
2227
|
-
)
|
|
2228
|
-
self.list_groups = to_raw_response_wrapper(
|
|
2229
|
-
agents.list_groups,
|
|
1794
|
+
self.export_file = to_raw_response_wrapper(
|
|
1795
|
+
agents.export_file,
|
|
2230
1796
|
)
|
|
2231
|
-
self.
|
|
2232
|
-
agents.
|
|
2233
|
-
)
|
|
2234
|
-
self.reset_messages = to_raw_response_wrapper(
|
|
2235
|
-
agents.reset_messages,
|
|
2236
|
-
)
|
|
2237
|
-
self.retrieve_context = to_raw_response_wrapper(
|
|
2238
|
-
agents.retrieve_context,
|
|
2239
|
-
)
|
|
2240
|
-
self.search = to_raw_response_wrapper(
|
|
2241
|
-
agents.search,
|
|
2242
|
-
)
|
|
2243
|
-
self.summarize = to_raw_response_wrapper(
|
|
2244
|
-
agents.summarize,
|
|
1797
|
+
self.import_file = to_raw_response_wrapper(
|
|
1798
|
+
agents.import_file,
|
|
2245
1799
|
)
|
|
2246
1800
|
|
|
2247
1801
|
@cached_property
|
|
2248
1802
|
def tools(self) -> ToolsResourceWithRawResponse:
|
|
2249
1803
|
return ToolsResourceWithRawResponse(self._agents.tools)
|
|
2250
1804
|
|
|
2251
|
-
@cached_property
|
|
2252
|
-
def sources(self) -> SourcesResourceWithRawResponse:
|
|
2253
|
-
return SourcesResourceWithRawResponse(self._agents.sources)
|
|
2254
|
-
|
|
2255
1805
|
@cached_property
|
|
2256
1806
|
def folders(self) -> FoldersResourceWithRawResponse:
|
|
2257
1807
|
return FoldersResourceWithRawResponse(self._agents.folders)
|
|
@@ -2261,12 +1811,12 @@ class AgentsResourceWithRawResponse:
|
|
|
2261
1811
|
return FilesResourceWithRawResponse(self._agents.files)
|
|
2262
1812
|
|
|
2263
1813
|
@cached_property
|
|
2264
|
-
def
|
|
2265
|
-
return
|
|
1814
|
+
def blocks(self) -> BlocksResourceWithRawResponse:
|
|
1815
|
+
return BlocksResourceWithRawResponse(self._agents.blocks)
|
|
2266
1816
|
|
|
2267
1817
|
@cached_property
|
|
2268
|
-
def
|
|
2269
|
-
return
|
|
1818
|
+
def groups(self) -> GroupsResourceWithRawResponse:
|
|
1819
|
+
return GroupsResourceWithRawResponse(self._agents.groups)
|
|
2270
1820
|
|
|
2271
1821
|
@cached_property
|
|
2272
1822
|
def messages(self) -> MessagesResourceWithRawResponse:
|
|
@@ -2295,39 +1845,17 @@ class AsyncAgentsResourceWithRawResponse:
|
|
|
2295
1845
|
self.count = async_to_raw_response_wrapper(
|
|
2296
1846
|
agents.count,
|
|
2297
1847
|
)
|
|
2298
|
-
self.
|
|
2299
|
-
agents.
|
|
2300
|
-
)
|
|
2301
|
-
self.import_ = async_to_raw_response_wrapper(
|
|
2302
|
-
agents.import_,
|
|
2303
|
-
)
|
|
2304
|
-
self.list_groups = async_to_raw_response_wrapper(
|
|
2305
|
-
agents.list_groups,
|
|
1848
|
+
self.export_file = async_to_raw_response_wrapper(
|
|
1849
|
+
agents.export_file,
|
|
2306
1850
|
)
|
|
2307
|
-
self.
|
|
2308
|
-
agents.
|
|
2309
|
-
)
|
|
2310
|
-
self.reset_messages = async_to_raw_response_wrapper(
|
|
2311
|
-
agents.reset_messages,
|
|
2312
|
-
)
|
|
2313
|
-
self.retrieve_context = async_to_raw_response_wrapper(
|
|
2314
|
-
agents.retrieve_context,
|
|
2315
|
-
)
|
|
2316
|
-
self.search = async_to_raw_response_wrapper(
|
|
2317
|
-
agents.search,
|
|
2318
|
-
)
|
|
2319
|
-
self.summarize = async_to_raw_response_wrapper(
|
|
2320
|
-
agents.summarize,
|
|
1851
|
+
self.import_file = async_to_raw_response_wrapper(
|
|
1852
|
+
agents.import_file,
|
|
2321
1853
|
)
|
|
2322
1854
|
|
|
2323
1855
|
@cached_property
|
|
2324
1856
|
def tools(self) -> AsyncToolsResourceWithRawResponse:
|
|
2325
1857
|
return AsyncToolsResourceWithRawResponse(self._agents.tools)
|
|
2326
1858
|
|
|
2327
|
-
@cached_property
|
|
2328
|
-
def sources(self) -> AsyncSourcesResourceWithRawResponse:
|
|
2329
|
-
return AsyncSourcesResourceWithRawResponse(self._agents.sources)
|
|
2330
|
-
|
|
2331
1859
|
@cached_property
|
|
2332
1860
|
def folders(self) -> AsyncFoldersResourceWithRawResponse:
|
|
2333
1861
|
return AsyncFoldersResourceWithRawResponse(self._agents.folders)
|
|
@@ -2337,12 +1865,12 @@ class AsyncAgentsResourceWithRawResponse:
|
|
|
2337
1865
|
return AsyncFilesResourceWithRawResponse(self._agents.files)
|
|
2338
1866
|
|
|
2339
1867
|
@cached_property
|
|
2340
|
-
def
|
|
2341
|
-
return
|
|
1868
|
+
def blocks(self) -> AsyncBlocksResourceWithRawResponse:
|
|
1869
|
+
return AsyncBlocksResourceWithRawResponse(self._agents.blocks)
|
|
2342
1870
|
|
|
2343
1871
|
@cached_property
|
|
2344
|
-
def
|
|
2345
|
-
return
|
|
1872
|
+
def groups(self) -> AsyncGroupsResourceWithRawResponse:
|
|
1873
|
+
return AsyncGroupsResourceWithRawResponse(self._agents.groups)
|
|
2346
1874
|
|
|
2347
1875
|
@cached_property
|
|
2348
1876
|
def messages(self) -> AsyncMessagesResourceWithRawResponse:
|
|
@@ -2371,39 +1899,17 @@ class AgentsResourceWithStreamingResponse:
|
|
|
2371
1899
|
self.count = to_streamed_response_wrapper(
|
|
2372
1900
|
agents.count,
|
|
2373
1901
|
)
|
|
2374
|
-
self.
|
|
2375
|
-
agents.
|
|
2376
|
-
)
|
|
2377
|
-
self.import_ = to_streamed_response_wrapper(
|
|
2378
|
-
agents.import_,
|
|
1902
|
+
self.export_file = to_streamed_response_wrapper(
|
|
1903
|
+
agents.export_file,
|
|
2379
1904
|
)
|
|
2380
|
-
self.
|
|
2381
|
-
agents.
|
|
2382
|
-
)
|
|
2383
|
-
self.migrate = to_streamed_response_wrapper(
|
|
2384
|
-
agents.migrate,
|
|
2385
|
-
)
|
|
2386
|
-
self.reset_messages = to_streamed_response_wrapper(
|
|
2387
|
-
agents.reset_messages,
|
|
2388
|
-
)
|
|
2389
|
-
self.retrieve_context = to_streamed_response_wrapper(
|
|
2390
|
-
agents.retrieve_context,
|
|
2391
|
-
)
|
|
2392
|
-
self.search = to_streamed_response_wrapper(
|
|
2393
|
-
agents.search,
|
|
2394
|
-
)
|
|
2395
|
-
self.summarize = to_streamed_response_wrapper(
|
|
2396
|
-
agents.summarize,
|
|
1905
|
+
self.import_file = to_streamed_response_wrapper(
|
|
1906
|
+
agents.import_file,
|
|
2397
1907
|
)
|
|
2398
1908
|
|
|
2399
1909
|
@cached_property
|
|
2400
1910
|
def tools(self) -> ToolsResourceWithStreamingResponse:
|
|
2401
1911
|
return ToolsResourceWithStreamingResponse(self._agents.tools)
|
|
2402
1912
|
|
|
2403
|
-
@cached_property
|
|
2404
|
-
def sources(self) -> SourcesResourceWithStreamingResponse:
|
|
2405
|
-
return SourcesResourceWithStreamingResponse(self._agents.sources)
|
|
2406
|
-
|
|
2407
1913
|
@cached_property
|
|
2408
1914
|
def folders(self) -> FoldersResourceWithStreamingResponse:
|
|
2409
1915
|
return FoldersResourceWithStreamingResponse(self._agents.folders)
|
|
@@ -2413,12 +1919,12 @@ class AgentsResourceWithStreamingResponse:
|
|
|
2413
1919
|
return FilesResourceWithStreamingResponse(self._agents.files)
|
|
2414
1920
|
|
|
2415
1921
|
@cached_property
|
|
2416
|
-
def
|
|
2417
|
-
return
|
|
1922
|
+
def blocks(self) -> BlocksResourceWithStreamingResponse:
|
|
1923
|
+
return BlocksResourceWithStreamingResponse(self._agents.blocks)
|
|
2418
1924
|
|
|
2419
1925
|
@cached_property
|
|
2420
|
-
def
|
|
2421
|
-
return
|
|
1926
|
+
def groups(self) -> GroupsResourceWithStreamingResponse:
|
|
1927
|
+
return GroupsResourceWithStreamingResponse(self._agents.groups)
|
|
2422
1928
|
|
|
2423
1929
|
@cached_property
|
|
2424
1930
|
def messages(self) -> MessagesResourceWithStreamingResponse:
|
|
@@ -2447,39 +1953,17 @@ class AsyncAgentsResourceWithStreamingResponse:
|
|
|
2447
1953
|
self.count = async_to_streamed_response_wrapper(
|
|
2448
1954
|
agents.count,
|
|
2449
1955
|
)
|
|
2450
|
-
self.
|
|
2451
|
-
agents.
|
|
2452
|
-
)
|
|
2453
|
-
self.import_ = async_to_streamed_response_wrapper(
|
|
2454
|
-
agents.import_,
|
|
1956
|
+
self.export_file = async_to_streamed_response_wrapper(
|
|
1957
|
+
agents.export_file,
|
|
2455
1958
|
)
|
|
2456
|
-
self.
|
|
2457
|
-
agents.
|
|
2458
|
-
)
|
|
2459
|
-
self.migrate = async_to_streamed_response_wrapper(
|
|
2460
|
-
agents.migrate,
|
|
2461
|
-
)
|
|
2462
|
-
self.reset_messages = async_to_streamed_response_wrapper(
|
|
2463
|
-
agents.reset_messages,
|
|
2464
|
-
)
|
|
2465
|
-
self.retrieve_context = async_to_streamed_response_wrapper(
|
|
2466
|
-
agents.retrieve_context,
|
|
2467
|
-
)
|
|
2468
|
-
self.search = async_to_streamed_response_wrapper(
|
|
2469
|
-
agents.search,
|
|
2470
|
-
)
|
|
2471
|
-
self.summarize = async_to_streamed_response_wrapper(
|
|
2472
|
-
agents.summarize,
|
|
1959
|
+
self.import_file = async_to_streamed_response_wrapper(
|
|
1960
|
+
agents.import_file,
|
|
2473
1961
|
)
|
|
2474
1962
|
|
|
2475
1963
|
@cached_property
|
|
2476
1964
|
def tools(self) -> AsyncToolsResourceWithStreamingResponse:
|
|
2477
1965
|
return AsyncToolsResourceWithStreamingResponse(self._agents.tools)
|
|
2478
1966
|
|
|
2479
|
-
@cached_property
|
|
2480
|
-
def sources(self) -> AsyncSourcesResourceWithStreamingResponse:
|
|
2481
|
-
return AsyncSourcesResourceWithStreamingResponse(self._agents.sources)
|
|
2482
|
-
|
|
2483
1967
|
@cached_property
|
|
2484
1968
|
def folders(self) -> AsyncFoldersResourceWithStreamingResponse:
|
|
2485
1969
|
return AsyncFoldersResourceWithStreamingResponse(self._agents.folders)
|
|
@@ -2489,12 +1973,12 @@ class AsyncAgentsResourceWithStreamingResponse:
|
|
|
2489
1973
|
return AsyncFilesResourceWithStreamingResponse(self._agents.files)
|
|
2490
1974
|
|
|
2491
1975
|
@cached_property
|
|
2492
|
-
def
|
|
2493
|
-
return
|
|
1976
|
+
def blocks(self) -> AsyncBlocksResourceWithStreamingResponse:
|
|
1977
|
+
return AsyncBlocksResourceWithStreamingResponse(self._agents.blocks)
|
|
2494
1978
|
|
|
2495
1979
|
@cached_property
|
|
2496
|
-
def
|
|
2497
|
-
return
|
|
1980
|
+
def groups(self) -> AsyncGroupsResourceWithStreamingResponse:
|
|
1981
|
+
return AsyncGroupsResourceWithStreamingResponse(self._agents.groups)
|
|
2498
1982
|
|
|
2499
1983
|
@cached_property
|
|
2500
1984
|
def messages(self) -> AsyncMessagesResourceWithStreamingResponse:
|