letta-client 0.1.24__py3-none-any.whl → 0.1.26__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-client might be problematic. Click here for more details.
- letta_client/__init__.py +332 -10
- letta_client/agents/__init__.py +320 -11
- letta_client/agents/client.py +121 -17
- letta_client/agents/templates/__init__.py +2 -2
- letta_client/agents/templates/client.py +19 -24
- letta_client/agents/templates/types/__init__.py +2 -1
- letta_client/agents/templates/types/templates_create_response.py +22 -0
- letta_client/agents/types/__init__.py +542 -10
- letta_client/agents/types/agents_search_request_search_item.py +2 -6
- letta_client/agents/types/{agents_search_request_search_item_two.py → agents_search_request_search_item_field.py} +1 -1
- letta_client/agents/types/agents_search_request_search_item_one_operator.py +1 -1
- letta_client/agents/types/{agents_search_request_search_item_direction.py → agents_search_response.py} +6 -6
- letta_client/agents/types/agents_search_response_agents_item.py +63 -0
- letta_client/agents/types/agents_search_response_agents_item_agent_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_base_template_id.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_base_template_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_created_at.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_created_at_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_created_by_id.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_created_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_description.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_description_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config.py +48 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_deployment.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_deployment_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_endpoint.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_endpoint_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_version.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_azure_version_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_chunk_size.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_chunk_size_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_endpoint.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_endpoint_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_embedding_endpoint_type.py +27 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_handle.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_embedding_config_handle_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_last_updated_by_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_last_updated_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config.py +44 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_handle.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_handle_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_endpoint.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_endpoint_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_endpoint_type.py +27 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_wrapper.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_model_wrapper_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_put_inner_thoughts_in_kwargs.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_put_inner_thoughts_in_kwargs_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_llm_config_temperature.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory.py +24 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item.py +57 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_created_by_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_created_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_description.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_description_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_id.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_is_template.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_label.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_label_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_last_updated_by_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_last_updated_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_limit.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_metadata.py +12 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_metadata_item.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_name.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_name_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_organization_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_blocks_item_organization_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_memory_prompt_template.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_message_ids.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_message_ids_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_metadata.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_metadata_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_organization_id.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_organization_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_project_id.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_project_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item.py +51 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_at.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_at_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_by_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_created_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_description.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_description_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config.py +52 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_deployment.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_deployment_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_endpoint.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_endpoint_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_version.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_azure_version_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_chunk_size.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_chunk_size_item.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_endpoint.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_endpoint_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_embedding_endpoint_type.py +27 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_handle.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_embedding_config_handle_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_id.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_last_updated_by_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_last_updated_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_metadata.py +12 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_metadata_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_organization_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_organization_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_updated_at.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_sources_item_updated_at_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_template_id.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_template_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item.py +53 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_at.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_at_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_by_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_created_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_description.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_description_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_id.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_last_updated_by_id_item.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_organization_id.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_organization_id_item.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_updated_at.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_exec_environment_variables_item_updated_at_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item.py +8 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping.py +34 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_default_child.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_default_child_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_require_output_mapping.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_child_output_mapping_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_children.py +24 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_children_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item.py +22 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping.py +34 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_default_child.py +13 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_default_child_item.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_require_output_mapping.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_child_output_mapping_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_children.py +24 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_children_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_one.py +23 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_one_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_two.py +23 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_item_two_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_one.py +23 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_one_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_two.py +23 -0
- letta_client/agents/types/agents_search_response_agents_item_tool_rules_item_two_type.py +7 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item.py +47 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_created_by_id.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_created_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_description.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_description_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_json_schema.py +12 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_json_schema_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_last_updated_by_id.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_last_updated_by_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_name.py +8 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_name_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_organization_id.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_organization_id_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_code.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_code_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_type.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_source_type_item.py +5 -0
- letta_client/agents/types/agents_search_response_agents_item_tools_item_tool_type.py +10 -0
- letta_client/agents/types/agents_search_response_agents_item_updated_at.py +11 -0
- letta_client/agents/types/agents_search_response_agents_item_updated_at_item.py +5 -0
- letta_client/core/client_wrapper.py +1 -1
- letta_client/templates/__init__.py +12 -0
- letta_client/templates/client.py +10 -0
- letta_client/templates/types/__init__.py +24 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item.py +12 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_base_template_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_base_template_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_project_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_project_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_template_id.py +13 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_template_id_item.py +5 -0
- letta_client/templates/types/templates_create_agents_from_template_response_agents_item_tools_item_tool_type.py +3 -1
- letta_client/types/__init__.py +2 -0
- letta_client/types/agent_state.py +15 -0
- letta_client/types/local_sandbox_config.py +8 -2
- letta_client/types/pip_requirement.py +27 -0
- letta_client/types/step.py +5 -0
- letta_client/types/tool_type.py +3 -1
- {letta_client-0.1.24.dist-info → letta_client-0.1.26.dist-info}/METADATA +1 -1
- {letta_client-0.1.24.dist-info → letta_client-0.1.26.dist-info}/RECORD +190 -28
- letta_client/agents/types/agents_search_request_combinator.py +0 -5
- letta_client/agents/types/agents_search_request_search_item_direction_direction.py +0 -5
- letta_client/agents/types/agents_search_request_search_item_direction_value.py +0 -5
- {letta_client-0.1.24.dist-info → letta_client-0.1.26.dist-info}/WHEEL +0 -0
letta_client/agents/client.py
CHANGED
|
@@ -27,7 +27,7 @@ from ..core.serialization import convert_and_respect_annotation_metadata
|
|
|
27
27
|
from ..core.jsonable_encoder import jsonable_encoder
|
|
28
28
|
from .types.update_agent_tool_rules_item import UpdateAgentToolRulesItem
|
|
29
29
|
from .types.agents_search_request_search_item import AgentsSearchRequestSearchItem
|
|
30
|
-
from .types.
|
|
30
|
+
from .types.agents_search_response import AgentsSearchResponse
|
|
31
31
|
from ..core.client_wrapper import AsyncClientWrapper
|
|
32
32
|
from .context.client import AsyncContextClient
|
|
33
33
|
from .tools.client import AsyncToolsClient
|
|
@@ -64,6 +64,9 @@ class AgentsClient:
|
|
|
64
64
|
after: typing.Optional[str] = None,
|
|
65
65
|
limit: typing.Optional[int] = None,
|
|
66
66
|
query_text: typing.Optional[str] = None,
|
|
67
|
+
project_id: typing.Optional[str] = None,
|
|
68
|
+
template_id: typing.Optional[str] = None,
|
|
69
|
+
base_template_id: typing.Optional[str] = None,
|
|
67
70
|
request_options: typing.Optional[RequestOptions] = None,
|
|
68
71
|
) -> typing.List[AgentState]:
|
|
69
72
|
"""
|
|
@@ -93,6 +96,15 @@ class AgentsClient:
|
|
|
93
96
|
query_text : typing.Optional[str]
|
|
94
97
|
Search agents by name
|
|
95
98
|
|
|
99
|
+
project_id : typing.Optional[str]
|
|
100
|
+
Search agents by project id
|
|
101
|
+
|
|
102
|
+
template_id : typing.Optional[str]
|
|
103
|
+
Search agents by template id
|
|
104
|
+
|
|
105
|
+
base_template_id : typing.Optional[str]
|
|
106
|
+
Search agents by base template id
|
|
107
|
+
|
|
96
108
|
request_options : typing.Optional[RequestOptions]
|
|
97
109
|
Request-specific configuration.
|
|
98
110
|
|
|
@@ -121,6 +133,9 @@ class AgentsClient:
|
|
|
121
133
|
"after": after,
|
|
122
134
|
"limit": limit,
|
|
123
135
|
"query_text": query_text,
|
|
136
|
+
"project_id": project_id,
|
|
137
|
+
"template_id": template_id,
|
|
138
|
+
"base_template_id": base_template_id,
|
|
124
139
|
},
|
|
125
140
|
request_options=request_options,
|
|
126
141
|
)
|
|
@@ -177,6 +192,9 @@ class AgentsClient:
|
|
|
177
192
|
project: typing.Optional[str] = OMIT,
|
|
178
193
|
tool_exec_environment_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
179
194
|
memory_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
195
|
+
project_id: typing.Optional[str] = OMIT,
|
|
196
|
+
template_id: typing.Optional[str] = OMIT,
|
|
197
|
+
base_template_id: typing.Optional[str] = OMIT,
|
|
180
198
|
request_options: typing.Optional[RequestOptions] = None,
|
|
181
199
|
) -> AgentState:
|
|
182
200
|
"""
|
|
@@ -262,6 +280,15 @@ class AgentsClient:
|
|
|
262
280
|
memory_variables : typing.Optional[typing.Dict[str, typing.Optional[str]]]
|
|
263
281
|
The variables that should be set for the agent.
|
|
264
282
|
|
|
283
|
+
project_id : typing.Optional[str]
|
|
284
|
+
The id of the project the agent belongs to.
|
|
285
|
+
|
|
286
|
+
template_id : typing.Optional[str]
|
|
287
|
+
The id of the template the agent belongs to.
|
|
288
|
+
|
|
289
|
+
base_template_id : typing.Optional[str]
|
|
290
|
+
The base template id of the agent.
|
|
291
|
+
|
|
265
292
|
request_options : typing.Optional[RequestOptions]
|
|
266
293
|
Request-specific configuration.
|
|
267
294
|
|
|
@@ -319,6 +346,9 @@ class AgentsClient:
|
|
|
319
346
|
"project": project,
|
|
320
347
|
"tool_exec_environment_variables": tool_exec_environment_variables,
|
|
321
348
|
"memory_variables": memory_variables,
|
|
349
|
+
"project_id": project_id,
|
|
350
|
+
"template_id": template_id,
|
|
351
|
+
"base_template_id": base_template_id,
|
|
322
352
|
},
|
|
323
353
|
headers={
|
|
324
354
|
"content-type": "application/json",
|
|
@@ -481,6 +511,9 @@ class AgentsClient:
|
|
|
481
511
|
description: typing.Optional[str] = OMIT,
|
|
482
512
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
483
513
|
tool_exec_environment_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
514
|
+
project_id: typing.Optional[str] = OMIT,
|
|
515
|
+
template_id: typing.Optional[str] = OMIT,
|
|
516
|
+
base_template_id: typing.Optional[str] = OMIT,
|
|
484
517
|
request_options: typing.Optional[RequestOptions] = None,
|
|
485
518
|
) -> AgentState:
|
|
486
519
|
"""
|
|
@@ -529,6 +562,15 @@ class AgentsClient:
|
|
|
529
562
|
tool_exec_environment_variables : typing.Optional[typing.Dict[str, typing.Optional[str]]]
|
|
530
563
|
The environment variables for tool execution specific to this agent.
|
|
531
564
|
|
|
565
|
+
project_id : typing.Optional[str]
|
|
566
|
+
The id of the project the agent belongs to.
|
|
567
|
+
|
|
568
|
+
template_id : typing.Optional[str]
|
|
569
|
+
The id of the template the agent belongs to.
|
|
570
|
+
|
|
571
|
+
base_template_id : typing.Optional[str]
|
|
572
|
+
The base template id of the agent.
|
|
573
|
+
|
|
532
574
|
request_options : typing.Optional[RequestOptions]
|
|
533
575
|
Request-specific configuration.
|
|
534
576
|
|
|
@@ -571,6 +613,9 @@ class AgentsClient:
|
|
|
571
613
|
"description": description,
|
|
572
614
|
"metadata": metadata,
|
|
573
615
|
"tool_exec_environment_variables": tool_exec_environment_variables,
|
|
616
|
+
"project_id": project_id,
|
|
617
|
+
"template_id": template_id,
|
|
618
|
+
"base_template_id": base_template_id,
|
|
574
619
|
},
|
|
575
620
|
headers={
|
|
576
621
|
"content-type": "application/json",
|
|
@@ -675,11 +720,11 @@ class AgentsClient:
|
|
|
675
720
|
*,
|
|
676
721
|
search: typing.Optional[typing.Sequence[AgentsSearchRequestSearchItem]] = OMIT,
|
|
677
722
|
project_id: typing.Optional[str] = OMIT,
|
|
678
|
-
combinator: typing.Optional[
|
|
723
|
+
combinator: typing.Optional[typing.Literal["AND"]] = OMIT,
|
|
679
724
|
limit: typing.Optional[float] = OMIT,
|
|
680
|
-
|
|
725
|
+
after: typing.Optional[str] = OMIT,
|
|
681
726
|
request_options: typing.Optional[RequestOptions] = None,
|
|
682
|
-
) ->
|
|
727
|
+
) -> AgentsSearchResponse:
|
|
683
728
|
"""
|
|
684
729
|
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
685
730
|
|
|
@@ -691,18 +736,19 @@ class AgentsClient:
|
|
|
691
736
|
|
|
692
737
|
project_id : typing.Optional[str]
|
|
693
738
|
|
|
694
|
-
combinator : typing.Optional[
|
|
739
|
+
combinator : typing.Optional[typing.Literal["AND"]]
|
|
695
740
|
|
|
696
741
|
limit : typing.Optional[float]
|
|
697
742
|
|
|
698
|
-
|
|
743
|
+
after : typing.Optional[str]
|
|
699
744
|
|
|
700
745
|
request_options : typing.Optional[RequestOptions]
|
|
701
746
|
Request-specific configuration.
|
|
702
747
|
|
|
703
748
|
Returns
|
|
704
749
|
-------
|
|
705
|
-
|
|
750
|
+
AgentsSearchResponse
|
|
751
|
+
200
|
|
706
752
|
|
|
707
753
|
Examples
|
|
708
754
|
--------
|
|
@@ -723,7 +769,7 @@ class AgentsClient:
|
|
|
723
769
|
"project_id": project_id,
|
|
724
770
|
"combinator": combinator,
|
|
725
771
|
"limit": limit,
|
|
726
|
-
"
|
|
772
|
+
"after": after,
|
|
727
773
|
},
|
|
728
774
|
headers={
|
|
729
775
|
"content-type": "application/json",
|
|
@@ -733,7 +779,13 @@ class AgentsClient:
|
|
|
733
779
|
)
|
|
734
780
|
try:
|
|
735
781
|
if 200 <= _response.status_code < 300:
|
|
736
|
-
return
|
|
782
|
+
return typing.cast(
|
|
783
|
+
AgentsSearchResponse,
|
|
784
|
+
construct_type(
|
|
785
|
+
type_=AgentsSearchResponse, # type: ignore
|
|
786
|
+
object_=_response.json(),
|
|
787
|
+
),
|
|
788
|
+
)
|
|
737
789
|
_response_json = _response.json()
|
|
738
790
|
except JSONDecodeError:
|
|
739
791
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -762,6 +814,9 @@ class AsyncAgentsClient:
|
|
|
762
814
|
after: typing.Optional[str] = None,
|
|
763
815
|
limit: typing.Optional[int] = None,
|
|
764
816
|
query_text: typing.Optional[str] = None,
|
|
817
|
+
project_id: typing.Optional[str] = None,
|
|
818
|
+
template_id: typing.Optional[str] = None,
|
|
819
|
+
base_template_id: typing.Optional[str] = None,
|
|
765
820
|
request_options: typing.Optional[RequestOptions] = None,
|
|
766
821
|
) -> typing.List[AgentState]:
|
|
767
822
|
"""
|
|
@@ -791,6 +846,15 @@ class AsyncAgentsClient:
|
|
|
791
846
|
query_text : typing.Optional[str]
|
|
792
847
|
Search agents by name
|
|
793
848
|
|
|
849
|
+
project_id : typing.Optional[str]
|
|
850
|
+
Search agents by project id
|
|
851
|
+
|
|
852
|
+
template_id : typing.Optional[str]
|
|
853
|
+
Search agents by template id
|
|
854
|
+
|
|
855
|
+
base_template_id : typing.Optional[str]
|
|
856
|
+
Search agents by base template id
|
|
857
|
+
|
|
794
858
|
request_options : typing.Optional[RequestOptions]
|
|
795
859
|
Request-specific configuration.
|
|
796
860
|
|
|
@@ -827,6 +891,9 @@ class AsyncAgentsClient:
|
|
|
827
891
|
"after": after,
|
|
828
892
|
"limit": limit,
|
|
829
893
|
"query_text": query_text,
|
|
894
|
+
"project_id": project_id,
|
|
895
|
+
"template_id": template_id,
|
|
896
|
+
"base_template_id": base_template_id,
|
|
830
897
|
},
|
|
831
898
|
request_options=request_options,
|
|
832
899
|
)
|
|
@@ -883,6 +950,9 @@ class AsyncAgentsClient:
|
|
|
883
950
|
project: typing.Optional[str] = OMIT,
|
|
884
951
|
tool_exec_environment_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
885
952
|
memory_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
953
|
+
project_id: typing.Optional[str] = OMIT,
|
|
954
|
+
template_id: typing.Optional[str] = OMIT,
|
|
955
|
+
base_template_id: typing.Optional[str] = OMIT,
|
|
886
956
|
request_options: typing.Optional[RequestOptions] = None,
|
|
887
957
|
) -> AgentState:
|
|
888
958
|
"""
|
|
@@ -968,6 +1038,15 @@ class AsyncAgentsClient:
|
|
|
968
1038
|
memory_variables : typing.Optional[typing.Dict[str, typing.Optional[str]]]
|
|
969
1039
|
The variables that should be set for the agent.
|
|
970
1040
|
|
|
1041
|
+
project_id : typing.Optional[str]
|
|
1042
|
+
The id of the project the agent belongs to.
|
|
1043
|
+
|
|
1044
|
+
template_id : typing.Optional[str]
|
|
1045
|
+
The id of the template the agent belongs to.
|
|
1046
|
+
|
|
1047
|
+
base_template_id : typing.Optional[str]
|
|
1048
|
+
The base template id of the agent.
|
|
1049
|
+
|
|
971
1050
|
request_options : typing.Optional[RequestOptions]
|
|
972
1051
|
Request-specific configuration.
|
|
973
1052
|
|
|
@@ -1033,6 +1112,9 @@ class AsyncAgentsClient:
|
|
|
1033
1112
|
"project": project,
|
|
1034
1113
|
"tool_exec_environment_variables": tool_exec_environment_variables,
|
|
1035
1114
|
"memory_variables": memory_variables,
|
|
1115
|
+
"project_id": project_id,
|
|
1116
|
+
"template_id": template_id,
|
|
1117
|
+
"base_template_id": base_template_id,
|
|
1036
1118
|
},
|
|
1037
1119
|
headers={
|
|
1038
1120
|
"content-type": "application/json",
|
|
@@ -1211,6 +1293,9 @@ class AsyncAgentsClient:
|
|
|
1211
1293
|
description: typing.Optional[str] = OMIT,
|
|
1212
1294
|
metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
|
|
1213
1295
|
tool_exec_environment_variables: typing.Optional[typing.Dict[str, typing.Optional[str]]] = OMIT,
|
|
1296
|
+
project_id: typing.Optional[str] = OMIT,
|
|
1297
|
+
template_id: typing.Optional[str] = OMIT,
|
|
1298
|
+
base_template_id: typing.Optional[str] = OMIT,
|
|
1214
1299
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1215
1300
|
) -> AgentState:
|
|
1216
1301
|
"""
|
|
@@ -1259,6 +1344,15 @@ class AsyncAgentsClient:
|
|
|
1259
1344
|
tool_exec_environment_variables : typing.Optional[typing.Dict[str, typing.Optional[str]]]
|
|
1260
1345
|
The environment variables for tool execution specific to this agent.
|
|
1261
1346
|
|
|
1347
|
+
project_id : typing.Optional[str]
|
|
1348
|
+
The id of the project the agent belongs to.
|
|
1349
|
+
|
|
1350
|
+
template_id : typing.Optional[str]
|
|
1351
|
+
The id of the template the agent belongs to.
|
|
1352
|
+
|
|
1353
|
+
base_template_id : typing.Optional[str]
|
|
1354
|
+
The base template id of the agent.
|
|
1355
|
+
|
|
1262
1356
|
request_options : typing.Optional[RequestOptions]
|
|
1263
1357
|
Request-specific configuration.
|
|
1264
1358
|
|
|
@@ -1309,6 +1403,9 @@ class AsyncAgentsClient:
|
|
|
1309
1403
|
"description": description,
|
|
1310
1404
|
"metadata": metadata,
|
|
1311
1405
|
"tool_exec_environment_variables": tool_exec_environment_variables,
|
|
1406
|
+
"project_id": project_id,
|
|
1407
|
+
"template_id": template_id,
|
|
1408
|
+
"base_template_id": base_template_id,
|
|
1312
1409
|
},
|
|
1313
1410
|
headers={
|
|
1314
1411
|
"content-type": "application/json",
|
|
@@ -1421,11 +1518,11 @@ class AsyncAgentsClient:
|
|
|
1421
1518
|
*,
|
|
1422
1519
|
search: typing.Optional[typing.Sequence[AgentsSearchRequestSearchItem]] = OMIT,
|
|
1423
1520
|
project_id: typing.Optional[str] = OMIT,
|
|
1424
|
-
combinator: typing.Optional[
|
|
1521
|
+
combinator: typing.Optional[typing.Literal["AND"]] = OMIT,
|
|
1425
1522
|
limit: typing.Optional[float] = OMIT,
|
|
1426
|
-
|
|
1523
|
+
after: typing.Optional[str] = OMIT,
|
|
1427
1524
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1428
|
-
) ->
|
|
1525
|
+
) -> AgentsSearchResponse:
|
|
1429
1526
|
"""
|
|
1430
1527
|
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
1431
1528
|
|
|
@@ -1437,18 +1534,19 @@ class AsyncAgentsClient:
|
|
|
1437
1534
|
|
|
1438
1535
|
project_id : typing.Optional[str]
|
|
1439
1536
|
|
|
1440
|
-
combinator : typing.Optional[
|
|
1537
|
+
combinator : typing.Optional[typing.Literal["AND"]]
|
|
1441
1538
|
|
|
1442
1539
|
limit : typing.Optional[float]
|
|
1443
1540
|
|
|
1444
|
-
|
|
1541
|
+
after : typing.Optional[str]
|
|
1445
1542
|
|
|
1446
1543
|
request_options : typing.Optional[RequestOptions]
|
|
1447
1544
|
Request-specific configuration.
|
|
1448
1545
|
|
|
1449
1546
|
Returns
|
|
1450
1547
|
-------
|
|
1451
|
-
|
|
1548
|
+
AgentsSearchResponse
|
|
1549
|
+
200
|
|
1452
1550
|
|
|
1453
1551
|
Examples
|
|
1454
1552
|
--------
|
|
@@ -1477,7 +1575,7 @@ class AsyncAgentsClient:
|
|
|
1477
1575
|
"project_id": project_id,
|
|
1478
1576
|
"combinator": combinator,
|
|
1479
1577
|
"limit": limit,
|
|
1480
|
-
"
|
|
1578
|
+
"after": after,
|
|
1481
1579
|
},
|
|
1482
1580
|
headers={
|
|
1483
1581
|
"content-type": "application/json",
|
|
@@ -1487,7 +1585,13 @@ class AsyncAgentsClient:
|
|
|
1487
1585
|
)
|
|
1488
1586
|
try:
|
|
1489
1587
|
if 200 <= _response.status_code < 300:
|
|
1490
|
-
return
|
|
1588
|
+
return typing.cast(
|
|
1589
|
+
AgentsSearchResponse,
|
|
1590
|
+
construct_type(
|
|
1591
|
+
type_=AgentsSearchResponse, # type: ignore
|
|
1592
|
+
object_=_response.json(),
|
|
1593
|
+
),
|
|
1594
|
+
)
|
|
1491
1595
|
_response_json = _response.json()
|
|
1492
1596
|
except JSONDecodeError:
|
|
1493
1597
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from .types import TemplatesMigrateResponse
|
|
3
|
+
from .types import TemplatesCreateResponse, TemplatesMigrateResponse
|
|
4
4
|
|
|
5
|
-
__all__ = ["TemplatesMigrateResponse"]
|
|
5
|
+
__all__ = ["TemplatesCreateResponse", "TemplatesMigrateResponse"]
|
|
@@ -12,6 +12,7 @@ from ...core.api_error import ApiError
|
|
|
12
12
|
from .types.templates_migrate_response import TemplatesMigrateResponse
|
|
13
13
|
from ...errors.conflict_error import ConflictError
|
|
14
14
|
from ...types.conflict_error_body import ConflictErrorBody
|
|
15
|
+
from .types.templates_create_response import TemplatesCreateResponse
|
|
15
16
|
from ...core.client_wrapper import AsyncClientWrapper
|
|
16
17
|
|
|
17
18
|
# this is used as the default value for optional parameters
|
|
@@ -215,7 +216,7 @@ class TemplatesClient:
|
|
|
215
216
|
*,
|
|
216
217
|
project: typing.Optional[str] = OMIT,
|
|
217
218
|
request_options: typing.Optional[RequestOptions] = None,
|
|
218
|
-
) ->
|
|
219
|
+
) -> TemplatesCreateResponse:
|
|
219
220
|
"""
|
|
220
221
|
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
221
222
|
|
|
@@ -232,7 +233,8 @@ class TemplatesClient:
|
|
|
232
233
|
|
|
233
234
|
Returns
|
|
234
235
|
-------
|
|
235
|
-
|
|
236
|
+
TemplatesCreateResponse
|
|
237
|
+
201
|
|
236
238
|
|
|
237
239
|
Examples
|
|
238
240
|
--------
|
|
@@ -259,16 +261,12 @@ class TemplatesClient:
|
|
|
259
261
|
)
|
|
260
262
|
try:
|
|
261
263
|
if 200 <= _response.status_code < 300:
|
|
262
|
-
return
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
|
269
|
-
object_=_response.json(),
|
|
270
|
-
),
|
|
271
|
-
)
|
|
264
|
+
return typing.cast(
|
|
265
|
+
TemplatesCreateResponse,
|
|
266
|
+
construct_type(
|
|
267
|
+
type_=TemplatesCreateResponse, # type: ignore
|
|
268
|
+
object_=_response.json(),
|
|
269
|
+
),
|
|
272
270
|
)
|
|
273
271
|
if _response.status_code == 500:
|
|
274
272
|
raise InternalServerError(
|
|
@@ -499,7 +497,7 @@ class AsyncTemplatesClient:
|
|
|
499
497
|
*,
|
|
500
498
|
project: typing.Optional[str] = OMIT,
|
|
501
499
|
request_options: typing.Optional[RequestOptions] = None,
|
|
502
|
-
) ->
|
|
500
|
+
) -> TemplatesCreateResponse:
|
|
503
501
|
"""
|
|
504
502
|
<Note>This endpoint is only available on Letta Cloud.</Note>
|
|
505
503
|
|
|
@@ -516,7 +514,8 @@ class AsyncTemplatesClient:
|
|
|
516
514
|
|
|
517
515
|
Returns
|
|
518
516
|
-------
|
|
519
|
-
|
|
517
|
+
TemplatesCreateResponse
|
|
518
|
+
201
|
|
520
519
|
|
|
521
520
|
Examples
|
|
522
521
|
--------
|
|
@@ -551,16 +550,12 @@ class AsyncTemplatesClient:
|
|
|
551
550
|
)
|
|
552
551
|
try:
|
|
553
552
|
if 200 <= _response.status_code < 300:
|
|
554
|
-
return
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
type_=typing.Optional[typing.Any], # type: ignore
|
|
561
|
-
object_=_response.json(),
|
|
562
|
-
),
|
|
563
|
-
)
|
|
553
|
+
return typing.cast(
|
|
554
|
+
TemplatesCreateResponse,
|
|
555
|
+
construct_type(
|
|
556
|
+
type_=TemplatesCreateResponse, # type: ignore
|
|
557
|
+
object_=_response.json(),
|
|
558
|
+
),
|
|
564
559
|
)
|
|
565
560
|
if _response.status_code == 500:
|
|
566
561
|
raise InternalServerError(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from .templates_create_response import TemplatesCreateResponse
|
|
3
4
|
from .templates_migrate_response import TemplatesMigrateResponse
|
|
4
5
|
|
|
5
|
-
__all__ = ["TemplatesMigrateResponse"]
|
|
6
|
+
__all__ = ["TemplatesCreateResponse", "TemplatesMigrateResponse"]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
+
import typing_extensions
|
|
5
|
+
from ....core.serialization import FieldMetadata
|
|
6
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
8
|
+
import pydantic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class TemplatesCreateResponse(UncheckedBaseModel):
|
|
12
|
+
template_name: typing_extensions.Annotated[str, FieldMetadata(alias="templateName")]
|
|
13
|
+
template_id: typing_extensions.Annotated[str, FieldMetadata(alias="templateId")]
|
|
14
|
+
|
|
15
|
+
if IS_PYDANTIC_V2:
|
|
16
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
17
|
+
else:
|
|
18
|
+
|
|
19
|
+
class Config:
|
|
20
|
+
frozen = True
|
|
21
|
+
smart_union = True
|
|
22
|
+
extra = pydantic.Extra.allow
|