letta-client 0.1.63__py3-none-any.whl → 0.1.65__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 +10 -0
- letta_client/agents/client.py +6 -6
- letta_client/agents/types/agents_search_response_agents_item_tools_item_tool_type.py +7 -1
- letta_client/blocks/client.py +20 -0
- letta_client/core/client_wrapper.py +1 -1
- letta_client/identities/client.py +30 -0
- letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_tool_type.py +7 -1
- letta_client/tools/__init__.py +3 -0
- letta_client/tools/client.py +372 -0
- letta_client/tools/types/__init__.py +5 -0
- letta_client/tools/types/list_mcp_servers_response_value.py +7 -0
- letta_client/types/__init__.py +8 -0
- letta_client/types/identity.py +5 -0
- letta_client/types/identity_create.py +5 -0
- letta_client/types/local_server_config.py +34 -0
- letta_client/types/mcp_server_type.py +5 -0
- letta_client/types/mcp_tool.py +29 -0
- letta_client/types/sse_server_config.py +29 -0
- letta_client/types/tool_type.py +7 -1
- {letta_client-0.1.63.dist-info → letta_client-0.1.65.dist-info}/METADATA +1 -1
- {letta_client-0.1.63.dist-info → letta_client-0.1.65.dist-info}/RECORD +22 -16
- {letta_client-0.1.63.dist-info → letta_client-0.1.65.dist-info}/WHEEL +0 -0
letta_client/__init__.py
CHANGED
|
@@ -110,6 +110,9 @@ from .types import (
|
|
|
110
110
|
LlmConfig,
|
|
111
111
|
LlmConfigModelEndpointType,
|
|
112
112
|
LocalSandboxConfig,
|
|
113
|
+
LocalServerConfig,
|
|
114
|
+
McpServerType,
|
|
115
|
+
McpTool,
|
|
113
116
|
Memory,
|
|
114
117
|
Message,
|
|
115
118
|
MessageCreate,
|
|
@@ -141,6 +144,7 @@ from .types import (
|
|
|
141
144
|
SandboxEnvironmentVariableUpdate,
|
|
142
145
|
SandboxType,
|
|
143
146
|
Source,
|
|
147
|
+
SseServerConfig,
|
|
144
148
|
Step,
|
|
145
149
|
SystemMessage,
|
|
146
150
|
SystemMessageContent,
|
|
@@ -544,6 +548,7 @@ from .templates import (
|
|
|
544
548
|
TemplatesCreateAgentsResponseAgentsItemUpdatedAt,
|
|
545
549
|
TemplatesCreateAgentsResponseAgentsItemUpdatedAtItem,
|
|
546
550
|
)
|
|
551
|
+
from .tools import ListMcpServersResponseValue
|
|
547
552
|
from .version import __version__
|
|
548
553
|
from .voice import CreateVoiceChatCompletionsRequest
|
|
549
554
|
|
|
@@ -834,9 +839,13 @@ __all__ = [
|
|
|
834
839
|
"LettaRequestConfig",
|
|
835
840
|
"LettaResponse",
|
|
836
841
|
"LettaUsageStatistics",
|
|
842
|
+
"ListMcpServersResponseValue",
|
|
837
843
|
"LlmConfig",
|
|
838
844
|
"LlmConfigModelEndpointType",
|
|
839
845
|
"LocalSandboxConfig",
|
|
846
|
+
"LocalServerConfig",
|
|
847
|
+
"McpServerType",
|
|
848
|
+
"McpTool",
|
|
840
849
|
"Memory",
|
|
841
850
|
"Message",
|
|
842
851
|
"MessageCreate",
|
|
@@ -869,6 +878,7 @@ __all__ = [
|
|
|
869
878
|
"SandboxEnvironmentVariableUpdate",
|
|
870
879
|
"SandboxType",
|
|
871
880
|
"Source",
|
|
881
|
+
"SseServerConfig",
|
|
872
882
|
"Step",
|
|
873
883
|
"SystemMessage",
|
|
874
884
|
"SystemMessageContent",
|
letta_client/agents/client.py
CHANGED
|
@@ -73,7 +73,7 @@ class AgentsClient:
|
|
|
73
73
|
project_id: typing.Optional[str] = None,
|
|
74
74
|
template_id: typing.Optional[str] = None,
|
|
75
75
|
base_template_id: typing.Optional[str] = None,
|
|
76
|
-
|
|
76
|
+
identity_id: typing.Optional[str] = None,
|
|
77
77
|
identifier_keys: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
78
78
|
request_options: typing.Optional[RequestOptions] = None,
|
|
79
79
|
) -> typing.List[AgentState]:
|
|
@@ -113,7 +113,7 @@ class AgentsClient:
|
|
|
113
113
|
base_template_id : typing.Optional[str]
|
|
114
114
|
Search agents by base template id
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
identity_id : typing.Optional[str]
|
|
117
117
|
Search agents by identifier id
|
|
118
118
|
|
|
119
119
|
identifier_keys : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
@@ -150,7 +150,7 @@ class AgentsClient:
|
|
|
150
150
|
"project_id": project_id,
|
|
151
151
|
"template_id": template_id,
|
|
152
152
|
"base_template_id": base_template_id,
|
|
153
|
-
"
|
|
153
|
+
"identity_id": identity_id,
|
|
154
154
|
"identifier_keys": identifier_keys,
|
|
155
155
|
},
|
|
156
156
|
request_options=request_options,
|
|
@@ -1142,7 +1142,7 @@ class AsyncAgentsClient:
|
|
|
1142
1142
|
project_id: typing.Optional[str] = None,
|
|
1143
1143
|
template_id: typing.Optional[str] = None,
|
|
1144
1144
|
base_template_id: typing.Optional[str] = None,
|
|
1145
|
-
|
|
1145
|
+
identity_id: typing.Optional[str] = None,
|
|
1146
1146
|
identifier_keys: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
1147
1147
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1148
1148
|
) -> typing.List[AgentState]:
|
|
@@ -1182,7 +1182,7 @@ class AsyncAgentsClient:
|
|
|
1182
1182
|
base_template_id : typing.Optional[str]
|
|
1183
1183
|
Search agents by base template id
|
|
1184
1184
|
|
|
1185
|
-
|
|
1185
|
+
identity_id : typing.Optional[str]
|
|
1186
1186
|
Search agents by identifier id
|
|
1187
1187
|
|
|
1188
1188
|
identifier_keys : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
@@ -1227,7 +1227,7 @@ class AsyncAgentsClient:
|
|
|
1227
1227
|
"project_id": project_id,
|
|
1228
1228
|
"template_id": template_id,
|
|
1229
1229
|
"base_template_id": base_template_id,
|
|
1230
|
-
"
|
|
1230
|
+
"identity_id": identity_id,
|
|
1231
1231
|
"identifier_keys": identifier_keys,
|
|
1232
1232
|
},
|
|
1233
1233
|
request_options=request_options,
|
|
@@ -4,7 +4,13 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
AgentsSearchResponseAgentsItemToolsItemToolType = typing.Union[
|
|
6
6
|
typing.Literal[
|
|
7
|
-
"custom",
|
|
7
|
+
"custom",
|
|
8
|
+
"letta_core",
|
|
9
|
+
"letta_memory_core",
|
|
10
|
+
"letta_multi_agent_core",
|
|
11
|
+
"external_composio",
|
|
12
|
+
"external_langchain",
|
|
13
|
+
"external_mcp",
|
|
8
14
|
],
|
|
9
15
|
typing.Any,
|
|
10
16
|
]
|
letta_client/blocks/client.py
CHANGED
|
@@ -27,6 +27,8 @@ class BlocksClient:
|
|
|
27
27
|
label: typing.Optional[str] = None,
|
|
28
28
|
templates_only: typing.Optional[bool] = None,
|
|
29
29
|
name: typing.Optional[str] = None,
|
|
30
|
+
identity_id: typing.Optional[str] = None,
|
|
31
|
+
identifier_keys: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
30
32
|
request_options: typing.Optional[RequestOptions] = None,
|
|
31
33
|
) -> typing.List[Block]:
|
|
32
34
|
"""
|
|
@@ -41,6 +43,12 @@ class BlocksClient:
|
|
|
41
43
|
name : typing.Optional[str]
|
|
42
44
|
Name of the block
|
|
43
45
|
|
|
46
|
+
identity_id : typing.Optional[str]
|
|
47
|
+
Search agents by identifier id
|
|
48
|
+
|
|
49
|
+
identifier_keys : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
50
|
+
Search agents by identifier keys
|
|
51
|
+
|
|
44
52
|
request_options : typing.Optional[RequestOptions]
|
|
45
53
|
Request-specific configuration.
|
|
46
54
|
|
|
@@ -65,6 +73,8 @@ class BlocksClient:
|
|
|
65
73
|
"label": label,
|
|
66
74
|
"templates_only": templates_only,
|
|
67
75
|
"name": name,
|
|
76
|
+
"identity_id": identity_id,
|
|
77
|
+
"identifier_keys": identifier_keys,
|
|
68
78
|
},
|
|
69
79
|
request_options=request_options,
|
|
70
80
|
)
|
|
@@ -461,6 +471,8 @@ class AsyncBlocksClient:
|
|
|
461
471
|
label: typing.Optional[str] = None,
|
|
462
472
|
templates_only: typing.Optional[bool] = None,
|
|
463
473
|
name: typing.Optional[str] = None,
|
|
474
|
+
identity_id: typing.Optional[str] = None,
|
|
475
|
+
identifier_keys: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
464
476
|
request_options: typing.Optional[RequestOptions] = None,
|
|
465
477
|
) -> typing.List[Block]:
|
|
466
478
|
"""
|
|
@@ -475,6 +487,12 @@ class AsyncBlocksClient:
|
|
|
475
487
|
name : typing.Optional[str]
|
|
476
488
|
Name of the block
|
|
477
489
|
|
|
490
|
+
identity_id : typing.Optional[str]
|
|
491
|
+
Search agents by identifier id
|
|
492
|
+
|
|
493
|
+
identifier_keys : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
494
|
+
Search agents by identifier keys
|
|
495
|
+
|
|
478
496
|
request_options : typing.Optional[RequestOptions]
|
|
479
497
|
Request-specific configuration.
|
|
480
498
|
|
|
@@ -507,6 +525,8 @@ class AsyncBlocksClient:
|
|
|
507
525
|
"label": label,
|
|
508
526
|
"templates_only": templates_only,
|
|
509
527
|
"name": name,
|
|
528
|
+
"identity_id": identity_id,
|
|
529
|
+
"identifier_keys": identifier_keys,
|
|
510
530
|
},
|
|
511
531
|
request_options=request_options,
|
|
512
532
|
)
|
|
@@ -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.65",
|
|
20
20
|
}
|
|
21
21
|
if self.token is not None:
|
|
22
22
|
headers["Authorization"] = f"Bearer {self.token}"
|
|
@@ -118,6 +118,7 @@ class IdentitiesClient:
|
|
|
118
118
|
project: typing.Optional[str] = None,
|
|
119
119
|
project_id: typing.Optional[str] = OMIT,
|
|
120
120
|
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
121
|
+
block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
121
122
|
properties: typing.Optional[typing.Sequence[IdentityProperty]] = OMIT,
|
|
122
123
|
request_options: typing.Optional[RequestOptions] = None,
|
|
123
124
|
) -> Identity:
|
|
@@ -141,6 +142,9 @@ class IdentitiesClient:
|
|
|
141
142
|
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
142
143
|
The agent ids that are associated with the identity.
|
|
143
144
|
|
|
145
|
+
block_ids : typing.Optional[typing.Sequence[str]]
|
|
146
|
+
The IDs of the blocks associated with the identity.
|
|
147
|
+
|
|
144
148
|
properties : typing.Optional[typing.Sequence[IdentityProperty]]
|
|
145
149
|
List of properties associated with the identity.
|
|
146
150
|
|
|
@@ -174,6 +178,7 @@ class IdentitiesClient:
|
|
|
174
178
|
"identity_type": identity_type,
|
|
175
179
|
"project_id": project_id,
|
|
176
180
|
"agent_ids": agent_ids,
|
|
181
|
+
"block_ids": block_ids,
|
|
177
182
|
"properties": convert_and_respect_annotation_metadata(
|
|
178
183
|
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
179
184
|
),
|
|
@@ -217,6 +222,7 @@ class IdentitiesClient:
|
|
|
217
222
|
project: typing.Optional[str] = None,
|
|
218
223
|
project_id: typing.Optional[str] = OMIT,
|
|
219
224
|
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
225
|
+
block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
220
226
|
properties: typing.Optional[typing.Sequence[IdentityProperty]] = OMIT,
|
|
221
227
|
request_options: typing.Optional[RequestOptions] = None,
|
|
222
228
|
) -> Identity:
|
|
@@ -240,6 +246,9 @@ class IdentitiesClient:
|
|
|
240
246
|
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
241
247
|
The agent ids that are associated with the identity.
|
|
242
248
|
|
|
249
|
+
block_ids : typing.Optional[typing.Sequence[str]]
|
|
250
|
+
The IDs of the blocks associated with the identity.
|
|
251
|
+
|
|
243
252
|
properties : typing.Optional[typing.Sequence[IdentityProperty]]
|
|
244
253
|
List of properties associated with the identity.
|
|
245
254
|
|
|
@@ -273,6 +282,7 @@ class IdentitiesClient:
|
|
|
273
282
|
"identity_type": identity_type,
|
|
274
283
|
"project_id": project_id,
|
|
275
284
|
"agent_ids": agent_ids,
|
|
285
|
+
"block_ids": block_ids,
|
|
276
286
|
"properties": convert_and_respect_annotation_metadata(
|
|
277
287
|
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
278
288
|
),
|
|
@@ -427,6 +437,7 @@ class IdentitiesClient:
|
|
|
427
437
|
name: typing.Optional[str] = OMIT,
|
|
428
438
|
identity_type: typing.Optional[IdentityType] = OMIT,
|
|
429
439
|
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
440
|
+
block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
430
441
|
properties: typing.Optional[typing.Sequence[IdentityProperty]] = OMIT,
|
|
431
442
|
request_options: typing.Optional[RequestOptions] = None,
|
|
432
443
|
) -> Identity:
|
|
@@ -447,6 +458,9 @@ class IdentitiesClient:
|
|
|
447
458
|
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
448
459
|
The agent ids that are associated with the identity.
|
|
449
460
|
|
|
461
|
+
block_ids : typing.Optional[typing.Sequence[str]]
|
|
462
|
+
The IDs of the blocks associated with the identity.
|
|
463
|
+
|
|
450
464
|
properties : typing.Optional[typing.Sequence[IdentityProperty]]
|
|
451
465
|
List of properties associated with the identity.
|
|
452
466
|
|
|
@@ -477,6 +491,7 @@ class IdentitiesClient:
|
|
|
477
491
|
"name": name,
|
|
478
492
|
"identity_type": identity_type,
|
|
479
493
|
"agent_ids": agent_ids,
|
|
494
|
+
"block_ids": block_ids,
|
|
480
495
|
"properties": convert_and_respect_annotation_metadata(
|
|
481
496
|
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
482
497
|
),
|
|
@@ -619,6 +634,7 @@ class AsyncIdentitiesClient:
|
|
|
619
634
|
project: typing.Optional[str] = None,
|
|
620
635
|
project_id: typing.Optional[str] = OMIT,
|
|
621
636
|
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
637
|
+
block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
622
638
|
properties: typing.Optional[typing.Sequence[IdentityProperty]] = OMIT,
|
|
623
639
|
request_options: typing.Optional[RequestOptions] = None,
|
|
624
640
|
) -> Identity:
|
|
@@ -642,6 +658,9 @@ class AsyncIdentitiesClient:
|
|
|
642
658
|
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
643
659
|
The agent ids that are associated with the identity.
|
|
644
660
|
|
|
661
|
+
block_ids : typing.Optional[typing.Sequence[str]]
|
|
662
|
+
The IDs of the blocks associated with the identity.
|
|
663
|
+
|
|
645
664
|
properties : typing.Optional[typing.Sequence[IdentityProperty]]
|
|
646
665
|
List of properties associated with the identity.
|
|
647
666
|
|
|
@@ -683,6 +702,7 @@ class AsyncIdentitiesClient:
|
|
|
683
702
|
"identity_type": identity_type,
|
|
684
703
|
"project_id": project_id,
|
|
685
704
|
"agent_ids": agent_ids,
|
|
705
|
+
"block_ids": block_ids,
|
|
686
706
|
"properties": convert_and_respect_annotation_metadata(
|
|
687
707
|
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
688
708
|
),
|
|
@@ -726,6 +746,7 @@ class AsyncIdentitiesClient:
|
|
|
726
746
|
project: typing.Optional[str] = None,
|
|
727
747
|
project_id: typing.Optional[str] = OMIT,
|
|
728
748
|
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
749
|
+
block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
729
750
|
properties: typing.Optional[typing.Sequence[IdentityProperty]] = OMIT,
|
|
730
751
|
request_options: typing.Optional[RequestOptions] = None,
|
|
731
752
|
) -> Identity:
|
|
@@ -749,6 +770,9 @@ class AsyncIdentitiesClient:
|
|
|
749
770
|
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
750
771
|
The agent ids that are associated with the identity.
|
|
751
772
|
|
|
773
|
+
block_ids : typing.Optional[typing.Sequence[str]]
|
|
774
|
+
The IDs of the blocks associated with the identity.
|
|
775
|
+
|
|
752
776
|
properties : typing.Optional[typing.Sequence[IdentityProperty]]
|
|
753
777
|
List of properties associated with the identity.
|
|
754
778
|
|
|
@@ -790,6 +814,7 @@ class AsyncIdentitiesClient:
|
|
|
790
814
|
"identity_type": identity_type,
|
|
791
815
|
"project_id": project_id,
|
|
792
816
|
"agent_ids": agent_ids,
|
|
817
|
+
"block_ids": block_ids,
|
|
793
818
|
"properties": convert_and_respect_annotation_metadata(
|
|
794
819
|
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
795
820
|
),
|
|
@@ -960,6 +985,7 @@ class AsyncIdentitiesClient:
|
|
|
960
985
|
name: typing.Optional[str] = OMIT,
|
|
961
986
|
identity_type: typing.Optional[IdentityType] = OMIT,
|
|
962
987
|
agent_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
988
|
+
block_ids: typing.Optional[typing.Sequence[str]] = OMIT,
|
|
963
989
|
properties: typing.Optional[typing.Sequence[IdentityProperty]] = OMIT,
|
|
964
990
|
request_options: typing.Optional[RequestOptions] = None,
|
|
965
991
|
) -> Identity:
|
|
@@ -980,6 +1006,9 @@ class AsyncIdentitiesClient:
|
|
|
980
1006
|
agent_ids : typing.Optional[typing.Sequence[str]]
|
|
981
1007
|
The agent ids that are associated with the identity.
|
|
982
1008
|
|
|
1009
|
+
block_ids : typing.Optional[typing.Sequence[str]]
|
|
1010
|
+
The IDs of the blocks associated with the identity.
|
|
1011
|
+
|
|
983
1012
|
properties : typing.Optional[typing.Sequence[IdentityProperty]]
|
|
984
1013
|
List of properties associated with the identity.
|
|
985
1014
|
|
|
@@ -1018,6 +1047,7 @@ class AsyncIdentitiesClient:
|
|
|
1018
1047
|
"name": name,
|
|
1019
1048
|
"identity_type": identity_type,
|
|
1020
1049
|
"agent_ids": agent_ids,
|
|
1050
|
+
"block_ids": block_ids,
|
|
1021
1051
|
"properties": convert_and_respect_annotation_metadata(
|
|
1022
1052
|
object_=properties, annotation=typing.Sequence[IdentityProperty], direction="write"
|
|
1023
1053
|
),
|
letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_tool_type.py
CHANGED
|
@@ -4,7 +4,13 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
TemplatesCreateAgentsResponseAgentsItemToolsItemToolType = typing.Union[
|
|
6
6
|
typing.Literal[
|
|
7
|
-
"custom",
|
|
7
|
+
"custom",
|
|
8
|
+
"letta_core",
|
|
9
|
+
"letta_memory_core",
|
|
10
|
+
"letta_multi_agent_core",
|
|
11
|
+
"external_composio",
|
|
12
|
+
"external_langchain",
|
|
13
|
+
"external_mcp",
|
|
8
14
|
],
|
|
9
15
|
typing.Any,
|
|
10
16
|
]
|
letta_client/tools/__init__.py
CHANGED
letta_client/tools/client.py
CHANGED
|
@@ -13,6 +13,8 @@ from ..core.api_error import ApiError
|
|
|
13
13
|
from ..types.tool_return_message import ToolReturnMessage
|
|
14
14
|
from ..types.app_model import AppModel
|
|
15
15
|
from ..types.action_model import ActionModel
|
|
16
|
+
from .types.list_mcp_servers_response_value import ListMcpServersResponseValue
|
|
17
|
+
from ..types.mcp_tool import McpTool
|
|
16
18
|
from ..core.client_wrapper import AsyncClientWrapper
|
|
17
19
|
|
|
18
20
|
# this is used as the default value for optional parameters
|
|
@@ -816,6 +818,179 @@ class ToolsClient:
|
|
|
816
818
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
817
819
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
818
820
|
|
|
821
|
+
def list_mcp_servers(
|
|
822
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
823
|
+
) -> typing.Dict[str, ListMcpServersResponseValue]:
|
|
824
|
+
"""
|
|
825
|
+
Get a list of all configured MCP servers
|
|
826
|
+
|
|
827
|
+
Parameters
|
|
828
|
+
----------
|
|
829
|
+
request_options : typing.Optional[RequestOptions]
|
|
830
|
+
Request-specific configuration.
|
|
831
|
+
|
|
832
|
+
Returns
|
|
833
|
+
-------
|
|
834
|
+
typing.Dict[str, ListMcpServersResponseValue]
|
|
835
|
+
Successful Response
|
|
836
|
+
|
|
837
|
+
Examples
|
|
838
|
+
--------
|
|
839
|
+
from letta_client import Letta
|
|
840
|
+
|
|
841
|
+
client = Letta(
|
|
842
|
+
token="YOUR_TOKEN",
|
|
843
|
+
)
|
|
844
|
+
client.tools.list_mcp_servers()
|
|
845
|
+
"""
|
|
846
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
847
|
+
"v1/tools/mcp/servers",
|
|
848
|
+
method="GET",
|
|
849
|
+
request_options=request_options,
|
|
850
|
+
)
|
|
851
|
+
try:
|
|
852
|
+
if 200 <= _response.status_code < 300:
|
|
853
|
+
return typing.cast(
|
|
854
|
+
typing.Dict[str, ListMcpServersResponseValue],
|
|
855
|
+
construct_type(
|
|
856
|
+
type_=typing.Dict[str, ListMcpServersResponseValue], # type: ignore
|
|
857
|
+
object_=_response.json(),
|
|
858
|
+
),
|
|
859
|
+
)
|
|
860
|
+
if _response.status_code == 422:
|
|
861
|
+
raise UnprocessableEntityError(
|
|
862
|
+
typing.cast(
|
|
863
|
+
HttpValidationError,
|
|
864
|
+
construct_type(
|
|
865
|
+
type_=HttpValidationError, # type: ignore
|
|
866
|
+
object_=_response.json(),
|
|
867
|
+
),
|
|
868
|
+
)
|
|
869
|
+
)
|
|
870
|
+
_response_json = _response.json()
|
|
871
|
+
except JSONDecodeError:
|
|
872
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
873
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
874
|
+
|
|
875
|
+
def list_mcp_tools_by_server(
|
|
876
|
+
self, mcp_server_name: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
877
|
+
) -> typing.List[McpTool]:
|
|
878
|
+
"""
|
|
879
|
+
Get a list of all tools for a specific MCP server
|
|
880
|
+
|
|
881
|
+
Parameters
|
|
882
|
+
----------
|
|
883
|
+
mcp_server_name : str
|
|
884
|
+
|
|
885
|
+
request_options : typing.Optional[RequestOptions]
|
|
886
|
+
Request-specific configuration.
|
|
887
|
+
|
|
888
|
+
Returns
|
|
889
|
+
-------
|
|
890
|
+
typing.List[McpTool]
|
|
891
|
+
Successful Response
|
|
892
|
+
|
|
893
|
+
Examples
|
|
894
|
+
--------
|
|
895
|
+
from letta_client import Letta
|
|
896
|
+
|
|
897
|
+
client = Letta(
|
|
898
|
+
token="YOUR_TOKEN",
|
|
899
|
+
)
|
|
900
|
+
client.tools.list_mcp_tools_by_server(
|
|
901
|
+
mcp_server_name="mcp_server_name",
|
|
902
|
+
)
|
|
903
|
+
"""
|
|
904
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
905
|
+
f"v1/tools/mcp/servers/{jsonable_encoder(mcp_server_name)}/tools",
|
|
906
|
+
method="GET",
|
|
907
|
+
request_options=request_options,
|
|
908
|
+
)
|
|
909
|
+
try:
|
|
910
|
+
if 200 <= _response.status_code < 300:
|
|
911
|
+
return typing.cast(
|
|
912
|
+
typing.List[McpTool],
|
|
913
|
+
construct_type(
|
|
914
|
+
type_=typing.List[McpTool], # type: ignore
|
|
915
|
+
object_=_response.json(),
|
|
916
|
+
),
|
|
917
|
+
)
|
|
918
|
+
if _response.status_code == 422:
|
|
919
|
+
raise UnprocessableEntityError(
|
|
920
|
+
typing.cast(
|
|
921
|
+
HttpValidationError,
|
|
922
|
+
construct_type(
|
|
923
|
+
type_=HttpValidationError, # type: ignore
|
|
924
|
+
object_=_response.json(),
|
|
925
|
+
),
|
|
926
|
+
)
|
|
927
|
+
)
|
|
928
|
+
_response_json = _response.json()
|
|
929
|
+
except JSONDecodeError:
|
|
930
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
931
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
932
|
+
|
|
933
|
+
def add_mcp_tool(
|
|
934
|
+
self, mcp_server_name: str, mcp_tool_name: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
935
|
+
) -> Tool:
|
|
936
|
+
"""
|
|
937
|
+
Add a new MCP tool by server + tool name
|
|
938
|
+
|
|
939
|
+
Parameters
|
|
940
|
+
----------
|
|
941
|
+
mcp_server_name : str
|
|
942
|
+
|
|
943
|
+
mcp_tool_name : str
|
|
944
|
+
|
|
945
|
+
request_options : typing.Optional[RequestOptions]
|
|
946
|
+
Request-specific configuration.
|
|
947
|
+
|
|
948
|
+
Returns
|
|
949
|
+
-------
|
|
950
|
+
Tool
|
|
951
|
+
Successful Response
|
|
952
|
+
|
|
953
|
+
Examples
|
|
954
|
+
--------
|
|
955
|
+
from letta_client import Letta
|
|
956
|
+
|
|
957
|
+
client = Letta(
|
|
958
|
+
token="YOUR_TOKEN",
|
|
959
|
+
)
|
|
960
|
+
client.tools.add_mcp_tool(
|
|
961
|
+
mcp_server_name="mcp_server_name",
|
|
962
|
+
mcp_tool_name="mcp_tool_name",
|
|
963
|
+
)
|
|
964
|
+
"""
|
|
965
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
966
|
+
f"v1/tools/mcp/servers/{jsonable_encoder(mcp_server_name)}/{jsonable_encoder(mcp_tool_name)}",
|
|
967
|
+
method="POST",
|
|
968
|
+
request_options=request_options,
|
|
969
|
+
)
|
|
970
|
+
try:
|
|
971
|
+
if 200 <= _response.status_code < 300:
|
|
972
|
+
return typing.cast(
|
|
973
|
+
Tool,
|
|
974
|
+
construct_type(
|
|
975
|
+
type_=Tool, # type: ignore
|
|
976
|
+
object_=_response.json(),
|
|
977
|
+
),
|
|
978
|
+
)
|
|
979
|
+
if _response.status_code == 422:
|
|
980
|
+
raise UnprocessableEntityError(
|
|
981
|
+
typing.cast(
|
|
982
|
+
HttpValidationError,
|
|
983
|
+
construct_type(
|
|
984
|
+
type_=HttpValidationError, # type: ignore
|
|
985
|
+
object_=_response.json(),
|
|
986
|
+
),
|
|
987
|
+
)
|
|
988
|
+
)
|
|
989
|
+
_response_json = _response.json()
|
|
990
|
+
except JSONDecodeError:
|
|
991
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
992
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
993
|
+
|
|
819
994
|
|
|
820
995
|
class AsyncToolsClient:
|
|
821
996
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
@@ -1703,3 +1878,200 @@ class AsyncToolsClient:
|
|
|
1703
1878
|
except JSONDecodeError:
|
|
1704
1879
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1705
1880
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1881
|
+
|
|
1882
|
+
async def list_mcp_servers(
|
|
1883
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
1884
|
+
) -> typing.Dict[str, ListMcpServersResponseValue]:
|
|
1885
|
+
"""
|
|
1886
|
+
Get a list of all configured MCP servers
|
|
1887
|
+
|
|
1888
|
+
Parameters
|
|
1889
|
+
----------
|
|
1890
|
+
request_options : typing.Optional[RequestOptions]
|
|
1891
|
+
Request-specific configuration.
|
|
1892
|
+
|
|
1893
|
+
Returns
|
|
1894
|
+
-------
|
|
1895
|
+
typing.Dict[str, ListMcpServersResponseValue]
|
|
1896
|
+
Successful Response
|
|
1897
|
+
|
|
1898
|
+
Examples
|
|
1899
|
+
--------
|
|
1900
|
+
import asyncio
|
|
1901
|
+
|
|
1902
|
+
from letta_client import AsyncLetta
|
|
1903
|
+
|
|
1904
|
+
client = AsyncLetta(
|
|
1905
|
+
token="YOUR_TOKEN",
|
|
1906
|
+
)
|
|
1907
|
+
|
|
1908
|
+
|
|
1909
|
+
async def main() -> None:
|
|
1910
|
+
await client.tools.list_mcp_servers()
|
|
1911
|
+
|
|
1912
|
+
|
|
1913
|
+
asyncio.run(main())
|
|
1914
|
+
"""
|
|
1915
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1916
|
+
"v1/tools/mcp/servers",
|
|
1917
|
+
method="GET",
|
|
1918
|
+
request_options=request_options,
|
|
1919
|
+
)
|
|
1920
|
+
try:
|
|
1921
|
+
if 200 <= _response.status_code < 300:
|
|
1922
|
+
return typing.cast(
|
|
1923
|
+
typing.Dict[str, ListMcpServersResponseValue],
|
|
1924
|
+
construct_type(
|
|
1925
|
+
type_=typing.Dict[str, ListMcpServersResponseValue], # type: ignore
|
|
1926
|
+
object_=_response.json(),
|
|
1927
|
+
),
|
|
1928
|
+
)
|
|
1929
|
+
if _response.status_code == 422:
|
|
1930
|
+
raise UnprocessableEntityError(
|
|
1931
|
+
typing.cast(
|
|
1932
|
+
HttpValidationError,
|
|
1933
|
+
construct_type(
|
|
1934
|
+
type_=HttpValidationError, # type: ignore
|
|
1935
|
+
object_=_response.json(),
|
|
1936
|
+
),
|
|
1937
|
+
)
|
|
1938
|
+
)
|
|
1939
|
+
_response_json = _response.json()
|
|
1940
|
+
except JSONDecodeError:
|
|
1941
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1942
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1943
|
+
|
|
1944
|
+
async def list_mcp_tools_by_server(
|
|
1945
|
+
self, mcp_server_name: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
1946
|
+
) -> typing.List[McpTool]:
|
|
1947
|
+
"""
|
|
1948
|
+
Get a list of all tools for a specific MCP server
|
|
1949
|
+
|
|
1950
|
+
Parameters
|
|
1951
|
+
----------
|
|
1952
|
+
mcp_server_name : str
|
|
1953
|
+
|
|
1954
|
+
request_options : typing.Optional[RequestOptions]
|
|
1955
|
+
Request-specific configuration.
|
|
1956
|
+
|
|
1957
|
+
Returns
|
|
1958
|
+
-------
|
|
1959
|
+
typing.List[McpTool]
|
|
1960
|
+
Successful Response
|
|
1961
|
+
|
|
1962
|
+
Examples
|
|
1963
|
+
--------
|
|
1964
|
+
import asyncio
|
|
1965
|
+
|
|
1966
|
+
from letta_client import AsyncLetta
|
|
1967
|
+
|
|
1968
|
+
client = AsyncLetta(
|
|
1969
|
+
token="YOUR_TOKEN",
|
|
1970
|
+
)
|
|
1971
|
+
|
|
1972
|
+
|
|
1973
|
+
async def main() -> None:
|
|
1974
|
+
await client.tools.list_mcp_tools_by_server(
|
|
1975
|
+
mcp_server_name="mcp_server_name",
|
|
1976
|
+
)
|
|
1977
|
+
|
|
1978
|
+
|
|
1979
|
+
asyncio.run(main())
|
|
1980
|
+
"""
|
|
1981
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
1982
|
+
f"v1/tools/mcp/servers/{jsonable_encoder(mcp_server_name)}/tools",
|
|
1983
|
+
method="GET",
|
|
1984
|
+
request_options=request_options,
|
|
1985
|
+
)
|
|
1986
|
+
try:
|
|
1987
|
+
if 200 <= _response.status_code < 300:
|
|
1988
|
+
return typing.cast(
|
|
1989
|
+
typing.List[McpTool],
|
|
1990
|
+
construct_type(
|
|
1991
|
+
type_=typing.List[McpTool], # type: ignore
|
|
1992
|
+
object_=_response.json(),
|
|
1993
|
+
),
|
|
1994
|
+
)
|
|
1995
|
+
if _response.status_code == 422:
|
|
1996
|
+
raise UnprocessableEntityError(
|
|
1997
|
+
typing.cast(
|
|
1998
|
+
HttpValidationError,
|
|
1999
|
+
construct_type(
|
|
2000
|
+
type_=HttpValidationError, # type: ignore
|
|
2001
|
+
object_=_response.json(),
|
|
2002
|
+
),
|
|
2003
|
+
)
|
|
2004
|
+
)
|
|
2005
|
+
_response_json = _response.json()
|
|
2006
|
+
except JSONDecodeError:
|
|
2007
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2008
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2009
|
+
|
|
2010
|
+
async def add_mcp_tool(
|
|
2011
|
+
self, mcp_server_name: str, mcp_tool_name: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
2012
|
+
) -> Tool:
|
|
2013
|
+
"""
|
|
2014
|
+
Add a new MCP tool by server + tool name
|
|
2015
|
+
|
|
2016
|
+
Parameters
|
|
2017
|
+
----------
|
|
2018
|
+
mcp_server_name : str
|
|
2019
|
+
|
|
2020
|
+
mcp_tool_name : str
|
|
2021
|
+
|
|
2022
|
+
request_options : typing.Optional[RequestOptions]
|
|
2023
|
+
Request-specific configuration.
|
|
2024
|
+
|
|
2025
|
+
Returns
|
|
2026
|
+
-------
|
|
2027
|
+
Tool
|
|
2028
|
+
Successful Response
|
|
2029
|
+
|
|
2030
|
+
Examples
|
|
2031
|
+
--------
|
|
2032
|
+
import asyncio
|
|
2033
|
+
|
|
2034
|
+
from letta_client import AsyncLetta
|
|
2035
|
+
|
|
2036
|
+
client = AsyncLetta(
|
|
2037
|
+
token="YOUR_TOKEN",
|
|
2038
|
+
)
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
async def main() -> None:
|
|
2042
|
+
await client.tools.add_mcp_tool(
|
|
2043
|
+
mcp_server_name="mcp_server_name",
|
|
2044
|
+
mcp_tool_name="mcp_tool_name",
|
|
2045
|
+
)
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
asyncio.run(main())
|
|
2049
|
+
"""
|
|
2050
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
2051
|
+
f"v1/tools/mcp/servers/{jsonable_encoder(mcp_server_name)}/{jsonable_encoder(mcp_tool_name)}",
|
|
2052
|
+
method="POST",
|
|
2053
|
+
request_options=request_options,
|
|
2054
|
+
)
|
|
2055
|
+
try:
|
|
2056
|
+
if 200 <= _response.status_code < 300:
|
|
2057
|
+
return typing.cast(
|
|
2058
|
+
Tool,
|
|
2059
|
+
construct_type(
|
|
2060
|
+
type_=Tool, # type: ignore
|
|
2061
|
+
object_=_response.json(),
|
|
2062
|
+
),
|
|
2063
|
+
)
|
|
2064
|
+
if _response.status_code == 422:
|
|
2065
|
+
raise UnprocessableEntityError(
|
|
2066
|
+
typing.cast(
|
|
2067
|
+
HttpValidationError,
|
|
2068
|
+
construct_type(
|
|
2069
|
+
type_=HttpValidationError, # type: ignore
|
|
2070
|
+
object_=_response.json(),
|
|
2071
|
+
),
|
|
2072
|
+
)
|
|
2073
|
+
)
|
|
2074
|
+
_response_json = _response.json()
|
|
2075
|
+
except JSONDecodeError:
|
|
2076
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2077
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from ...types.sse_server_config import SseServerConfig
|
|
5
|
+
from ...types.local_server_config import LocalServerConfig
|
|
6
|
+
|
|
7
|
+
ListMcpServersResponseValue = typing.Union[SseServerConfig, LocalServerConfig]
|
letta_client/types/__init__.py
CHANGED
|
@@ -109,6 +109,9 @@ from .letta_usage_statistics import LettaUsageStatistics
|
|
|
109
109
|
from .llm_config import LlmConfig
|
|
110
110
|
from .llm_config_model_endpoint_type import LlmConfigModelEndpointType
|
|
111
111
|
from .local_sandbox_config import LocalSandboxConfig
|
|
112
|
+
from .local_server_config import LocalServerConfig
|
|
113
|
+
from .mcp_server_type import McpServerType
|
|
114
|
+
from .mcp_tool import McpTool
|
|
112
115
|
from .memory import Memory
|
|
113
116
|
from .message import Message
|
|
114
117
|
from .message_create import MessageCreate
|
|
@@ -144,6 +147,7 @@ from .sandbox_environment_variable_create import SandboxEnvironmentVariableCreat
|
|
|
144
147
|
from .sandbox_environment_variable_update import SandboxEnvironmentVariableUpdate
|
|
145
148
|
from .sandbox_type import SandboxType
|
|
146
149
|
from .source import Source
|
|
150
|
+
from .sse_server_config import SseServerConfig
|
|
147
151
|
from .step import Step
|
|
148
152
|
from .system_message import SystemMessage
|
|
149
153
|
from .system_message_content import SystemMessageContent
|
|
@@ -291,6 +295,9 @@ __all__ = [
|
|
|
291
295
|
"LlmConfig",
|
|
292
296
|
"LlmConfigModelEndpointType",
|
|
293
297
|
"LocalSandboxConfig",
|
|
298
|
+
"LocalServerConfig",
|
|
299
|
+
"McpServerType",
|
|
300
|
+
"McpTool",
|
|
294
301
|
"Memory",
|
|
295
302
|
"Message",
|
|
296
303
|
"MessageCreate",
|
|
@@ -322,6 +329,7 @@ __all__ = [
|
|
|
322
329
|
"SandboxEnvironmentVariableUpdate",
|
|
323
330
|
"SandboxType",
|
|
324
331
|
"Source",
|
|
332
|
+
"SseServerConfig",
|
|
325
333
|
"Step",
|
|
326
334
|
"SystemMessage",
|
|
327
335
|
"SystemMessageContent",
|
letta_client/types/identity.py
CHANGED
|
@@ -39,6 +39,11 @@ class Identity(UncheckedBaseModel):
|
|
|
39
39
|
The IDs of the agents associated with the identity.
|
|
40
40
|
"""
|
|
41
41
|
|
|
42
|
+
block_ids: typing.List[str] = pydantic.Field()
|
|
43
|
+
"""
|
|
44
|
+
The IDs of the blocks associated with the identity.
|
|
45
|
+
"""
|
|
46
|
+
|
|
42
47
|
properties: typing.Optional[typing.List[IdentityProperty]] = pydantic.Field(default=None)
|
|
43
48
|
"""
|
|
44
49
|
List of properties associated with the identity
|
|
@@ -34,6 +34,11 @@ class IdentityCreate(UncheckedBaseModel):
|
|
|
34
34
|
The agent ids that are associated with the identity.
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
|
+
block_ids: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
38
|
+
"""
|
|
39
|
+
The IDs of the blocks associated with the identity.
|
|
40
|
+
"""
|
|
41
|
+
|
|
37
42
|
properties: typing.Optional[typing.List[IdentityProperty]] = pydantic.Field(default=None)
|
|
38
43
|
"""
|
|
39
44
|
List of properties associated with the identity.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
import typing
|
|
6
|
+
from .mcp_server_type import McpServerType
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class LocalServerConfig(UncheckedBaseModel):
|
|
11
|
+
server_name: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The name of the server
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
type: typing.Optional[McpServerType] = None
|
|
17
|
+
command: str = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
The command to run (MCP 'local' client will run this command)
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
args: typing.List[str] = pydantic.Field()
|
|
23
|
+
"""
|
|
24
|
+
The arguments to pass to the command
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
if IS_PYDANTIC_V2:
|
|
28
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
29
|
+
else:
|
|
30
|
+
|
|
31
|
+
class Config:
|
|
32
|
+
frozen = True
|
|
33
|
+
smart_union = True
|
|
34
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
+
import typing
|
|
5
|
+
import typing_extensions
|
|
6
|
+
from ..core.serialization import FieldMetadata
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import pydantic
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class McpTool(UncheckedBaseModel):
|
|
12
|
+
"""
|
|
13
|
+
A simple wrapper around MCP's tool definition (to avoid conflict with our own)
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
name: str
|
|
17
|
+
description: typing.Optional[str] = None
|
|
18
|
+
input_schema: typing_extensions.Annotated[
|
|
19
|
+
typing.Dict[str, typing.Optional[typing.Any]], FieldMetadata(alias="inputSchema")
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
if IS_PYDANTIC_V2:
|
|
23
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
4
|
+
import pydantic
|
|
5
|
+
import typing
|
|
6
|
+
from .mcp_server_type import McpServerType
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SseServerConfig(UncheckedBaseModel):
|
|
11
|
+
server_name: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
The name of the server
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
type: typing.Optional[McpServerType] = None
|
|
17
|
+
server_url: str = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
The URL of the server (MCP SSE client will connect to this URL)
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
if IS_PYDANTIC_V2:
|
|
23
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
24
|
+
else:
|
|
25
|
+
|
|
26
|
+
class Config:
|
|
27
|
+
frozen = True
|
|
28
|
+
smart_union = True
|
|
29
|
+
extra = pydantic.Extra.allow
|
letta_client/types/tool_type.py
CHANGED
|
@@ -4,7 +4,13 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
ToolType = typing.Union[
|
|
6
6
|
typing.Literal[
|
|
7
|
-
"custom",
|
|
7
|
+
"custom",
|
|
8
|
+
"letta_core",
|
|
9
|
+
"letta_memory_core",
|
|
10
|
+
"letta_multi_agent_core",
|
|
11
|
+
"external_composio",
|
|
12
|
+
"external_langchain",
|
|
13
|
+
"external_mcp",
|
|
8
14
|
],
|
|
9
15
|
typing.Any,
|
|
10
16
|
]
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=4XObgTUSf6R_gzv5KOZ2i_hEMNDyXrh6vh5B_TPGXf0,57462
|
|
2
2
|
letta_client/agents/__init__.py,sha256=ePMwPIgzTgDIbCr1wR1Zch36fvKau2B1mOFmjt47CsE,22440
|
|
3
3
|
letta_client/agents/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
4
4
|
letta_client/agents/blocks/client.py,sha256=u5zvutxoH_DqfSLWhRtNSRBC9_ezQDx682cxkxDz3JA,23822
|
|
5
|
-
letta_client/agents/client.py,sha256=
|
|
5
|
+
letta_client/agents/client.py,sha256=oBd6K7pVbztBqvQ-cNEj2NxlZeviLKtEdHFZ5qtf9UQ,83823
|
|
6
6
|
letta_client/agents/context/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
7
7
|
letta_client/agents/context/client.py,sha256=GKKvoG4N_K8Biz9yDjeIHpFG0C8Cwc7tHmEX3pTL_9U,4815
|
|
8
8
|
letta_client/agents/core_memory/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
@@ -199,18 +199,18 @@ letta_client/agents/types/agents_search_response_agents_item_tools_item_source_c
|
|
|
199
199
|
letta_client/agents/types/agents_search_response_agents_item_tools_item_source_code_item.py,sha256=-rtA92Qh0XCr6JHriFgNyE5zUwckvNDxJmX324MJjPw,176
|
|
200
200
|
letta_client/agents/types/agents_search_response_agents_item_tools_item_source_type.py,sha256=rwgwIJAZXZXQCGkcWUEg0g9bgoh93egCvRdCnCgPsB4,402
|
|
201
201
|
letta_client/agents/types/agents_search_response_agents_item_tools_item_source_type_item.py,sha256=pa68H119K-O0Ev_08RNY-DvafVji0Tu_ZljoCZ25smk,176
|
|
202
|
-
letta_client/agents/types/agents_search_response_agents_item_tools_item_tool_type.py,sha256=
|
|
202
|
+
letta_client/agents/types/agents_search_response_agents_item_tools_item_tool_type.py,sha256=WjrScLkwFzm1p6-apcAvrZBvtj22swXGL7j0nLjUvcI,375
|
|
203
203
|
letta_client/agents/types/agents_search_response_agents_item_updated_at.py,sha256=IszYN8OnqSC01c_WCn6-5SghNHbYUp0K3ltHQNhh6PM,393
|
|
204
204
|
letta_client/agents/types/agents_search_response_agents_item_updated_at_item.py,sha256=Anb4fUgBP7Qf9Iggi_OYab0dPcWE-aIA6BvcAk8qIcg,166
|
|
205
205
|
letta_client/agents/types/create_agent_request_tool_rules_item.py,sha256=GsXAkmphzNTrk56rg5n4GVWZY_uu--w0dumpskWyKIg,496
|
|
206
206
|
letta_client/agents/types/update_agent_tool_rules_item.py,sha256=gCA9oFxIWEcbVV5Z85hL0RYjmRNYwfVrYmj6BFGlGTQ,489
|
|
207
207
|
letta_client/base_client.py,sha256=ZD62gkVcq-3piS6Az6L9yM9vD1kssEdtK3c0pHoRWMI,8395
|
|
208
208
|
letta_client/blocks/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
209
|
-
letta_client/blocks/client.py,sha256=
|
|
209
|
+
letta_client/blocks/client.py,sha256=LE9dsHaBxFLC3G035f0VpNDG7XKWRK8y9OXpeFCMvUw,30082
|
|
210
210
|
letta_client/client.py,sha256=xdSrD4IkWokZHujowd1r7zESBoVgKGNvo6RqgZ3f0Fg,12808
|
|
211
211
|
letta_client/core/__init__.py,sha256=OKbX2aCZXgHCDUsCouqv-OiX32xA6eFFCKIUH9M5Vzk,1591
|
|
212
212
|
letta_client/core/api_error.py,sha256=RE8LELok2QCjABadECTvtDp7qejA1VmINCh6TbqPwSE,426
|
|
213
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
213
|
+
letta_client/core/client_wrapper.py,sha256=8W3tzjCJJ0wMFt9ll41067q2CamNLpeSzhX5cVbxhBo,1997
|
|
214
214
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
215
215
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
216
216
|
letta_client/core/http_client.py,sha256=Z77OIxIbL4OAB2IDqjRq_sYa5yNYAWfmdhdCSSvh6Y4,19552
|
|
@@ -230,7 +230,7 @@ letta_client/errors/unprocessable_entity_error.py,sha256=FvR7XPlV3Xx5nu8HNlmLhBR
|
|
|
230
230
|
letta_client/health/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
231
231
|
letta_client/health/client.py,sha256=6BjXH83ZhsLt_MD4QA2hiTsvgfeIgxMT1KSN0Oj6e1I,3242
|
|
232
232
|
letta_client/identities/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
233
|
-
letta_client/identities/client.py,sha256=
|
|
233
|
+
letta_client/identities/client.py,sha256=NPlSrWArxHUnJU_mfUky5tpFyKxqlnFPPlXsWb7C54o,35732
|
|
234
234
|
letta_client/jobs/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
235
235
|
letta_client/jobs/client.py,sha256=z1Zq6dGs2xbf3EAFuD3-m-qbpbUeqpCBYqtIFKkGoMk,15622
|
|
236
236
|
letta_client/models/__init__.py,sha256=FTtvy8EDg9nNNg9WCatVgKTRYV8-_v1roeGPAKoa_pw,65
|
|
@@ -418,12 +418,14 @@ letta_client/templates/types/templates_create_agents_response_agents_item_tools_
|
|
|
418
418
|
letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_source_code_item.py,sha256=7AP_R_CMkK6UqsYehtO9sV4V3ivv3yaqCzlmAGkS250,185
|
|
419
419
|
letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_source_type.py,sha256=XO1_nEPy-mRengj6uja1HOKmQQ9sX9PZuSV7J-Inm24,448
|
|
420
420
|
letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_source_type_item.py,sha256=A5tUHdev6MikeljqGojW1jkuJSuzgxE5TNKfpZCm4gw,185
|
|
421
|
-
letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_tool_type.py,sha256=
|
|
421
|
+
letta_client/templates/types/templates_create_agents_response_agents_item_tools_item_tool_type.py,sha256=41qFb26ocOiXdzlnoef44J-fpZ1f9PUQFbBPwsoz6Ms,384
|
|
422
422
|
letta_client/templates/types/templates_create_agents_response_agents_item_updated_at.py,sha256=Md7WfCTT1_AGvyd24EeWzUibPvnrun9rhyxqCLeAURg,439
|
|
423
423
|
letta_client/templates/types/templates_create_agents_response_agents_item_updated_at_item.py,sha256=T3rYnv5m_cBAEPBnEjUkkHJLYtFZfXNMbb7a9FrIwKY,175
|
|
424
|
-
letta_client/tools/__init__.py,sha256=
|
|
425
|
-
letta_client/tools/client.py,sha256=
|
|
426
|
-
letta_client/types/__init__.py,sha256=
|
|
424
|
+
letta_client/tools/__init__.py,sha256=mmzyALdCQKWki9BHa7_ihwxScL6HZiVaExsoYOu0n8U,155
|
|
425
|
+
letta_client/tools/client.py,sha256=l83rlCZyUnFf-lB_BADzqyd3TPkdNujtYk4Kv2ECvIU,67693
|
|
426
|
+
letta_client/tools/types/__init__.py,sha256=QAP4LY1LD9mKJqniez5WlK3k2-oeCoY3pcqA5G4zlNs,181
|
|
427
|
+
letta_client/tools/types/list_mcp_servers_response_value.py,sha256=HVcUi2UhYbnT8xdJ-A2wGSQmak3v-J9mllHO8MT-VW8,273
|
|
428
|
+
letta_client/types/__init__.py,sha256=QUOvB-tuDEJMcQZpZ0jawbcNMUpmUg9iudufnz-p0NE,16745
|
|
427
429
|
letta_client/types/action_model.py,sha256=y1e2XMv3skFaNJIBdYoBKgiORzGh05aOVvu-qVR9uHg,1240
|
|
428
430
|
letta_client/types/action_parameters_model.py,sha256=LgKf5aPZG3-OHGxFdXiSokIDgce8c02xPYIAY05VgW8,828
|
|
429
431
|
letta_client/types/action_response_model.py,sha256=yq2Fd9UU8j7vvtE3VqXUoRRvDzWcfJPj_95ynGdeHCs,824
|
|
@@ -509,8 +511,8 @@ letta_client/types/function_output.py,sha256=7b8550BllXxtZQ3T3jfvZjcCU_ZGWNBvjlr
|
|
|
509
511
|
letta_client/types/function_tool.py,sha256=TOETpZdqgPIgd4g9JFo3yvDBpTx4lDFzJNZH8PxAjpI,697
|
|
510
512
|
letta_client/types/health.py,sha256=nQwx5ysn_cJMKUoqsfaPcGNSRSjfwX5S272UiSQJ03w,618
|
|
511
513
|
letta_client/types/http_validation_error.py,sha256=yHa4_NHIMB-VKNZpk7agjLTwWIg7mv7ml3d7I-Bqiog,661
|
|
512
|
-
letta_client/types/identity.py,sha256=
|
|
513
|
-
letta_client/types/identity_create.py,sha256=
|
|
514
|
+
letta_client/types/identity.py,sha256=ODegiJaCyiFFfYd177v-hRdJBnIwbCQImB9U_fk4s4E,1591
|
|
515
|
+
letta_client/types/identity_create.py,sha256=QuYCfc7dL5aHQqRIt6SlOV00bWyeMouxpKiY3Wx10o0,1538
|
|
514
516
|
letta_client/types/identity_property.py,sha256=K-e-SVzwIznTAJgMrYKWvEBZmymHzUiAOql4Da7BX7o,981
|
|
515
517
|
letta_client/types/identity_property_type.py,sha256=Ce360UCsjWkX5t1-4HK8_4qiBz1olFGL8gDhuLb2d6Q,183
|
|
516
518
|
letta_client/types/identity_property_value.py,sha256=SQJz97fXG0XHqOGYmYRmHLbI4On3xKmPZhrrkfN8vBs,187
|
|
@@ -533,6 +535,9 @@ letta_client/types/letta_usage_statistics.py,sha256=0BHM3ArfwH6WVJNHYja7LI2k3BZ3
|
|
|
533
535
|
letta_client/types/llm_config.py,sha256=B-LJpzPB5RNSPG-cag65yTIWc0mbD7iKg77N6ejPL64,3045
|
|
534
536
|
letta_client/types/llm_config_model_endpoint_type.py,sha256=HOSM5kIZDCNAVCWmASvAk52K819plqGlD66yKQ1xFkI,620
|
|
535
537
|
letta_client/types/local_sandbox_config.py,sha256=jfe7akG_YrJJ8csLaLdev04Zg1x-PTN0XCAL4KifaZI,1387
|
|
538
|
+
letta_client/types/local_server_config.py,sha256=0tkHCooFWb0ciwCoUPkBbUiDnaFRvL8wiJc_ncM17Eg,945
|
|
539
|
+
letta_client/types/mcp_server_type.py,sha256=WiUotkvET2eFvM0OKpYkxXmSGA1_Id3sBy4nd2DEJ3E,153
|
|
540
|
+
letta_client/types/mcp_tool.py,sha256=_GSTb0k8l-IUEflRkQ6-v45UnbTcA4Nv1N8sgmExJQ0,912
|
|
536
541
|
letta_client/types/memory.py,sha256=KD5MkDQB-vbRPT9f_-yFBWY1WUW_NWxYEI0IiflG6P8,1035
|
|
537
542
|
letta_client/types/message.py,sha256=X4TSKPKJn97RcjCdZts96Yfoo78sGqJXAlrYIot9DRk,3457
|
|
538
543
|
letta_client/types/message_create.py,sha256=x80xQYxC3IUHs7PKCqHfeJkHRh02dx0oOc0PoJO8krc,1011
|
|
@@ -564,6 +569,7 @@ letta_client/types/sandbox_environment_variable_create.py,sha256=AhGE8ITStXkPOfP
|
|
|
564
569
|
letta_client/types/sandbox_environment_variable_update.py,sha256=JMkX6nzvcBNEemjvBmyHDezci3Bn7epKhMnvFY_--EA,948
|
|
565
570
|
letta_client/types/sandbox_type.py,sha256=XSWmX3JIFFrDPQ4i89E8LauXY8kjmJEtaz6e_JheGm4,151
|
|
566
571
|
letta_client/types/source.py,sha256=7tLptZ4AZrvRPF6NqToM4Vf9i7TosS2_Ydks4zfvZx4,2239
|
|
572
|
+
letta_client/types/sse_server_config.py,sha256=b-h5FLm5MELZ5A9bwZt-02Zx_f3UbfKAQS--yHQVOQU,844
|
|
567
573
|
letta_client/types/step.py,sha256=XE98vMiU34dgUxLPvmJLdp9iWFPjg6E2Pb8xNSURMMg,2988
|
|
568
574
|
letta_client/types/system_message.py,sha256=DUIgPbL_ya49sGN15DIEGO2t8OQ4pseHvbMcayygV0c,1155
|
|
569
575
|
letta_client/types/system_message_content.py,sha256=9VvwCUKMkNidcMUaPmuj6-WhzeJoEZCNvyn3oH-LR70,185
|
|
@@ -579,7 +585,7 @@ letta_client/types/tool_return.py,sha256=f-6zaRo8Bwl0i0Q0rHl8vKOfzymFHN_tVRoC2lM
|
|
|
579
585
|
letta_client/types/tool_return_message.py,sha256=hQ-17bvNGoSaCow4AvWSGLTa80fKuXP2bxXGNUXuX0w,1591
|
|
580
586
|
letta_client/types/tool_return_message_status.py,sha256=FvFOMaG9mnmgnHi2UBQVQQMtHFabbWnQnHTxGUDgVl0,167
|
|
581
587
|
letta_client/types/tool_return_status.py,sha256=TQjwYprn5F_jU9kIbrtiyk7Gw2SjcmFFZLjFbGDpBM0,160
|
|
582
|
-
letta_client/types/tool_type.py,sha256=
|
|
588
|
+
letta_client/types/tool_type.py,sha256=v6DX7qGAbg9t4HZTa9GBuzehNDCW3NkD6Zi3Z1teEKI,336
|
|
583
589
|
letta_client/types/update_assistant_message.py,sha256=Kcp9B45eKIOmgpRW1PiMbkSLJ4axyFVW40bhHAE4os4,748
|
|
584
590
|
letta_client/types/update_assistant_message_content.py,sha256=iRX42-mdpRrRXeG4KKpZZpfUWGbhUZJYRQQLPiiZuHQ,194
|
|
585
591
|
letta_client/types/update_reasoning_message.py,sha256=bTcD0dB4yKhmRMA6tc-6FEPvqvCI7wnTsJ792aQravg,756
|
|
@@ -605,6 +611,6 @@ letta_client/voice/__init__.py,sha256=ZrZEuXIukVGhsfM-i0dIFfqjeSOBMPeEgDva7Vvnip
|
|
|
605
611
|
letta_client/voice/client.py,sha256=O38dLq__WTwLPlFTtvw1hgqaPYK9alds_ft12Bnp5fs,6475
|
|
606
612
|
letta_client/voice/types/__init__.py,sha256=hBLJcrom99DkDxxsVRU2ni8kPx6SsCy8gtAJvNOz26w,199
|
|
607
613
|
letta_client/voice/types/create_voice_chat_completions_request.py,sha256=K4__83rXRCshfdobyAmH-5fUDJQ_PeSQetTUeC4Abk0,381
|
|
608
|
-
letta_client-0.1.
|
|
609
|
-
letta_client-0.1.
|
|
610
|
-
letta_client-0.1.
|
|
614
|
+
letta_client-0.1.65.dist-info/METADATA,sha256=le9Ueg2bRXbgoBh3zU-4eE8UqTnTRK675pwk0IPvyB4,4942
|
|
615
|
+
letta_client-0.1.65.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
616
|
+
letta_client-0.1.65.dist-info/RECORD,,
|
|
File without changes
|