letta-client 1.0.0a6__py3-none-any.whl → 1.0.0a8__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- {letta_sdk → letta_client}/__init__.py +8 -8
- {letta_sdk → letta_client}/_base_client.py +1 -1
- {letta_sdk → letta_client}/_client.py +124 -171
- {letta_sdk → letta_client}/_exceptions.py +2 -2
- {letta_sdk → letta_client}/_resource.py +5 -5
- {letta_sdk → letta_client}/_response.py +8 -6
- {letta_sdk → letta_client}/_streaming.py +3 -3
- {letta_sdk → letta_client}/_types.py +1 -1
- {letta_sdk → letta_client}/_utils/_logs.py +3 -3
- {letta_sdk → letta_client}/_utils/_resources_proxy.py +4 -4
- {letta_sdk → letta_client}/_version.py +2 -2
- letta_client/pagination.py +107 -0
- {letta_sdk → letta_client}/resources/__init__.py +14 -154
- {letta_sdk → letta_client}/resources/agents/__init__.py +28 -42
- {letta_sdk → letta_client}/resources/agents/agents.py +228 -744
- {letta_sdk/resources/agents/core_memory → letta_client/resources/agents}/blocks.py +112 -19
- {letta_sdk → letta_client}/resources/agents/files.py +71 -8
- {letta_sdk → letta_client}/resources/agents/folders.py +101 -11
- letta_client/resources/agents/groups.py +245 -0
- {letta_sdk → letta_client}/resources/agents/messages.py +265 -490
- {letta_sdk → letta_client}/resources/agents/tools.py +147 -31
- letta_sdk/resources/jobs.py → letta_client/resources/archives.py +268 -280
- {letta_sdk/resources/messages → letta_client/resources/batches}/batches.py +46 -161
- letta_client/resources/batches/messages.py +238 -0
- {letta_sdk/resources/agents/core_memory → letta_client/resources/blocks}/__init__.py +14 -14
- letta_client/resources/blocks/agents.py +287 -0
- {letta_sdk/resources → letta_client/resources/blocks}/blocks.py +64 -175
- letta_client/resources/folders/__init__.py +47 -0
- letta_client/resources/folders/agents.py +237 -0
- letta_client/resources/folders/files.py +472 -0
- letta_sdk/resources/providers.py → letta_client/resources/folders/folders.py +298 -313
- {letta_sdk → letta_client}/resources/groups/groups.py +24 -88
- {letta_sdk → letta_client}/resources/groups/messages.py +178 -37
- letta_client/resources/identities/__init__.py +61 -0
- letta_client/resources/identities/agents.py +269 -0
- letta_client/resources/identities/blocks.py +237 -0
- {letta_sdk/resources → letta_client/resources/identities}/identities.py +277 -533
- letta_client/resources/identities/properties.py +174 -0
- letta_client/resources/models/__init__.py +33 -0
- {letta_sdk/resources → letta_client/resources/models}/embeddings.py +26 -49
- {letta_sdk/resources → letta_client/resources/models}/models.py +42 -117
- letta_client/resources/runs/__init__.py +61 -0
- letta_sdk/resources/archives.py → letta_client/resources/runs/messages.py +189 -157
- letta_client/resources/runs/runs.py +462 -0
- letta_client/resources/runs/steps.py +229 -0
- letta_sdk/resources/voice_beta/chat.py → letta_client/resources/runs/usage.py +50 -57
- letta_client/resources/steps/__init__.py +75 -0
- letta_client/resources/steps/feedback.py +198 -0
- letta_client/resources/steps/messages.py +237 -0
- letta_client/resources/steps/metrics.py +167 -0
- letta_client/resources/steps/steps.py +513 -0
- letta_sdk/resources/telemetry.py → letta_client/resources/steps/trace.py +45 -56
- {letta_sdk → letta_client}/resources/tags.py +13 -10
- letta_client/resources/templates/__init__.py +33 -0
- letta_client/resources/templates/agents.py +236 -0
- letta_client/resources/templates/templates.py +102 -0
- {letta_sdk/resources/tools → letta_client/resources}/tools.py +249 -433
- letta_client/types/__init__.py +111 -0
- {letta_sdk → letta_client}/types/agent_create_params.py +5 -2
- {letta_sdk → letta_client}/types/agent_environment_variable.py +3 -0
- letta_client/types/agent_export_file_params.py +18 -0
- letta_sdk/types/agent_export_response.py → letta_client/types/agent_export_file_response.py +2 -2
- letta_sdk/types/agent_import_params.py → letta_client/types/agent_import_file_params.py +5 -2
- letta_sdk/types/agent_import_response.py → letta_client/types/agent_import_file_response.py +2 -2
- {letta_sdk → letta_client}/types/agent_list_params.py +19 -2
- {letta_sdk → letta_client}/types/agent_retrieve_params.py +20 -3
- {letta_sdk → letta_client}/types/agent_state.py +131 -3
- {letta_sdk → letta_client}/types/agent_type.py +1 -0
- {letta_sdk → letta_client}/types/agent_update_params.py +12 -0
- {letta_sdk → letta_client}/types/agents/__init__.py +10 -21
- letta_client/types/agents/approval_create_param.py +44 -0
- {letta_sdk → letta_client}/types/agents/approval_request_message.py +10 -2
- letta_client/types/agents/approval_response_message.py +63 -0
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block.py +1 -1
- letta_sdk/types/identity_list_blocks_params.py → letta_client/types/agents/block_list_params.py +2 -2
- {letta_sdk/types/agents/core_memory → letta_client/types/agents}/block_update_params.py +1 -0
- letta_client/types/agents/file_list_params.py +40 -0
- letta_client/types/agents/folder_list_params.py +34 -0
- letta_sdk/types/source.py → letta_client/types/agents/folder_list_response.py +5 -5
- letta_client/types/agents/group_list_params.py +37 -0
- {letta_sdk → letta_client}/types/agents/letta_assistant_message_content_union.py +3 -0
- {letta_sdk → letta_client}/types/agents/letta_assistant_message_content_union_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/letta_response.py +0 -4
- {letta_sdk → letta_client}/types/agents/message.py +93 -2
- {letta_sdk → letta_client}/types/agents/message_list_params.py +20 -5
- letta_sdk/types/agent_reset_messages_params.py → letta_client/types/agents/message_reset_params.py +2 -2
- {letta_sdk → letta_client}/types/agents/message_send_async_params.py +12 -3
- {letta_sdk → letta_client}/types/agents/message_send_params.py +12 -3
- letta_sdk/types/agents/message_send_stream_params.py → letta_client/types/agents/message_stream_params.py +14 -5
- {letta_sdk → letta_client}/types/agents/message_update_params.py +4 -0
- {letta_sdk → letta_client}/types/agents/omitted_reasoning_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/omitted_reasoning_content_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/run.py +16 -19
- {letta_sdk → letta_client}/types/agents/text_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/text_content_param.py +4 -0
- {letta_sdk → letta_client}/types/agents/tool_call_content.py +3 -0
- {letta_sdk → letta_client}/types/agents/tool_call_content_param.py +4 -1
- {letta_sdk → letta_client}/types/agents/tool_call_message.py +6 -2
- letta_client/types/agents/tool_list_params.py +34 -0
- {letta_sdk → letta_client}/types/agents/tool_return.py +7 -3
- letta_client/types/agents/tool_return_param.py +25 -0
- letta_client/types/agents/tool_update_approval_params.py +21 -0
- {letta_sdk → letta_client}/types/archive.py +4 -0
- letta_client/types/archive_create_params.py +19 -0
- letta_sdk/types/archive_retrieve_params.py → letta_client/types/archive_list_params.py +2 -2
- letta_sdk/types/archive_retrieve_response.py → letta_client/types/archive_list_response.py +2 -2
- {letta_sdk → letta_client}/types/archive_update_params.py +3 -3
- {letta_sdk/types/messages → letta_client/types}/batch_create_params.py +15 -6
- letta_sdk/types/job.py → letta_client/types/batch_job.py +8 -3
- letta_client/types/batches/__init__.py +6 -0
- letta_sdk/types/messages/batch_list_messages_params.py → letta_client/types/batches/message_list_params.py +2 -2
- letta_sdk/types/messages/batch_list_messages_response.py → letta_client/types/batches/message_list_response.py +2 -2
- {letta_sdk/types/tools → letta_client/types/blocks}/__init__.py +2 -0
- letta_sdk/types/block_list_agents_params.py → letta_client/types/blocks/agent_list_params.py +22 -5
- letta_client/types/child_tool_rule.py +40 -0
- letta_client/types/child_tool_rule_param.py +42 -0
- letta_client/types/folders/__init__.py +10 -0
- letta_sdk/types/folder_list_agents_params.py → letta_client/types/folders/agent_list_params.py +2 -2
- letta_client/types/folders/agent_list_response.py +7 -0
- letta_sdk/types/folder_list_files_params.py → letta_client/types/folders/file_list_params.py +2 -2
- letta_sdk/types/file_metadata.py → letta_client/types/folders/file_list_response.py +5 -5
- letta_sdk/types/source_upload_file_params.py → letta_client/types/folders/file_upload_params.py +5 -6
- letta_client/types/folders/file_upload_response.py +65 -0
- {letta_sdk → letta_client}/types/groups/__init__.py +1 -2
- {letta_sdk → letta_client}/types/groups/message_send_params.py +12 -3
- letta_sdk/types/groups/message_send_stream_params.py → letta_client/types/groups/message_stream_params.py +14 -5
- {letta_sdk → letta_client}/types/groups/message_update_params.py +4 -0
- letta_sdk/types/health_check_response.py → letta_client/types/health_response.py +2 -2
- letta_client/types/identities/__init__.py +7 -0
- letta_sdk/types/identity_list_agents_params.py → letta_client/types/identities/agent_list_params.py +19 -3
- letta_client/types/identities/block_list_params.py +34 -0
- letta_sdk/types/identity_upsert_properties_params.py → letta_client/types/identities/property_upsert_params.py +3 -3
- letta_sdk/types/identity_modify_params.py → letta_client/types/identity_update_params.py +2 -2
- {letta_sdk → letta_client}/types/init_tool_rule.py +10 -1
- {letta_sdk → letta_client}/types/init_tool_rule_param.py +10 -1
- {letta_sdk → letta_client}/types/llm_config.py +6 -0
- {letta_sdk → letta_client}/types/llm_config_param.py +6 -0
- {letta_sdk/types/voice_beta → letta_client/types/models}/__init__.py +1 -1
- letta_sdk/types/agents/archival_memory_create_response.py → letta_client/types/models/embedding_list_response.py +3 -3
- {letta_sdk → letta_client}/types/run_list_params.py +29 -5
- letta_client/types/runs/__init__.py +8 -0
- letta_sdk/types/run_list_messages_params.py → letta_client/types/runs/message_list_params.py +5 -2
- letta_sdk/types/run_retrieve_stream_params.py → letta_client/types/runs/message_stream_params.py +2 -2
- letta_sdk/types/run_list_steps_params.py → letta_client/types/runs/step_list_params.py +9 -6
- letta_sdk/types/run_retrieve_usage_response.py → letta_client/types/runs/usage_retrieve_response.py +3 -3
- {letta_sdk → letta_client}/types/step.py +6 -6
- letta_client/types/steps/__init__.py +8 -0
- letta_sdk/types/step_update_feedback_params.py → letta_client/types/steps/feedback_create_params.py +3 -3
- letta_sdk/types/step_list_messages_params.py → letta_client/types/steps/message_list_params.py +2 -2
- letta_client/types/steps/message_list_response.py +32 -0
- letta_sdk/types/step_retrieve_metrics_response.py → letta_client/types/steps/metric_retrieve_response.py +6 -6
- {letta_sdk → letta_client}/types/tag_list_response.py +1 -2
- letta_client/types/templates/__init__.py +5 -0
- letta_sdk/types/template_create_agents_params.py → letta_client/types/templates/agent_create_params.py +4 -4
- {letta_sdk → letta_client}/types/tool.py +6 -0
- {letta_sdk → letta_client}/types/tool_create_params.py +6 -0
- {letta_sdk → letta_client}/types/tool_return_message.py +3 -0
- letta_sdk/types/tool_modify_params.py → letta_client/types/tool_update_params.py +8 -2
- letta_sdk/types/tool_list_response.py → letta_client/types/tool_upsert_base_tools_response.py +2 -2
- {letta_sdk → letta_client}/types/tool_upsert_params.py +6 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a8.dist-info}/METADATA +110 -70
- letta_client-1.0.0a8.dist-info/RECORD +289 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a8.dist-info}/licenses/LICENSE +1 -1
- letta_client-1.0.0a6.dist-info/RECORD +0 -420
- letta_sdk/resources/_internal_templates/__init__.py +0 -33
- letta_sdk/resources/_internal_templates/_internal_templates.py +0 -961
- letta_sdk/resources/_internal_templates/deployment.py +0 -268
- letta_sdk/resources/agents/archival_memory.py +0 -581
- letta_sdk/resources/agents/core_memory/core_memory.py +0 -278
- letta_sdk/resources/agents/sources.py +0 -332
- letta_sdk/resources/client_side_access_tokens.py +0 -402
- letta_sdk/resources/folders.py +0 -1562
- letta_sdk/resources/health.py +0 -135
- letta_sdk/resources/messages/messages.py +0 -102
- letta_sdk/resources/projects.py +0 -189
- letta_sdk/resources/runs.py +0 -1016
- letta_sdk/resources/sources/__init__.py +0 -33
- letta_sdk/resources/sources/files.py +0 -341
- letta_sdk/resources/sources/sources.py +0 -1371
- letta_sdk/resources/steps.py +0 -784
- letta_sdk/resources/templates.py +0 -1310
- letta_sdk/resources/tools/__init__.py +0 -47
- letta_sdk/resources/tools/composio/__init__.py +0 -33
- letta_sdk/resources/tools/composio/apps.py +0 -214
- letta_sdk/resources/tools/composio/composio.py +0 -201
- letta_sdk/resources/tools/mcp/__init__.py +0 -47
- letta_sdk/resources/tools/mcp/mcp.py +0 -134
- letta_sdk/resources/tools/mcp/oauth.py +0 -214
- letta_sdk/resources/tools/mcp/servers/__init__.py +0 -33
- letta_sdk/resources/tools/mcp/servers/servers.py +0 -1785
- letta_sdk/resources/tools/mcp/servers/tools.py +0 -263
- letta_sdk/resources/voice_beta/__init__.py +0 -33
- letta_sdk/resources/voice_beta/voice_beta.py +0 -102
- letta_sdk/types/__init__.py +0 -226
- letta_sdk/types/_internal_templates/__init__.py +0 -7
- letta_sdk/types/_internal_templates/deployment_delete_response.py +0 -17
- letta_sdk/types/_internal_templates/deployment_list_entities_params.py +0 -15
- letta_sdk/types/_internal_templates/deployment_list_entities_response.py +0 -31
- letta_sdk/types/agent_export_params.py +0 -17
- letta_sdk/types/agent_list_groups_params.py +0 -13
- letta_sdk/types/agent_list_groups_response.py +0 -10
- letta_sdk/types/agent_list_response.py +0 -10
- letta_sdk/types/agent_migrate_params.py +0 -19
- letta_sdk/types/agent_migrate_response.py +0 -11
- letta_sdk/types/agent_retrieve_context_response.py +0 -110
- letta_sdk/types/agent_search_params.py +0 -78
- letta_sdk/types/agent_search_response.py +0 -16
- letta_sdk/types/agent_summarize_params.py +0 -12
- letta_sdk/types/agents/approval_create_param.py +0 -22
- letta_sdk/types/agents/approval_response_message.py +0 -41
- letta_sdk/types/agents/archival_memory_create_params.py +0 -23
- letta_sdk/types/agents/archival_memory_list_params.py +0 -28
- letta_sdk/types/agents/archival_memory_list_response.py +0 -10
- letta_sdk/types/agents/archival_memory_search_params.py +0 -35
- letta_sdk/types/agents/archival_memory_search_response.py +0 -26
- letta_sdk/types/agents/core_memory/__init__.py +0 -7
- letta_sdk/types/agents/core_memory/block_list_response.py +0 -10
- letta_sdk/types/agents/core_memory_retrieve_variables_response.py +0 -11
- letta_sdk/types/agents/file_list_params.py +0 -19
- letta_sdk/types/agents/folder_list_response.py +0 -10
- letta_sdk/types/agents/letta_request_param.py +0 -45
- letta_sdk/types/agents/letta_streaming_request_param.py +0 -60
- letta_sdk/types/agents/memory.py +0 -92
- letta_sdk/types/agents/message_list_response.py +0 -10
- letta_sdk/types/agents/message_preview_raw_payload_params.py +0 -103
- letta_sdk/types/agents/message_preview_raw_payload_response.py +0 -8
- letta_sdk/types/agents/message_search_params.py +0 -38
- letta_sdk/types/agents/message_search_response.py +0 -29
- letta_sdk/types/agents/source_list_response.py +0 -10
- letta_sdk/types/agents/tool_list_response.py +0 -10
- letta_sdk/types/agents/tool_modify_approval_params.py +0 -13
- letta_sdk/types/block_list_agents_response.py +0 -10
- letta_sdk/types/block_list_response.py +0 -10
- letta_sdk/types/child_tool_rule.py +0 -21
- letta_sdk/types/child_tool_rule_param.py +0 -23
- letta_sdk/types/client_side_access_token_create_params.py +0 -32
- letta_sdk/types/client_side_access_token_create_response.py +0 -34
- letta_sdk/types/client_side_access_token_delete_params.py +0 -11
- letta_sdk/types/client_side_access_token_list_params.py +0 -23
- letta_sdk/types/client_side_access_token_list_response.py +0 -40
- letta_sdk/types/duplicate_file_handling.py +0 -7
- letta_sdk/types/embedding_get_total_storage_size_response.py +0 -7
- letta_sdk/types/file_processing_status.py +0 -7
- letta_sdk/types/folder_get_by_name_response.py +0 -7
- letta_sdk/types/folder_list_agents_response.py +0 -8
- letta_sdk/types/folder_list_files_response.py +0 -10
- letta_sdk/types/folder_list_passages_params.py +0 -34
- letta_sdk/types/folder_list_passages_response.py +0 -10
- letta_sdk/types/folder_list_response.py +0 -10
- letta_sdk/types/folder_retrieve_metadata_params.py +0 -11
- letta_sdk/types/folder_upload_file_params.py +0 -21
- letta_sdk/types/group_list_response.py +0 -10
- letta_sdk/types/groups/message_list_response.py +0 -10
- letta_sdk/types/identity_list_agents_response.py +0 -10
- letta_sdk/types/identity_list_blocks_response.py +0 -10
- letta_sdk/types/identity_list_response.py +0 -10
- letta_sdk/types/internal_template_create_agent_params.py +0 -217
- letta_sdk/types/internal_template_create_block_params.py +0 -54
- letta_sdk/types/internal_template_create_group_params.py +0 -49
- letta_sdk/types/job_list_active_params.py +0 -28
- letta_sdk/types/job_list_active_response.py +0 -10
- letta_sdk/types/job_list_params.py +0 -31
- letta_sdk/types/job_list_response.py +0 -10
- letta_sdk/types/messages/__init__.py +0 -10
- letta_sdk/types/messages/batch_job.py +0 -60
- letta_sdk/types/messages/batch_list_response.py +0 -10
- letta_sdk/types/model_list_embedding_response.py +0 -10
- letta_sdk/types/organization_sources_stats.py +0 -49
- letta_sdk/types/passage.py +0 -56
- letta_sdk/types/project_list_params.py +0 -16
- letta_sdk/types/project_list_response.py +0 -23
- letta_sdk/types/provider.py +0 -42
- letta_sdk/types/provider_check_params.py +0 -30
- letta_sdk/types/provider_create_params.py +0 -33
- letta_sdk/types/provider_list_params.py +0 -42
- letta_sdk/types/provider_list_response.py +0 -10
- letta_sdk/types/provider_update_params.py +0 -25
- letta_sdk/types/run_list_active_params.py +0 -18
- letta_sdk/types/run_list_active_response.py +0 -10
- letta_sdk/types/run_list_messages_response.py +0 -10
- letta_sdk/types/run_list_response.py +0 -10
- letta_sdk/types/run_list_steps_response.py +0 -10
- letta_sdk/types/source_count_response.py +0 -7
- letta_sdk/types/source_create_params.py +0 -33
- letta_sdk/types/source_get_agents_response.py +0 -8
- letta_sdk/types/source_get_by_name_response.py +0 -7
- letta_sdk/types/source_get_metadata_params.py +0 -11
- letta_sdk/types/source_list_passages_params.py +0 -19
- letta_sdk/types/source_list_passages_response.py +0 -10
- letta_sdk/types/source_list_response.py +0 -10
- letta_sdk/types/source_update_params.py +0 -27
- letta_sdk/types/sources/__init__.py +0 -7
- letta_sdk/types/sources/file_list_params.py +0 -26
- letta_sdk/types/sources/file_list_response.py +0 -10
- letta_sdk/types/sources/file_retrieve_params.py +0 -14
- letta_sdk/types/step_list_messages_response.py +0 -34
- letta_sdk/types/step_list_response.py +0 -10
- letta_sdk/types/template_create_agents_response.py +0 -12
- letta_sdk/types/template_create_params.py +0 -40
- letta_sdk/types/template_create_response.py +0 -29
- letta_sdk/types/template_delete_response.py +0 -9
- letta_sdk/types/template_fork_params.py +0 -17
- letta_sdk/types/template_fork_response.py +0 -29
- letta_sdk/types/template_get_snapshot_response.py +0 -258
- letta_sdk/types/template_list_params.py +0 -34
- letta_sdk/types/template_list_response.py +0 -35
- letta_sdk/types/template_list_versions_params.py +0 -16
- letta_sdk/types/template_list_versions_response.py +0 -29
- letta_sdk/types/template_rename_params.py +0 -14
- letta_sdk/types/template_rename_response.py +0 -9
- letta_sdk/types/template_save_version_params.py +0 -32
- letta_sdk/types/template_save_version_response.py +0 -29
- letta_sdk/types/template_update_description_params.py +0 -14
- letta_sdk/types/template_update_description_response.py +0 -9
- letta_sdk/types/tool_run_params.py +0 -43
- letta_sdk/types/tool_upsert_base_response.py +0 -10
- letta_sdk/types/tools/composio/__init__.py +0 -6
- letta_sdk/types/tools/composio/app_list_actions_response.py +0 -70
- letta_sdk/types/tools/composio/app_list_response.py +0 -103
- letta_sdk/types/tools/mcp/__init__.py +0 -21
- letta_sdk/types/tools/mcp/mcp_server_type.py +0 -7
- letta_sdk/types/tools/mcp/oauth_callback_params.py +0 -22
- letta_sdk/types/tools/mcp/server_add_params.py +0 -68
- letta_sdk/types/tools/mcp/server_add_response.py +0 -14
- letta_sdk/types/tools/mcp/server_connect_params.py +0 -68
- letta_sdk/types/tools/mcp/server_delete_response.py +0 -14
- letta_sdk/types/tools/mcp/server_list_response.py +0 -14
- letta_sdk/types/tools/mcp/server_resync_params.py +0 -12
- letta_sdk/types/tools/mcp/server_test_params.py +0 -68
- letta_sdk/types/tools/mcp/server_update_params.py +0 -43
- letta_sdk/types/tools/mcp/server_update_response.py +0 -12
- letta_sdk/types/tools/mcp/servers/__init__.py +0 -6
- letta_sdk/types/tools/mcp/servers/tool_execute_params.py +0 -15
- letta_sdk/types/tools/mcp/servers/tool_list_response.py +0 -85
- letta_sdk/types/tools/mcp/sse_server_config.py +0 -27
- letta_sdk/types/tools/mcp/sse_server_config_param.py +0 -29
- letta_sdk/types/tools/mcp/stdio_server_config.py +0 -24
- letta_sdk/types/tools/mcp/stdio_server_config_param.py +0 -27
- letta_sdk/types/tools/mcp/streamable_http_server_config.py +0 -27
- letta_sdk/types/tools/mcp/streamable_http_server_config_param.py +0 -29
- letta_sdk/types/voice_beta/chat_create_completion_params.py +0 -12
- {letta_sdk → letta_client}/_compat.py +0 -0
- {letta_sdk → letta_client}/_constants.py +0 -0
- {letta_sdk → letta_client}/_files.py +0 -0
- {letta_sdk → letta_client}/_models.py +0 -0
- {letta_sdk → letta_client}/_qs.py +0 -0
- {letta_sdk → letta_client}/_utils/__init__.py +0 -0
- {letta_sdk → letta_client}/_utils/_compat.py +0 -0
- {letta_sdk → letta_client}/_utils/_datetime_parse.py +0 -0
- {letta_sdk → letta_client}/_utils/_proxy.py +0 -0
- {letta_sdk → letta_client}/_utils/_reflection.py +0 -0
- {letta_sdk → letta_client}/_utils/_streams.py +0 -0
- {letta_sdk → letta_client}/_utils/_sync.py +0 -0
- {letta_sdk → letta_client}/_utils/_transform.py +0 -0
- {letta_sdk → letta_client}/_utils/_typing.py +0 -0
- {letta_sdk → letta_client}/_utils/_utils.py +0 -0
- {letta_sdk → letta_client}/lib/.keep +0 -0
- {letta_sdk → letta_client}/py.typed +0 -0
- {letta_sdk/resources/messages → letta_client/resources/batches}/__init__.py +6 -6
- {letta_sdk → letta_client}/resources/groups/__init__.py +0 -0
- {letta_sdk → letta_client}/types/agent_count_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/assistant_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_close_all_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_list_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/file_open_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/hidden_reasoning_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/image_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/image_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/job_status.py +0 -0
- {letta_sdk → letta_client}/types/agents/job_type.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_message_union.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_user_message_content_union.py +0 -0
- {letta_sdk → letta_client}/types/agents/letta_user_message_content_union_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_cancel_params.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_cancel_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_role.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_type.py +0 -0
- {letta_sdk → letta_client}/types/agents/message_update_response.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/reasoning_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/redacted_reasoning_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/redacted_reasoning_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/system_message.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_call.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_call_delta.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_return_content.py +0 -0
- {letta_sdk → letta_client}/types/agents/tool_return_content_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_assistant_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_reasoning_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_system_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/update_user_message_param.py +0 -0
- {letta_sdk → letta_client}/types/agents/user_message.py +0 -0
- {letta_sdk/types/messages → letta_client/types}/batch_list_params.py +0 -0
- {letta_sdk → letta_client}/types/block_count_response.py +0 -0
- {letta_sdk → letta_client}/types/block_create_params.py +0 -0
- {letta_sdk → letta_client}/types/block_list_params.py +0 -0
- {letta_sdk → letta_client}/types/block_update_params.py +0 -0
- {letta_sdk → letta_client}/types/conditional_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/conditional_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/continue_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/continue_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/create_block_param.py +0 -0
- {letta_sdk → letta_client}/types/dynamic_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/embedding_config.py +0 -0
- {letta_sdk → letta_client}/types/embedding_config_param.py +0 -0
- {letta_sdk → letta_client}/types/folder.py +0 -0
- {letta_sdk → letta_client}/types/folder_count_response.py +0 -0
- {letta_sdk → letta_client}/types/folder_create_params.py +0 -0
- {letta_sdk → letta_client}/types/folder_list_params.py +0 -0
- {letta_sdk → letta_client}/types/folder_update_params.py +0 -0
- {letta_sdk → letta_client}/types/group.py +0 -0
- {letta_sdk → letta_client}/types/group_count_response.py +0 -0
- {letta_sdk → letta_client}/types/group_create_params.py +0 -0
- {letta_sdk → letta_client}/types/group_list_params.py +0 -0
- {letta_sdk → letta_client}/types/group_update_params.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_list_params.py +0 -0
- {letta_sdk → letta_client}/types/groups/message_update_response.py +0 -0
- {letta_sdk → letta_client}/types/identity.py +0 -0
- {letta_sdk → letta_client}/types/identity_count_response.py +0 -0
- {letta_sdk → letta_client}/types/identity_create_params.py +0 -0
- {letta_sdk → letta_client}/types/identity_list_params.py +0 -0
- {letta_sdk → letta_client}/types/identity_property.py +0 -0
- {letta_sdk → letta_client}/types/identity_property_param.py +0 -0
- {letta_sdk → letta_client}/types/identity_type.py +0 -0
- {letta_sdk → letta_client}/types/identity_upsert_params.py +0 -0
- {letta_sdk → letta_client}/types/json_object_response_format.py +0 -0
- {letta_sdk → letta_client}/types/json_object_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/json_schema_response_format.py +0 -0
- {letta_sdk → letta_client}/types/json_schema_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/letta_message_content_union_param.py +0 -0
- {letta_sdk → letta_client}/types/manager_type.py +0 -0
- {letta_sdk → letta_client}/types/max_count_per_step_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/max_count_per_step_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/message_create_param.py +0 -0
- {letta_sdk → letta_client}/types/model_list_params.py +0 -0
- {letta_sdk → letta_client}/types/model_list_response.py +0 -0
- {letta_sdk → letta_client}/types/npm_requirement.py +0 -0
- {letta_sdk → letta_client}/types/npm_requirement_param.py +0 -0
- {letta_sdk → letta_client}/types/parent_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/parent_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/pip_requirement.py +0 -0
- {letta_sdk → letta_client}/types/pip_requirement_param.py +0 -0
- {letta_sdk → letta_client}/types/provider_category.py +0 -0
- {letta_sdk → letta_client}/types/provider_trace.py +0 -0
- {letta_sdk → letta_client}/types/provider_type.py +0 -0
- {letta_sdk → letta_client}/types/required_before_exit_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/required_before_exit_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/requires_approval_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/requires_approval_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/round_robin_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/sleeptime_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/step_list_params.py +0 -0
- {letta_sdk → letta_client}/types/stop_reason_type.py +0 -0
- {letta_sdk → letta_client}/types/supervisor_manager_param.py +0 -0
- {letta_sdk → letta_client}/types/tag_list_params.py +0 -0
- {letta_sdk → letta_client}/types/terminal_tool_rule.py +0 -0
- {letta_sdk → letta_client}/types/terminal_tool_rule_param.py +0 -0
- {letta_sdk → letta_client}/types/text_response_format.py +0 -0
- {letta_sdk → letta_client}/types/text_response_format_param.py +0 -0
- {letta_sdk → letta_client}/types/tool_count_params.py +0 -0
- {letta_sdk → letta_client}/types/tool_count_response.py +0 -0
- {letta_sdk → letta_client}/types/tool_list_params.py +0 -0
- {letta_sdk → letta_client}/types/tool_type.py +1 -1
- {letta_sdk → letta_client}/types/vector_db_provider.py +0 -0
- {letta_sdk → letta_client}/types/voice_sleeptime_manager_param.py +0 -0
- {letta_client-1.0.0a6.dist-info → letta_client-1.0.0a8.dist-info}/WHEEL +0 -0
|
@@ -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 ...pagination import SyncArrayPage, AsyncArrayPage
|
|
21
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
22
|
+
from ...types.agents import block_list_params, block_update_params
|
|
23
|
+
from ...types.agent_state import AgentState
|
|
24
|
+
from ...types.agents.block import Block
|
|
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,17 +187,37 @@ 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,
|
|
188
198
|
extra_query: Query | None = None,
|
|
189
199
|
extra_body: Body | None = None,
|
|
190
200
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
191
|
-
) ->
|
|
201
|
+
) -> SyncArrayPage[Block]:
|
|
192
202
|
"""
|
|
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
|
|
@@ -203,12 +228,26 @@ class BlocksResource(SyncAPIResource):
|
|
|
203
228
|
"""
|
|
204
229
|
if not agent_id:
|
|
205
230
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
206
|
-
return self.
|
|
231
|
+
return self._get_api_list(
|
|
207
232
|
f"/v1/agents/{agent_id}/core-memory/blocks",
|
|
233
|
+
page=SyncArrayPage[Block],
|
|
208
234
|
options=make_request_options(
|
|
209
|
-
extra_headers=extra_headers,
|
|
235
|
+
extra_headers=extra_headers,
|
|
236
|
+
extra_query=extra_query,
|
|
237
|
+
extra_body=extra_body,
|
|
238
|
+
timeout=timeout,
|
|
239
|
+
query=maybe_transform(
|
|
240
|
+
{
|
|
241
|
+
"after": after,
|
|
242
|
+
"before": before,
|
|
243
|
+
"limit": limit,
|
|
244
|
+
"order": order,
|
|
245
|
+
"order_by": order_by,
|
|
246
|
+
},
|
|
247
|
+
block_list_params.BlockListParams,
|
|
248
|
+
),
|
|
210
249
|
),
|
|
211
|
-
|
|
250
|
+
model=Block,
|
|
212
251
|
)
|
|
213
252
|
|
|
214
253
|
def attach(
|
|
@@ -227,6 +266,10 @@ class BlocksResource(SyncAPIResource):
|
|
|
227
266
|
Attach a core memory block to an agent.
|
|
228
267
|
|
|
229
268
|
Args:
|
|
269
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
270
|
+
|
|
271
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
272
|
+
|
|
230
273
|
extra_headers: Send extra headers
|
|
231
274
|
|
|
232
275
|
extra_query: Add additional query parameters to the request
|
|
@@ -263,6 +306,10 @@ class BlocksResource(SyncAPIResource):
|
|
|
263
306
|
Detach a core memory block from an agent.
|
|
264
307
|
|
|
265
308
|
Args:
|
|
309
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
310
|
+
|
|
311
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
312
|
+
|
|
266
313
|
extra_headers: Send extra headers
|
|
267
314
|
|
|
268
315
|
extra_query: Add additional query parameters to the request
|
|
@@ -320,6 +367,8 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
320
367
|
Retrieve a core memory block from an agent.
|
|
321
368
|
|
|
322
369
|
Args:
|
|
370
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
371
|
+
|
|
323
372
|
extra_headers: Send extra headers
|
|
324
373
|
|
|
325
374
|
extra_query: Add additional query parameters to the request
|
|
@@ -370,6 +419,8 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
370
419
|
Updates a core memory block of an agent.
|
|
371
420
|
|
|
372
421
|
Args:
|
|
422
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
423
|
+
|
|
373
424
|
base_template_id: The base template id of the block.
|
|
374
425
|
|
|
375
426
|
deployment_id: The id of the deployment.
|
|
@@ -437,21 +488,41 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
437
488
|
cast_to=Block,
|
|
438
489
|
)
|
|
439
490
|
|
|
440
|
-
|
|
491
|
+
def list(
|
|
441
492
|
self,
|
|
442
493
|
agent_id: str,
|
|
443
494
|
*,
|
|
495
|
+
after: Optional[str] | Omit = omit,
|
|
496
|
+
before: Optional[str] | Omit = omit,
|
|
497
|
+
limit: Optional[int] | Omit = omit,
|
|
498
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
499
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
444
500
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
445
501
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
446
502
|
extra_headers: Headers | None = None,
|
|
447
503
|
extra_query: Query | None = None,
|
|
448
504
|
extra_body: Body | None = None,
|
|
449
505
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
450
|
-
) ->
|
|
506
|
+
) -> AsyncPaginator[Block, AsyncArrayPage[Block]]:
|
|
451
507
|
"""
|
|
452
508
|
Retrieve the core memory blocks of a specific agent.
|
|
453
509
|
|
|
454
510
|
Args:
|
|
511
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
512
|
+
|
|
513
|
+
after: Block ID cursor for pagination. Returns blocks that come after this block ID in
|
|
514
|
+
the specified sort order
|
|
515
|
+
|
|
516
|
+
before: Block ID cursor for pagination. Returns blocks that come before this block ID in
|
|
517
|
+
the specified sort order
|
|
518
|
+
|
|
519
|
+
limit: Maximum number of blocks to return
|
|
520
|
+
|
|
521
|
+
order: Sort order for blocks by creation time. 'asc' for oldest first, 'desc' for
|
|
522
|
+
newest first
|
|
523
|
+
|
|
524
|
+
order_by: Field to sort by
|
|
525
|
+
|
|
455
526
|
extra_headers: Send extra headers
|
|
456
527
|
|
|
457
528
|
extra_query: Add additional query parameters to the request
|
|
@@ -462,12 +533,26 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
462
533
|
"""
|
|
463
534
|
if not agent_id:
|
|
464
535
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
465
|
-
return
|
|
536
|
+
return self._get_api_list(
|
|
466
537
|
f"/v1/agents/{agent_id}/core-memory/blocks",
|
|
538
|
+
page=AsyncArrayPage[Block],
|
|
467
539
|
options=make_request_options(
|
|
468
|
-
extra_headers=extra_headers,
|
|
540
|
+
extra_headers=extra_headers,
|
|
541
|
+
extra_query=extra_query,
|
|
542
|
+
extra_body=extra_body,
|
|
543
|
+
timeout=timeout,
|
|
544
|
+
query=maybe_transform(
|
|
545
|
+
{
|
|
546
|
+
"after": after,
|
|
547
|
+
"before": before,
|
|
548
|
+
"limit": limit,
|
|
549
|
+
"order": order,
|
|
550
|
+
"order_by": order_by,
|
|
551
|
+
},
|
|
552
|
+
block_list_params.BlockListParams,
|
|
553
|
+
),
|
|
469
554
|
),
|
|
470
|
-
|
|
555
|
+
model=Block,
|
|
471
556
|
)
|
|
472
557
|
|
|
473
558
|
async def attach(
|
|
@@ -486,6 +571,10 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
486
571
|
Attach a core memory block to an agent.
|
|
487
572
|
|
|
488
573
|
Args:
|
|
574
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
575
|
+
|
|
576
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
577
|
+
|
|
489
578
|
extra_headers: Send extra headers
|
|
490
579
|
|
|
491
580
|
extra_query: Add additional query parameters to the request
|
|
@@ -522,6 +611,10 @@ class AsyncBlocksResource(AsyncAPIResource):
|
|
|
522
611
|
Detach a core memory block from an agent.
|
|
523
612
|
|
|
524
613
|
Args:
|
|
614
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
615
|
+
|
|
616
|
+
block_id: The ID of the block in the format 'block-<uuid4>'
|
|
617
|
+
|
|
525
618
|
extra_headers: Send extra headers
|
|
526
619
|
|
|
527
620
|
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
|
|
8
12
|
from ..._compat import cached_property
|
|
9
13
|
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
10
14
|
from ..._response import (
|
|
@@ -13,7 +17,9 @@ from ..._response import (
|
|
|
13
17
|
async_to_raw_response_wrapper,
|
|
14
18
|
async_to_streamed_response_wrapper,
|
|
15
19
|
)
|
|
16
|
-
from ...
|
|
20
|
+
from ...pagination import SyncArrayPage, AsyncArrayPage
|
|
21
|
+
from ..._base_client import AsyncPaginator, make_request_options
|
|
22
|
+
from ...types.agents import folder_list_params
|
|
17
23
|
from ...types.agent_state import AgentState
|
|
18
24
|
from ...types.agents.folder_list_response import FolderListResponse
|
|
19
25
|
|
|
@@ -44,17 +50,37 @@ class FoldersResource(SyncAPIResource):
|
|
|
44
50
|
self,
|
|
45
51
|
agent_id: str,
|
|
46
52
|
*,
|
|
53
|
+
after: Optional[str] | Omit = omit,
|
|
54
|
+
before: Optional[str] | Omit = omit,
|
|
55
|
+
limit: Optional[int] | Omit = omit,
|
|
56
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
57
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
47
58
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
48
59
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
49
60
|
extra_headers: Headers | None = None,
|
|
50
61
|
extra_query: Query | None = None,
|
|
51
62
|
extra_body: Body | None = None,
|
|
52
63
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
53
|
-
) -> FolderListResponse:
|
|
64
|
+
) -> SyncArrayPage[FolderListResponse]:
|
|
54
65
|
"""
|
|
55
66
|
Get the folders associated with an agent.
|
|
56
67
|
|
|
57
68
|
Args:
|
|
69
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
70
|
+
|
|
71
|
+
after: Source ID cursor for pagination. Returns sources that come after this source ID
|
|
72
|
+
in the specified sort order
|
|
73
|
+
|
|
74
|
+
before: Source ID cursor for pagination. Returns sources that come before this source ID
|
|
75
|
+
in the specified sort order
|
|
76
|
+
|
|
77
|
+
limit: Maximum number of sources to return
|
|
78
|
+
|
|
79
|
+
order: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for
|
|
80
|
+
newest first
|
|
81
|
+
|
|
82
|
+
order_by: Field to sort by
|
|
83
|
+
|
|
58
84
|
extra_headers: Send extra headers
|
|
59
85
|
|
|
60
86
|
extra_query: Add additional query parameters to the request
|
|
@@ -65,12 +91,26 @@ class FoldersResource(SyncAPIResource):
|
|
|
65
91
|
"""
|
|
66
92
|
if not agent_id:
|
|
67
93
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
68
|
-
return self.
|
|
94
|
+
return self._get_api_list(
|
|
69
95
|
f"/v1/agents/{agent_id}/folders",
|
|
96
|
+
page=SyncArrayPage[FolderListResponse],
|
|
70
97
|
options=make_request_options(
|
|
71
|
-
extra_headers=extra_headers,
|
|
98
|
+
extra_headers=extra_headers,
|
|
99
|
+
extra_query=extra_query,
|
|
100
|
+
extra_body=extra_body,
|
|
101
|
+
timeout=timeout,
|
|
102
|
+
query=maybe_transform(
|
|
103
|
+
{
|
|
104
|
+
"after": after,
|
|
105
|
+
"before": before,
|
|
106
|
+
"limit": limit,
|
|
107
|
+
"order": order,
|
|
108
|
+
"order_by": order_by,
|
|
109
|
+
},
|
|
110
|
+
folder_list_params.FolderListParams,
|
|
111
|
+
),
|
|
72
112
|
),
|
|
73
|
-
|
|
113
|
+
model=FolderListResponse,
|
|
74
114
|
)
|
|
75
115
|
|
|
76
116
|
def attach(
|
|
@@ -89,6 +129,10 @@ class FoldersResource(SyncAPIResource):
|
|
|
89
129
|
Attach a folder to an agent.
|
|
90
130
|
|
|
91
131
|
Args:
|
|
132
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
133
|
+
|
|
134
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
135
|
+
|
|
92
136
|
extra_headers: Send extra headers
|
|
93
137
|
|
|
94
138
|
extra_query: Add additional query parameters to the request
|
|
@@ -125,6 +169,10 @@ class FoldersResource(SyncAPIResource):
|
|
|
125
169
|
Detach a folder from an agent.
|
|
126
170
|
|
|
127
171
|
Args:
|
|
172
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
173
|
+
|
|
174
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
175
|
+
|
|
128
176
|
extra_headers: Send extra headers
|
|
129
177
|
|
|
130
178
|
extra_query: Add additional query parameters to the request
|
|
@@ -166,21 +214,41 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
166
214
|
"""
|
|
167
215
|
return AsyncFoldersResourceWithStreamingResponse(self)
|
|
168
216
|
|
|
169
|
-
|
|
217
|
+
def list(
|
|
170
218
|
self,
|
|
171
219
|
agent_id: str,
|
|
172
220
|
*,
|
|
221
|
+
after: Optional[str] | Omit = omit,
|
|
222
|
+
before: Optional[str] | Omit = omit,
|
|
223
|
+
limit: Optional[int] | Omit = omit,
|
|
224
|
+
order: Literal["asc", "desc"] | Omit = omit,
|
|
225
|
+
order_by: Literal["created_at"] | Omit = omit,
|
|
173
226
|
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
174
227
|
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
175
228
|
extra_headers: Headers | None = None,
|
|
176
229
|
extra_query: Query | None = None,
|
|
177
230
|
extra_body: Body | None = None,
|
|
178
231
|
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
179
|
-
) -> FolderListResponse:
|
|
232
|
+
) -> AsyncPaginator[FolderListResponse, AsyncArrayPage[FolderListResponse]]:
|
|
180
233
|
"""
|
|
181
234
|
Get the folders associated with an agent.
|
|
182
235
|
|
|
183
236
|
Args:
|
|
237
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
238
|
+
|
|
239
|
+
after: Source ID cursor for pagination. Returns sources that come after this source ID
|
|
240
|
+
in the specified sort order
|
|
241
|
+
|
|
242
|
+
before: Source ID cursor for pagination. Returns sources that come before this source ID
|
|
243
|
+
in the specified sort order
|
|
244
|
+
|
|
245
|
+
limit: Maximum number of sources to return
|
|
246
|
+
|
|
247
|
+
order: Sort order for sources by creation time. 'asc' for oldest first, 'desc' for
|
|
248
|
+
newest first
|
|
249
|
+
|
|
250
|
+
order_by: Field to sort by
|
|
251
|
+
|
|
184
252
|
extra_headers: Send extra headers
|
|
185
253
|
|
|
186
254
|
extra_query: Add additional query parameters to the request
|
|
@@ -191,12 +259,26 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
191
259
|
"""
|
|
192
260
|
if not agent_id:
|
|
193
261
|
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
|
|
194
|
-
return
|
|
262
|
+
return self._get_api_list(
|
|
195
263
|
f"/v1/agents/{agent_id}/folders",
|
|
264
|
+
page=AsyncArrayPage[FolderListResponse],
|
|
196
265
|
options=make_request_options(
|
|
197
|
-
extra_headers=extra_headers,
|
|
266
|
+
extra_headers=extra_headers,
|
|
267
|
+
extra_query=extra_query,
|
|
268
|
+
extra_body=extra_body,
|
|
269
|
+
timeout=timeout,
|
|
270
|
+
query=maybe_transform(
|
|
271
|
+
{
|
|
272
|
+
"after": after,
|
|
273
|
+
"before": before,
|
|
274
|
+
"limit": limit,
|
|
275
|
+
"order": order,
|
|
276
|
+
"order_by": order_by,
|
|
277
|
+
},
|
|
278
|
+
folder_list_params.FolderListParams,
|
|
279
|
+
),
|
|
198
280
|
),
|
|
199
|
-
|
|
281
|
+
model=FolderListResponse,
|
|
200
282
|
)
|
|
201
283
|
|
|
202
284
|
async def attach(
|
|
@@ -215,6 +297,10 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
215
297
|
Attach a folder to an agent.
|
|
216
298
|
|
|
217
299
|
Args:
|
|
300
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
301
|
+
|
|
302
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
303
|
+
|
|
218
304
|
extra_headers: Send extra headers
|
|
219
305
|
|
|
220
306
|
extra_query: Add additional query parameters to the request
|
|
@@ -251,6 +337,10 @@ class AsyncFoldersResource(AsyncAPIResource):
|
|
|
251
337
|
Detach a folder from an agent.
|
|
252
338
|
|
|
253
339
|
Args:
|
|
340
|
+
agent_id: The ID of the agent in the format 'agent-<uuid4>'
|
|
341
|
+
|
|
342
|
+
folder_id: The ID of the source in the format 'source-<uuid4>'
|
|
343
|
+
|
|
254
344
|
extra_headers: Send extra headers
|
|
255
345
|
|
|
256
346
|
extra_query: Add additional query parameters to the request
|