letta-client 0.1.9__py3-none-any.whl → 0.1.11__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.
- {letta → letta_client}/__init__.py +6 -1
- {letta → letta_client}/agents/archival_memory/client.py +8 -8
- {letta → letta_client}/agents/client.py +164 -20
- {letta → letta_client}/agents/context/client.py +2 -2
- {letta → letta_client}/agents/core_memory/client.py +14 -14
- {letta → letta_client}/agents/memory_variables/client.py +2 -2
- {letta → letta_client}/agents/messages/client.py +19 -19
- {letta → letta_client}/agents/recall_memory/client.py +2 -2
- {letta → letta_client}/agents/sources/client.py +2 -2
- {letta → letta_client}/agents/templates/client.py +12 -12
- {letta → letta_client}/agents/tools/client.py +6 -6
- {letta → letta_client}/blocks/client.py +14 -14
- {letta → letta_client}/client.py +6 -2
- {letta → letta_client}/core/client_wrapper.py +1 -1
- {letta → letta_client}/health/client.py +2 -2
- {letta → letta_client}/jobs/client.py +8 -8
- {letta → letta_client}/models/client.py +4 -4
- {letta → letta_client}/providers/client.py +8 -8
- letta_client/runs/client.py +876 -0
- {letta → letta_client}/sources/client.py +16 -16
- {letta → letta_client}/sources/files/client.py +6 -6
- {letta → letta_client}/sources/passages/client.py +2 -2
- letta_client/tools/__init__.py +2 -0
- {letta → letta_client}/tools/client.py +28 -58
- {letta → letta_client}/types/__init__.py +4 -0
- {letta → letta_client}/types/job.py +6 -0
- letta_client/types/job_type.py +5 -0
- {letta → letta_client}/types/letta_schemas_tool_tool.py +0 -5
- letta_client/types/run.py +77 -0
- {letta → letta_client}/types/tool_create.py +0 -5
- {letta_client-0.1.9.dist-info → letta_client-0.1.11.dist-info}/METADATA +7 -7
- letta_client-0.1.11.dist-info/RECORD +204 -0
- letta_client-0.1.9.dist-info/RECORD +0 -200
- {letta → letta_client}/agents/__init__.py +0 -0
- {letta → letta_client}/agents/archival_memory/__init__.py +0 -0
- {letta → letta_client}/agents/context/__init__.py +0 -0
- {letta → letta_client}/agents/core_memory/__init__.py +0 -0
- {letta → letta_client}/agents/memory_variables/__init__.py +0 -0
- {letta → letta_client}/agents/memory_variables/types/__init__.py +0 -0
- {letta → letta_client}/agents/memory_variables/types/memory_variables_get_response.py +0 -0
- {letta → letta_client}/agents/messages/__init__.py +0 -0
- {letta → letta_client}/agents/messages/types/__init__.py +0 -0
- {letta → letta_client}/agents/messages/types/letta_streaming_response.py +0 -0
- {letta → letta_client}/agents/messages/types/messages_list_response.py +0 -0
- {letta → letta_client}/agents/messages/types/messages_list_response_item.py +0 -0
- {letta → letta_client}/agents/recall_memory/__init__.py +0 -0
- {letta → letta_client}/agents/sources/__init__.py +0 -0
- {letta → letta_client}/agents/templates/__init__.py +0 -0
- {letta → letta_client}/agents/templates/types/__init__.py +0 -0
- {letta → letta_client}/agents/templates/types/templates_migrate_response.py +0 -0
- {letta → letta_client}/agents/tools/__init__.py +0 -0
- {letta → letta_client}/agents/types/__init__.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_combinator.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_search_item.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_search_item_name.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_search_item_name_operator.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_search_item_order_by.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_search_item_order_by_direction.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_search_item_order_by_value.py +0 -0
- {letta → letta_client}/agents/types/agents_search_request_search_item_version.py +0 -0
- {letta → letta_client}/agents/types/create_agent_request_tool_rules_item.py +0 -0
- {letta → letta_client}/agents/types/update_agent_tool_rules_item.py +0 -0
- {letta → letta_client}/blocks/__init__.py +0 -0
- {letta → letta_client}/core/__init__.py +0 -0
- {letta → letta_client}/core/api_error.py +0 -0
- {letta → letta_client}/core/datetime_utils.py +0 -0
- {letta → letta_client}/core/file.py +0 -0
- {letta → letta_client}/core/http_client.py +0 -0
- {letta → letta_client}/core/jsonable_encoder.py +0 -0
- {letta → letta_client}/core/pydantic_utilities.py +0 -0
- {letta → letta_client}/core/query_encoder.py +0 -0
- {letta → letta_client}/core/remove_none_from_dict.py +0 -0
- {letta → letta_client}/core/request_options.py +0 -0
- {letta → letta_client}/core/serialization.py +0 -0
- {letta → letta_client}/core/unchecked_base_model.py +0 -0
- {letta → letta_client}/environment.py +0 -0
- {letta → letta_client}/errors/__init__.py +0 -0
- {letta → letta_client}/errors/conflict_error.py +0 -0
- {letta → letta_client}/errors/internal_server_error.py +0 -0
- {letta → letta_client}/errors/not_found_error.py +0 -0
- {letta → letta_client}/errors/unprocessable_entity_error.py +0 -0
- {letta → letta_client}/health/__init__.py +0 -0
- {letta → letta_client}/jobs/__init__.py +0 -0
- {letta → letta_client}/models/__init__.py +0 -0
- {letta → letta_client}/providers/__init__.py +0 -0
- {letta → letta_client}/py.typed +0 -0
- {letta/sources/files → letta_client/runs}/__init__.py +0 -0
- {letta → letta_client}/sources/__init__.py +0 -0
- {letta/sources/passages → letta_client/sources/files}/__init__.py +0 -0
- {letta/tools → letta_client/sources/passages}/__init__.py +0 -0
- {letta → letta_client}/types/action_model.py +0 -0
- {letta → letta_client}/types/action_parameters_model.py +0 -0
- {letta → letta_client}/types/action_response_model.py +0 -0
- {letta → letta_client}/types/agent_environment_variable.py +0 -0
- {letta → letta_client}/types/agent_state.py +0 -0
- {letta → letta_client}/types/agent_state_tool_rules_item.py +0 -0
- {letta → letta_client}/types/agent_type.py +0 -0
- {letta → letta_client}/types/app_auth_scheme.py +0 -0
- {letta → letta_client}/types/app_auth_scheme_auth_mode.py +0 -0
- {letta → letta_client}/types/app_model.py +0 -0
- {letta → letta_client}/types/archival_memory_summary.py +0 -0
- {letta → letta_client}/types/assistant_file.py +0 -0
- {letta → letta_client}/types/assistant_message_input.py +0 -0
- {letta → letta_client}/types/assistant_message_output.py +0 -0
- {letta → letta_client}/types/auth_request.py +0 -0
- {letta → letta_client}/types/auth_response.py +0 -0
- {letta → letta_client}/types/auth_scheme_field.py +0 -0
- {letta → letta_client}/types/block.py +0 -0
- {letta → letta_client}/types/block_update.py +0 -0
- {letta → letta_client}/types/chat_completion_request.py +0 -0
- {letta → letta_client}/types/chat_completion_request_function_call.py +0 -0
- {letta → letta_client}/types/chat_completion_request_messages_item.py +0 -0
- {letta → letta_client}/types/chat_completion_request_stop.py +0 -0
- {letta → letta_client}/types/chat_completion_request_tool_choice.py +0 -0
- {letta → letta_client}/types/chat_completion_response.py +0 -0
- {letta → letta_client}/types/child_tool_rule.py +0 -0
- {letta → letta_client}/types/choice.py +0 -0
- {letta → letta_client}/types/conditional_tool_rule.py +0 -0
- {letta → letta_client}/types/conflict_error_body.py +0 -0
- {letta → letta_client}/types/context_window_overview.py +0 -0
- {letta → letta_client}/types/create_assistant_file_request.py +0 -0
- {letta → letta_client}/types/create_assistant_request.py +0 -0
- {letta → letta_client}/types/create_block.py +0 -0
- {letta → letta_client}/types/delete_assistant_file_response.py +0 -0
- {letta → letta_client}/types/delete_assistant_response.py +0 -0
- {letta → letta_client}/types/e_2_b_sandbox_config.py +0 -0
- {letta → letta_client}/types/embedding_config.py +0 -0
- {letta → letta_client}/types/embedding_config_embedding_endpoint_type.py +0 -0
- {letta → letta_client}/types/file_metadata.py +0 -0
- {letta → letta_client}/types/function_call_input.py +0 -0
- {letta → letta_client}/types/function_call_output.py +0 -0
- {letta → letta_client}/types/function_schema.py +0 -0
- {letta → letta_client}/types/health.py +0 -0
- {letta → letta_client}/types/http_validation_error.py +0 -0
- {letta → letta_client}/types/init_tool_rule.py +0 -0
- {letta → letta_client}/types/internal_server_error_body.py +0 -0
- {letta → letta_client}/types/job_status.py +0 -0
- {letta → letta_client}/types/letta_request.py +0 -0
- {letta → letta_client}/types/letta_response.py +0 -0
- {letta → letta_client}/types/letta_response_messages_item.py +0 -0
- {letta → letta_client}/types/letta_schemas_letta_message_tool_call.py +0 -0
- {letta → letta_client}/types/letta_schemas_message_message.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completion_request_tool.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completion_request_tool_call.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completion_request_tool_call_function.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completion_response_message.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completion_response_tool_call.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completions_tool_call_function.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completions_tool_call_input.py +0 -0
- {letta → letta_client}/types/letta_schemas_openai_chat_completions_tool_call_output.py +0 -0
- {letta → letta_client}/types/letta_usage_statistics.py +0 -0
- {letta → letta_client}/types/llm_config.py +0 -0
- {letta → letta_client}/types/llm_config_model_endpoint_type.py +0 -0
- {letta → letta_client}/types/local_sandbox_config.py +0 -0
- {letta → letta_client}/types/log_prob_token.py +0 -0
- {letta → letta_client}/types/memory.py +0 -0
- {letta → letta_client}/types/message_content_log_prob.py +0 -0
- {letta → letta_client}/types/message_create.py +0 -0
- {letta → letta_client}/types/message_create_role.py +0 -0
- {letta → letta_client}/types/message_role.py +0 -0
- {letta → letta_client}/types/not_found_error_body.py +0 -0
- {letta → letta_client}/types/not_found_error_body_message.py +0 -0
- {letta → letta_client}/types/open_ai_assistant.py +0 -0
- {letta → letta_client}/types/organization.py +0 -0
- {letta → letta_client}/types/organization_create.py +0 -0
- {letta → letta_client}/types/passage.py +0 -0
- {letta → letta_client}/types/provider.py +0 -0
- {letta → letta_client}/types/reasoning_message.py +0 -0
- {letta → letta_client}/types/recall_memory_summary.py +0 -0
- {letta → letta_client}/types/response_format.py +0 -0
- {letta → letta_client}/types/sandbox_config.py +0 -0
- {letta → letta_client}/types/sandbox_config_create.py +0 -0
- {letta → letta_client}/types/sandbox_config_create_config.py +0 -0
- {letta → letta_client}/types/sandbox_config_update.py +0 -0
- {letta → letta_client}/types/sandbox_config_update_config.py +0 -0
- {letta → letta_client}/types/sandbox_environment_variable.py +0 -0
- {letta → letta_client}/types/sandbox_environment_variable_create.py +0 -0
- {letta → letta_client}/types/sandbox_environment_variable_update.py +0 -0
- {letta → letta_client}/types/sandbox_type.py +0 -0
- {letta → letta_client}/types/source.py +0 -0
- {letta → letta_client}/types/system_message_input.py +0 -0
- {letta → letta_client}/types/system_message_output.py +0 -0
- {letta → letta_client}/types/terminal_tool_rule.py +0 -0
- {letta → letta_client}/types/tool_call_delta.py +0 -0
- {letta → letta_client}/types/tool_call_function_output.py +0 -0
- {letta → letta_client}/types/tool_call_message.py +0 -0
- {letta → letta_client}/types/tool_call_message_tool_call.py +0 -0
- {letta → letta_client}/types/tool_function_choice.py +0 -0
- {letta → letta_client}/types/tool_input.py +0 -0
- {letta → letta_client}/types/tool_message.py +0 -0
- {letta → letta_client}/types/tool_return_message.py +0 -0
- {letta → letta_client}/types/tool_return_message_status.py +0 -0
- {letta → letta_client}/types/tool_rule_type.py +0 -0
- {letta → letta_client}/types/tool_type.py +0 -0
- {letta → letta_client}/types/usage_statistics.py +0 -0
- {letta → letta_client}/types/user.py +0 -0
- {letta → letta_client}/types/user_create.py +0 -0
- {letta → letta_client}/types/user_message_input.py +0 -0
- {letta → letta_client}/types/user_message_input_content.py +0 -0
- {letta → letta_client}/types/user_message_output.py +0 -0
- {letta → letta_client}/types/user_update.py +0 -0
- {letta → letta_client}/types/validation_error.py +0 -0
- {letta → letta_client}/types/validation_error_loc_item.py +0 -0
- {letta → letta_client}/version.py +0 -0
- {letta_client-0.1.9.dist-info → letta_client-0.1.11.dist-info}/WHEEL +0 -0
|
@@ -21,7 +21,7 @@ from ...types.letta_schemas_message_message import LettaSchemasMessageMessage
|
|
|
21
21
|
from .types.letta_streaming_response import LettaStreamingResponse
|
|
22
22
|
import httpx_sse
|
|
23
23
|
import json
|
|
24
|
-
from ...types.
|
|
24
|
+
from ...types.run import Run
|
|
25
25
|
from ...core.client_wrapper import AsyncClientWrapper
|
|
26
26
|
|
|
27
27
|
# this is used as the default value for optional parameters
|
|
@@ -75,7 +75,7 @@ class MessagesClient:
|
|
|
75
75
|
|
|
76
76
|
Examples
|
|
77
77
|
--------
|
|
78
|
-
from
|
|
78
|
+
from letta_client import Letta
|
|
79
79
|
|
|
80
80
|
client = Letta(
|
|
81
81
|
token="YOUR_TOKEN",
|
|
@@ -160,7 +160,7 @@ class MessagesClient:
|
|
|
160
160
|
|
|
161
161
|
Examples
|
|
162
162
|
--------
|
|
163
|
-
from
|
|
163
|
+
from letta_client import Letta, MessageCreate
|
|
164
164
|
|
|
165
165
|
client = Letta(
|
|
166
166
|
token="YOUR_TOKEN",
|
|
@@ -259,7 +259,7 @@ class MessagesClient:
|
|
|
259
259
|
|
|
260
260
|
Examples
|
|
261
261
|
--------
|
|
262
|
-
from
|
|
262
|
+
from letta_client import Letta
|
|
263
263
|
|
|
264
264
|
client = Letta(
|
|
265
265
|
token="YOUR_TOKEN",
|
|
@@ -358,7 +358,7 @@ class MessagesClient:
|
|
|
358
358
|
|
|
359
359
|
Examples
|
|
360
360
|
--------
|
|
361
|
-
from
|
|
361
|
+
from letta_client import Letta, MessageCreate
|
|
362
362
|
|
|
363
363
|
client = Letta(
|
|
364
364
|
token="YOUR_TOKEN",
|
|
@@ -433,7 +433,7 @@ class MessagesClient:
|
|
|
433
433
|
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
434
434
|
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
435
435
|
request_options: typing.Optional[RequestOptions] = None,
|
|
436
|
-
) ->
|
|
436
|
+
) -> Run:
|
|
437
437
|
"""
|
|
438
438
|
Asynchronously process a user message and return a job ID.
|
|
439
439
|
The actual processing happens in the background, and the status can be checked using the job ID.
|
|
@@ -459,12 +459,12 @@ class MessagesClient:
|
|
|
459
459
|
|
|
460
460
|
Returns
|
|
461
461
|
-------
|
|
462
|
-
|
|
462
|
+
Run
|
|
463
463
|
Successful Response
|
|
464
464
|
|
|
465
465
|
Examples
|
|
466
466
|
--------
|
|
467
|
-
from
|
|
467
|
+
from letta_client import Letta, MessageCreate
|
|
468
468
|
|
|
469
469
|
client = Letta(
|
|
470
470
|
token="YOUR_TOKEN",
|
|
@@ -496,9 +496,9 @@ class MessagesClient:
|
|
|
496
496
|
try:
|
|
497
497
|
if 200 <= _response.status_code < 300:
|
|
498
498
|
return typing.cast(
|
|
499
|
-
|
|
499
|
+
Run,
|
|
500
500
|
construct_type(
|
|
501
|
-
type_=
|
|
501
|
+
type_=Run, # type: ignore
|
|
502
502
|
object_=_response.json(),
|
|
503
503
|
),
|
|
504
504
|
)
|
|
@@ -567,7 +567,7 @@ class AsyncMessagesClient:
|
|
|
567
567
|
--------
|
|
568
568
|
import asyncio
|
|
569
569
|
|
|
570
|
-
from
|
|
570
|
+
from letta_client import AsyncLetta
|
|
571
571
|
|
|
572
572
|
client = AsyncLetta(
|
|
573
573
|
token="YOUR_TOKEN",
|
|
@@ -660,7 +660,7 @@ class AsyncMessagesClient:
|
|
|
660
660
|
--------
|
|
661
661
|
import asyncio
|
|
662
662
|
|
|
663
|
-
from
|
|
663
|
+
from letta_client import AsyncLetta, MessageCreate
|
|
664
664
|
|
|
665
665
|
client = AsyncLetta(
|
|
666
666
|
token="YOUR_TOKEN",
|
|
@@ -767,7 +767,7 @@ class AsyncMessagesClient:
|
|
|
767
767
|
--------
|
|
768
768
|
import asyncio
|
|
769
769
|
|
|
770
|
-
from
|
|
770
|
+
from letta_client import AsyncLetta
|
|
771
771
|
|
|
772
772
|
client = AsyncLetta(
|
|
773
773
|
token="YOUR_TOKEN",
|
|
@@ -874,7 +874,7 @@ class AsyncMessagesClient:
|
|
|
874
874
|
--------
|
|
875
875
|
import asyncio
|
|
876
876
|
|
|
877
|
-
from
|
|
877
|
+
from letta_client import AsyncLetta, MessageCreate
|
|
878
878
|
|
|
879
879
|
client = AsyncLetta(
|
|
880
880
|
token="YOUR_TOKEN",
|
|
@@ -955,7 +955,7 @@ class AsyncMessagesClient:
|
|
|
955
955
|
assistant_message_tool_name: typing.Optional[str] = OMIT,
|
|
956
956
|
assistant_message_tool_kwarg: typing.Optional[str] = OMIT,
|
|
957
957
|
request_options: typing.Optional[RequestOptions] = None,
|
|
958
|
-
) ->
|
|
958
|
+
) -> Run:
|
|
959
959
|
"""
|
|
960
960
|
Asynchronously process a user message and return a job ID.
|
|
961
961
|
The actual processing happens in the background, and the status can be checked using the job ID.
|
|
@@ -981,14 +981,14 @@ class AsyncMessagesClient:
|
|
|
981
981
|
|
|
982
982
|
Returns
|
|
983
983
|
-------
|
|
984
|
-
|
|
984
|
+
Run
|
|
985
985
|
Successful Response
|
|
986
986
|
|
|
987
987
|
Examples
|
|
988
988
|
--------
|
|
989
989
|
import asyncio
|
|
990
990
|
|
|
991
|
-
from
|
|
991
|
+
from letta_client import AsyncLetta, MessageCreate
|
|
992
992
|
|
|
993
993
|
client = AsyncLetta(
|
|
994
994
|
token="YOUR_TOKEN",
|
|
@@ -1026,9 +1026,9 @@ class AsyncMessagesClient:
|
|
|
1026
1026
|
try:
|
|
1027
1027
|
if 200 <= _response.status_code < 300:
|
|
1028
1028
|
return typing.cast(
|
|
1029
|
-
|
|
1029
|
+
Run,
|
|
1030
1030
|
construct_type(
|
|
1031
|
-
type_=
|
|
1031
|
+
type_=Run, # type: ignore
|
|
1032
1032
|
object_=_response.json(),
|
|
1033
1033
|
),
|
|
1034
1034
|
)
|
|
@@ -37,7 +37,7 @@ class RecallMemoryClient:
|
|
|
37
37
|
|
|
38
38
|
Examples
|
|
39
39
|
--------
|
|
40
|
-
from
|
|
40
|
+
from letta_client import Letta
|
|
41
41
|
|
|
42
42
|
client = Letta(
|
|
43
43
|
token="YOUR_TOKEN",
|
|
@@ -102,7 +102,7 @@ class AsyncRecallMemoryClient:
|
|
|
102
102
|
--------
|
|
103
103
|
import asyncio
|
|
104
104
|
|
|
105
|
-
from
|
|
105
|
+
from letta_client import AsyncLetta
|
|
106
106
|
|
|
107
107
|
client = AsyncLetta(
|
|
108
108
|
token="YOUR_TOKEN",
|
|
@@ -35,7 +35,7 @@ class SourcesClient:
|
|
|
35
35
|
|
|
36
36
|
Examples
|
|
37
37
|
--------
|
|
38
|
-
from
|
|
38
|
+
from letta_client import Letta
|
|
39
39
|
|
|
40
40
|
client = Letta(
|
|
41
41
|
token="YOUR_TOKEN",
|
|
@@ -100,7 +100,7 @@ class AsyncSourcesClient:
|
|
|
100
100
|
--------
|
|
101
101
|
import asyncio
|
|
102
102
|
|
|
103
|
-
from
|
|
103
|
+
from letta_client import AsyncLetta
|
|
104
104
|
|
|
105
105
|
client = AsyncLetta(
|
|
106
106
|
token="YOUR_TOKEN",
|
|
@@ -53,7 +53,7 @@ class TemplatesClient:
|
|
|
53
53
|
|
|
54
54
|
Examples
|
|
55
55
|
--------
|
|
56
|
-
from
|
|
56
|
+
from letta_client import Letta
|
|
57
57
|
|
|
58
58
|
client = Letta(
|
|
59
59
|
token="YOUR_TOKEN",
|
|
@@ -140,7 +140,7 @@ class TemplatesClient:
|
|
|
140
140
|
|
|
141
141
|
Examples
|
|
142
142
|
--------
|
|
143
|
-
from
|
|
143
|
+
from letta_client import Letta
|
|
144
144
|
|
|
145
145
|
client = Letta(
|
|
146
146
|
token="YOUR_TOKEN",
|
|
@@ -213,7 +213,7 @@ class TemplatesClient:
|
|
|
213
213
|
self,
|
|
214
214
|
agent_id: str,
|
|
215
215
|
*,
|
|
216
|
-
|
|
216
|
+
project: typing.Optional[str] = OMIT,
|
|
217
217
|
request_options: typing.Optional[RequestOptions] = None,
|
|
218
218
|
) -> None:
|
|
219
219
|
"""
|
|
@@ -225,7 +225,7 @@ class TemplatesClient:
|
|
|
225
225
|
----------
|
|
226
226
|
agent_id : str
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
project : typing.Optional[str]
|
|
229
229
|
|
|
230
230
|
request_options : typing.Optional[RequestOptions]
|
|
231
231
|
Request-specific configuration.
|
|
@@ -236,7 +236,7 @@ class TemplatesClient:
|
|
|
236
236
|
|
|
237
237
|
Examples
|
|
238
238
|
--------
|
|
239
|
-
from
|
|
239
|
+
from letta_client import Letta
|
|
240
240
|
|
|
241
241
|
client = Letta(
|
|
242
242
|
token="YOUR_TOKEN",
|
|
@@ -249,7 +249,7 @@ class TemplatesClient:
|
|
|
249
249
|
f"v1/agents/{jsonable_encoder(agent_id)}/template",
|
|
250
250
|
method="POST",
|
|
251
251
|
json={
|
|
252
|
-
"
|
|
252
|
+
"project": project,
|
|
253
253
|
},
|
|
254
254
|
headers={
|
|
255
255
|
"content-type": "application/json",
|
|
@@ -323,7 +323,7 @@ class AsyncTemplatesClient:
|
|
|
323
323
|
--------
|
|
324
324
|
import asyncio
|
|
325
325
|
|
|
326
|
-
from
|
|
326
|
+
from letta_client import AsyncLetta
|
|
327
327
|
|
|
328
328
|
client = AsyncLetta(
|
|
329
329
|
token="YOUR_TOKEN",
|
|
@@ -418,7 +418,7 @@ class AsyncTemplatesClient:
|
|
|
418
418
|
--------
|
|
419
419
|
import asyncio
|
|
420
420
|
|
|
421
|
-
from
|
|
421
|
+
from letta_client import AsyncLetta
|
|
422
422
|
|
|
423
423
|
client = AsyncLetta(
|
|
424
424
|
token="YOUR_TOKEN",
|
|
@@ -497,7 +497,7 @@ class AsyncTemplatesClient:
|
|
|
497
497
|
self,
|
|
498
498
|
agent_id: str,
|
|
499
499
|
*,
|
|
500
|
-
|
|
500
|
+
project: typing.Optional[str] = OMIT,
|
|
501
501
|
request_options: typing.Optional[RequestOptions] = None,
|
|
502
502
|
) -> None:
|
|
503
503
|
"""
|
|
@@ -509,7 +509,7 @@ class AsyncTemplatesClient:
|
|
|
509
509
|
----------
|
|
510
510
|
agent_id : str
|
|
511
511
|
|
|
512
|
-
|
|
512
|
+
project : typing.Optional[str]
|
|
513
513
|
|
|
514
514
|
request_options : typing.Optional[RequestOptions]
|
|
515
515
|
Request-specific configuration.
|
|
@@ -522,7 +522,7 @@ class AsyncTemplatesClient:
|
|
|
522
522
|
--------
|
|
523
523
|
import asyncio
|
|
524
524
|
|
|
525
|
-
from
|
|
525
|
+
from letta_client import AsyncLetta
|
|
526
526
|
|
|
527
527
|
client = AsyncLetta(
|
|
528
528
|
token="YOUR_TOKEN",
|
|
@@ -541,7 +541,7 @@ class AsyncTemplatesClient:
|
|
|
541
541
|
f"v1/agents/{jsonable_encoder(agent_id)}/template",
|
|
542
542
|
method="POST",
|
|
543
543
|
json={
|
|
544
|
-
"
|
|
544
|
+
"project": project,
|
|
545
545
|
},
|
|
546
546
|
headers={
|
|
547
547
|
"content-type": "application/json",
|
|
@@ -38,7 +38,7 @@ class ToolsClient:
|
|
|
38
38
|
|
|
39
39
|
Examples
|
|
40
40
|
--------
|
|
41
|
-
from
|
|
41
|
+
from letta_client import Letta
|
|
42
42
|
|
|
43
43
|
client = Letta(
|
|
44
44
|
token="YOUR_TOKEN",
|
|
@@ -98,7 +98,7 @@ class ToolsClient:
|
|
|
98
98
|
|
|
99
99
|
Examples
|
|
100
100
|
--------
|
|
101
|
-
from
|
|
101
|
+
from letta_client import Letta
|
|
102
102
|
|
|
103
103
|
client = Letta(
|
|
104
104
|
token="YOUR_TOKEN",
|
|
@@ -159,7 +159,7 @@ class ToolsClient:
|
|
|
159
159
|
|
|
160
160
|
Examples
|
|
161
161
|
--------
|
|
162
|
-
from
|
|
162
|
+
from letta_client import Letta
|
|
163
163
|
|
|
164
164
|
client = Letta(
|
|
165
165
|
token="YOUR_TOKEN",
|
|
@@ -225,7 +225,7 @@ class AsyncToolsClient:
|
|
|
225
225
|
--------
|
|
226
226
|
import asyncio
|
|
227
227
|
|
|
228
|
-
from
|
|
228
|
+
from letta_client import AsyncLetta
|
|
229
229
|
|
|
230
230
|
client = AsyncLetta(
|
|
231
231
|
token="YOUR_TOKEN",
|
|
@@ -293,7 +293,7 @@ class AsyncToolsClient:
|
|
|
293
293
|
--------
|
|
294
294
|
import asyncio
|
|
295
295
|
|
|
296
|
-
from
|
|
296
|
+
from letta_client import AsyncLetta
|
|
297
297
|
|
|
298
298
|
client = AsyncLetta(
|
|
299
299
|
token="YOUR_TOKEN",
|
|
@@ -362,7 +362,7 @@ class AsyncToolsClient:
|
|
|
362
362
|
--------
|
|
363
363
|
import asyncio
|
|
364
364
|
|
|
365
|
-
from
|
|
365
|
+
from letta_client import AsyncLetta
|
|
366
366
|
|
|
367
367
|
client = AsyncLetta(
|
|
368
368
|
token="YOUR_TOKEN",
|
|
@@ -50,7 +50,7 @@ class BlocksClient:
|
|
|
50
50
|
|
|
51
51
|
Examples
|
|
52
52
|
--------
|
|
53
|
-
from
|
|
53
|
+
from letta_client import Letta
|
|
54
54
|
|
|
55
55
|
client = Letta(
|
|
56
56
|
token="YOUR_TOKEN",
|
|
@@ -136,7 +136,7 @@ class BlocksClient:
|
|
|
136
136
|
|
|
137
137
|
Examples
|
|
138
138
|
--------
|
|
139
|
-
from
|
|
139
|
+
from letta_client import Letta
|
|
140
140
|
|
|
141
141
|
client = Letta(
|
|
142
142
|
token="YOUR_TOKEN",
|
|
@@ -201,7 +201,7 @@ class BlocksClient:
|
|
|
201
201
|
|
|
202
202
|
Examples
|
|
203
203
|
--------
|
|
204
|
-
from
|
|
204
|
+
from letta_client import Letta
|
|
205
205
|
|
|
206
206
|
client = Letta(
|
|
207
207
|
token="YOUR_TOKEN",
|
|
@@ -255,7 +255,7 @@ class BlocksClient:
|
|
|
255
255
|
|
|
256
256
|
Examples
|
|
257
257
|
--------
|
|
258
|
-
from
|
|
258
|
+
from letta_client import Letta
|
|
259
259
|
|
|
260
260
|
client = Letta(
|
|
261
261
|
token="YOUR_TOKEN",
|
|
@@ -342,7 +342,7 @@ class BlocksClient:
|
|
|
342
342
|
|
|
343
343
|
Examples
|
|
344
344
|
--------
|
|
345
|
-
from
|
|
345
|
+
from letta_client import Letta
|
|
346
346
|
|
|
347
347
|
client = Letta(
|
|
348
348
|
token="YOUR_TOKEN",
|
|
@@ -412,7 +412,7 @@ class BlocksClient:
|
|
|
412
412
|
|
|
413
413
|
Examples
|
|
414
414
|
--------
|
|
415
|
-
from
|
|
415
|
+
from letta_client import Letta
|
|
416
416
|
|
|
417
417
|
client = Letta(
|
|
418
418
|
token="YOUR_TOKEN",
|
|
@@ -470,7 +470,7 @@ class BlocksClient:
|
|
|
470
470
|
|
|
471
471
|
Examples
|
|
472
472
|
--------
|
|
473
|
-
from
|
|
473
|
+
from letta_client import Letta
|
|
474
474
|
|
|
475
475
|
client = Letta(
|
|
476
476
|
token="YOUR_TOKEN",
|
|
@@ -543,7 +543,7 @@ class AsyncBlocksClient:
|
|
|
543
543
|
--------
|
|
544
544
|
import asyncio
|
|
545
545
|
|
|
546
|
-
from
|
|
546
|
+
from letta_client import AsyncLetta
|
|
547
547
|
|
|
548
548
|
client = AsyncLetta(
|
|
549
549
|
token="YOUR_TOKEN",
|
|
@@ -637,7 +637,7 @@ class AsyncBlocksClient:
|
|
|
637
637
|
--------
|
|
638
638
|
import asyncio
|
|
639
639
|
|
|
640
|
-
from
|
|
640
|
+
from letta_client import AsyncLetta
|
|
641
641
|
|
|
642
642
|
client = AsyncLetta(
|
|
643
643
|
token="YOUR_TOKEN",
|
|
@@ -710,7 +710,7 @@ class AsyncBlocksClient:
|
|
|
710
710
|
--------
|
|
711
711
|
import asyncio
|
|
712
712
|
|
|
713
|
-
from
|
|
713
|
+
from letta_client import AsyncLetta
|
|
714
714
|
|
|
715
715
|
client = AsyncLetta(
|
|
716
716
|
token="YOUR_TOKEN",
|
|
@@ -772,7 +772,7 @@ class AsyncBlocksClient:
|
|
|
772
772
|
--------
|
|
773
773
|
import asyncio
|
|
774
774
|
|
|
775
|
-
from
|
|
775
|
+
from letta_client import AsyncLetta
|
|
776
776
|
|
|
777
777
|
client = AsyncLetta(
|
|
778
778
|
token="YOUR_TOKEN",
|
|
@@ -867,7 +867,7 @@ class AsyncBlocksClient:
|
|
|
867
867
|
--------
|
|
868
868
|
import asyncio
|
|
869
869
|
|
|
870
|
-
from
|
|
870
|
+
from letta_client import AsyncLetta
|
|
871
871
|
|
|
872
872
|
client = AsyncLetta(
|
|
873
873
|
token="YOUR_TOKEN",
|
|
@@ -945,7 +945,7 @@ class AsyncBlocksClient:
|
|
|
945
945
|
--------
|
|
946
946
|
import asyncio
|
|
947
947
|
|
|
948
|
-
from
|
|
948
|
+
from letta_client import AsyncLetta
|
|
949
949
|
|
|
950
950
|
client = AsyncLetta(
|
|
951
951
|
token="YOUR_TOKEN",
|
|
@@ -1011,7 +1011,7 @@ class AsyncBlocksClient:
|
|
|
1011
1011
|
--------
|
|
1012
1012
|
import asyncio
|
|
1013
1013
|
|
|
1014
|
-
from
|
|
1014
|
+
from letta_client import AsyncLetta
|
|
1015
1015
|
|
|
1016
1016
|
client = AsyncLetta(
|
|
1017
1017
|
token="YOUR_TOKEN",
|
{letta → letta_client}/client.py
RENAMED
|
@@ -12,6 +12,7 @@ from .blocks.client import BlocksClient
|
|
|
12
12
|
from .jobs.client import JobsClient
|
|
13
13
|
from .health.client import HealthClient
|
|
14
14
|
from .providers.client import ProvidersClient
|
|
15
|
+
from .runs.client import RunsClient
|
|
15
16
|
from .core.client_wrapper import AsyncClientWrapper
|
|
16
17
|
from .tools.client import AsyncToolsClient
|
|
17
18
|
from .sources.client import AsyncSourcesClient
|
|
@@ -21,6 +22,7 @@ from .blocks.client import AsyncBlocksClient
|
|
|
21
22
|
from .jobs.client import AsyncJobsClient
|
|
22
23
|
from .health.client import AsyncHealthClient
|
|
23
24
|
from .providers.client import AsyncProvidersClient
|
|
25
|
+
from .runs.client import AsyncRunsClient
|
|
24
26
|
|
|
25
27
|
|
|
26
28
|
class Letta:
|
|
@@ -53,7 +55,7 @@ class Letta:
|
|
|
53
55
|
|
|
54
56
|
Examples
|
|
55
57
|
--------
|
|
56
|
-
from
|
|
58
|
+
from letta_client import Letta
|
|
57
59
|
|
|
58
60
|
client = Letta(
|
|
59
61
|
token="YOUR_TOKEN",
|
|
@@ -89,6 +91,7 @@ class Letta:
|
|
|
89
91
|
self.jobs = JobsClient(client_wrapper=self._client_wrapper)
|
|
90
92
|
self.health = HealthClient(client_wrapper=self._client_wrapper)
|
|
91
93
|
self.providers = ProvidersClient(client_wrapper=self._client_wrapper)
|
|
94
|
+
self.runs = RunsClient(client_wrapper=self._client_wrapper)
|
|
92
95
|
|
|
93
96
|
|
|
94
97
|
class AsyncLetta:
|
|
@@ -121,7 +124,7 @@ class AsyncLetta:
|
|
|
121
124
|
|
|
122
125
|
Examples
|
|
123
126
|
--------
|
|
124
|
-
from
|
|
127
|
+
from letta_client import AsyncLetta
|
|
125
128
|
|
|
126
129
|
client = AsyncLetta(
|
|
127
130
|
token="YOUR_TOKEN",
|
|
@@ -157,6 +160,7 @@ class AsyncLetta:
|
|
|
157
160
|
self.jobs = AsyncJobsClient(client_wrapper=self._client_wrapper)
|
|
158
161
|
self.health = AsyncHealthClient(client_wrapper=self._client_wrapper)
|
|
159
162
|
self.providers = AsyncProvidersClient(client_wrapper=self._client_wrapper)
|
|
163
|
+
self.runs = AsyncRunsClient(client_wrapper=self._client_wrapper)
|
|
160
164
|
|
|
161
165
|
|
|
162
166
|
def _get_base_url(*, base_url: typing.Optional[str] = None, environment: LettaEnvironment) -> str:
|
|
@@ -16,7 +16,7 @@ class BaseClientWrapper:
|
|
|
16
16
|
headers: typing.Dict[str, str] = {
|
|
17
17
|
"X-Fern-Language": "Python",
|
|
18
18
|
"X-Fern-SDK-Name": "letta-client",
|
|
19
|
-
"X-Fern-SDK-Version": "0.1.
|
|
19
|
+
"X-Fern-SDK-Version": "0.1.11",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
|
@@ -28,7 +28,7 @@ class HealthClient:
|
|
|
28
28
|
|
|
29
29
|
Examples
|
|
30
30
|
--------
|
|
31
|
-
from
|
|
31
|
+
from letta_client import Letta
|
|
32
32
|
|
|
33
33
|
client = Letta(
|
|
34
34
|
token="YOUR_TOKEN",
|
|
@@ -75,7 +75,7 @@ class AsyncHealthClient:
|
|
|
75
75
|
--------
|
|
76
76
|
import asyncio
|
|
77
77
|
|
|
78
|
-
from
|
|
78
|
+
from letta_client import AsyncLetta
|
|
79
79
|
|
|
80
80
|
client = AsyncLetta(
|
|
81
81
|
token="YOUR_TOKEN",
|
|
@@ -38,7 +38,7 @@ class JobsClient:
|
|
|
38
38
|
|
|
39
39
|
Examples
|
|
40
40
|
--------
|
|
41
|
-
from
|
|
41
|
+
from letta_client import Letta
|
|
42
42
|
|
|
43
43
|
client = Letta(
|
|
44
44
|
token="YOUR_TOKEN",
|
|
@@ -93,7 +93,7 @@ class JobsClient:
|
|
|
93
93
|
|
|
94
94
|
Examples
|
|
95
95
|
--------
|
|
96
|
-
from
|
|
96
|
+
from letta_client import Letta
|
|
97
97
|
|
|
98
98
|
client = Letta(
|
|
99
99
|
token="YOUR_TOKEN",
|
|
@@ -147,7 +147,7 @@ class JobsClient:
|
|
|
147
147
|
|
|
148
148
|
Examples
|
|
149
149
|
--------
|
|
150
|
-
from
|
|
150
|
+
from letta_client import Letta
|
|
151
151
|
|
|
152
152
|
client = Letta(
|
|
153
153
|
token="YOUR_TOKEN",
|
|
@@ -203,7 +203,7 @@ class JobsClient:
|
|
|
203
203
|
|
|
204
204
|
Examples
|
|
205
205
|
--------
|
|
206
|
-
from
|
|
206
|
+
from letta_client import Letta
|
|
207
207
|
|
|
208
208
|
client = Letta(
|
|
209
209
|
token="YOUR_TOKEN",
|
|
@@ -269,7 +269,7 @@ class AsyncJobsClient:
|
|
|
269
269
|
--------
|
|
270
270
|
import asyncio
|
|
271
271
|
|
|
272
|
-
from
|
|
272
|
+
from letta_client import AsyncLetta
|
|
273
273
|
|
|
274
274
|
client = AsyncLetta(
|
|
275
275
|
token="YOUR_TOKEN",
|
|
@@ -332,7 +332,7 @@ class AsyncJobsClient:
|
|
|
332
332
|
--------
|
|
333
333
|
import asyncio
|
|
334
334
|
|
|
335
|
-
from
|
|
335
|
+
from letta_client import AsyncLetta
|
|
336
336
|
|
|
337
337
|
client = AsyncLetta(
|
|
338
338
|
token="YOUR_TOKEN",
|
|
@@ -394,7 +394,7 @@ class AsyncJobsClient:
|
|
|
394
394
|
--------
|
|
395
395
|
import asyncio
|
|
396
396
|
|
|
397
|
-
from
|
|
397
|
+
from letta_client import AsyncLetta
|
|
398
398
|
|
|
399
399
|
client = AsyncLetta(
|
|
400
400
|
token="YOUR_TOKEN",
|
|
@@ -458,7 +458,7 @@ class AsyncJobsClient:
|
|
|
458
458
|
--------
|
|
459
459
|
import asyncio
|
|
460
460
|
|
|
461
|
-
from
|
|
461
|
+
from letta_client import AsyncLetta
|
|
462
462
|
|
|
463
463
|
client = AsyncLetta(
|
|
464
464
|
token="YOUR_TOKEN",
|
|
@@ -29,7 +29,7 @@ class ModelsClient:
|
|
|
29
29
|
|
|
30
30
|
Examples
|
|
31
31
|
--------
|
|
32
|
-
from
|
|
32
|
+
from letta_client import Letta
|
|
33
33
|
|
|
34
34
|
client = Letta(
|
|
35
35
|
token="YOUR_TOKEN",
|
|
@@ -71,7 +71,7 @@ class ModelsClient:
|
|
|
71
71
|
|
|
72
72
|
Examples
|
|
73
73
|
--------
|
|
74
|
-
from
|
|
74
|
+
from letta_client import Letta
|
|
75
75
|
|
|
76
76
|
client = Letta(
|
|
77
77
|
token="YOUR_TOKEN",
|
|
@@ -118,7 +118,7 @@ class AsyncModelsClient:
|
|
|
118
118
|
--------
|
|
119
119
|
import asyncio
|
|
120
120
|
|
|
121
|
-
from
|
|
121
|
+
from letta_client import AsyncLetta
|
|
122
122
|
|
|
123
123
|
client = AsyncLetta(
|
|
124
124
|
token="YOUR_TOKEN",
|
|
@@ -168,7 +168,7 @@ class AsyncModelsClient:
|
|
|
168
168
|
--------
|
|
169
169
|
import asyncio
|
|
170
170
|
|
|
171
|
-
from
|
|
171
|
+
from letta_client import AsyncLetta
|
|
172
172
|
|
|
173
173
|
client = AsyncLetta(
|
|
174
174
|
token="YOUR_TOKEN",
|