letta-client 1.0.0a6__py3-none-any.whl → 1.0.0a7__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_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 +216 -734
- {letta_sdk/resources/agents/core_memory → letta_client/resources/agents}/blocks.py +103 -12
- {letta_sdk → letta_client}/resources/agents/files.py +71 -8
- {letta_sdk → letta_client}/resources/agents/folders.py +90 -3
- letta_client/resources/agents/groups.py +242 -0
- {letta_sdk → letta_client}/resources/agents/messages.py +252 -480
- {letta_sdk → letta_client}/resources/agents/tools.py +135 -22
- letta_sdk/resources/jobs.py → letta_client/resources/archives.py +268 -280
- {letta_sdk/resources/messages → letta_client/resources/batches}/batches.py +35 -152
- 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 +284 -0
- {letta_sdk/resources → letta_client/resources/blocks}/blocks.py +54 -167
- letta_client/resources/folders/__init__.py +47 -0
- letta_client/resources/folders/agents.py +234 -0
- letta_client/resources/folders/files.py +469 -0
- letta_sdk/resources/providers.py → letta_client/resources/folders/folders.py +292 -309
- {letta_sdk → letta_client}/resources/groups/groups.py +12 -78
- {letta_sdk → letta_client}/resources/groups/messages.py +165 -27
- letta_client/resources/identities/__init__.py +61 -0
- letta_client/resources/identities/agents.py +266 -0
- letta_client/resources/identities/blocks.py +234 -0
- {letta_sdk/resources → letta_client/resources/identities}/identities.py +267 -525
- 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 +182 -153
- letta_client/resources/runs/runs.py +460 -0
- letta_sdk/resources/projects.py → letta_client/resources/runs/steps.py +93 -56
- 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 +234 -0
- letta_client/resources/steps/metrics.py +167 -0
- letta_client/resources/steps/steps.py +511 -0
- letta_sdk/resources/telemetry.py → letta_client/resources/steps/trace.py +45 -56
- 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 +239 -425
- letta_client/types/__init__.py +120 -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 +12 -19
- 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 +10 -6
- letta_client/types/agents/group_list_params.py +37 -0
- letta_client/types/agents/group_list_response.py +10 -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 → letta_client}/types/block_list_response.py +1 -1
- letta_client/types/blocks/__init__.py +6 -0
- letta_sdk/types/block_list_agents_params.py → letta_client/types/blocks/agent_list_params.py +22 -5
- letta_sdk/types/agent_list_groups_response.py → letta_client/types/blocks/agent_list_response.py +3 -3
- 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_sdk/types/run_list_active_response.py → letta_client/types/folders/agent_list_response.py +2 -4
- letta_sdk/types/folder_list_files_params.py → letta_client/types/folders/file_list_params.py +2 -2
- letta_client/types/folders/file_list_response.py +68 -0
- letta_sdk/types/source_upload_file_params.py → letta_client/types/folders/file_upload_params.py +5 -6
- letta_sdk/types/file_metadata.py → letta_client/types/folders/file_upload_response.py +5 -5
- {letta_sdk → letta_client}/types/groups/__init__.py +1 -1
- {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 +9 -0
- letta_sdk/types/identity_list_agents_params.py → letta_client/types/identities/agent_list_params.py +19 -3
- letta_client/types/identities/agent_list_response.py +10 -0
- letta_client/types/identities/block_list_params.py +34 -0
- letta_sdk/types/agents/folder_list_response.py → letta_client/types/identities/block_list_response.py +3 -3
- 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 +10 -0
- letta_sdk/types/run_list_messages_params.py → letta_client/types/runs/message_list_params.py +5 -2
- letta_client/types/runs/message_list_response.py +10 -0
- 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/job_list_response.py → letta_client/types/runs/step_list_response.py +3 -3
- 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 +34 -0
- letta_sdk/types/step_retrieve_metrics_response.py → letta_client/types/steps/metric_retrieve_response.py +6 -6
- {letta_sdk/types/tools → letta_client/types/templates}/__init__.py +2 -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_upsert_base_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.0a7.dist-info}/METADATA +110 -70
- letta_client-1.0.0a7.dist-info/RECORD +307 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a7.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/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_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_retrieve_variables_response.py +0 -11
- letta_sdk/types/agents/file_list_params.py +0 -19
- 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_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_modify_approval_params.py +0 -13
- letta_sdk/types/block_list_agents_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_retrieve_metadata_params.py +0 -11
- letta_sdk/types/folder_upload_file_params.py +0 -21
- letta_sdk/types/identity_list_agents_response.py +0 -10
- letta_sdk/types/identity_list_blocks_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/messages/__init__.py +0 -10
- letta_sdk/types/messages/batch_job.py +0 -60
- 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_messages_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/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/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}/resources/tags.py +0 -0
- {letta_sdk → letta_client}/types/agent_count_response.py +0 -0
- {letta_sdk → letta_client}/types/agent_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/assistant_message.py +0 -0
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block_list_response.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_list_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_list_response.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/types/messages → letta_client/types}/batch_list_response.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_list_response.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_list_response.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_list_response.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_list_response.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/run_list_response.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/step_list_response.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/tag_list_response.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_list_response.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.0a7.dist-info}/WHEEL +0 -0
|
@@ -1,961 +0,0 @@
|
|
|
1
|
-
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
from __future__ import annotations
|
|
4
|
-
|
|
5
|
-
from typing import Dict, Iterable, Optional
|
|
6
|
-
|
|
7
|
-
import httpx
|
|
8
|
-
|
|
9
|
-
from ...types import (
|
|
10
|
-
AgentType,
|
|
11
|
-
internal_template_create_agent_params,
|
|
12
|
-
internal_template_create_block_params,
|
|
13
|
-
internal_template_create_group_params,
|
|
14
|
-
)
|
|
15
|
-
from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
|
|
16
|
-
from ..._utils import maybe_transform, async_maybe_transform
|
|
17
|
-
from ..._compat import cached_property
|
|
18
|
-
from .deployment import (
|
|
19
|
-
DeploymentResource,
|
|
20
|
-
AsyncDeploymentResource,
|
|
21
|
-
DeploymentResourceWithRawResponse,
|
|
22
|
-
AsyncDeploymentResourceWithRawResponse,
|
|
23
|
-
DeploymentResourceWithStreamingResponse,
|
|
24
|
-
AsyncDeploymentResourceWithStreamingResponse,
|
|
25
|
-
)
|
|
26
|
-
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
27
|
-
from ..._response import (
|
|
28
|
-
to_raw_response_wrapper,
|
|
29
|
-
to_streamed_response_wrapper,
|
|
30
|
-
async_to_raw_response_wrapper,
|
|
31
|
-
async_to_streamed_response_wrapper,
|
|
32
|
-
)
|
|
33
|
-
from ...types.group import Group
|
|
34
|
-
from ..._base_client import make_request_options
|
|
35
|
-
from ...types.agent_type import AgentType
|
|
36
|
-
from ...types.agent_state import AgentState
|
|
37
|
-
from ...types.llm_config_param import LlmConfigParam
|
|
38
|
-
from ...types.create_block_param import CreateBlockParam
|
|
39
|
-
from ...types.message_create_param import MessageCreateParam
|
|
40
|
-
from ...types.embedding_config_param import EmbeddingConfigParam
|
|
41
|
-
from ...types.agents.core_memory.block import Block
|
|
42
|
-
|
|
43
|
-
__all__ = ["_InternalTemplatesResource", "AsyncInternalTemplatesResource"]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class _InternalTemplatesResource(SyncAPIResource):
|
|
47
|
-
@cached_property
|
|
48
|
-
def deployment(self) -> DeploymentResource:
|
|
49
|
-
return DeploymentResource(self._client)
|
|
50
|
-
|
|
51
|
-
@cached_property
|
|
52
|
-
def with_raw_response(self) -> _InternalTemplatesResourceWithRawResponse:
|
|
53
|
-
"""
|
|
54
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
55
|
-
the raw response object instead of the parsed content.
|
|
56
|
-
|
|
57
|
-
For more information, see https://www.github.com/letta-ai/letta-python#accessing-raw-response-data-eg-headers
|
|
58
|
-
"""
|
|
59
|
-
return _InternalTemplatesResourceWithRawResponse(self)
|
|
60
|
-
|
|
61
|
-
@cached_property
|
|
62
|
-
def with_streaming_response(self) -> _InternalTemplatesResourceWithStreamingResponse:
|
|
63
|
-
"""
|
|
64
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
65
|
-
|
|
66
|
-
For more information, see https://www.github.com/letta-ai/letta-python#with_streaming_response
|
|
67
|
-
"""
|
|
68
|
-
return _InternalTemplatesResourceWithStreamingResponse(self)
|
|
69
|
-
|
|
70
|
-
def create_agent(
|
|
71
|
-
self,
|
|
72
|
-
*,
|
|
73
|
-
base_template_id: str,
|
|
74
|
-
deployment_id: str,
|
|
75
|
-
entity_id: str,
|
|
76
|
-
template_id: str,
|
|
77
|
-
agent_type: AgentType | Omit = omit,
|
|
78
|
-
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
79
|
-
context_window_limit: Optional[int] | Omit = omit,
|
|
80
|
-
description: Optional[str] | Omit = omit,
|
|
81
|
-
embedding: Optional[str] | Omit = omit,
|
|
82
|
-
embedding_chunk_size: Optional[int] | Omit = omit,
|
|
83
|
-
embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
|
|
84
|
-
enable_reasoner: Optional[bool] | Omit = omit,
|
|
85
|
-
enable_sleeptime: Optional[bool] | Omit = omit,
|
|
86
|
-
from_template: Optional[str] | Omit = omit,
|
|
87
|
-
hidden: Optional[bool] | Omit = omit,
|
|
88
|
-
identity_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
89
|
-
include_base_tool_rules: Optional[bool] | Omit = omit,
|
|
90
|
-
include_base_tools: bool | Omit = omit,
|
|
91
|
-
include_default_source: bool | Omit = omit,
|
|
92
|
-
include_multi_agent_tools: bool | Omit = omit,
|
|
93
|
-
initial_message_sequence: Optional[Iterable[MessageCreateParam]] | Omit = omit,
|
|
94
|
-
llm_config: Optional[LlmConfigParam] | Omit = omit,
|
|
95
|
-
max_files_open: Optional[int] | Omit = omit,
|
|
96
|
-
max_reasoning_tokens: Optional[int] | Omit = omit,
|
|
97
|
-
max_tokens: Optional[int] | Omit = omit,
|
|
98
|
-
memory_blocks: Optional[Iterable[CreateBlockParam]] | Omit = omit,
|
|
99
|
-
memory_variables: Optional[Dict[str, str]] | Omit = omit,
|
|
100
|
-
message_buffer_autoclear: bool | Omit = omit,
|
|
101
|
-
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
102
|
-
model: Optional[str] | Omit = omit,
|
|
103
|
-
name: str | Omit = omit,
|
|
104
|
-
per_file_view_window_char_limit: Optional[int] | Omit = omit,
|
|
105
|
-
project: Optional[str] | Omit = omit,
|
|
106
|
-
project_id: Optional[str] | Omit = omit,
|
|
107
|
-
reasoning: Optional[bool] | Omit = omit,
|
|
108
|
-
response_format: Optional[internal_template_create_agent_params.ResponseFormat] | Omit = omit,
|
|
109
|
-
secrets: Optional[Dict[str, str]] | Omit = omit,
|
|
110
|
-
source_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
111
|
-
system: Optional[str] | Omit = omit,
|
|
112
|
-
tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
113
|
-
template: bool | Omit = omit,
|
|
114
|
-
timezone: Optional[str] | Omit = omit,
|
|
115
|
-
tool_exec_environment_variables: Optional[Dict[str, str]] | Omit = omit,
|
|
116
|
-
tool_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
117
|
-
tool_rules: Optional[Iterable[internal_template_create_agent_params.ToolRule]] | Omit = omit,
|
|
118
|
-
tools: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
119
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
120
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
121
|
-
extra_headers: Headers | None = None,
|
|
122
|
-
extra_query: Query | None = None,
|
|
123
|
-
extra_body: Body | None = None,
|
|
124
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
125
|
-
) -> AgentState:
|
|
126
|
-
"""
|
|
127
|
-
Create a new agent with template-related fields.
|
|
128
|
-
|
|
129
|
-
Args:
|
|
130
|
-
base_template_id: The id of the base template.
|
|
131
|
-
|
|
132
|
-
deployment_id: The id of the deployment.
|
|
133
|
-
|
|
134
|
-
entity_id: The id of the entity within the template.
|
|
135
|
-
|
|
136
|
-
template_id: The id of the template.
|
|
137
|
-
|
|
138
|
-
agent_type: The type of agent.
|
|
139
|
-
|
|
140
|
-
block_ids: The ids of the blocks used by the agent.
|
|
141
|
-
|
|
142
|
-
context_window_limit: The context window limit used by the agent.
|
|
143
|
-
|
|
144
|
-
description: The description of the agent.
|
|
145
|
-
|
|
146
|
-
embedding: The embedding configuration handle used by the agent, specified in the format
|
|
147
|
-
provider/model-name.
|
|
148
|
-
|
|
149
|
-
embedding_chunk_size: The embedding chunk size used by the agent.
|
|
150
|
-
|
|
151
|
-
embedding_config: Configuration for embedding model connection and processing parameters.
|
|
152
|
-
|
|
153
|
-
enable_reasoner: Whether to enable internal extended thinking step for a reasoner model.
|
|
154
|
-
|
|
155
|
-
enable_sleeptime: If set to True, memory management will move to a background agent thread.
|
|
156
|
-
|
|
157
|
-
from_template: The template id used to configure the agent
|
|
158
|
-
|
|
159
|
-
hidden: If set to True, the agent will be hidden.
|
|
160
|
-
|
|
161
|
-
identity_ids: The ids of the identities associated with this agent.
|
|
162
|
-
|
|
163
|
-
include_base_tool_rules: If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly
|
|
164
|
-
allowed).
|
|
165
|
-
|
|
166
|
-
include_base_tools: If true, attaches the Letta core tools (e.g. core_memory related functions).
|
|
167
|
-
|
|
168
|
-
include_default_source: If true, automatically creates and attaches a default data source for this
|
|
169
|
-
agent.
|
|
170
|
-
|
|
171
|
-
include_multi_agent_tools: If true, attaches the Letta multi-agent tools (e.g. sending a message to another
|
|
172
|
-
agent).
|
|
173
|
-
|
|
174
|
-
initial_message_sequence: The initial set of messages to put in the agent's in-context memory.
|
|
175
|
-
|
|
176
|
-
llm_config: Configuration for Language Model (LLM) connection and generation parameters.
|
|
177
|
-
|
|
178
|
-
max_files_open: Maximum number of files that can be open at once for this agent. Setting this
|
|
179
|
-
too high may exceed the context window, which will break the agent.
|
|
180
|
-
|
|
181
|
-
max_reasoning_tokens: The maximum number of tokens to generate for reasoning step. If not set, the
|
|
182
|
-
model will use its default value.
|
|
183
|
-
|
|
184
|
-
max_tokens: The maximum number of tokens to generate, including reasoning step. If not set,
|
|
185
|
-
the model will use its default value.
|
|
186
|
-
|
|
187
|
-
memory_blocks: The blocks to create in the agent's in-context memory.
|
|
188
|
-
|
|
189
|
-
memory_variables: The variables that should be set for the agent.
|
|
190
|
-
|
|
191
|
-
message_buffer_autoclear: If set to True, the agent will not remember previous messages (though the agent
|
|
192
|
-
will still retain state via core memory blocks and archival/recall memory). Not
|
|
193
|
-
recommended unless you have an advanced use case.
|
|
194
|
-
|
|
195
|
-
metadata: The metadata of the agent.
|
|
196
|
-
|
|
197
|
-
model: The LLM configuration handle used by the agent, specified in the format
|
|
198
|
-
provider/model-name, as an alternative to specifying llm_config.
|
|
199
|
-
|
|
200
|
-
name: The name of the agent.
|
|
201
|
-
|
|
202
|
-
per_file_view_window_char_limit: The per-file view window character limit for this agent. Setting this too high
|
|
203
|
-
may exceed the context window, which will break the agent.
|
|
204
|
-
|
|
205
|
-
project: Deprecated: Project should now be passed via the X-Project header instead of in
|
|
206
|
-
the request body. If using the sdk, this can be done via the new x_project field
|
|
207
|
-
below.
|
|
208
|
-
|
|
209
|
-
project_id: The id of the project the agent belongs to.
|
|
210
|
-
|
|
211
|
-
reasoning: Whether to enable reasoning for this agent.
|
|
212
|
-
|
|
213
|
-
response_format: The response format for the agent.
|
|
214
|
-
|
|
215
|
-
secrets: The environment variables for tool execution specific to this agent.
|
|
216
|
-
|
|
217
|
-
source_ids: The ids of the sources used by the agent.
|
|
218
|
-
|
|
219
|
-
system: The system prompt used by the agent.
|
|
220
|
-
|
|
221
|
-
tags: The tags associated with the agent.
|
|
222
|
-
|
|
223
|
-
template: Whether the agent is a template
|
|
224
|
-
|
|
225
|
-
timezone: The timezone of the agent (IANA format).
|
|
226
|
-
|
|
227
|
-
tool_exec_environment_variables: Deprecated: use `secrets` field instead.
|
|
228
|
-
|
|
229
|
-
tool_ids: The ids of the tools used by the agent.
|
|
230
|
-
|
|
231
|
-
tool_rules: The tool rules governing the agent.
|
|
232
|
-
|
|
233
|
-
tools: The tools used by the agent.
|
|
234
|
-
|
|
235
|
-
extra_headers: Send extra headers
|
|
236
|
-
|
|
237
|
-
extra_query: Add additional query parameters to the request
|
|
238
|
-
|
|
239
|
-
extra_body: Add additional JSON properties to the request
|
|
240
|
-
|
|
241
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
242
|
-
"""
|
|
243
|
-
return self._post(
|
|
244
|
-
"/v1/_internal_templates/agents",
|
|
245
|
-
body=maybe_transform(
|
|
246
|
-
{
|
|
247
|
-
"base_template_id": base_template_id,
|
|
248
|
-
"deployment_id": deployment_id,
|
|
249
|
-
"entity_id": entity_id,
|
|
250
|
-
"template_id": template_id,
|
|
251
|
-
"agent_type": agent_type,
|
|
252
|
-
"block_ids": block_ids,
|
|
253
|
-
"context_window_limit": context_window_limit,
|
|
254
|
-
"description": description,
|
|
255
|
-
"embedding": embedding,
|
|
256
|
-
"embedding_chunk_size": embedding_chunk_size,
|
|
257
|
-
"embedding_config": embedding_config,
|
|
258
|
-
"enable_reasoner": enable_reasoner,
|
|
259
|
-
"enable_sleeptime": enable_sleeptime,
|
|
260
|
-
"from_template": from_template,
|
|
261
|
-
"hidden": hidden,
|
|
262
|
-
"identity_ids": identity_ids,
|
|
263
|
-
"include_base_tool_rules": include_base_tool_rules,
|
|
264
|
-
"include_base_tools": include_base_tools,
|
|
265
|
-
"include_default_source": include_default_source,
|
|
266
|
-
"include_multi_agent_tools": include_multi_agent_tools,
|
|
267
|
-
"initial_message_sequence": initial_message_sequence,
|
|
268
|
-
"llm_config": llm_config,
|
|
269
|
-
"max_files_open": max_files_open,
|
|
270
|
-
"max_reasoning_tokens": max_reasoning_tokens,
|
|
271
|
-
"max_tokens": max_tokens,
|
|
272
|
-
"memory_blocks": memory_blocks,
|
|
273
|
-
"memory_variables": memory_variables,
|
|
274
|
-
"message_buffer_autoclear": message_buffer_autoclear,
|
|
275
|
-
"metadata": metadata,
|
|
276
|
-
"model": model,
|
|
277
|
-
"name": name,
|
|
278
|
-
"per_file_view_window_char_limit": per_file_view_window_char_limit,
|
|
279
|
-
"project": project,
|
|
280
|
-
"project_id": project_id,
|
|
281
|
-
"reasoning": reasoning,
|
|
282
|
-
"response_format": response_format,
|
|
283
|
-
"secrets": secrets,
|
|
284
|
-
"source_ids": source_ids,
|
|
285
|
-
"system": system,
|
|
286
|
-
"tags": tags,
|
|
287
|
-
"template": template,
|
|
288
|
-
"timezone": timezone,
|
|
289
|
-
"tool_exec_environment_variables": tool_exec_environment_variables,
|
|
290
|
-
"tool_ids": tool_ids,
|
|
291
|
-
"tool_rules": tool_rules,
|
|
292
|
-
"tools": tools,
|
|
293
|
-
},
|
|
294
|
-
internal_template_create_agent_params.InternalTemplateCreateAgentParams,
|
|
295
|
-
),
|
|
296
|
-
options=make_request_options(
|
|
297
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
298
|
-
),
|
|
299
|
-
cast_to=AgentState,
|
|
300
|
-
)
|
|
301
|
-
|
|
302
|
-
def create_block(
|
|
303
|
-
self,
|
|
304
|
-
*,
|
|
305
|
-
base_template_id: str,
|
|
306
|
-
deployment_id: str,
|
|
307
|
-
entity_id: str,
|
|
308
|
-
label: str,
|
|
309
|
-
template_id: str,
|
|
310
|
-
value: str,
|
|
311
|
-
description: Optional[str] | Omit = omit,
|
|
312
|
-
hidden: Optional[bool] | Omit = omit,
|
|
313
|
-
is_template: bool | Omit = omit,
|
|
314
|
-
limit: int | Omit = omit,
|
|
315
|
-
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
316
|
-
name: Optional[str] | Omit = omit,
|
|
317
|
-
preserve_on_migration: Optional[bool] | Omit = omit,
|
|
318
|
-
project_id: Optional[str] | Omit = omit,
|
|
319
|
-
read_only: bool | Omit = omit,
|
|
320
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
321
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
322
|
-
extra_headers: Headers | None = None,
|
|
323
|
-
extra_query: Query | None = None,
|
|
324
|
-
extra_body: Body | None = None,
|
|
325
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
326
|
-
) -> Block:
|
|
327
|
-
"""
|
|
328
|
-
Create a new block with template-related fields.
|
|
329
|
-
|
|
330
|
-
Args:
|
|
331
|
-
base_template_id: The id of the base template.
|
|
332
|
-
|
|
333
|
-
deployment_id: The id of the deployment.
|
|
334
|
-
|
|
335
|
-
entity_id: The id of the entity within the template.
|
|
336
|
-
|
|
337
|
-
label: Label of the block.
|
|
338
|
-
|
|
339
|
-
template_id: The id of the template.
|
|
340
|
-
|
|
341
|
-
value: Value of the block.
|
|
342
|
-
|
|
343
|
-
description: Description of the block.
|
|
344
|
-
|
|
345
|
-
hidden: If set to True, the block will be hidden.
|
|
346
|
-
|
|
347
|
-
limit: Character limit of the block.
|
|
348
|
-
|
|
349
|
-
metadata: Metadata of the block.
|
|
350
|
-
|
|
351
|
-
name: Name of the block if it is a template.
|
|
352
|
-
|
|
353
|
-
preserve_on_migration: Preserve the block on template migration.
|
|
354
|
-
|
|
355
|
-
project_id: The associated project id.
|
|
356
|
-
|
|
357
|
-
read_only: Whether the agent has read-only access to the block.
|
|
358
|
-
|
|
359
|
-
extra_headers: Send extra headers
|
|
360
|
-
|
|
361
|
-
extra_query: Add additional query parameters to the request
|
|
362
|
-
|
|
363
|
-
extra_body: Add additional JSON properties to the request
|
|
364
|
-
|
|
365
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
366
|
-
"""
|
|
367
|
-
return self._post(
|
|
368
|
-
"/v1/_internal_templates/blocks",
|
|
369
|
-
body=maybe_transform(
|
|
370
|
-
{
|
|
371
|
-
"base_template_id": base_template_id,
|
|
372
|
-
"deployment_id": deployment_id,
|
|
373
|
-
"entity_id": entity_id,
|
|
374
|
-
"label": label,
|
|
375
|
-
"template_id": template_id,
|
|
376
|
-
"value": value,
|
|
377
|
-
"description": description,
|
|
378
|
-
"hidden": hidden,
|
|
379
|
-
"is_template": is_template,
|
|
380
|
-
"limit": limit,
|
|
381
|
-
"metadata": metadata,
|
|
382
|
-
"name": name,
|
|
383
|
-
"preserve_on_migration": preserve_on_migration,
|
|
384
|
-
"project_id": project_id,
|
|
385
|
-
"read_only": read_only,
|
|
386
|
-
},
|
|
387
|
-
internal_template_create_block_params.InternalTemplateCreateBlockParams,
|
|
388
|
-
),
|
|
389
|
-
options=make_request_options(
|
|
390
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
391
|
-
),
|
|
392
|
-
cast_to=Block,
|
|
393
|
-
)
|
|
394
|
-
|
|
395
|
-
def create_group(
|
|
396
|
-
self,
|
|
397
|
-
*,
|
|
398
|
-
agent_ids: SequenceNotStr[str],
|
|
399
|
-
base_template_id: str,
|
|
400
|
-
deployment_id: str,
|
|
401
|
-
description: str,
|
|
402
|
-
template_id: str,
|
|
403
|
-
hidden: Optional[bool] | Omit = omit,
|
|
404
|
-
manager_config: internal_template_create_group_params.ManagerConfig | Omit = omit,
|
|
405
|
-
project_id: Optional[str] | Omit = omit,
|
|
406
|
-
shared_block_ids: SequenceNotStr[str] | Omit = omit,
|
|
407
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
408
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
409
|
-
extra_headers: Headers | None = None,
|
|
410
|
-
extra_query: Query | None = None,
|
|
411
|
-
extra_body: Body | None = None,
|
|
412
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
413
|
-
) -> Group:
|
|
414
|
-
"""
|
|
415
|
-
Create a new multi-agent group with the specified configuration.
|
|
416
|
-
|
|
417
|
-
Args:
|
|
418
|
-
agent_ids
|
|
419
|
-
|
|
420
|
-
base_template_id: The id of the base template.
|
|
421
|
-
|
|
422
|
-
deployment_id: The id of the deployment.
|
|
423
|
-
|
|
424
|
-
description
|
|
425
|
-
|
|
426
|
-
template_id: The id of the template.
|
|
427
|
-
|
|
428
|
-
hidden: If set to True, the group will be hidden.
|
|
429
|
-
|
|
430
|
-
manager_config
|
|
431
|
-
|
|
432
|
-
project_id: The associated project id.
|
|
433
|
-
|
|
434
|
-
shared_block_ids
|
|
435
|
-
|
|
436
|
-
extra_headers: Send extra headers
|
|
437
|
-
|
|
438
|
-
extra_query: Add additional query parameters to the request
|
|
439
|
-
|
|
440
|
-
extra_body: Add additional JSON properties to the request
|
|
441
|
-
|
|
442
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
443
|
-
"""
|
|
444
|
-
return self._post(
|
|
445
|
-
"/v1/_internal_templates/groups",
|
|
446
|
-
body=maybe_transform(
|
|
447
|
-
{
|
|
448
|
-
"agent_ids": agent_ids,
|
|
449
|
-
"base_template_id": base_template_id,
|
|
450
|
-
"deployment_id": deployment_id,
|
|
451
|
-
"description": description,
|
|
452
|
-
"template_id": template_id,
|
|
453
|
-
"hidden": hidden,
|
|
454
|
-
"manager_config": manager_config,
|
|
455
|
-
"project_id": project_id,
|
|
456
|
-
"shared_block_ids": shared_block_ids,
|
|
457
|
-
},
|
|
458
|
-
internal_template_create_group_params.InternalTemplateCreateGroupParams,
|
|
459
|
-
),
|
|
460
|
-
options=make_request_options(
|
|
461
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
462
|
-
),
|
|
463
|
-
cast_to=Group,
|
|
464
|
-
)
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
class AsyncInternalTemplatesResource(AsyncAPIResource):
|
|
468
|
-
@cached_property
|
|
469
|
-
def deployment(self) -> AsyncDeploymentResource:
|
|
470
|
-
return AsyncDeploymentResource(self._client)
|
|
471
|
-
|
|
472
|
-
@cached_property
|
|
473
|
-
def with_raw_response(self) -> AsyncInternalTemplatesResourceWithRawResponse:
|
|
474
|
-
"""
|
|
475
|
-
This property can be used as a prefix for any HTTP method call to return
|
|
476
|
-
the raw response object instead of the parsed content.
|
|
477
|
-
|
|
478
|
-
For more information, see https://www.github.com/letta-ai/letta-python#accessing-raw-response-data-eg-headers
|
|
479
|
-
"""
|
|
480
|
-
return AsyncInternalTemplatesResourceWithRawResponse(self)
|
|
481
|
-
|
|
482
|
-
@cached_property
|
|
483
|
-
def with_streaming_response(self) -> AsyncInternalTemplatesResourceWithStreamingResponse:
|
|
484
|
-
"""
|
|
485
|
-
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
486
|
-
|
|
487
|
-
For more information, see https://www.github.com/letta-ai/letta-python#with_streaming_response
|
|
488
|
-
"""
|
|
489
|
-
return AsyncInternalTemplatesResourceWithStreamingResponse(self)
|
|
490
|
-
|
|
491
|
-
async def create_agent(
|
|
492
|
-
self,
|
|
493
|
-
*,
|
|
494
|
-
base_template_id: str,
|
|
495
|
-
deployment_id: str,
|
|
496
|
-
entity_id: str,
|
|
497
|
-
template_id: str,
|
|
498
|
-
agent_type: AgentType | Omit = omit,
|
|
499
|
-
block_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
500
|
-
context_window_limit: Optional[int] | Omit = omit,
|
|
501
|
-
description: Optional[str] | Omit = omit,
|
|
502
|
-
embedding: Optional[str] | Omit = omit,
|
|
503
|
-
embedding_chunk_size: Optional[int] | Omit = omit,
|
|
504
|
-
embedding_config: Optional[EmbeddingConfigParam] | Omit = omit,
|
|
505
|
-
enable_reasoner: Optional[bool] | Omit = omit,
|
|
506
|
-
enable_sleeptime: Optional[bool] | Omit = omit,
|
|
507
|
-
from_template: Optional[str] | Omit = omit,
|
|
508
|
-
hidden: Optional[bool] | Omit = omit,
|
|
509
|
-
identity_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
510
|
-
include_base_tool_rules: Optional[bool] | Omit = omit,
|
|
511
|
-
include_base_tools: bool | Omit = omit,
|
|
512
|
-
include_default_source: bool | Omit = omit,
|
|
513
|
-
include_multi_agent_tools: bool | Omit = omit,
|
|
514
|
-
initial_message_sequence: Optional[Iterable[MessageCreateParam]] | Omit = omit,
|
|
515
|
-
llm_config: Optional[LlmConfigParam] | Omit = omit,
|
|
516
|
-
max_files_open: Optional[int] | Omit = omit,
|
|
517
|
-
max_reasoning_tokens: Optional[int] | Omit = omit,
|
|
518
|
-
max_tokens: Optional[int] | Omit = omit,
|
|
519
|
-
memory_blocks: Optional[Iterable[CreateBlockParam]] | Omit = omit,
|
|
520
|
-
memory_variables: Optional[Dict[str, str]] | Omit = omit,
|
|
521
|
-
message_buffer_autoclear: bool | Omit = omit,
|
|
522
|
-
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
523
|
-
model: Optional[str] | Omit = omit,
|
|
524
|
-
name: str | Omit = omit,
|
|
525
|
-
per_file_view_window_char_limit: Optional[int] | Omit = omit,
|
|
526
|
-
project: Optional[str] | Omit = omit,
|
|
527
|
-
project_id: Optional[str] | Omit = omit,
|
|
528
|
-
reasoning: Optional[bool] | Omit = omit,
|
|
529
|
-
response_format: Optional[internal_template_create_agent_params.ResponseFormat] | Omit = omit,
|
|
530
|
-
secrets: Optional[Dict[str, str]] | Omit = omit,
|
|
531
|
-
source_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
532
|
-
system: Optional[str] | Omit = omit,
|
|
533
|
-
tags: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
534
|
-
template: bool | Omit = omit,
|
|
535
|
-
timezone: Optional[str] | Omit = omit,
|
|
536
|
-
tool_exec_environment_variables: Optional[Dict[str, str]] | Omit = omit,
|
|
537
|
-
tool_ids: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
538
|
-
tool_rules: Optional[Iterable[internal_template_create_agent_params.ToolRule]] | Omit = omit,
|
|
539
|
-
tools: Optional[SequenceNotStr[str]] | Omit = omit,
|
|
540
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
541
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
542
|
-
extra_headers: Headers | None = None,
|
|
543
|
-
extra_query: Query | None = None,
|
|
544
|
-
extra_body: Body | None = None,
|
|
545
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
546
|
-
) -> AgentState:
|
|
547
|
-
"""
|
|
548
|
-
Create a new agent with template-related fields.
|
|
549
|
-
|
|
550
|
-
Args:
|
|
551
|
-
base_template_id: The id of the base template.
|
|
552
|
-
|
|
553
|
-
deployment_id: The id of the deployment.
|
|
554
|
-
|
|
555
|
-
entity_id: The id of the entity within the template.
|
|
556
|
-
|
|
557
|
-
template_id: The id of the template.
|
|
558
|
-
|
|
559
|
-
agent_type: The type of agent.
|
|
560
|
-
|
|
561
|
-
block_ids: The ids of the blocks used by the agent.
|
|
562
|
-
|
|
563
|
-
context_window_limit: The context window limit used by the agent.
|
|
564
|
-
|
|
565
|
-
description: The description of the agent.
|
|
566
|
-
|
|
567
|
-
embedding: The embedding configuration handle used by the agent, specified in the format
|
|
568
|
-
provider/model-name.
|
|
569
|
-
|
|
570
|
-
embedding_chunk_size: The embedding chunk size used by the agent.
|
|
571
|
-
|
|
572
|
-
embedding_config: Configuration for embedding model connection and processing parameters.
|
|
573
|
-
|
|
574
|
-
enable_reasoner: Whether to enable internal extended thinking step for a reasoner model.
|
|
575
|
-
|
|
576
|
-
enable_sleeptime: If set to True, memory management will move to a background agent thread.
|
|
577
|
-
|
|
578
|
-
from_template: The template id used to configure the agent
|
|
579
|
-
|
|
580
|
-
hidden: If set to True, the agent will be hidden.
|
|
581
|
-
|
|
582
|
-
identity_ids: The ids of the identities associated with this agent.
|
|
583
|
-
|
|
584
|
-
include_base_tool_rules: If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly
|
|
585
|
-
allowed).
|
|
586
|
-
|
|
587
|
-
include_base_tools: If true, attaches the Letta core tools (e.g. core_memory related functions).
|
|
588
|
-
|
|
589
|
-
include_default_source: If true, automatically creates and attaches a default data source for this
|
|
590
|
-
agent.
|
|
591
|
-
|
|
592
|
-
include_multi_agent_tools: If true, attaches the Letta multi-agent tools (e.g. sending a message to another
|
|
593
|
-
agent).
|
|
594
|
-
|
|
595
|
-
initial_message_sequence: The initial set of messages to put in the agent's in-context memory.
|
|
596
|
-
|
|
597
|
-
llm_config: Configuration for Language Model (LLM) connection and generation parameters.
|
|
598
|
-
|
|
599
|
-
max_files_open: Maximum number of files that can be open at once for this agent. Setting this
|
|
600
|
-
too high may exceed the context window, which will break the agent.
|
|
601
|
-
|
|
602
|
-
max_reasoning_tokens: The maximum number of tokens to generate for reasoning step. If not set, the
|
|
603
|
-
model will use its default value.
|
|
604
|
-
|
|
605
|
-
max_tokens: The maximum number of tokens to generate, including reasoning step. If not set,
|
|
606
|
-
the model will use its default value.
|
|
607
|
-
|
|
608
|
-
memory_blocks: The blocks to create in the agent's in-context memory.
|
|
609
|
-
|
|
610
|
-
memory_variables: The variables that should be set for the agent.
|
|
611
|
-
|
|
612
|
-
message_buffer_autoclear: If set to True, the agent will not remember previous messages (though the agent
|
|
613
|
-
will still retain state via core memory blocks and archival/recall memory). Not
|
|
614
|
-
recommended unless you have an advanced use case.
|
|
615
|
-
|
|
616
|
-
metadata: The metadata of the agent.
|
|
617
|
-
|
|
618
|
-
model: The LLM configuration handle used by the agent, specified in the format
|
|
619
|
-
provider/model-name, as an alternative to specifying llm_config.
|
|
620
|
-
|
|
621
|
-
name: The name of the agent.
|
|
622
|
-
|
|
623
|
-
per_file_view_window_char_limit: The per-file view window character limit for this agent. Setting this too high
|
|
624
|
-
may exceed the context window, which will break the agent.
|
|
625
|
-
|
|
626
|
-
project: Deprecated: Project should now be passed via the X-Project header instead of in
|
|
627
|
-
the request body. If using the sdk, this can be done via the new x_project field
|
|
628
|
-
below.
|
|
629
|
-
|
|
630
|
-
project_id: The id of the project the agent belongs to.
|
|
631
|
-
|
|
632
|
-
reasoning: Whether to enable reasoning for this agent.
|
|
633
|
-
|
|
634
|
-
response_format: The response format for the agent.
|
|
635
|
-
|
|
636
|
-
secrets: The environment variables for tool execution specific to this agent.
|
|
637
|
-
|
|
638
|
-
source_ids: The ids of the sources used by the agent.
|
|
639
|
-
|
|
640
|
-
system: The system prompt used by the agent.
|
|
641
|
-
|
|
642
|
-
tags: The tags associated with the agent.
|
|
643
|
-
|
|
644
|
-
template: Whether the agent is a template
|
|
645
|
-
|
|
646
|
-
timezone: The timezone of the agent (IANA format).
|
|
647
|
-
|
|
648
|
-
tool_exec_environment_variables: Deprecated: use `secrets` field instead.
|
|
649
|
-
|
|
650
|
-
tool_ids: The ids of the tools used by the agent.
|
|
651
|
-
|
|
652
|
-
tool_rules: The tool rules governing the agent.
|
|
653
|
-
|
|
654
|
-
tools: The tools used by the agent.
|
|
655
|
-
|
|
656
|
-
extra_headers: Send extra headers
|
|
657
|
-
|
|
658
|
-
extra_query: Add additional query parameters to the request
|
|
659
|
-
|
|
660
|
-
extra_body: Add additional JSON properties to the request
|
|
661
|
-
|
|
662
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
663
|
-
"""
|
|
664
|
-
return await self._post(
|
|
665
|
-
"/v1/_internal_templates/agents",
|
|
666
|
-
body=await async_maybe_transform(
|
|
667
|
-
{
|
|
668
|
-
"base_template_id": base_template_id,
|
|
669
|
-
"deployment_id": deployment_id,
|
|
670
|
-
"entity_id": entity_id,
|
|
671
|
-
"template_id": template_id,
|
|
672
|
-
"agent_type": agent_type,
|
|
673
|
-
"block_ids": block_ids,
|
|
674
|
-
"context_window_limit": context_window_limit,
|
|
675
|
-
"description": description,
|
|
676
|
-
"embedding": embedding,
|
|
677
|
-
"embedding_chunk_size": embedding_chunk_size,
|
|
678
|
-
"embedding_config": embedding_config,
|
|
679
|
-
"enable_reasoner": enable_reasoner,
|
|
680
|
-
"enable_sleeptime": enable_sleeptime,
|
|
681
|
-
"from_template": from_template,
|
|
682
|
-
"hidden": hidden,
|
|
683
|
-
"identity_ids": identity_ids,
|
|
684
|
-
"include_base_tool_rules": include_base_tool_rules,
|
|
685
|
-
"include_base_tools": include_base_tools,
|
|
686
|
-
"include_default_source": include_default_source,
|
|
687
|
-
"include_multi_agent_tools": include_multi_agent_tools,
|
|
688
|
-
"initial_message_sequence": initial_message_sequence,
|
|
689
|
-
"llm_config": llm_config,
|
|
690
|
-
"max_files_open": max_files_open,
|
|
691
|
-
"max_reasoning_tokens": max_reasoning_tokens,
|
|
692
|
-
"max_tokens": max_tokens,
|
|
693
|
-
"memory_blocks": memory_blocks,
|
|
694
|
-
"memory_variables": memory_variables,
|
|
695
|
-
"message_buffer_autoclear": message_buffer_autoclear,
|
|
696
|
-
"metadata": metadata,
|
|
697
|
-
"model": model,
|
|
698
|
-
"name": name,
|
|
699
|
-
"per_file_view_window_char_limit": per_file_view_window_char_limit,
|
|
700
|
-
"project": project,
|
|
701
|
-
"project_id": project_id,
|
|
702
|
-
"reasoning": reasoning,
|
|
703
|
-
"response_format": response_format,
|
|
704
|
-
"secrets": secrets,
|
|
705
|
-
"source_ids": source_ids,
|
|
706
|
-
"system": system,
|
|
707
|
-
"tags": tags,
|
|
708
|
-
"template": template,
|
|
709
|
-
"timezone": timezone,
|
|
710
|
-
"tool_exec_environment_variables": tool_exec_environment_variables,
|
|
711
|
-
"tool_ids": tool_ids,
|
|
712
|
-
"tool_rules": tool_rules,
|
|
713
|
-
"tools": tools,
|
|
714
|
-
},
|
|
715
|
-
internal_template_create_agent_params.InternalTemplateCreateAgentParams,
|
|
716
|
-
),
|
|
717
|
-
options=make_request_options(
|
|
718
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
719
|
-
),
|
|
720
|
-
cast_to=AgentState,
|
|
721
|
-
)
|
|
722
|
-
|
|
723
|
-
async def create_block(
|
|
724
|
-
self,
|
|
725
|
-
*,
|
|
726
|
-
base_template_id: str,
|
|
727
|
-
deployment_id: str,
|
|
728
|
-
entity_id: str,
|
|
729
|
-
label: str,
|
|
730
|
-
template_id: str,
|
|
731
|
-
value: str,
|
|
732
|
-
description: Optional[str] | Omit = omit,
|
|
733
|
-
hidden: Optional[bool] | Omit = omit,
|
|
734
|
-
is_template: bool | Omit = omit,
|
|
735
|
-
limit: int | Omit = omit,
|
|
736
|
-
metadata: Optional[Dict[str, object]] | Omit = omit,
|
|
737
|
-
name: Optional[str] | Omit = omit,
|
|
738
|
-
preserve_on_migration: Optional[bool] | Omit = omit,
|
|
739
|
-
project_id: Optional[str] | Omit = omit,
|
|
740
|
-
read_only: bool | Omit = omit,
|
|
741
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
742
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
743
|
-
extra_headers: Headers | None = None,
|
|
744
|
-
extra_query: Query | None = None,
|
|
745
|
-
extra_body: Body | None = None,
|
|
746
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
747
|
-
) -> Block:
|
|
748
|
-
"""
|
|
749
|
-
Create a new block with template-related fields.
|
|
750
|
-
|
|
751
|
-
Args:
|
|
752
|
-
base_template_id: The id of the base template.
|
|
753
|
-
|
|
754
|
-
deployment_id: The id of the deployment.
|
|
755
|
-
|
|
756
|
-
entity_id: The id of the entity within the template.
|
|
757
|
-
|
|
758
|
-
label: Label of the block.
|
|
759
|
-
|
|
760
|
-
template_id: The id of the template.
|
|
761
|
-
|
|
762
|
-
value: Value of the block.
|
|
763
|
-
|
|
764
|
-
description: Description of the block.
|
|
765
|
-
|
|
766
|
-
hidden: If set to True, the block will be hidden.
|
|
767
|
-
|
|
768
|
-
limit: Character limit of the block.
|
|
769
|
-
|
|
770
|
-
metadata: Metadata of the block.
|
|
771
|
-
|
|
772
|
-
name: Name of the block if it is a template.
|
|
773
|
-
|
|
774
|
-
preserve_on_migration: Preserve the block on template migration.
|
|
775
|
-
|
|
776
|
-
project_id: The associated project id.
|
|
777
|
-
|
|
778
|
-
read_only: Whether the agent has read-only access to the block.
|
|
779
|
-
|
|
780
|
-
extra_headers: Send extra headers
|
|
781
|
-
|
|
782
|
-
extra_query: Add additional query parameters to the request
|
|
783
|
-
|
|
784
|
-
extra_body: Add additional JSON properties to the request
|
|
785
|
-
|
|
786
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
787
|
-
"""
|
|
788
|
-
return await self._post(
|
|
789
|
-
"/v1/_internal_templates/blocks",
|
|
790
|
-
body=await async_maybe_transform(
|
|
791
|
-
{
|
|
792
|
-
"base_template_id": base_template_id,
|
|
793
|
-
"deployment_id": deployment_id,
|
|
794
|
-
"entity_id": entity_id,
|
|
795
|
-
"label": label,
|
|
796
|
-
"template_id": template_id,
|
|
797
|
-
"value": value,
|
|
798
|
-
"description": description,
|
|
799
|
-
"hidden": hidden,
|
|
800
|
-
"is_template": is_template,
|
|
801
|
-
"limit": limit,
|
|
802
|
-
"metadata": metadata,
|
|
803
|
-
"name": name,
|
|
804
|
-
"preserve_on_migration": preserve_on_migration,
|
|
805
|
-
"project_id": project_id,
|
|
806
|
-
"read_only": read_only,
|
|
807
|
-
},
|
|
808
|
-
internal_template_create_block_params.InternalTemplateCreateBlockParams,
|
|
809
|
-
),
|
|
810
|
-
options=make_request_options(
|
|
811
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
812
|
-
),
|
|
813
|
-
cast_to=Block,
|
|
814
|
-
)
|
|
815
|
-
|
|
816
|
-
async def create_group(
|
|
817
|
-
self,
|
|
818
|
-
*,
|
|
819
|
-
agent_ids: SequenceNotStr[str],
|
|
820
|
-
base_template_id: str,
|
|
821
|
-
deployment_id: str,
|
|
822
|
-
description: str,
|
|
823
|
-
template_id: str,
|
|
824
|
-
hidden: Optional[bool] | Omit = omit,
|
|
825
|
-
manager_config: internal_template_create_group_params.ManagerConfig | Omit = omit,
|
|
826
|
-
project_id: Optional[str] | Omit = omit,
|
|
827
|
-
shared_block_ids: SequenceNotStr[str] | Omit = omit,
|
|
828
|
-
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
829
|
-
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
830
|
-
extra_headers: Headers | None = None,
|
|
831
|
-
extra_query: Query | None = None,
|
|
832
|
-
extra_body: Body | None = None,
|
|
833
|
-
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
834
|
-
) -> Group:
|
|
835
|
-
"""
|
|
836
|
-
Create a new multi-agent group with the specified configuration.
|
|
837
|
-
|
|
838
|
-
Args:
|
|
839
|
-
agent_ids
|
|
840
|
-
|
|
841
|
-
base_template_id: The id of the base template.
|
|
842
|
-
|
|
843
|
-
deployment_id: The id of the deployment.
|
|
844
|
-
|
|
845
|
-
description
|
|
846
|
-
|
|
847
|
-
template_id: The id of the template.
|
|
848
|
-
|
|
849
|
-
hidden: If set to True, the group will be hidden.
|
|
850
|
-
|
|
851
|
-
manager_config
|
|
852
|
-
|
|
853
|
-
project_id: The associated project id.
|
|
854
|
-
|
|
855
|
-
shared_block_ids
|
|
856
|
-
|
|
857
|
-
extra_headers: Send extra headers
|
|
858
|
-
|
|
859
|
-
extra_query: Add additional query parameters to the request
|
|
860
|
-
|
|
861
|
-
extra_body: Add additional JSON properties to the request
|
|
862
|
-
|
|
863
|
-
timeout: Override the client-level default timeout for this request, in seconds
|
|
864
|
-
"""
|
|
865
|
-
return await self._post(
|
|
866
|
-
"/v1/_internal_templates/groups",
|
|
867
|
-
body=await async_maybe_transform(
|
|
868
|
-
{
|
|
869
|
-
"agent_ids": agent_ids,
|
|
870
|
-
"base_template_id": base_template_id,
|
|
871
|
-
"deployment_id": deployment_id,
|
|
872
|
-
"description": description,
|
|
873
|
-
"template_id": template_id,
|
|
874
|
-
"hidden": hidden,
|
|
875
|
-
"manager_config": manager_config,
|
|
876
|
-
"project_id": project_id,
|
|
877
|
-
"shared_block_ids": shared_block_ids,
|
|
878
|
-
},
|
|
879
|
-
internal_template_create_group_params.InternalTemplateCreateGroupParams,
|
|
880
|
-
),
|
|
881
|
-
options=make_request_options(
|
|
882
|
-
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
883
|
-
),
|
|
884
|
-
cast_to=Group,
|
|
885
|
-
)
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
class _InternalTemplatesResourceWithRawResponse:
|
|
889
|
-
def __init__(self, _internal_templates: _InternalTemplatesResource) -> None:
|
|
890
|
-
self.__internal_templates = _internal_templates
|
|
891
|
-
|
|
892
|
-
self.create_agent = to_raw_response_wrapper(
|
|
893
|
-
_internal_templates.create_agent,
|
|
894
|
-
)
|
|
895
|
-
self.create_block = to_raw_response_wrapper(
|
|
896
|
-
_internal_templates.create_block,
|
|
897
|
-
)
|
|
898
|
-
self.create_group = to_raw_response_wrapper(
|
|
899
|
-
_internal_templates.create_group,
|
|
900
|
-
)
|
|
901
|
-
|
|
902
|
-
@cached_property
|
|
903
|
-
def deployment(self) -> DeploymentResourceWithRawResponse:
|
|
904
|
-
return DeploymentResourceWithRawResponse(self.__internal_templates.deployment)
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
class AsyncInternalTemplatesResourceWithRawResponse:
|
|
908
|
-
def __init__(self, _internal_templates: AsyncInternalTemplatesResource) -> None:
|
|
909
|
-
self.__internal_templates = _internal_templates
|
|
910
|
-
|
|
911
|
-
self.create_agent = async_to_raw_response_wrapper(
|
|
912
|
-
_internal_templates.create_agent,
|
|
913
|
-
)
|
|
914
|
-
self.create_block = async_to_raw_response_wrapper(
|
|
915
|
-
_internal_templates.create_block,
|
|
916
|
-
)
|
|
917
|
-
self.create_group = async_to_raw_response_wrapper(
|
|
918
|
-
_internal_templates.create_group,
|
|
919
|
-
)
|
|
920
|
-
|
|
921
|
-
@cached_property
|
|
922
|
-
def deployment(self) -> AsyncDeploymentResourceWithRawResponse:
|
|
923
|
-
return AsyncDeploymentResourceWithRawResponse(self.__internal_templates.deployment)
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
class _InternalTemplatesResourceWithStreamingResponse:
|
|
927
|
-
def __init__(self, _internal_templates: _InternalTemplatesResource) -> None:
|
|
928
|
-
self.__internal_templates = _internal_templates
|
|
929
|
-
|
|
930
|
-
self.create_agent = to_streamed_response_wrapper(
|
|
931
|
-
_internal_templates.create_agent,
|
|
932
|
-
)
|
|
933
|
-
self.create_block = to_streamed_response_wrapper(
|
|
934
|
-
_internal_templates.create_block,
|
|
935
|
-
)
|
|
936
|
-
self.create_group = to_streamed_response_wrapper(
|
|
937
|
-
_internal_templates.create_group,
|
|
938
|
-
)
|
|
939
|
-
|
|
940
|
-
@cached_property
|
|
941
|
-
def deployment(self) -> DeploymentResourceWithStreamingResponse:
|
|
942
|
-
return DeploymentResourceWithStreamingResponse(self.__internal_templates.deployment)
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
class AsyncInternalTemplatesResourceWithStreamingResponse:
|
|
946
|
-
def __init__(self, _internal_templates: AsyncInternalTemplatesResource) -> None:
|
|
947
|
-
self.__internal_templates = _internal_templates
|
|
948
|
-
|
|
949
|
-
self.create_agent = async_to_streamed_response_wrapper(
|
|
950
|
-
_internal_templates.create_agent,
|
|
951
|
-
)
|
|
952
|
-
self.create_block = async_to_streamed_response_wrapper(
|
|
953
|
-
_internal_templates.create_block,
|
|
954
|
-
)
|
|
955
|
-
self.create_group = async_to_streamed_response_wrapper(
|
|
956
|
-
_internal_templates.create_group,
|
|
957
|
-
)
|
|
958
|
-
|
|
959
|
-
@cached_property
|
|
960
|
-
def deployment(self) -> AsyncDeploymentResourceWithStreamingResponse:
|
|
961
|
-
return AsyncDeploymentResourceWithStreamingResponse(self.__internal_templates.deployment)
|