Skip to content

Commit 917a250

Browse files
committed
Release 0.1.15
1 parent 7845e37 commit 917a250

14 files changed

+324
-303
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "letta-client"
3-
version = "0.1.14"
3+
version = "0.1.15"
44
description = ""
55
readme = "README.md"
66
authors = []

reference.md

+20-110
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ client.agents.list()
17101710
<dl>
17111711
<dd>
17121712

1713-
**cursor:** `typing.Optional[int]` — Cursor for pagination
1713+
**cursor:** `typing.Optional[str]` — Cursor for pagination
17141714

17151715
</dd>
17161716
</dl>
@@ -1726,6 +1726,14 @@ client.agents.list()
17261726
<dl>
17271727
<dd>
17281728

1729+
**query_text:** `typing.Optional[str]` — Search agents by name
1730+
1731+
</dd>
1732+
</dl>
1733+
1734+
<dl>
1735+
<dd>
1736+
17291737
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
17301738

17311739
</dd>
@@ -4042,16 +4050,14 @@ Get messages associated with a run with filtering options.
40424050
Args:
40434051
run_id: ID of the run
40444052
cursor: Cursor for pagination
4045-
start_date: Filter messages after this date
4046-
end_date: Filter messages before this date
40474053
limit: Maximum number of messages to return
4048-
query_text: Search text in message content
40494054
ascending: Sort order by creation time
4050-
tags: Filter by message tags
4051-
match_all_tags: If true, match all tags. If false, match any tag
4052-
role: Filter by message role (user/assistant/system/tool)
4053-
tool_name: Filter by tool call name
4055+
role: Filter by role (user/assistant/system/tool)
4056+
return_message_object: Whether to return Message objects or LettaMessage objects
40544057
user_id: ID of the user making the request
4058+
4059+
Returns:
4060+
A list of messages associated with the run. Default is List[LettaMessage].
40554061
</dd>
40564062
</dl>
40574063
</dd>
@@ -4105,22 +4111,6 @@ client.runs.get_run_messages(
41054111
<dl>
41064112
<dd>
41074113

4108-
**start_date:** `typing.Optional[dt.datetime]` — Filter messages after this date
4109-
4110-
</dd>
4111-
</dl>
4112-
4113-
<dl>
4114-
<dd>
4115-
4116-
**end_date:** `typing.Optional[dt.datetime]` — Filter messages before this date
4117-
4118-
</dd>
4119-
</dl>
4120-
4121-
<dl>
4122-
<dd>
4123-
41244114
**limit:** `typing.Optional[int]` — Maximum number of messages to return
41254115

41264116
</dd>
@@ -4129,14 +4119,6 @@ client.runs.get_run_messages(
41294119
<dl>
41304120
<dd>
41314121

4132-
**query_text:** `typing.Optional[str]` — Search text in message content
4133-
4134-
</dd>
4135-
</dl>
4136-
4137-
<dl>
4138-
<dd>
4139-
41404122
**ascending:** `typing.Optional[bool]` — Sort order by creation time
41414123

41424124
</dd>
@@ -4145,31 +4127,7 @@ client.runs.get_run_messages(
41454127
<dl>
41464128
<dd>
41474129

4148-
**tags:** `typing.Optional[typing.Union[str, typing.Sequence[str]]]` — Filter by message tags
4149-
4150-
</dd>
4151-
</dl>
4152-
4153-
<dl>
4154-
<dd>
4155-
4156-
**match_all_tags:** `typing.Optional[bool]` — If true, match all tags. If false, match any tag
4157-
4158-
</dd>
4159-
</dl>
4160-
4161-
<dl>
4162-
<dd>
4163-
4164-
**role:** `typing.Optional[MessageRole]` — Filter by message role
4165-
4166-
</dd>
4167-
</dl>
4168-
4169-
<dl>
4170-
<dd>
4171-
4172-
**tool_name:** `typing.Optional[str]` — Filter by tool call name
4130+
**role:** `typing.Optional[MessageRole]` — Filter by role
41734131

41744132
</dd>
41754133
</dl>
@@ -5926,23 +5884,7 @@ client.agents.messages.create(
59265884
<dl>
59275885
<dd>
59285886

5929-
**use_assistant_message:** `typing.Optional[bool]` — Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
5930-
5931-
</dd>
5932-
</dl>
5933-
5934-
<dl>
5935-
<dd>
5936-
5937-
**assistant_message_tool_name:** `typing.Optional[str]` — The name of the designated message tool.
5938-
5939-
</dd>
5940-
</dl>
5941-
5942-
<dl>
5943-
<dd>
5944-
5945-
**assistant_message_tool_kwarg:** `typing.Optional[str]` — The name of the message argument in the designated message tool.
5887+
**config:** `typing.Optional[LettaRequestConfig]` — Configuration options for the LettaRequest.
59465888

59475889
</dd>
59485890
</dl>
@@ -6157,23 +6099,7 @@ for chunk in response:
61576099
<dl>
61586100
<dd>
61596101

6160-
**use_assistant_message:** `typing.Optional[bool]` — Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
6161-
6162-
</dd>
6163-
</dl>
6164-
6165-
<dl>
6166-
<dd>
6167-
6168-
**assistant_message_tool_name:** `typing.Optional[str]` — The name of the designated message tool.
6169-
6170-
</dd>
6171-
</dl>
6172-
6173-
<dl>
6174-
<dd>
6175-
6176-
**assistant_message_tool_kwarg:** `typing.Optional[str]` — The name of the message argument in the designated message tool.
6102+
**config:** `typing.Optional[LettaRequestConfig]` — Configuration options for the LettaRequest.
61776103

61786104
</dd>
61796105
</dl>
@@ -6213,8 +6139,8 @@ for chunk in response:
62136139
<dl>
62146140
<dd>
62156141

6216-
Asynchronously process a user message and return a job ID.
6217-
The actual processing happens in the background, and the status can be checked using the job ID.
6142+
Asynchronously process a user message and return a run object.
6143+
The actual processing happens in the background, and the status can be checked using the run ID.
62186144
</dd>
62196145
</dl>
62206146
</dd>
@@ -6274,23 +6200,7 @@ client.agents.messages.create_async(
62746200
<dl>
62756201
<dd>
62766202

6277-
**use_assistant_message:** `typing.Optional[bool]` — Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects.
6278-
6279-
</dd>
6280-
</dl>
6281-
6282-
<dl>
6283-
<dd>
6284-
6285-
**assistant_message_tool_name:** `typing.Optional[str]` — The name of the designated message tool.
6286-
6287-
</dd>
6288-
</dl>
6289-
6290-
<dl>
6291-
<dd>
6292-
6293-
**assistant_message_tool_kwarg:** `typing.Optional[str]` — The name of the message argument in the designated message tool.
6203+
**config:** `typing.Optional[LettaRequestConfig]` — Configuration options for the LettaRequest.
62946204

62956205
</dd>
62966206
</dl>

src/letta_client/__init__.py

+18
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
JobStatus,
5252
JobType,
5353
LettaRequest,
54+
LettaRequestConfig,
5455
LettaResponse,
5556
LettaResponseMessagesItem,
5657
LettaResponseMessagesItem_AssistantMessage,
@@ -147,6 +148,15 @@
147148
)
148149
from .client import AsyncLetta, Letta
149150
from .environment import LettaEnvironment
151+
from .runs import (
152+
GetRunMessagesResponseItem,
153+
GetRunMessagesResponseItem_AssistantMessage,
154+
GetRunMessagesResponseItem_ReasoningMessage,
155+
GetRunMessagesResponseItem_SystemMessage,
156+
GetRunMessagesResponseItem_ToolCallMessage,
157+
GetRunMessagesResponseItem_ToolReturnMessage,
158+
GetRunMessagesResponseItem_UserMessage,
159+
)
150160
from .version import __version__
151161

152162
__all__ = [
@@ -208,6 +218,13 @@
208218
"FunctionCallInput",
209219
"FunctionCallOutput",
210220
"FunctionSchema",
221+
"GetRunMessagesResponseItem",
222+
"GetRunMessagesResponseItem_AssistantMessage",
223+
"GetRunMessagesResponseItem_ReasoningMessage",
224+
"GetRunMessagesResponseItem_SystemMessage",
225+
"GetRunMessagesResponseItem_ToolCallMessage",
226+
"GetRunMessagesResponseItem_ToolReturnMessage",
227+
"GetRunMessagesResponseItem_UserMessage",
211228
"Health",
212229
"HttpValidationError",
213230
"InitToolRule",
@@ -219,6 +236,7 @@
219236
"Letta",
220237
"LettaEnvironment",
221238
"LettaRequest",
239+
"LettaRequestConfig",
222240
"LettaResponse",
223241
"LettaResponseMessagesItem",
224242
"LettaResponseMessagesItem_AssistantMessage",

src/letta_client/agents/client.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ def list(
6363
name: typing.Optional[str] = None,
6464
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
6565
match_all_tags: typing.Optional[bool] = None,
66-
cursor: typing.Optional[int] = None,
66+
cursor: typing.Optional[str] = None,
6767
limit: typing.Optional[int] = None,
68+
query_text: typing.Optional[str] = None,
6869
request_options: typing.Optional[RequestOptions] = None,
6970
) -> typing.List[AgentState]:
7071
"""
@@ -82,12 +83,15 @@ def list(
8283
match_all_tags : typing.Optional[bool]
8384
If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed in tags.
8485
85-
cursor : typing.Optional[int]
86+
cursor : typing.Optional[str]
8687
Cursor for pagination
8788
8889
limit : typing.Optional[int]
8990
Limit for pagination
9091
92+
query_text : typing.Optional[str]
93+
Search agents by name
94+
9195
request_options : typing.Optional[RequestOptions]
9296
Request-specific configuration.
9397
@@ -114,6 +118,7 @@ def list(
114118
"match_all_tags": match_all_tags,
115119
"cursor": cursor,
116120
"limit": limit,
121+
"query_text": query_text,
117122
},
118123
request_options=request_options,
119124
)
@@ -747,8 +752,9 @@ async def list(
747752
name: typing.Optional[str] = None,
748753
tags: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
749754
match_all_tags: typing.Optional[bool] = None,
750-
cursor: typing.Optional[int] = None,
755+
cursor: typing.Optional[str] = None,
751756
limit: typing.Optional[int] = None,
757+
query_text: typing.Optional[str] = None,
752758
request_options: typing.Optional[RequestOptions] = None,
753759
) -> typing.List[AgentState]:
754760
"""
@@ -766,12 +772,15 @@ async def list(
766772
match_all_tags : typing.Optional[bool]
767773
If True, only returns agents that match ALL given tags. Otherwise, return agents that have ANY of the passed in tags.
768774
769-
cursor : typing.Optional[int]
775+
cursor : typing.Optional[str]
770776
Cursor for pagination
771777
772778
limit : typing.Optional[int]
773779
Limit for pagination
774780
781+
query_text : typing.Optional[str]
782+
Search agents by name
783+
775784
request_options : typing.Optional[RequestOptions]
776785
Request-specific configuration.
777786
@@ -806,6 +815,7 @@ async def main() -> None:
806815
"match_all_tags": match_all_tags,
807816
"cursor": cursor,
808817
"limit": limit,
818+
"query_text": query_text,
809819
},
810820
request_options=request_options,
811821
)

0 commit comments

Comments
 (0)