letta-client 0.1.304__py3-none-any.whl → 0.1.306__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 +4 -0
- letta_client/agents/__init__.py +2 -0
- letta_client/agents/passages/__init__.py +3 -0
- letta_client/agents/passages/client.py +158 -0
- letta_client/agents/passages/raw_client.py +178 -0
- letta_client/agents/passages/types/__init__.py +7 -0
- letta_client/agents/passages/types/passages_search_request_tag_match_mode.py +5 -0
- letta_client/core/client_wrapper.py +2 -2
- letta_client/types/__init__.py +4 -0
- letta_client/types/archival_memory_search_response.py +29 -0
- letta_client/types/archival_memory_search_result.py +33 -0
- letta_client/types/update_ssemcp_server.py +0 -5
- letta_client/types/update_stdio_mcp_server.py +0 -5
- letta_client/types/update_streamable_httpmcp_server.py +0 -5
- {letta_client-0.1.304.dist-info → letta_client-0.1.306.dist-info}/METADATA +1 -1
- {letta_client-0.1.304.dist-info → letta_client-0.1.306.dist-info}/RECORD +17 -13
- {letta_client-0.1.304.dist-info → letta_client-0.1.306.dist-info}/WHEEL +0 -0
letta_client/__init__.py
CHANGED
|
@@ -19,6 +19,8 @@ from .types import (
|
|
|
19
19
|
ApprovalCreate,
|
|
20
20
|
ApprovalRequestMessage,
|
|
21
21
|
ApprovalResponseMessage,
|
|
22
|
+
ArchivalMemorySearchResponse,
|
|
23
|
+
ArchivalMemorySearchResult,
|
|
22
24
|
AssistantMessage,
|
|
23
25
|
AssistantMessageContent,
|
|
24
26
|
Audio,
|
|
@@ -452,6 +454,8 @@ __all__ = [
|
|
|
452
454
|
"ApprovalCreate",
|
|
453
455
|
"ApprovalRequestMessage",
|
|
454
456
|
"ApprovalResponseMessage",
|
|
457
|
+
"ArchivalMemorySearchResponse",
|
|
458
|
+
"ArchivalMemorySearchResult",
|
|
455
459
|
"AssistantMessage",
|
|
456
460
|
"AssistantMessageContent",
|
|
457
461
|
"AsyncLetta",
|
letta_client/agents/__init__.py
CHANGED
|
@@ -39,6 +39,7 @@ from .messages import (
|
|
|
39
39
|
MessagesModifyResponse,
|
|
40
40
|
MessagesPreviewRawPayloadRequest,
|
|
41
41
|
)
|
|
42
|
+
from .passages import PassagesSearchRequestTagMatchMode
|
|
42
43
|
from .templates import TemplatesMigrateResponse
|
|
43
44
|
|
|
44
45
|
__all__ = [
|
|
@@ -59,6 +60,7 @@ __all__ = [
|
|
|
59
60
|
"MessagesModifyRequest",
|
|
60
61
|
"MessagesModifyResponse",
|
|
61
62
|
"MessagesPreviewRawPayloadRequest",
|
|
63
|
+
"PassagesSearchRequestTagMatchMode",
|
|
62
64
|
"TemplatesMigrateResponse",
|
|
63
65
|
"UpdateAgentResponseFormat",
|
|
64
66
|
"UpdateAgentToolRulesItem",
|
|
@@ -5,8 +5,10 @@ import typing
|
|
|
5
5
|
|
|
6
6
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
7
7
|
from ...core.request_options import RequestOptions
|
|
8
|
+
from ...types.archival_memory_search_response import ArchivalMemorySearchResponse
|
|
8
9
|
from ...types.passage import Passage
|
|
9
10
|
from .raw_client import AsyncRawPassagesClient, RawPassagesClient
|
|
11
|
+
from .types.passages_search_request_tag_match_mode import PassagesSearchRequestTagMatchMode
|
|
10
12
|
|
|
11
13
|
# this is used as the default value for optional parameters
|
|
12
14
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -142,6 +144,80 @@ class PassagesClient:
|
|
|
142
144
|
)
|
|
143
145
|
return _response.data
|
|
144
146
|
|
|
147
|
+
def search(
|
|
148
|
+
self,
|
|
149
|
+
agent_id: str,
|
|
150
|
+
*,
|
|
151
|
+
query: str,
|
|
152
|
+
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
153
|
+
tag_match_mode: typing.Optional[PassagesSearchRequestTagMatchMode] = None,
|
|
154
|
+
top_k: typing.Optional[int] = None,
|
|
155
|
+
start_datetime: typing.Optional[str] = None,
|
|
156
|
+
end_datetime: typing.Optional[str] = None,
|
|
157
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
158
|
+
) -> ArchivalMemorySearchResponse:
|
|
159
|
+
"""
|
|
160
|
+
Search archival memory using semantic (embedding-based) search with optional temporal filtering.
|
|
161
|
+
|
|
162
|
+
This endpoint allows manual triggering of archival memory searches, enabling users to query
|
|
163
|
+
an agent's archival memory store directly via the API. The search uses the same functionality
|
|
164
|
+
as the agent's archival_memory_search tool but is accessible for external API usage.
|
|
165
|
+
|
|
166
|
+
Parameters
|
|
167
|
+
----------
|
|
168
|
+
agent_id : str
|
|
169
|
+
|
|
170
|
+
query : str
|
|
171
|
+
String to search for using semantic similarity
|
|
172
|
+
|
|
173
|
+
tags : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
174
|
+
Optional list of tags to filter search results
|
|
175
|
+
|
|
176
|
+
tag_match_mode : typing.Optional[PassagesSearchRequestTagMatchMode]
|
|
177
|
+
How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags
|
|
178
|
+
|
|
179
|
+
top_k : typing.Optional[int]
|
|
180
|
+
Maximum number of results to return. Uses system default if not specified
|
|
181
|
+
|
|
182
|
+
start_datetime : typing.Optional[str]
|
|
183
|
+
Filter results to passages created after this datetime. ISO 8601 format
|
|
184
|
+
|
|
185
|
+
end_datetime : typing.Optional[str]
|
|
186
|
+
Filter results to passages created before this datetime. ISO 8601 format
|
|
187
|
+
|
|
188
|
+
request_options : typing.Optional[RequestOptions]
|
|
189
|
+
Request-specific configuration.
|
|
190
|
+
|
|
191
|
+
Returns
|
|
192
|
+
-------
|
|
193
|
+
ArchivalMemorySearchResponse
|
|
194
|
+
Successful Response
|
|
195
|
+
|
|
196
|
+
Examples
|
|
197
|
+
--------
|
|
198
|
+
from letta_client import Letta
|
|
199
|
+
|
|
200
|
+
client = Letta(
|
|
201
|
+
project="YOUR_PROJECT",
|
|
202
|
+
token="YOUR_TOKEN",
|
|
203
|
+
)
|
|
204
|
+
client.agents.passages.search(
|
|
205
|
+
agent_id="agent_id",
|
|
206
|
+
query="query",
|
|
207
|
+
)
|
|
208
|
+
"""
|
|
209
|
+
_response = self._raw_client.search(
|
|
210
|
+
agent_id,
|
|
211
|
+
query=query,
|
|
212
|
+
tags=tags,
|
|
213
|
+
tag_match_mode=tag_match_mode,
|
|
214
|
+
top_k=top_k,
|
|
215
|
+
start_datetime=start_datetime,
|
|
216
|
+
end_datetime=end_datetime,
|
|
217
|
+
request_options=request_options,
|
|
218
|
+
)
|
|
219
|
+
return _response.data
|
|
220
|
+
|
|
145
221
|
def delete(
|
|
146
222
|
self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
147
223
|
) -> typing.Optional[typing.Any]:
|
|
@@ -356,6 +432,88 @@ class AsyncPassagesClient:
|
|
|
356
432
|
)
|
|
357
433
|
return _response.data
|
|
358
434
|
|
|
435
|
+
async def search(
|
|
436
|
+
self,
|
|
437
|
+
agent_id: str,
|
|
438
|
+
*,
|
|
439
|
+
query: str,
|
|
440
|
+
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
441
|
+
tag_match_mode: typing.Optional[PassagesSearchRequestTagMatchMode] = None,
|
|
442
|
+
top_k: typing.Optional[int] = None,
|
|
443
|
+
start_datetime: typing.Optional[str] = None,
|
|
444
|
+
end_datetime: typing.Optional[str] = None,
|
|
445
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
446
|
+
) -> ArchivalMemorySearchResponse:
|
|
447
|
+
"""
|
|
448
|
+
Search archival memory using semantic (embedding-based) search with optional temporal filtering.
|
|
449
|
+
|
|
450
|
+
This endpoint allows manual triggering of archival memory searches, enabling users to query
|
|
451
|
+
an agent's archival memory store directly via the API. The search uses the same functionality
|
|
452
|
+
as the agent's archival_memory_search tool but is accessible for external API usage.
|
|
453
|
+
|
|
454
|
+
Parameters
|
|
455
|
+
----------
|
|
456
|
+
agent_id : str
|
|
457
|
+
|
|
458
|
+
query : str
|
|
459
|
+
String to search for using semantic similarity
|
|
460
|
+
|
|
461
|
+
tags : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
462
|
+
Optional list of tags to filter search results
|
|
463
|
+
|
|
464
|
+
tag_match_mode : typing.Optional[PassagesSearchRequestTagMatchMode]
|
|
465
|
+
How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags
|
|
466
|
+
|
|
467
|
+
top_k : typing.Optional[int]
|
|
468
|
+
Maximum number of results to return. Uses system default if not specified
|
|
469
|
+
|
|
470
|
+
start_datetime : typing.Optional[str]
|
|
471
|
+
Filter results to passages created after this datetime. ISO 8601 format
|
|
472
|
+
|
|
473
|
+
end_datetime : typing.Optional[str]
|
|
474
|
+
Filter results to passages created before this datetime. ISO 8601 format
|
|
475
|
+
|
|
476
|
+
request_options : typing.Optional[RequestOptions]
|
|
477
|
+
Request-specific configuration.
|
|
478
|
+
|
|
479
|
+
Returns
|
|
480
|
+
-------
|
|
481
|
+
ArchivalMemorySearchResponse
|
|
482
|
+
Successful Response
|
|
483
|
+
|
|
484
|
+
Examples
|
|
485
|
+
--------
|
|
486
|
+
import asyncio
|
|
487
|
+
|
|
488
|
+
from letta_client import AsyncLetta
|
|
489
|
+
|
|
490
|
+
client = AsyncLetta(
|
|
491
|
+
project="YOUR_PROJECT",
|
|
492
|
+
token="YOUR_TOKEN",
|
|
493
|
+
)
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
async def main() -> None:
|
|
497
|
+
await client.agents.passages.search(
|
|
498
|
+
agent_id="agent_id",
|
|
499
|
+
query="query",
|
|
500
|
+
)
|
|
501
|
+
|
|
502
|
+
|
|
503
|
+
asyncio.run(main())
|
|
504
|
+
"""
|
|
505
|
+
_response = await self._raw_client.search(
|
|
506
|
+
agent_id,
|
|
507
|
+
query=query,
|
|
508
|
+
tags=tags,
|
|
509
|
+
tag_match_mode=tag_match_mode,
|
|
510
|
+
top_k=top_k,
|
|
511
|
+
start_datetime=start_datetime,
|
|
512
|
+
end_datetime=end_datetime,
|
|
513
|
+
request_options=request_options,
|
|
514
|
+
)
|
|
515
|
+
return _response.data
|
|
516
|
+
|
|
359
517
|
async def delete(
|
|
360
518
|
self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
361
519
|
) -> typing.Optional[typing.Any]:
|
|
@@ -11,8 +11,10 @@ from ...core.jsonable_encoder import jsonable_encoder
|
|
|
11
11
|
from ...core.request_options import RequestOptions
|
|
12
12
|
from ...core.unchecked_base_model import construct_type
|
|
13
13
|
from ...errors.unprocessable_entity_error import UnprocessableEntityError
|
|
14
|
+
from ...types.archival_memory_search_response import ArchivalMemorySearchResponse
|
|
14
15
|
from ...types.http_validation_error import HttpValidationError
|
|
15
16
|
from ...types.passage import Passage
|
|
17
|
+
from .types.passages_search_request_tag_match_mode import PassagesSearchRequestTagMatchMode
|
|
16
18
|
|
|
17
19
|
# this is used as the default value for optional parameters
|
|
18
20
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -174,6 +176,94 @@ class RawPassagesClient:
|
|
|
174
176
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
175
177
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
176
178
|
|
|
179
|
+
def search(
|
|
180
|
+
self,
|
|
181
|
+
agent_id: str,
|
|
182
|
+
*,
|
|
183
|
+
query: str,
|
|
184
|
+
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
185
|
+
tag_match_mode: typing.Optional[PassagesSearchRequestTagMatchMode] = None,
|
|
186
|
+
top_k: typing.Optional[int] = None,
|
|
187
|
+
start_datetime: typing.Optional[str] = None,
|
|
188
|
+
end_datetime: typing.Optional[str] = None,
|
|
189
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
190
|
+
) -> HttpResponse[ArchivalMemorySearchResponse]:
|
|
191
|
+
"""
|
|
192
|
+
Search archival memory using semantic (embedding-based) search with optional temporal filtering.
|
|
193
|
+
|
|
194
|
+
This endpoint allows manual triggering of archival memory searches, enabling users to query
|
|
195
|
+
an agent's archival memory store directly via the API. The search uses the same functionality
|
|
196
|
+
as the agent's archival_memory_search tool but is accessible for external API usage.
|
|
197
|
+
|
|
198
|
+
Parameters
|
|
199
|
+
----------
|
|
200
|
+
agent_id : str
|
|
201
|
+
|
|
202
|
+
query : str
|
|
203
|
+
String to search for using semantic similarity
|
|
204
|
+
|
|
205
|
+
tags : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
206
|
+
Optional list of tags to filter search results
|
|
207
|
+
|
|
208
|
+
tag_match_mode : typing.Optional[PassagesSearchRequestTagMatchMode]
|
|
209
|
+
How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags
|
|
210
|
+
|
|
211
|
+
top_k : typing.Optional[int]
|
|
212
|
+
Maximum number of results to return. Uses system default if not specified
|
|
213
|
+
|
|
214
|
+
start_datetime : typing.Optional[str]
|
|
215
|
+
Filter results to passages created after this datetime. ISO 8601 format
|
|
216
|
+
|
|
217
|
+
end_datetime : typing.Optional[str]
|
|
218
|
+
Filter results to passages created before this datetime. ISO 8601 format
|
|
219
|
+
|
|
220
|
+
request_options : typing.Optional[RequestOptions]
|
|
221
|
+
Request-specific configuration.
|
|
222
|
+
|
|
223
|
+
Returns
|
|
224
|
+
-------
|
|
225
|
+
HttpResponse[ArchivalMemorySearchResponse]
|
|
226
|
+
Successful Response
|
|
227
|
+
"""
|
|
228
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
229
|
+
f"v1/agents/{jsonable_encoder(agent_id)}/archival-memory/search",
|
|
230
|
+
method="GET",
|
|
231
|
+
params={
|
|
232
|
+
"query": query,
|
|
233
|
+
"tags": tags,
|
|
234
|
+
"tag_match_mode": tag_match_mode,
|
|
235
|
+
"top_k": top_k,
|
|
236
|
+
"start_datetime": start_datetime,
|
|
237
|
+
"end_datetime": end_datetime,
|
|
238
|
+
},
|
|
239
|
+
request_options=request_options,
|
|
240
|
+
)
|
|
241
|
+
try:
|
|
242
|
+
if 200 <= _response.status_code < 300:
|
|
243
|
+
_data = typing.cast(
|
|
244
|
+
ArchivalMemorySearchResponse,
|
|
245
|
+
construct_type(
|
|
246
|
+
type_=ArchivalMemorySearchResponse, # type: ignore
|
|
247
|
+
object_=_response.json(),
|
|
248
|
+
),
|
|
249
|
+
)
|
|
250
|
+
return HttpResponse(response=_response, data=_data)
|
|
251
|
+
if _response.status_code == 422:
|
|
252
|
+
raise UnprocessableEntityError(
|
|
253
|
+
headers=dict(_response.headers),
|
|
254
|
+
body=typing.cast(
|
|
255
|
+
HttpValidationError,
|
|
256
|
+
construct_type(
|
|
257
|
+
type_=HttpValidationError, # type: ignore
|
|
258
|
+
object_=_response.json(),
|
|
259
|
+
),
|
|
260
|
+
),
|
|
261
|
+
)
|
|
262
|
+
_response_json = _response.json()
|
|
263
|
+
except JSONDecodeError:
|
|
264
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
265
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
266
|
+
|
|
177
267
|
def delete(
|
|
178
268
|
self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
179
269
|
) -> HttpResponse[typing.Optional[typing.Any]]:
|
|
@@ -414,6 +504,94 @@ class AsyncRawPassagesClient:
|
|
|
414
504
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
415
505
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
416
506
|
|
|
507
|
+
async def search(
|
|
508
|
+
self,
|
|
509
|
+
agent_id: str,
|
|
510
|
+
*,
|
|
511
|
+
query: str,
|
|
512
|
+
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
|
|
513
|
+
tag_match_mode: typing.Optional[PassagesSearchRequestTagMatchMode] = None,
|
|
514
|
+
top_k: typing.Optional[int] = None,
|
|
515
|
+
start_datetime: typing.Optional[str] = None,
|
|
516
|
+
end_datetime: typing.Optional[str] = None,
|
|
517
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
518
|
+
) -> AsyncHttpResponse[ArchivalMemorySearchResponse]:
|
|
519
|
+
"""
|
|
520
|
+
Search archival memory using semantic (embedding-based) search with optional temporal filtering.
|
|
521
|
+
|
|
522
|
+
This endpoint allows manual triggering of archival memory searches, enabling users to query
|
|
523
|
+
an agent's archival memory store directly via the API. The search uses the same functionality
|
|
524
|
+
as the agent's archival_memory_search tool but is accessible for external API usage.
|
|
525
|
+
|
|
526
|
+
Parameters
|
|
527
|
+
----------
|
|
528
|
+
agent_id : str
|
|
529
|
+
|
|
530
|
+
query : str
|
|
531
|
+
String to search for using semantic similarity
|
|
532
|
+
|
|
533
|
+
tags : typing.Optional[typing.Union[str, typing.Sequence[str]]]
|
|
534
|
+
Optional list of tags to filter search results
|
|
535
|
+
|
|
536
|
+
tag_match_mode : typing.Optional[PassagesSearchRequestTagMatchMode]
|
|
537
|
+
How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags
|
|
538
|
+
|
|
539
|
+
top_k : typing.Optional[int]
|
|
540
|
+
Maximum number of results to return. Uses system default if not specified
|
|
541
|
+
|
|
542
|
+
start_datetime : typing.Optional[str]
|
|
543
|
+
Filter results to passages created after this datetime. ISO 8601 format
|
|
544
|
+
|
|
545
|
+
end_datetime : typing.Optional[str]
|
|
546
|
+
Filter results to passages created before this datetime. ISO 8601 format
|
|
547
|
+
|
|
548
|
+
request_options : typing.Optional[RequestOptions]
|
|
549
|
+
Request-specific configuration.
|
|
550
|
+
|
|
551
|
+
Returns
|
|
552
|
+
-------
|
|
553
|
+
AsyncHttpResponse[ArchivalMemorySearchResponse]
|
|
554
|
+
Successful Response
|
|
555
|
+
"""
|
|
556
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
557
|
+
f"v1/agents/{jsonable_encoder(agent_id)}/archival-memory/search",
|
|
558
|
+
method="GET",
|
|
559
|
+
params={
|
|
560
|
+
"query": query,
|
|
561
|
+
"tags": tags,
|
|
562
|
+
"tag_match_mode": tag_match_mode,
|
|
563
|
+
"top_k": top_k,
|
|
564
|
+
"start_datetime": start_datetime,
|
|
565
|
+
"end_datetime": end_datetime,
|
|
566
|
+
},
|
|
567
|
+
request_options=request_options,
|
|
568
|
+
)
|
|
569
|
+
try:
|
|
570
|
+
if 200 <= _response.status_code < 300:
|
|
571
|
+
_data = typing.cast(
|
|
572
|
+
ArchivalMemorySearchResponse,
|
|
573
|
+
construct_type(
|
|
574
|
+
type_=ArchivalMemorySearchResponse, # type: ignore
|
|
575
|
+
object_=_response.json(),
|
|
576
|
+
),
|
|
577
|
+
)
|
|
578
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
579
|
+
if _response.status_code == 422:
|
|
580
|
+
raise UnprocessableEntityError(
|
|
581
|
+
headers=dict(_response.headers),
|
|
582
|
+
body=typing.cast(
|
|
583
|
+
HttpValidationError,
|
|
584
|
+
construct_type(
|
|
585
|
+
type_=HttpValidationError, # type: ignore
|
|
586
|
+
object_=_response.json(),
|
|
587
|
+
),
|
|
588
|
+
),
|
|
589
|
+
)
|
|
590
|
+
_response_json = _response.json()
|
|
591
|
+
except JSONDecodeError:
|
|
592
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
593
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
594
|
+
|
|
417
595
|
async def delete(
|
|
418
596
|
self, agent_id: str, memory_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
419
597
|
) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
|
|
@@ -24,10 +24,10 @@ class BaseClientWrapper:
|
|
|
24
24
|
|
|
25
25
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
26
26
|
headers: typing.Dict[str, str] = {
|
|
27
|
-
"User-Agent": "letta-client/0.1.
|
|
27
|
+
"User-Agent": "letta-client/0.1.306",
|
|
28
28
|
"X-Fern-Language": "Python",
|
|
29
29
|
"X-Fern-SDK-Name": "letta-client",
|
|
30
|
-
"X-Fern-SDK-Version": "0.1.
|
|
30
|
+
"X-Fern-SDK-Version": "0.1.306",
|
|
31
31
|
**(self.get_custom_headers() or {}),
|
|
32
32
|
}
|
|
33
33
|
if self._project is not None:
|
letta_client/types/__init__.py
CHANGED
|
@@ -18,6 +18,8 @@ from .app_model import AppModel
|
|
|
18
18
|
from .approval_create import ApprovalCreate
|
|
19
19
|
from .approval_request_message import ApprovalRequestMessage
|
|
20
20
|
from .approval_response_message import ApprovalResponseMessage
|
|
21
|
+
from .archival_memory_search_response import ArchivalMemorySearchResponse
|
|
22
|
+
from .archival_memory_search_result import ArchivalMemorySearchResult
|
|
21
23
|
from .assistant_message import AssistantMessage
|
|
22
24
|
from .assistant_message_content import AssistantMessageContent
|
|
23
25
|
from .audio import Audio
|
|
@@ -357,6 +359,8 @@ __all__ = [
|
|
|
357
359
|
"ApprovalCreate",
|
|
358
360
|
"ApprovalRequestMessage",
|
|
359
361
|
"ApprovalResponseMessage",
|
|
362
|
+
"ArchivalMemorySearchResponse",
|
|
363
|
+
"ArchivalMemorySearchResult",
|
|
360
364
|
"AssistantMessage",
|
|
361
365
|
"AssistantMessageContent",
|
|
362
366
|
"Audio",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .archival_memory_search_result import ArchivalMemorySearchResult
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ArchivalMemorySearchResponse(UncheckedBaseModel):
|
|
12
|
+
results: typing.List[ArchivalMemorySearchResult] = pydantic.Field()
|
|
13
|
+
"""
|
|
14
|
+
List of search results matching the query
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
count: int = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
Total number of results returned
|
|
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,33 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ..core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ArchivalMemorySearchResult(UncheckedBaseModel):
|
|
11
|
+
timestamp: str = pydantic.Field()
|
|
12
|
+
"""
|
|
13
|
+
Timestamp of when the memory was created, formatted in agent's timezone
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
content: str = pydantic.Field()
|
|
17
|
+
"""
|
|
18
|
+
Text content of the archival memory passage
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
tags: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
List of tags associated with this memory
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
if IS_PYDANTIC_V2:
|
|
27
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
28
|
+
else:
|
|
29
|
+
|
|
30
|
+
class Config:
|
|
31
|
+
frozen = True
|
|
32
|
+
smart_union = True
|
|
33
|
+
extra = pydantic.Extra.allow
|
|
@@ -12,11 +12,6 @@ class UpdateSsemcpServer(UncheckedBaseModel):
|
|
|
12
12
|
Update an SSE MCP server
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
server_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
-
"""
|
|
17
|
-
The name of the server
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
15
|
server_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
16
|
"""
|
|
22
17
|
The URL of the server (MCP SSE client will connect to this URL)
|
|
@@ -13,11 +13,6 @@ class UpdateStdioMcpServer(UncheckedBaseModel):
|
|
|
13
13
|
Update a Stdio MCP server
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
|
-
server_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
-
"""
|
|
18
|
-
The name of the server
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
16
|
stdio_config: typing.Optional[StdioServerConfig] = pydantic.Field(default=None)
|
|
22
17
|
"""
|
|
23
18
|
The configuration for the server (MCP 'local' client will run this command)
|
|
@@ -12,11 +12,6 @@ class UpdateStreamableHttpmcpServer(UncheckedBaseModel):
|
|
|
12
12
|
Update a Streamable HTTP MCP server
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
server_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
16
|
-
"""
|
|
17
|
-
The name of the server
|
|
18
|
-
"""
|
|
19
|
-
|
|
20
15
|
server_url: typing.Optional[str] = pydantic.Field(default=None)
|
|
21
16
|
"""
|
|
22
17
|
The URL path for the streamable HTTP server (e.g., 'example/mcp')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
letta_client/__init__.py,sha256=
|
|
2
|
-
letta_client/agents/__init__.py,sha256=
|
|
1
|
+
letta_client/__init__.py,sha256=g2SF7LX1L7aSz2DoNATeSe7xxOXOPiuEloW2iwq0_0w,27213
|
|
2
|
+
letta_client/agents/__init__.py,sha256=6U2CPqYOtgufFoEhev61AzE-oOqgAQPUBsN8H7YJDbg,2081
|
|
3
3
|
letta_client/agents/blocks/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
4
4
|
letta_client/agents/blocks/client.py,sha256=CUwVh5FHgD0YP3VNhUrWdkedMWk49yH3IiDD589AWEM,15809
|
|
5
5
|
letta_client/agents/blocks/raw_client.py,sha256=Cx_85c78oqIOPZIPfCOsIa8WOL2EUNRwXJRGbOqn2AA,25570
|
|
@@ -33,9 +33,11 @@ letta_client/agents/messages/types/letta_streaming_response.py,sha256=TEqXH71L62
|
|
|
33
33
|
letta_client/agents/messages/types/messages_modify_request.py,sha256=0NT3pgbqQItc_p5cjBl4MaJ6bIMAlMhvdBJWm9zilpQ,476
|
|
34
34
|
letta_client/agents/messages/types/messages_modify_response.py,sha256=0nbkp7q7iaM2esLkdmIe0CYpJWY6LYtR3V-WkKaAy-g,871
|
|
35
35
|
letta_client/agents/messages/types/messages_preview_raw_payload_request.py,sha256=ncI14H-30FLJujezUyk2yS7Jfqf7TqqhcWejWXQ4pcE,283
|
|
36
|
-
letta_client/agents/passages/__init__.py,sha256=
|
|
37
|
-
letta_client/agents/passages/client.py,sha256=
|
|
38
|
-
letta_client/agents/passages/raw_client.py,sha256=
|
|
36
|
+
letta_client/agents/passages/__init__.py,sha256=wA0bocGcbmgb62sL9MEWpKzP_KBVv8KHhvc6vZH6MOE,187
|
|
37
|
+
letta_client/agents/passages/client.py,sha256=LB0pnikhFV__igj6LW7uWWBdfi4FSs7BIicuuauLNm4,17391
|
|
38
|
+
letta_client/agents/passages/raw_client.py,sha256=MdRBgCsArv_ZDUGvOI-VS5KI9Lnilh3F7NUvQI_iV8c,26249
|
|
39
|
+
letta_client/agents/passages/types/__init__.py,sha256=zA5psnkblMdGa_kOTKkqZmMPtryV1uGScnWFeI9fuu4,220
|
|
40
|
+
letta_client/agents/passages/types/passages_search_request_tag_match_mode.py,sha256=cgAkixKi6VCJGFHUtjEzYdgq9KJcn5nrEMbR3zKp2rE,171
|
|
39
41
|
letta_client/agents/raw_client.py,sha256=h3USsoctFijFNYUQDi6OdgvpJBtj7a8ekrL58EtsV7A,97954
|
|
40
42
|
letta_client/agents/sources/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
41
43
|
letta_client/agents/sources/client.py,sha256=lCqB6FF9svrwf0oZSFs41WKlMXc-YRhUeb4FZkHbicM,6868
|
|
@@ -90,7 +92,7 @@ letta_client/client_side_access_tokens/types/client_side_access_tokens_list_clie
|
|
|
90
92
|
letta_client/client_side_access_tokens/types/client_side_access_tokens_list_client_side_access_tokens_response_tokens_item_policy_data_item_access_item.py,sha256=kNHfEWFl7u71Pu8NPqutod0a2NXfvq8il05Hqm0iBB4,284
|
|
91
93
|
letta_client/core/__init__.py,sha256=tpn7rjb6C2UIkYZYIqdrNpI7Yax2jw88sXh2baxaxAI,1715
|
|
92
94
|
letta_client/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
93
|
-
letta_client/core/client_wrapper.py,sha256=
|
|
95
|
+
letta_client/core/client_wrapper.py,sha256=fd7wGNUHPifbkwFslEvBMH3VuWCDhZVBSZem02fwgjw,2776
|
|
94
96
|
letta_client/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
95
97
|
letta_client/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
96
98
|
letta_client/core/force_multipart.py,sha256=awxh5MtcRYe74ehY8U76jzv6fYM_w_D3Rur7KQQzSDk,429
|
|
@@ -255,7 +257,7 @@ letta_client/tools/types/streaming_response.py,sha256=V1qT-XAqm-z7zffJ7W1JKPCaxZ
|
|
|
255
257
|
letta_client/tools/types/test_mcp_server_request.py,sha256=3SqjEL3EYi7iV57TjTIzuBSKv8O3Y7qSUFrCiXEvSRk,373
|
|
256
258
|
letta_client/tools/types/update_mcp_server_request.py,sha256=MHouV3iyZCTROguOQP5rOYvnmvDbBeXe5VtEejRvrEs,403
|
|
257
259
|
letta_client/tools/types/update_mcp_server_response.py,sha256=BJTPHWkb8hwgd4FvftQ8eZjl2QzCQT-vZAUVnLft9hw,376
|
|
258
|
-
letta_client/types/__init__.py,sha256=
|
|
260
|
+
letta_client/types/__init__.py,sha256=cfMGE-4qetwMMogQPqIgUvdx3HTAVRQ3m8GNT7dczlw,30185
|
|
259
261
|
letta_client/types/action_model.py,sha256=VTXavHB6J2d4MjjTMEpkuEyVaiTHyj1FGfa4j8kN6hQ,1241
|
|
260
262
|
letta_client/types/action_parameters_model.py,sha256=s1mJ4tycms8UmCFsxyjKr6RbghSuqv35xpa9mK42sjg,829
|
|
261
263
|
letta_client/types/action_response_model.py,sha256=LcML150OvsKimVV3sP4jSFh8pVxQXn_r_ff8DADOr3c,825
|
|
@@ -272,6 +274,8 @@ letta_client/types/app_model.py,sha256=6QlEj1uFSnUMDEkmM1XF1umO-X6AHq5oBGzVTZeZe
|
|
|
272
274
|
letta_client/types/approval_create.py,sha256=cB5zRgOYzcyAM_ZTKELeCy8SIWTzPQUNcMd1uLjXB_I,1092
|
|
273
275
|
letta_client/types/approval_request_message.py,sha256=goqIU7BQEdOy5DEurCmtdROCxWWjw8BM4938bgUhS5w,1499
|
|
274
276
|
letta_client/types/approval_response_message.py,sha256=mtY_Je8CEOeO78-dcg0aSG3mqRx9afIe_xqcrJcLBDs,1846
|
|
277
|
+
letta_client/types/archival_memory_search_response.py,sha256=zMvo5jJPTxRWW9Cq6d5dsacG9k4LoFcyBCfD_pLe4kg,852
|
|
278
|
+
letta_client/types/archival_memory_search_result.py,sha256=UlAWvWw1YGKAhLfAZZ30-oHLL1oDXFkaXBEAfNkQs3s,926
|
|
275
279
|
letta_client/types/assistant_message.py,sha256=iFCIXRIndpEfBpdv5jX1IMBOWKJsciQF12lfB4I9bHI,1631
|
|
276
280
|
letta_client/types/assistant_message_content.py,sha256=rJZePqcZN74tqx-FbArUF1FaqvATOYAn87mvdpqyINA,242
|
|
277
281
|
letta_client/types/audio.py,sha256=1HlHjJ1FEv4J5G4jQY24G0H91T5LT3K6e-dnQ1Di7i8,549
|
|
@@ -548,9 +552,9 @@ letta_client/types/tool_type.py,sha256=Lrced4b0gDW3IWOhyCPC_dZX6dRUReI8VsutrgRTC
|
|
|
548
552
|
letta_client/types/update_assistant_message.py,sha256=M8Ltqt8YdOFdge7ahLm-7bPeccXwyq_sHI-WgY1IcyA,879
|
|
549
553
|
letta_client/types/update_assistant_message_content.py,sha256=kAStjnVa0o4YeuDgqMnAd5Jcq1Yhnxhlk7gplV0JohQ,248
|
|
550
554
|
letta_client/types/update_reasoning_message.py,sha256=shpVxOnD7jbOYrwTm68vUw1ieEi7RcIuJeTseY9v8WE,651
|
|
551
|
-
letta_client/types/update_ssemcp_server.py,sha256=
|
|
552
|
-
letta_client/types/update_stdio_mcp_server.py,sha256=
|
|
553
|
-
letta_client/types/update_streamable_httpmcp_server.py,sha256=
|
|
555
|
+
letta_client/types/update_ssemcp_server.py,sha256=L52OAkNBTKfjSfQMm3cYFe0blIRcmxqM2a-A-8ExFP4,1086
|
|
556
|
+
letta_client/types/update_stdio_mcp_server.py,sha256=LM3nwNBi3M2SrTyajY6lWPSrrbwhAtHi2XJ2UMtdbd8,830
|
|
557
|
+
letta_client/types/update_streamable_httpmcp_server.py,sha256=YJ2acyfTB67Ik7WvJUPuSTAZ_CkeIojBt75KFkrksBk,1232
|
|
554
558
|
letta_client/types/update_system_message.py,sha256=7FQ3pzVI_wj0fpYMbe7QhUkK68_6IFWL3L4gmfJIxlw,780
|
|
555
559
|
letta_client/types/update_user_message.py,sha256=wwxhB7JBcMqJGN4bFzaJN41Rs1REvizp2caosb9yBdw,861
|
|
556
560
|
letta_client/types/update_user_message_content.py,sha256=yrx0by_JqHgOoGk4PVrq6hcu8Jjz8e7z4TheCDGpp7U,244
|
|
@@ -575,6 +579,6 @@ letta_client/version.py,sha256=bttKLbIhO3UonCYQlqs600zzbQgfhCCMjeXR9WRzid4,79
|
|
|
575
579
|
letta_client/voice/__init__.py,sha256=_VhToAyIt_5axN6CLJwtxg3-CO7THa_23pbUzqhXJa4,85
|
|
576
580
|
letta_client/voice/client.py,sha256=EbIVOQh4HXqU9McATxwga08STk-HUwPEAUr_UHqyKHg,3748
|
|
577
581
|
letta_client/voice/raw_client.py,sha256=KvM_3GXuSf51bubM0RVBnxvlf20qZTFMnaA_BzhXzjQ,5938
|
|
578
|
-
letta_client-0.1.
|
|
579
|
-
letta_client-0.1.
|
|
580
|
-
letta_client-0.1.
|
|
582
|
+
letta_client-0.1.306.dist-info/METADATA,sha256=n5wr6O2Ei7ekrRB53ZFiaFa0pM7KIImjotYktYx30jk,5782
|
|
583
|
+
letta_client-0.1.306.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
584
|
+
letta_client-0.1.306.dist-info/RECORD,,
|
|
File without changes
|