letta-client 1.0.0a14__py3-none-any.whl → 1.0.0a15__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/_version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "letta_client"
4
- __version__ = "1.0.0-alpha.14" # x-release-please-version
4
+ __version__ = "1.0.0-alpha.15" # x-release-please-version
@@ -425,12 +425,13 @@ class MessagesResource(SyncAPIResource):
425
425
  self,
426
426
  agent_id: str,
427
427
  *,
428
- messages: Iterable[message_send_params.Message],
429
428
  assistant_message_tool_kwarg: str | Omit = omit,
430
429
  assistant_message_tool_name: str | Omit = omit,
431
430
  enable_thinking: str | Omit = omit,
432
431
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
432
+ input: Union[str, Iterable[message_send_params.InputUnionMember1], None] | Omit = omit,
433
433
  max_steps: int | Omit = omit,
434
+ messages: Optional[Iterable[message_send_params.Message]] | Omit = omit,
434
435
  use_assistant_message: bool | Omit = omit,
435
436
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
436
437
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -447,8 +448,6 @@ class MessagesResource(SyncAPIResource):
447
448
  Args:
448
449
  agent_id: The ID of the agent in the format 'agent-<uuid4>'
449
450
 
450
- messages: The messages to be sent to the agent.
451
-
452
451
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
453
452
  for legacy agent types, but deprecated for letta_v1_agent onward.
454
453
 
@@ -460,8 +459,14 @@ class MessagesResource(SyncAPIResource):
460
459
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
461
460
  all messages.
462
461
 
462
+ input:
463
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
464
+ 'user', 'content': input}].
465
+
463
466
  max_steps: Maximum number of steps the agent should take to process the request.
464
467
 
468
+ messages: The messages to be sent to the agent.
469
+
465
470
  use_assistant_message: Whether the server should parse specific tool call arguments (default
466
471
  `send_message`) as `AssistantMessage` objects. Still supported for legacy agent
467
472
  types, but deprecated for letta_v1_agent onward.
@@ -480,12 +485,13 @@ class MessagesResource(SyncAPIResource):
480
485
  f"/v1/agents/{agent_id}/messages",
481
486
  body=maybe_transform(
482
487
  {
483
- "messages": messages,
484
488
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
485
489
  "assistant_message_tool_name": assistant_message_tool_name,
486
490
  "enable_thinking": enable_thinking,
487
491
  "include_return_message_types": include_return_message_types,
492
+ "input": input,
488
493
  "max_steps": max_steps,
494
+ "messages": messages,
489
495
  "use_assistant_message": use_assistant_message,
490
496
  },
491
497
  message_send_params.MessageSendParams,
@@ -500,13 +506,14 @@ class MessagesResource(SyncAPIResource):
500
506
  self,
501
507
  agent_id: str,
502
508
  *,
503
- messages: Iterable[message_send_async_params.Message],
504
509
  assistant_message_tool_kwarg: str | Omit = omit,
505
510
  assistant_message_tool_name: str | Omit = omit,
506
511
  callback_url: Optional[str] | Omit = omit,
507
512
  enable_thinking: str | Omit = omit,
508
513
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
514
+ input: Union[str, Iterable[message_send_async_params.InputUnionMember1], None] | Omit = omit,
509
515
  max_steps: int | Omit = omit,
516
+ messages: Optional[Iterable[message_send_async_params.Message]] | Omit = omit,
510
517
  use_assistant_message: bool | Omit = omit,
511
518
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
512
519
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -527,8 +534,6 @@ class MessagesResource(SyncAPIResource):
527
534
  Args:
528
535
  agent_id: The ID of the agent in the format 'agent-<uuid4>'
529
536
 
530
- messages: The messages to be sent to the agent.
531
-
532
537
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
533
538
  for legacy agent types, but deprecated for letta_v1_agent onward.
534
539
 
@@ -542,8 +547,14 @@ class MessagesResource(SyncAPIResource):
542
547
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
543
548
  all messages.
544
549
 
550
+ input:
551
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
552
+ 'user', 'content': input}].
553
+
545
554
  max_steps: Maximum number of steps the agent should take to process the request.
546
555
 
556
+ messages: The messages to be sent to the agent.
557
+
547
558
  use_assistant_message: Whether the server should parse specific tool call arguments (default
548
559
  `send_message`) as `AssistantMessage` objects. Still supported for legacy agent
549
560
  types, but deprecated for letta_v1_agent onward.
@@ -562,13 +573,14 @@ class MessagesResource(SyncAPIResource):
562
573
  f"/v1/agents/{agent_id}/messages/async",
563
574
  body=maybe_transform(
564
575
  {
565
- "messages": messages,
566
576
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
567
577
  "assistant_message_tool_name": assistant_message_tool_name,
568
578
  "callback_url": callback_url,
569
579
  "enable_thinking": enable_thinking,
570
580
  "include_return_message_types": include_return_message_types,
581
+ "input": input,
571
582
  "max_steps": max_steps,
583
+ "messages": messages,
572
584
  "use_assistant_message": use_assistant_message,
573
585
  },
574
586
  message_send_async_params.MessageSendAsyncParams,
@@ -583,14 +595,15 @@ class MessagesResource(SyncAPIResource):
583
595
  self,
584
596
  agent_id: str,
585
597
  *,
586
- messages: Iterable[message_stream_params.Message],
587
598
  assistant_message_tool_kwarg: str | Omit = omit,
588
599
  assistant_message_tool_name: str | Omit = omit,
589
600
  background: bool | Omit = omit,
590
601
  enable_thinking: str | Omit = omit,
591
602
  include_pings: bool | Omit = omit,
592
603
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
604
+ input: Union[str, Iterable[message_stream_params.InputUnionMember1], None] | Omit = omit,
593
605
  max_steps: int | Omit = omit,
606
+ messages: Optional[Iterable[message_stream_params.Message]] | Omit = omit,
594
607
  stream_tokens: bool | Omit = omit,
595
608
  use_assistant_message: bool | Omit = omit,
596
609
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -609,8 +622,6 @@ class MessagesResource(SyncAPIResource):
609
622
  Args:
610
623
  agent_id: The ID of the agent in the format 'agent-<uuid4>'
611
624
 
612
- messages: The messages to be sent to the agent.
613
-
614
625
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
615
626
  for legacy agent types, but deprecated for letta_v1_agent onward.
616
627
 
@@ -627,8 +638,14 @@ class MessagesResource(SyncAPIResource):
627
638
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
628
639
  all messages.
629
640
 
641
+ input:
642
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
643
+ 'user', 'content': input}].
644
+
630
645
  max_steps: Maximum number of steps the agent should take to process the request.
631
646
 
647
+ messages: The messages to be sent to the agent.
648
+
632
649
  stream_tokens: Flag to determine if individual tokens should be streamed, rather than streaming
633
650
  per step.
634
651
 
@@ -650,14 +667,15 @@ class MessagesResource(SyncAPIResource):
650
667
  f"/v1/agents/{agent_id}/messages/stream",
651
668
  body=maybe_transform(
652
669
  {
653
- "messages": messages,
654
670
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
655
671
  "assistant_message_tool_name": assistant_message_tool_name,
656
672
  "background": background,
657
673
  "enable_thinking": enable_thinking,
658
674
  "include_pings": include_pings,
659
675
  "include_return_message_types": include_return_message_types,
676
+ "input": input,
660
677
  "max_steps": max_steps,
678
+ "messages": messages,
661
679
  "stream_tokens": stream_tokens,
662
680
  "use_assistant_message": use_assistant_message,
663
681
  },
@@ -1092,12 +1110,13 @@ class AsyncMessagesResource(AsyncAPIResource):
1092
1110
  self,
1093
1111
  agent_id: str,
1094
1112
  *,
1095
- messages: Iterable[message_send_params.Message],
1096
1113
  assistant_message_tool_kwarg: str | Omit = omit,
1097
1114
  assistant_message_tool_name: str | Omit = omit,
1098
1115
  enable_thinking: str | Omit = omit,
1099
1116
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
1117
+ input: Union[str, Iterable[message_send_params.InputUnionMember1], None] | Omit = omit,
1100
1118
  max_steps: int | Omit = omit,
1119
+ messages: Optional[Iterable[message_send_params.Message]] | Omit = omit,
1101
1120
  use_assistant_message: bool | Omit = omit,
1102
1121
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1103
1122
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1114,8 +1133,6 @@ class AsyncMessagesResource(AsyncAPIResource):
1114
1133
  Args:
1115
1134
  agent_id: The ID of the agent in the format 'agent-<uuid4>'
1116
1135
 
1117
- messages: The messages to be sent to the agent.
1118
-
1119
1136
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
1120
1137
  for legacy agent types, but deprecated for letta_v1_agent onward.
1121
1138
 
@@ -1127,8 +1144,14 @@ class AsyncMessagesResource(AsyncAPIResource):
1127
1144
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
1128
1145
  all messages.
1129
1146
 
1147
+ input:
1148
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
1149
+ 'user', 'content': input}].
1150
+
1130
1151
  max_steps: Maximum number of steps the agent should take to process the request.
1131
1152
 
1153
+ messages: The messages to be sent to the agent.
1154
+
1132
1155
  use_assistant_message: Whether the server should parse specific tool call arguments (default
1133
1156
  `send_message`) as `AssistantMessage` objects. Still supported for legacy agent
1134
1157
  types, but deprecated for letta_v1_agent onward.
@@ -1147,12 +1170,13 @@ class AsyncMessagesResource(AsyncAPIResource):
1147
1170
  f"/v1/agents/{agent_id}/messages",
1148
1171
  body=await async_maybe_transform(
1149
1172
  {
1150
- "messages": messages,
1151
1173
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
1152
1174
  "assistant_message_tool_name": assistant_message_tool_name,
1153
1175
  "enable_thinking": enable_thinking,
1154
1176
  "include_return_message_types": include_return_message_types,
1177
+ "input": input,
1155
1178
  "max_steps": max_steps,
1179
+ "messages": messages,
1156
1180
  "use_assistant_message": use_assistant_message,
1157
1181
  },
1158
1182
  message_send_params.MessageSendParams,
@@ -1167,13 +1191,14 @@ class AsyncMessagesResource(AsyncAPIResource):
1167
1191
  self,
1168
1192
  agent_id: str,
1169
1193
  *,
1170
- messages: Iterable[message_send_async_params.Message],
1171
1194
  assistant_message_tool_kwarg: str | Omit = omit,
1172
1195
  assistant_message_tool_name: str | Omit = omit,
1173
1196
  callback_url: Optional[str] | Omit = omit,
1174
1197
  enable_thinking: str | Omit = omit,
1175
1198
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
1199
+ input: Union[str, Iterable[message_send_async_params.InputUnionMember1], None] | Omit = omit,
1176
1200
  max_steps: int | Omit = omit,
1201
+ messages: Optional[Iterable[message_send_async_params.Message]] | Omit = omit,
1177
1202
  use_assistant_message: bool | Omit = omit,
1178
1203
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
1179
1204
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -1194,8 +1219,6 @@ class AsyncMessagesResource(AsyncAPIResource):
1194
1219
  Args:
1195
1220
  agent_id: The ID of the agent in the format 'agent-<uuid4>'
1196
1221
 
1197
- messages: The messages to be sent to the agent.
1198
-
1199
1222
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
1200
1223
  for legacy agent types, but deprecated for letta_v1_agent onward.
1201
1224
 
@@ -1209,8 +1232,14 @@ class AsyncMessagesResource(AsyncAPIResource):
1209
1232
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
1210
1233
  all messages.
1211
1234
 
1235
+ input:
1236
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
1237
+ 'user', 'content': input}].
1238
+
1212
1239
  max_steps: Maximum number of steps the agent should take to process the request.
1213
1240
 
1241
+ messages: The messages to be sent to the agent.
1242
+
1214
1243
  use_assistant_message: Whether the server should parse specific tool call arguments (default
1215
1244
  `send_message`) as `AssistantMessage` objects. Still supported for legacy agent
1216
1245
  types, but deprecated for letta_v1_agent onward.
@@ -1229,13 +1258,14 @@ class AsyncMessagesResource(AsyncAPIResource):
1229
1258
  f"/v1/agents/{agent_id}/messages/async",
1230
1259
  body=await async_maybe_transform(
1231
1260
  {
1232
- "messages": messages,
1233
1261
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
1234
1262
  "assistant_message_tool_name": assistant_message_tool_name,
1235
1263
  "callback_url": callback_url,
1236
1264
  "enable_thinking": enable_thinking,
1237
1265
  "include_return_message_types": include_return_message_types,
1266
+ "input": input,
1238
1267
  "max_steps": max_steps,
1268
+ "messages": messages,
1239
1269
  "use_assistant_message": use_assistant_message,
1240
1270
  },
1241
1271
  message_send_async_params.MessageSendAsyncParams,
@@ -1250,14 +1280,15 @@ class AsyncMessagesResource(AsyncAPIResource):
1250
1280
  self,
1251
1281
  agent_id: str,
1252
1282
  *,
1253
- messages: Iterable[message_stream_params.Message],
1254
1283
  assistant_message_tool_kwarg: str | Omit = omit,
1255
1284
  assistant_message_tool_name: str | Omit = omit,
1256
1285
  background: bool | Omit = omit,
1257
1286
  enable_thinking: str | Omit = omit,
1258
1287
  include_pings: bool | Omit = omit,
1259
1288
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
1289
+ input: Union[str, Iterable[message_stream_params.InputUnionMember1], None] | Omit = omit,
1260
1290
  max_steps: int | Omit = omit,
1291
+ messages: Optional[Iterable[message_stream_params.Message]] | Omit = omit,
1261
1292
  stream_tokens: bool | Omit = omit,
1262
1293
  use_assistant_message: bool | Omit = omit,
1263
1294
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -1276,8 +1307,6 @@ class AsyncMessagesResource(AsyncAPIResource):
1276
1307
  Args:
1277
1308
  agent_id: The ID of the agent in the format 'agent-<uuid4>'
1278
1309
 
1279
- messages: The messages to be sent to the agent.
1280
-
1281
1310
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
1282
1311
  for legacy agent types, but deprecated for letta_v1_agent onward.
1283
1312
 
@@ -1294,8 +1323,14 @@ class AsyncMessagesResource(AsyncAPIResource):
1294
1323
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
1295
1324
  all messages.
1296
1325
 
1326
+ input:
1327
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
1328
+ 'user', 'content': input}].
1329
+
1297
1330
  max_steps: Maximum number of steps the agent should take to process the request.
1298
1331
 
1332
+ messages: The messages to be sent to the agent.
1333
+
1299
1334
  stream_tokens: Flag to determine if individual tokens should be streamed, rather than streaming
1300
1335
  per step.
1301
1336
 
@@ -1317,14 +1352,15 @@ class AsyncMessagesResource(AsyncAPIResource):
1317
1352
  f"/v1/agents/{agent_id}/messages/stream",
1318
1353
  body=await async_maybe_transform(
1319
1354
  {
1320
- "messages": messages,
1321
1355
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
1322
1356
  "assistant_message_tool_name": assistant_message_tool_name,
1323
1357
  "background": background,
1324
1358
  "enable_thinking": enable_thinking,
1325
1359
  "include_pings": include_pings,
1326
1360
  "include_return_message_types": include_return_message_types,
1361
+ "input": input,
1327
1362
  "max_steps": max_steps,
1363
+ "messages": messages,
1328
1364
  "stream_tokens": stream_tokens,
1329
1365
  "use_assistant_message": use_assistant_message,
1330
1366
  },
@@ -356,12 +356,13 @@ class MessagesResource(SyncAPIResource):
356
356
  self,
357
357
  group_id: str,
358
358
  *,
359
- messages: Iterable[message_send_params.Message],
360
359
  assistant_message_tool_kwarg: str | Omit = omit,
361
360
  assistant_message_tool_name: str | Omit = omit,
362
361
  enable_thinking: str | Omit = omit,
363
362
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
363
+ input: Union[str, Iterable[message_send_params.InputUnionMember1], None] | Omit = omit,
364
364
  max_steps: int | Omit = omit,
365
+ messages: Optional[Iterable[message_send_params.Message]] | Omit = omit,
365
366
  use_assistant_message: bool | Omit = omit,
366
367
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
367
368
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -379,8 +380,6 @@ class MessagesResource(SyncAPIResource):
379
380
  Args:
380
381
  group_id: The ID of the group in the format 'group-<uuid4>'
381
382
 
382
- messages: The messages to be sent to the agent.
383
-
384
383
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
385
384
  for legacy agent types, but deprecated for letta_v1_agent onward.
386
385
 
@@ -392,8 +391,14 @@ class MessagesResource(SyncAPIResource):
392
391
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
393
392
  all messages.
394
393
 
394
+ input:
395
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
396
+ 'user', 'content': input}].
397
+
395
398
  max_steps: Maximum number of steps the agent should take to process the request.
396
399
 
400
+ messages: The messages to be sent to the agent.
401
+
397
402
  use_assistant_message: Whether the server should parse specific tool call arguments (default
398
403
  `send_message`) as `AssistantMessage` objects. Still supported for legacy agent
399
404
  types, but deprecated for letta_v1_agent onward.
@@ -412,12 +417,13 @@ class MessagesResource(SyncAPIResource):
412
417
  f"/v1/groups/{group_id}/messages",
413
418
  body=maybe_transform(
414
419
  {
415
- "messages": messages,
416
420
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
417
421
  "assistant_message_tool_name": assistant_message_tool_name,
418
422
  "enable_thinking": enable_thinking,
419
423
  "include_return_message_types": include_return_message_types,
424
+ "input": input,
420
425
  "max_steps": max_steps,
426
+ "messages": messages,
421
427
  "use_assistant_message": use_assistant_message,
422
428
  },
423
429
  message_send_params.MessageSendParams,
@@ -432,14 +438,15 @@ class MessagesResource(SyncAPIResource):
432
438
  self,
433
439
  group_id: str,
434
440
  *,
435
- messages: Iterable[message_stream_params.Message],
436
441
  assistant_message_tool_kwarg: str | Omit = omit,
437
442
  assistant_message_tool_name: str | Omit = omit,
438
443
  background: bool | Omit = omit,
439
444
  enable_thinking: str | Omit = omit,
440
445
  include_pings: bool | Omit = omit,
441
446
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
447
+ input: Union[str, Iterable[message_stream_params.InputUnionMember1], None] | Omit = omit,
442
448
  max_steps: int | Omit = omit,
449
+ messages: Optional[Iterable[message_stream_params.Message]] | Omit = omit,
443
450
  stream_tokens: bool | Omit = omit,
444
451
  use_assistant_message: bool | Omit = omit,
445
452
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -459,8 +466,6 @@ class MessagesResource(SyncAPIResource):
459
466
  Args:
460
467
  group_id: The ID of the group in the format 'group-<uuid4>'
461
468
 
462
- messages: The messages to be sent to the agent.
463
-
464
469
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
465
470
  for legacy agent types, but deprecated for letta_v1_agent onward.
466
471
 
@@ -477,8 +482,14 @@ class MessagesResource(SyncAPIResource):
477
482
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
478
483
  all messages.
479
484
 
485
+ input:
486
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
487
+ 'user', 'content': input}].
488
+
480
489
  max_steps: Maximum number of steps the agent should take to process the request.
481
490
 
491
+ messages: The messages to be sent to the agent.
492
+
482
493
  stream_tokens: Flag to determine if individual tokens should be streamed, rather than streaming
483
494
  per step.
484
495
 
@@ -500,14 +511,15 @@ class MessagesResource(SyncAPIResource):
500
511
  f"/v1/groups/{group_id}/messages/stream",
501
512
  body=maybe_transform(
502
513
  {
503
- "messages": messages,
504
514
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
505
515
  "assistant_message_tool_name": assistant_message_tool_name,
506
516
  "background": background,
507
517
  "enable_thinking": enable_thinking,
508
518
  "include_pings": include_pings,
509
519
  "include_return_message_types": include_return_message_types,
520
+ "input": input,
510
521
  "max_steps": max_steps,
522
+ "messages": messages,
511
523
  "stream_tokens": stream_tokens,
512
524
  "use_assistant_message": use_assistant_message,
513
525
  },
@@ -846,12 +858,13 @@ class AsyncMessagesResource(AsyncAPIResource):
846
858
  self,
847
859
  group_id: str,
848
860
  *,
849
- messages: Iterable[message_send_params.Message],
850
861
  assistant_message_tool_kwarg: str | Omit = omit,
851
862
  assistant_message_tool_name: str | Omit = omit,
852
863
  enable_thinking: str | Omit = omit,
853
864
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
865
+ input: Union[str, Iterable[message_send_params.InputUnionMember1], None] | Omit = omit,
854
866
  max_steps: int | Omit = omit,
867
+ messages: Optional[Iterable[message_send_params.Message]] | Omit = omit,
855
868
  use_assistant_message: bool | Omit = omit,
856
869
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
857
870
  # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -869,8 +882,6 @@ class AsyncMessagesResource(AsyncAPIResource):
869
882
  Args:
870
883
  group_id: The ID of the group in the format 'group-<uuid4>'
871
884
 
872
- messages: The messages to be sent to the agent.
873
-
874
885
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
875
886
  for legacy agent types, but deprecated for letta_v1_agent onward.
876
887
 
@@ -882,8 +893,14 @@ class AsyncMessagesResource(AsyncAPIResource):
882
893
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
883
894
  all messages.
884
895
 
896
+ input:
897
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
898
+ 'user', 'content': input}].
899
+
885
900
  max_steps: Maximum number of steps the agent should take to process the request.
886
901
 
902
+ messages: The messages to be sent to the agent.
903
+
887
904
  use_assistant_message: Whether the server should parse specific tool call arguments (default
888
905
  `send_message`) as `AssistantMessage` objects. Still supported for legacy agent
889
906
  types, but deprecated for letta_v1_agent onward.
@@ -902,12 +919,13 @@ class AsyncMessagesResource(AsyncAPIResource):
902
919
  f"/v1/groups/{group_id}/messages",
903
920
  body=await async_maybe_transform(
904
921
  {
905
- "messages": messages,
906
922
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
907
923
  "assistant_message_tool_name": assistant_message_tool_name,
908
924
  "enable_thinking": enable_thinking,
909
925
  "include_return_message_types": include_return_message_types,
926
+ "input": input,
910
927
  "max_steps": max_steps,
928
+ "messages": messages,
911
929
  "use_assistant_message": use_assistant_message,
912
930
  },
913
931
  message_send_params.MessageSendParams,
@@ -922,14 +940,15 @@ class AsyncMessagesResource(AsyncAPIResource):
922
940
  self,
923
941
  group_id: str,
924
942
  *,
925
- messages: Iterable[message_stream_params.Message],
926
943
  assistant_message_tool_kwarg: str | Omit = omit,
927
944
  assistant_message_tool_name: str | Omit = omit,
928
945
  background: bool | Omit = omit,
929
946
  enable_thinking: str | Omit = omit,
930
947
  include_pings: bool | Omit = omit,
931
948
  include_return_message_types: Optional[List[MessageType]] | Omit = omit,
949
+ input: Union[str, Iterable[message_stream_params.InputUnionMember1], None] | Omit = omit,
932
950
  max_steps: int | Omit = omit,
951
+ messages: Optional[Iterable[message_stream_params.Message]] | Omit = omit,
933
952
  stream_tokens: bool | Omit = omit,
934
953
  use_assistant_message: bool | Omit = omit,
935
954
  # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -949,8 +968,6 @@ class AsyncMessagesResource(AsyncAPIResource):
949
968
  Args:
950
969
  group_id: The ID of the group in the format 'group-<uuid4>'
951
970
 
952
- messages: The messages to be sent to the agent.
953
-
954
971
  assistant_message_tool_kwarg: The name of the message argument in the designated message tool. Still supported
955
972
  for legacy agent types, but deprecated for letta_v1_agent onward.
956
973
 
@@ -967,8 +984,14 @@ class AsyncMessagesResource(AsyncAPIResource):
967
984
  include_return_message_types: Only return specified message types in the response. If `None` (default) returns
968
985
  all messages.
969
986
 
987
+ input:
988
+ Syntactic sugar for a single user message. Equivalent to messages=[{'role':
989
+ 'user', 'content': input}].
990
+
970
991
  max_steps: Maximum number of steps the agent should take to process the request.
971
992
 
993
+ messages: The messages to be sent to the agent.
994
+
972
995
  stream_tokens: Flag to determine if individual tokens should be streamed, rather than streaming
973
996
  per step.
974
997
 
@@ -990,14 +1013,15 @@ class AsyncMessagesResource(AsyncAPIResource):
990
1013
  f"/v1/groups/{group_id}/messages/stream",
991
1014
  body=await async_maybe_transform(
992
1015
  {
993
- "messages": messages,
994
1016
  "assistant_message_tool_kwarg": assistant_message_tool_kwarg,
995
1017
  "assistant_message_tool_name": assistant_message_tool_name,
996
1018
  "background": background,
997
1019
  "enable_thinking": enable_thinking,
998
1020
  "include_pings": include_pings,
999
1021
  "include_return_message_types": include_return_message_types,
1022
+ "input": input,
1000
1023
  "max_steps": max_steps,
1024
+ "messages": messages,
1001
1025
  "stream_tokens": stream_tokens,
1002
1026
  "use_assistant_message": use_assistant_message,
1003
1027
  },
@@ -13,9 +13,11 @@ from .message_role import MessageRole as MessageRole
13
13
  from .message_type import MessageType as MessageType
14
14
  from .text_content import TextContent as TextContent
15
15
  from .user_message import UserMessage as UserMessage
16
+ from .event_message import EventMessage as EventMessage
16
17
  from .image_content import ImageContent as ImageContent
17
18
  from .letta_response import LettaResponse as LettaResponse
18
19
  from .system_message import SystemMessage as SystemMessage
20
+ from .summary_message import SummaryMessage as SummaryMessage
19
21
  from .tool_call_delta import ToolCallDelta as ToolCallDelta
20
22
  from .file_list_params import FileListParams as FileListParams
21
23
  from .tool_list_params import ToolListParams as ToolListParams
@@ -0,0 +1,35 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, Optional
4
+ from datetime import datetime
5
+ from typing_extensions import Literal
6
+
7
+ from ..._models import BaseModel
8
+
9
+ __all__ = ["EventMessage"]
10
+
11
+
12
+ class EventMessage(BaseModel):
13
+ id: str
14
+
15
+ date: datetime
16
+
17
+ event_data: Dict[str, object]
18
+
19
+ event_type: Literal["compaction"]
20
+
21
+ is_err: Optional[bool] = None
22
+
23
+ message_type: Optional[Literal["event"]] = None
24
+
25
+ name: Optional[str] = None
26
+
27
+ otid: Optional[str] = None
28
+
29
+ run_id: Optional[str] = None
30
+
31
+ sender_id: Optional[str] = None
32
+
33
+ seq_id: Optional[int] = None
34
+
35
+ step_id: Optional[str] = None
@@ -5,7 +5,9 @@ from typing_extensions import Annotated, TypeAlias
5
5
 
6
6
  from ..._utils import PropertyInfo
7
7
  from .user_message import UserMessage
8
+ from .event_message import EventMessage
8
9
  from .system_message import SystemMessage
10
+ from .summary_message import SummaryMessage
9
11
  from .assistant_message import AssistantMessage
10
12
  from .reasoning_message import ReasoningMessage
11
13
  from .tool_call_message import ToolCallMessage
@@ -27,6 +29,8 @@ LettaMessageUnion: TypeAlias = Annotated[
27
29
  AssistantMessage,
28
30
  ApprovalRequestMessage,
29
31
  ApprovalResponseMessage,
32
+ SummaryMessage,
33
+ EventMessage,
30
34
  ],
31
35
  PropertyInfo(discriminator="message_type"),
32
36
  ]
@@ -5,7 +5,9 @@ from typing_extensions import Annotated, TypeAlias
5
5
 
6
6
  from ..._utils import PropertyInfo
7
7
  from .user_message import UserMessage
8
+ from .event_message import EventMessage
8
9
  from .system_message import SystemMessage
10
+ from .summary_message import SummaryMessage
9
11
  from .assistant_message import AssistantMessage
10
12
  from .reasoning_message import ReasoningMessage
11
13
  from .tool_call_message import ToolCallMessage
@@ -27,6 +29,8 @@ MessageModifyResponse: TypeAlias = Annotated[
27
29
  AssistantMessage,
28
30
  ApprovalRequestMessage,
29
31
  ApprovalResponseMessage,
32
+ SummaryMessage,
33
+ EventMessage,
30
34
  ],
31
35
  PropertyInfo(discriminator="message_type"),
32
36
  ]