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
|
@@ -3,24 +3,25 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Dict, Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
8
9
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
13
|
-
from
|
|
10
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
12
|
+
from ..._compat import cached_property
|
|
13
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
14
|
+
from ..._response import (
|
|
14
15
|
to_raw_response_wrapper,
|
|
15
16
|
to_streamed_response_wrapper,
|
|
16
17
|
async_to_raw_response_wrapper,
|
|
17
18
|
async_to_streamed_response_wrapper,
|
|
18
19
|
)
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
20
|
+
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.agents import block_list_params, block_update_params
|
|
22
|
+
from ...types.agent_state import AgentState
|
|
23
|
+
from ...types.agents.block import Block
|
|
24
|
+
from ...types.agents.block_list_response import BlockListResponse
|
|
24
25
|
|
|
25
26
|
__all__ = ["BlocksResource", "AsyncBlocksResource"]
|
|
26
27
|
|
|
@@ -61,6 +62,8 @@ class BlocksResource(SyncAPIResource):
|
|
|
61
62
|
Retrieve a core memory block from an agent.
|
|
62
63
|
|
|
63
64
|
Args:
|
|
65
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
66
|
+
|
|
64
67
|
extra_headers: Send extra headers
|
|
65
68
|
|
|
66
69
|
extra_query: Add additional query parameters to the request
|
|
@@ -111,6 +114,8 @@ class BlocksResource(SyncAPIResource):
|
|
|
111
114
|
Updates a core memory block of an agent.
|
|
112
115
|
|
|
113
116
|
Args:
|
|
117
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
118
|
+
|
|
114
119
|
base_template_id: The base template id of the block.
|
|
115
120
|
|
|
116
121
|
deployment_id: The id of the deployment.
|
|
@@ -182,6 +187,11 @@ class BlocksResource(SyncAPIResource):
|
|
|
182
187
|
self,
|
|
183
188
|
agent_id: str,
|
|
184
189
|
*,
|
|
190
|
+
after: Optional[str] | Omit = omit,
|
|
191
|
+
before: Optional[str] | Omit = omit,
|
|
192
|
+
limit: Optional[int] | Omit = omit,
|
|
193
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
194
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
185
195
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
186
196
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
187
197
|
extra_headers: Headers | None = None,
|
|
@@ -193,6 +203,21 @@ class BlocksResource(SyncAPIResource):
|
|
|
193
203
|
Retrieve the core memory blocks of a specific agent.
|
|
194
204
|
|
|
195
205
|
Args:
|
|
206
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
207
|
+
|
|
208
|
+
after: Block ID cursor for pagination. Returns blocks that come after this block ID in
|
|
209
|
+
the specified sort order
|
|
210
|
+
|
|
211
|
+
before: Block ID cursor for pagination. Returns blocks that come before this block ID in
|
|
212
|
+
the specified sort order
|
|
213
|
+
|
|
214
|
+
limit: Maximum number of blocks to return
|
|
215
|
+
|
|
216
|
+
order: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for
|
|
217
|
+
newest first
|
|
218
|
+
|
|
219
|
+
order_by: Field to sort by
|
|
220
|
+
|
|
196
221
|
extra_headers: Send extra headers
|
|
197
222
|
|
|
198
223
|
extra_query: Add additional query parameters to the request
|
|
@@ -206,7 +231,20 @@ class BlocksResource(SyncAPIResource):
|
|
|
206
231
|
return self._get(
|
|
207
232
|
f"/v1/agents/{agent_id}/core-memory/blocks",
|
|
208
233
|
options=make_request_options(
|
|
209
|
-
extra_headers=extra_headers,
|
|
234
|
+
extra_headers=extra_headers,
|
|
235
|
+
extra_query=extra_query,
|
|
236
|
+
extra_body=extra_body,
|
|
237
|
+
timeout=timeout,
|
|
238
|
+
query=maybe_transform(
|
|
239
|
+
{
|
|
240
|
+
"after": after,
|
|
241
|
+
"before": before,
|
|
242
|
+
"limit": limit,
|
|
243
|
+
"order": order,
|
|
244
|
+
"order_by": order_by,
|
|
245
|
+
},
|
|
246
|
+
block_list_params.BlockListParams,
|
|
247
|
+
),
|
|
210
248
|
),
|
|
211
249
|
cast_to=BlockListResponse,
|
|
212
250
|
)
|
|
@@ -227,6 +265,10 @@ class BlocksResource(SyncAPIResource):
|
|
|
227
265
|
Attach a core memory block to an agent.
|
|
228
266
|
|
|
229
267
|
Args:
|
|
268
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
269
|
+
|
|
270
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
271
|
+
|
|
230
272
|
extra_headers: Send extra headers
|
|
231
273
|
|
|
232
274
|
extra_query: Add additional query parameters to the request
|
|
@@ -263,6 +305,10 @@ class BlocksResource(SyncAPIResource):
|
|
|
263
305
|
Detach a core memory block from an agent.
|
|
264
306
|
|
|
265
307
|
Args:
|
|
308
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
309
|
+
|
|
310
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
311
|
+
|
|
266
312
|
extra_headers: Send extra headers
|
|
267
313
|
|
|
268
314
|
extra_query: Add additional query parameters to the request
|
|
@@ -320,6 +366,8 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
320
366
|
Retrieve a core memory block from an agent.
|
|
321
367
|
|
|
322
368
|
Args:
|
|
369
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
370
|
+
|
|
323
371
|
extra_headers: Send extra headers
|
|
324
372
|
|
|
325
373
|
extra_query: Add additional query parameters to the request
|
|
@@ -370,6 +418,8 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
370
418
|
Updates a core memory block of an agent.
|
|
371
419
|
|
|
372
420
|
Args:
|
|
421
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
422
|
+
|
|
373
423
|
base_template_id: The base template id of the block.
|
|
374
424
|
|
|
375
425
|
deployment_id: The id of the deployment.
|
|
@@ -441,6 +491,11 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
441
491
|
self,
|
|
442
492
|
agent_id: str,
|
|
443
493
|
*,
|
|
494
|
+
after: Optional[str] | Omit = omit,
|
|
495
|
+
before: Optional[str] | Omit = omit,
|
|
496
|
+
limit: Optional[int] | Omit = omit,
|
|
497
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
498
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
444
499
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
445
500
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
446
501
|
extra_headers: Headers | None = None,
|
|
@@ -452,6 +507,21 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
452
507
|
Retrieve the core memory blocks of a specific agent.
|
|
453
508
|
|
|
454
509
|
Args:
|
|
510
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
511
|
+
|
|
512
|
+
after: Block ID cursor for pagination. Returns blocks that come after this block ID in
|
|
513
|
+
the specified sort order
|
|
514
|
+
|
|
515
|
+
before: Block ID cursor for pagination. Returns blocks that come before this block ID in
|
|
516
|
+
the specified sort order
|
|
517
|
+
|
|
518
|
+
limit: Maximum number of blocks to return
|
|
519
|
+
|
|
520
|
+
order: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for
|
|
521
|
+
newest first
|
|
522
|
+
|
|
523
|
+
order_by: Field to sort by
|
|
524
|
+
|
|
455
525
|
extra_headers: Send extra headers
|
|
456
526
|
|
|
457
527
|
extra_query: Add additional query parameters to the request
|
|
@@ -465,7 +535,20 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
465
535
|
return await self._get(
|
|
466
536
|
f"/v1/agents/{agent_id}/core-memory/blocks",
|
|
467
537
|
options=make_request_options(
|
|
468
|
-
extra_headers=extra_headers,
|
|
538
|
+
extra_headers=extra_headers,
|
|
539
|
+
extra_query=extra_query,
|
|
540
|
+
extra_body=extra_body,
|
|
541
|
+
timeout=timeout,
|
|
542
|
+
query=await async_maybe_transform(
|
|
543
|
+
{
|
|
544
|
+
"after": after,
|
|
545
|
+
"before": before,
|
|
546
|
+
"limit": limit,
|
|
547
|
+
"order": order,
|
|
548
|
+
"order_by": order_by,
|
|
549
|
+
},
|
|
550
|
+
block_list_params.BlockListParams,
|
|
551
|
+
),
|
|
469
552
|
),
|
|
470
553
|
cast_to=BlockListResponse,
|
|
471
554
|
)
|
|
@@ -486,6 +569,10 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
486
569
|
Attach a core memory block to an agent.
|
|
487
570
|
|
|
488
571
|
Args:
|
|
572
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
573
|
+
|
|
574
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
575
|
+
|
|
489
576
|
extra_headers: Send extra headers
|
|
490
577
|
|
|
491
578
|
extra_query: Add additional query parameters to the request
|
|
@@ -522,6 +609,10 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
522
609
|
Detach a core memory block from an agent.
|
|
523
610
|
|
|
524
611
|
Args:
|
|
612
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
613
|
+
|
|
614
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
615
|
+
|
|
525
616
|
extra_headers: Send extra headers
|
|
526
617
|
|
|
527
618
|
extra_query: Add additional query parameters to the request
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
5
|
from typing import Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
6
7
|
|
|
7
8
|
import httpx
|
|
8
9
|
|
|
@@ -49,9 +50,13 @@ class FilesResource(SyncAPIResource):
|
|
|
49
50
|
self,
|
|
50
51
|
agent_id: str,
|
|
51
52
|
*,
|
|
53
|
+
after: Optional[str] | Omit = omit,
|
|
54
|
+
before: Optional[str] | Omit = omit,
|
|
52
55
|
cursor: Optional[str] | Omit = omit,
|
|
53
56
|
is_open: Optional[bool] | Omit = omit,
|
|
54
|
-
limit: int | Omit = omit,
|
|
57
|
+
limit: Optional[int] | Omit = omit,
|
|
58
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
59
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
55
60
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
56
61
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
57
62
|
extra_headers: Headers | None = None,
|
|
@@ -60,14 +65,27 @@ class FilesResource(SyncAPIResource):
|
|
|
60
65
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
61
66
|
) -> FileListResponse:
|
|
62
67
|
"""
|
|
63
|
-
Get the files attached to an agent with their open/closed status
|
|
68
|
+
Get the files attached to an agent with their open/closed status.
|
|
64
69
|
|
|
65
70
|
Args:
|
|
66
|
-
|
|
71
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
72
|
+
|
|
73
|
+
after: File ID cursor for pagination. Returns files that come after this file ID in the
|
|
74
|
+
specified sort order
|
|
75
|
+
|
|
76
|
+
before: File ID cursor for pagination. Returns files that come before this file ID in
|
|
77
|
+
the specified sort order
|
|
78
|
+
|
|
79
|
+
cursor: Pagination cursor from previous response (deprecated, use before/after)
|
|
67
80
|
|
|
68
81
|
is_open: Filter by open status (true for open files, false for closed files)
|
|
69
82
|
|
|
70
|
-
limit:
|
|
83
|
+
limit: Maximum number of files to return
|
|
84
|
+
|
|
85
|
+
order: Sort order for files by creation time. 'asc' for oldest first, 'desc' for newest
|
|
86
|
+
first
|
|
87
|
+
|
|
88
|
+
order_by: Field to sort by
|
|
71
89
|
|
|
72
90
|
extra_headers: Send extra headers
|
|
73
91
|
|
|
@@ -88,9 +106,13 @@ class FilesResource(SyncAPIResource):
|
|
|
88
106
|
timeout=timeout,
|
|
89
107
|
query=maybe_transform(
|
|
90
108
|
{
|
|
109
|
+
"after": after,
|
|
110
|
+
"before": before,
|
|
91
111
|
"cursor": cursor,
|
|
92
112
|
"is_open": is_open,
|
|
93
113
|
"limit": limit,
|
|
114
|
+
"order": order,
|
|
115
|
+
"order_by": order_by,
|
|
94
116
|
},
|
|
95
117
|
file_list_params.FileListParams,
|
|
96
118
|
),
|
|
@@ -117,6 +139,10 @@ class FilesResource(SyncAPIResource):
|
|
|
117
139
|
file will be removed from the agent's working memory view.
|
|
118
140
|
|
|
119
141
|
Args:
|
|
142
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
143
|
+
|
|
144
|
+
file_id: The ID of the file in the format 'file-<uuid4>'
|
|
145
|
+
|
|
120
146
|
extra_headers: Send extra headers
|
|
121
147
|
|
|
122
148
|
extra_query: Add additional query parameters to the request
|
|
@@ -155,6 +181,8 @@ class FilesResource(SyncAPIResource):
|
|
|
155
181
|
as open. Typically used to reset the working memory view for the agent.
|
|
156
182
|
|
|
157
183
|
Args:
|
|
184
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
185
|
+
|
|
158
186
|
extra_headers: Send extra headers
|
|
159
187
|
|
|
160
188
|
extra_query: Add additional query parameters to the request
|
|
@@ -193,6 +221,10 @@ class FilesResource(SyncAPIResource):
|
|
|
193
221
|
names that were closed due to LRU eviction.
|
|
194
222
|
|
|
195
223
|
Args:
|
|
224
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
225
|
+
|
|
226
|
+
file_id: The ID of the file in the format 'file-<uuid4>'
|
|
227
|
+
|
|
196
228
|
extra_headers: Send extra headers
|
|
197
229
|
|
|
198
230
|
extra_query: Add additional query parameters to the request
|
|
@@ -238,9 +270,13 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
238
270
|
self,
|
|
239
271
|
agent_id: str,
|
|
240
272
|
*,
|
|
273
|
+
after: Optional[str] | Omit = omit,
|
|
274
|
+
before: Optional[str] | Omit = omit,
|
|
241
275
|
cursor: Optional[str] | Omit = omit,
|
|
242
276
|
is_open: Optional[bool] | Omit = omit,
|
|
243
|
-
limit: int | Omit = omit,
|
|
277
|
+
limit: Optional[int] | Omit = omit,
|
|
278
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
279
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
244
280
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
245
281
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
246
282
|
extra_headers: Headers | None = None,
|
|
@@ -249,14 +285,27 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
249
285
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
250
286
|
) -> FileListResponse:
|
|
251
287
|
"""
|
|
252
|
-
Get the files attached to an agent with their open/closed status
|
|
288
|
+
Get the files attached to an agent with their open/closed status.
|
|
253
289
|
|
|
254
290
|
Args:
|
|
255
|
-
|
|
291
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
292
|
+
|
|
293
|
+
after: File ID cursor for pagination. Returns files that come after this file ID in the
|
|
294
|
+
specified sort order
|
|
295
|
+
|
|
296
|
+
before: File ID cursor for pagination. Returns files that come before this file ID in
|
|
297
|
+
the specified sort order
|
|
298
|
+
|
|
299
|
+
cursor: Pagination cursor from previous response (deprecated, use before/after)
|
|
256
300
|
|
|
257
301
|
is_open: Filter by open status (true for open files, false for closed files)
|
|
258
302
|
|
|
259
|
-
limit:
|
|
303
|
+
limit: Maximum number of files to return
|
|
304
|
+
|
|
305
|
+
order: Sort order for files by creation time. 'asc' for oldest first, 'desc' for newest
|
|
306
|
+
first
|
|
307
|
+
|
|
308
|
+
order_by: Field to sort by
|
|
260
309
|
|
|
261
310
|
extra_headers: Send extra headers
|
|
262
311
|
|
|
@@ -277,9 +326,13 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
277
326
|
timeout=timeout,
|
|
278
327
|
query=await async_maybe_transform(
|
|
279
328
|
{
|
|
329
|
+
"after": after,
|
|
330
|
+
"before": before,
|
|
280
331
|
"cursor": cursor,
|
|
281
332
|
"is_open": is_open,
|
|
282
333
|
"limit": limit,
|
|
334
|
+
"order": order,
|
|
335
|
+
"order_by": order_by,
|
|
283
336
|
},
|
|
284
337
|
file_list_params.FileListParams,
|
|
285
338
|
),
|
|
@@ -306,6 +359,10 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
306
359
|
file will be removed from the agent's working memory view.
|
|
307
360
|
|
|
308
361
|
Args:
|
|
362
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
363
|
+
|
|
364
|
+
file_id: The ID of the file in the format 'file-<uuid4>'
|
|
365
|
+
|
|
309
366
|
extra_headers: Send extra headers
|
|
310
367
|
|
|
311
368
|
extra_query: Add additional query parameters to the request
|
|
@@ -344,6 +401,8 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
344
401
|
as open. Typically used to reset the working memory view for the agent.
|
|
345
402
|
|
|
346
403
|
Args:
|
|
404
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
405
|
+
|
|
347
406
|
extra_headers: Send extra headers
|
|
348
407
|
|
|
349
408
|
extra_query: Add additional query parameters to the request
|
|
@@ -382,6 +441,10 @@ class AsyncFilesResource(AsyncAPIResource):
|
|
|
382
441
|
names that were closed due to LRU eviction.
|
|
383
442
|
|
|
384
443
|
Args:
|
|
444
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
445
|
+
|
|
446
|
+
file_id: The ID of the file in the format 'file-<uuid4>'
|
|
447
|
+
|
|
385
448
|
extra_headers: Send extra headers
|
|
386
449
|
|
|
387
450
|
extra_query: Add additional query parameters to the request
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
from typing import Optional
|
|
6
|
+
from typing_extensions import Literal
|
|
7
|
+
|
|
5
8
|
import httpx
|
|
6
9
|
|
|
7
|
-
from ..._types import Body, Query, Headers, NotGiven, not_given
|
|
10
|
+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
|
|
11
|
+
from ..._utils import maybe_transform, async_maybe_transform
|
|
8
12
|
from ..._compat import cached_property
|
|
9
13
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
14
|
from ..._response import (
|
|
@@ -14,6 +18,7 @@ from ..._response import (
|
|
|
14
18
|
async_to_streamed_response_wrapper,
|
|
15
19
|
)
|
|
16
20
|
from ..._base_client import make_request_options
|
|
21
|
+
from ...types.agents import folder_list_params
|
|
17
22
|
from ...types.agent_state import AgentState
|
|
18
23
|
from ...types.agents.folder_list_response import FolderListResponse
|
|
19
24
|
|
|
@@ -44,6 +49,11 @@ class FoldersResource(SyncAPIResource):
|
|
|
44
49
|
self,
|
|
45
50
|
agent_id: str,
|
|
46
51
|
*,
|
|
52
|
+
after: Optional[str] | Omit = omit,
|
|
53
|
+
before: Optional[str] | Omit = omit,
|
|
54
|
+
limit: Optional[int] | Omit = omit,
|
|
55
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
56
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
47
57
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
58
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
59
|
extra_headers: Headers | None = None,
|
|
@@ -55,6 +65,21 @@ class FoldersResource(SyncAPIResource):
|
|
|
55
65
|
Get the folders associated with an agent.
|
|
56
66
|
|
|
57
67
|
Args:
|
|
68
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
69
|
+
|
|
70
|
+
after: Source ID cursor for pagination. Returns sources that come after this source ID
|
|
71
|
+
in the specified sort order
|
|
72
|
+
|
|
73
|
+
before: Source ID cursor for pagination. Returns sources that come before this source ID
|
|
74
|
+
in the specified sort order
|
|
75
|
+
|
|
76
|
+
limit: Maximum number of sources to return
|
|
77
|
+
|
|
78
|
+
order: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for
|
|
79
|
+
newest first
|
|
80
|
+
|
|
81
|
+
order_by: Field to sort by
|
|
82
|
+
|
|
58
83
|
extra_headers: Send extra headers
|
|
59
84
|
|
|
60
85
|
extra_query: Add additional query parameters to the request
|
|
@@ -68,7 +93,20 @@ class FoldersResource(SyncAPIResource):
|
|
|
68
93
|
return self._get(
|
|
69
94
|
f"/v1/agents/{agent_id}/folders",
|
|
70
95
|
options=make_request_options(
|
|
71
|
-
extra_headers=extra_headers,
|
|
96
|
+
extra_headers=extra_headers,
|
|
97
|
+
extra_query=extra_query,
|
|
98
|
+
extra_body=extra_body,
|
|
99
|
+
timeout=timeout,
|
|
100
|
+
query=maybe_transform(
|
|
101
|
+
{
|
|
102
|
+
"after": after,
|
|
103
|
+
"before": before,
|
|
104
|
+
"limit": limit,
|
|
105
|
+
"order": order,
|
|
106
|
+
"order_by": order_by,
|
|
107
|
+
},
|
|
108
|
+
folder_list_params.FolderListParams,
|
|
109
|
+
),
|
|
72
110
|
),
|
|
73
111
|
cast_to=FolderListResponse,
|
|
74
112
|
)
|
|
@@ -89,6 +127,10 @@ class FoldersResource(SyncAPIResource):
|
|
|
89
127
|
Attach a folder to an agent.
|
|
90
128
|
|
|
91
129
|
Args:
|
|
130
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
131
|
+
|
|
132
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
133
|
+
|
|
92
134
|
extra_headers: Send extra headers
|
|
93
135
|
|
|
94
136
|
extra_query: Add additional query parameters to the request
|
|
@@ -125,6 +167,10 @@ class FoldersResource(SyncAPIResource):
|
|
|
125
167
|
Detach a folder from an agent.
|
|
126
168
|
|
|
127
169
|
Args:
|
|
170
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
171
|
+
|
|
172
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
173
|
+
|
|
128
174
|
extra_headers: Send extra headers
|
|
129
175
|
|
|
130
176
|
extra_query: Add additional query parameters to the request
|
|
@@ -170,6 +216,11 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
170
216
|
self,
|
|
171
217
|
agent_id: str,
|
|
172
218
|
*,
|
|
219
|
+
after: Optional[str] | Omit = omit,
|
|
220
|
+
before: Optional[str] | Omit = omit,
|
|
221
|
+
limit: Optional[int] | Omit = omit,
|
|
222
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
223
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
173
224
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
174
225
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
175
226
|
extra_headers: Headers | None = None,
|
|
@@ -181,6 +232,21 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
181
232
|
Get the folders associated with an agent.
|
|
182
233
|
|
|
183
234
|
Args:
|
|
235
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
236
|
+
|
|
237
|
+
after: Source ID cursor for pagination. Returns sources that come after this source ID
|
|
238
|
+
in the specified sort order
|
|
239
|
+
|
|
240
|
+
before: Source ID cursor for pagination. Returns sources that come before this source ID
|
|
241
|
+
in the specified sort order
|
|
242
|
+
|
|
243
|
+
limit: Maximum number of sources to return
|
|
244
|
+
|
|
245
|
+
order: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for
|
|
246
|
+
newest first
|
|
247
|
+
|
|
248
|
+
order_by: Field to sort by
|
|
249
|
+
|
|
184
250
|
extra_headers: Send extra headers
|
|
185
251
|
|
|
186
252
|
extra_query: Add additional query parameters to the request
|
|
@@ -194,7 +260,20 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
194
260
|
return await self._get(
|
|
195
261
|
f"/v1/agents/{agent_id}/folders",
|
|
196
262
|
options=make_request_options(
|
|
197
|
-
extra_headers=extra_headers,
|
|
263
|
+
extra_headers=extra_headers,
|
|
264
|
+
extra_query=extra_query,
|
|
265
|
+
extra_body=extra_body,
|
|
266
|
+
timeout=timeout,
|
|
267
|
+
query=await async_maybe_transform(
|
|
268
|
+
{
|
|
269
|
+
"after": after,
|
|
270
|
+
"before": before,
|
|
271
|
+
"limit": limit,
|
|
272
|
+
"order": order,
|
|
273
|
+
"order_by": order_by,
|
|
274
|
+
},
|
|
275
|
+
folder_list_params.FolderListParams,
|
|
276
|
+
),
|
|
198
277
|
),
|
|
199
278
|
cast_to=FolderListResponse,
|
|
200
279
|
)
|
|
@@ -215,6 +294,10 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
215
294
|
Attach a folder to an agent.
|
|
216
295
|
|
|
217
296
|
Args:
|
|
297
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
298
|
+
|
|
299
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
300
|
+
|
|
218
301
|
extra_headers: Send extra headers
|
|
219
302
|
|
|
220
303
|
extra_query: Add additional query parameters to the request
|
|
@@ -251,6 +334,10 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
251
334
|
Detach a folder from an agent.
|
|
252
335
|
|
|
253
336
|
Args:
|
|
337
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
338
|
+
|
|
339
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
340
|
+
|
|
254
341
|
extra_headers: Send extra headers
|
|
255
342
|
|
|
256
343
|
extra_query: Add additional query parameters to the request
|