@letta-ai/letta-client 1.0.0-alpha.13 → 1.0.0-alpha.15

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.
Files changed (79) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +7 -1
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -1
  5. package/client.d.ts.map +1 -1
  6. package/client.js +7 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +7 -2
  9. package/client.mjs.map +1 -1
  10. package/core/pagination.d.mts +1 -1
  11. package/core/pagination.d.mts.map +1 -1
  12. package/core/pagination.d.ts +1 -1
  13. package/core/pagination.d.ts.map +1 -1
  14. package/core/pagination.js +6 -6
  15. package/core/pagination.js.map +1 -1
  16. package/core/pagination.mjs +6 -6
  17. package/core/pagination.mjs.map +1 -1
  18. package/package.json +1 -1
  19. package/resources/agents/agents.d.mts +4 -4
  20. package/resources/agents/agents.d.mts.map +1 -1
  21. package/resources/agents/agents.d.ts +4 -4
  22. package/resources/agents/agents.d.ts.map +1 -1
  23. package/resources/agents/agents.js.map +1 -1
  24. package/resources/agents/agents.mjs.map +1 -1
  25. package/resources/agents/files.d.mts +39 -79
  26. package/resources/agents/files.d.mts.map +1 -1
  27. package/resources/agents/files.d.ts +39 -79
  28. package/resources/agents/files.d.ts.map +1 -1
  29. package/resources/agents/files.js +5 -1
  30. package/resources/agents/files.js.map +1 -1
  31. package/resources/agents/files.mjs +5 -1
  32. package/resources/agents/files.mjs.map +1 -1
  33. package/resources/agents/index.d.mts +2 -2
  34. package/resources/agents/index.d.mts.map +1 -1
  35. package/resources/agents/index.d.ts +2 -2
  36. package/resources/agents/index.d.ts.map +1 -1
  37. package/resources/agents/index.js.map +1 -1
  38. package/resources/agents/index.mjs.map +1 -1
  39. package/resources/agents/messages.d.mts +258 -21
  40. package/resources/agents/messages.d.mts.map +1 -1
  41. package/resources/agents/messages.d.ts +258 -21
  42. package/resources/agents/messages.d.ts.map +1 -1
  43. package/resources/batches/batches.d.mts +44 -4
  44. package/resources/batches/batches.d.mts.map +1 -1
  45. package/resources/batches/batches.d.ts +44 -4
  46. package/resources/batches/batches.d.ts.map +1 -1
  47. package/resources/batches/batches.js.map +1 -1
  48. package/resources/batches/batches.mjs.map +1 -1
  49. package/resources/groups/messages.d.mts +88 -8
  50. package/resources/groups/messages.d.mts.map +1 -1
  51. package/resources/groups/messages.d.ts +88 -8
  52. package/resources/groups/messages.d.ts.map +1 -1
  53. package/resources/steps/messages.d.mts +1 -1
  54. package/resources/steps/messages.d.mts.map +1 -1
  55. package/resources/steps/messages.d.ts +1 -1
  56. package/resources/steps/messages.d.ts.map +1 -1
  57. package/resources/templates/agents.d.mts +9 -14
  58. package/resources/templates/agents.d.mts.map +1 -1
  59. package/resources/templates/agents.d.ts +9 -14
  60. package/resources/templates/agents.d.ts.map +1 -1
  61. package/resources/templates/agents.js +2 -3
  62. package/resources/templates/agents.js.map +1 -1
  63. package/resources/templates/agents.mjs +2 -3
  64. package/resources/templates/agents.mjs.map +1 -1
  65. package/src/client.ts +13 -1
  66. package/src/core/pagination.ts +7 -7
  67. package/src/resources/agents/agents.ts +6 -0
  68. package/src/resources/agents/files.ts +47 -90
  69. package/src/resources/agents/index.ts +3 -0
  70. package/src/resources/agents/messages.ts +382 -23
  71. package/src/resources/batches/batches.ts +64 -5
  72. package/src/resources/groups/messages.ts +129 -9
  73. package/src/resources/steps/messages.ts +3 -1
  74. package/src/resources/templates/agents.ts +14 -17
  75. package/src/version.ts +1 -1
  76. package/version.d.mts +1 -1
  77. package/version.d.ts +1 -1
  78. package/version.js +1 -1
  79. package/version.mjs +1 -1
@@ -95,7 +95,9 @@ export type MessageModifyResponse =
95
95
  | ToolsAPI.ToolReturnMessage
96
96
  | MessagesAPI.AssistantMessage
97
97
  | MessagesAPI.ApprovalRequestMessage
98
- | MessagesAPI.ApprovalResponseMessage;
98
+ | MessagesAPI.ApprovalResponseMessage
99
+ | MessagesAPI.SummaryMessage
100
+ | MessagesAPI.EventMessage;
99
101
 
100
102
  export type MessageResetResponse = unknown;
101
103
 
@@ -198,11 +200,6 @@ export declare namespace MessageModifyParams {
198
200
  }
199
201
 
200
202
  export interface MessageSendParams {
201
- /**
202
- * The messages to be sent to the agent.
203
- */
204
- messages: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate>;
205
-
206
203
  /**
207
204
  * @deprecated The name of the message argument in the designated message tool.
208
205
  * Still supported for legacy agent types, but deprecated for letta_v1_agent
@@ -228,11 +225,34 @@ export interface MessageSendParams {
228
225
  */
229
226
  include_return_message_types?: Array<MessagesAPI.MessageType> | null;
230
227
 
228
+ /**
229
+ * Syntactic sugar for a single user message. Equivalent to messages=[{'role':
230
+ * 'user', 'content': input}].
231
+ */
232
+ input?:
233
+ | string
234
+ | Array<
235
+ | MessagesAPI.TextContent
236
+ | MessagesAPI.ImageContent
237
+ | MessagesAPI.ToolCallContent
238
+ | MessagesAPI.ToolReturnContent
239
+ | MessagesAPI.ReasoningContent
240
+ | MessagesAPI.RedactedReasoningContent
241
+ | MessagesAPI.OmittedReasoningContent
242
+ | MessageSendParams.SummarizedReasoningContent
243
+ >
244
+ | null;
245
+
231
246
  /**
232
247
  * Maximum number of steps the agent should take to process the request.
233
248
  */
234
249
  max_steps?: number;
235
250
 
251
+ /**
252
+ * The messages to be sent to the agent.
253
+ */
254
+ messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
255
+
236
256
  /**
237
257
  * @deprecated Whether the server should parse specific tool call arguments
238
258
  * (default `send_message`) as `AssistantMessage` objects. Still supported for
@@ -241,12 +261,48 @@ export interface MessageSendParams {
241
261
  use_assistant_message?: boolean;
242
262
  }
243
263
 
244
- export interface MessageStreamParams {
264
+ export namespace MessageSendParams {
245
265
  /**
246
- * The messages to be sent to the agent.
266
+ * The style of reasoning content returned by the OpenAI Responses API
247
267
  */
248
- messages: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate>;
268
+ export interface SummarizedReasoningContent {
269
+ /**
270
+ * The unique identifier for this reasoning step.
271
+ */
272
+ id: string;
273
+
274
+ /**
275
+ * Summaries of the reasoning content.
276
+ */
277
+ summary: Array<SummarizedReasoningContent.Summary>;
278
+
279
+ /**
280
+ * The encrypted reasoning content.
281
+ */
282
+ encrypted_content?: string;
283
+
284
+ /**
285
+ * Indicates this is a summarized reasoning step.
286
+ */
287
+ type?: 'summarized_reasoning';
288
+ }
289
+
290
+ export namespace SummarizedReasoningContent {
291
+ export interface Summary {
292
+ /**
293
+ * The index of the summary part.
294
+ */
295
+ index: number;
296
+
297
+ /**
298
+ * The text of the summary part.
299
+ */
300
+ text: string;
301
+ }
302
+ }
303
+ }
249
304
 
305
+ export interface MessageStreamParams {
250
306
  /**
251
307
  * @deprecated The name of the message argument in the designated message tool.
252
308
  * Still supported for legacy agent types, but deprecated for letta_v1_agent
@@ -283,11 +339,34 @@ export interface MessageStreamParams {
283
339
  */
284
340
  include_return_message_types?: Array<MessagesAPI.MessageType> | null;
285
341
 
342
+ /**
343
+ * Syntactic sugar for a single user message. Equivalent to messages=[{'role':
344
+ * 'user', 'content': input}].
345
+ */
346
+ input?:
347
+ | string
348
+ | Array<
349
+ | MessagesAPI.TextContent
350
+ | MessagesAPI.ImageContent
351
+ | MessagesAPI.ToolCallContent
352
+ | MessagesAPI.ToolReturnContent
353
+ | MessagesAPI.ReasoningContent
354
+ | MessagesAPI.RedactedReasoningContent
355
+ | MessagesAPI.OmittedReasoningContent
356
+ | MessageStreamParams.SummarizedReasoningContent
357
+ >
358
+ | null;
359
+
286
360
  /**
287
361
  * Maximum number of steps the agent should take to process the request.
288
362
  */
289
363
  max_steps?: number;
290
364
 
365
+ /**
366
+ * The messages to be sent to the agent.
367
+ */
368
+ messages?: Array<AgentsAPI.MessageCreate | MessagesAPI.ApprovalCreate> | null;
369
+
291
370
  /**
292
371
  * Flag to determine if individual tokens should be streamed, rather than streaming
293
372
  * per step.
@@ -302,6 +381,47 @@ export interface MessageStreamParams {
302
381
  use_assistant_message?: boolean;
303
382
  }
304
383
 
384
+ export namespace MessageStreamParams {
385
+ /**
386
+ * The style of reasoning content returned by the OpenAI Responses API
387
+ */
388
+ export interface SummarizedReasoningContent {
389
+ /**
390
+ * The unique identifier for this reasoning step.
391
+ */
392
+ id: string;
393
+
394
+ /**
395
+ * Summaries of the reasoning content.
396
+ */
397
+ summary: Array<SummarizedReasoningContent.Summary>;
398
+
399
+ /**
400
+ * The encrypted reasoning content.
401
+ */
402
+ encrypted_content?: string;
403
+
404
+ /**
405
+ * Indicates this is a summarized reasoning step.
406
+ */
407
+ type?: 'summarized_reasoning';
408
+ }
409
+
410
+ export namespace SummarizedReasoningContent {
411
+ export interface Summary {
412
+ /**
413
+ * The index of the summary part.
414
+ */
415
+ index: number;
416
+
417
+ /**
418
+ * The text of the summary part.
419
+ */
420
+ text: string;
421
+ }
422
+ }
423
+ }
424
+
305
425
  export declare namespace Messages {
306
426
  export {
307
427
  type MessageModifyResponse as MessageModifyResponse,
@@ -42,7 +42,9 @@ export type MessageListResponse =
42
42
  | ToolsAPI.ToolReturnMessage
43
43
  | MessagesAPI.AssistantMessage
44
44
  | MessagesAPI.ApprovalRequestMessage
45
- | MessagesAPI.ApprovalResponseMessage;
45
+ | MessagesAPI.ApprovalResponseMessage
46
+ | MessagesAPI.SummaryMessage
47
+ | MessagesAPI.EventMessage;
46
48
 
47
49
  export interface MessageListParams extends ArrayPageParams {}
48
50
 
@@ -10,9 +10,12 @@ export class Agents extends APIResource {
10
10
  /**
11
11
  * Creates an Agent or multiple Agents from a template
12
12
  */
13
- create(templateVersion: string, params: AgentCreateParams, options?: RequestOptions): APIPromise<void> {
14
- const { project_id, ...body } = params;
15
- return this._client.post(path`/v1/templates/${project_id}/${templateVersion}/agents`, {
13
+ create(
14
+ templateVersion: string,
15
+ body: AgentCreateParams | null | undefined = {},
16
+ options?: RequestOptions,
17
+ ): APIPromise<void> {
18
+ return this._client.post(path`/v1/templates/${templateVersion}/agents`, {
16
19
  body,
17
20
  ...options,
18
21
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
@@ -22,40 +25,34 @@ export class Agents extends APIResource {
22
25
 
23
26
  export interface AgentCreateParams {
24
27
  /**
25
- * Path param: The project id
26
- */
27
- project_id: string;
28
-
29
- /**
30
- * Body param: The name of the agent, optional otherwise a random one will be
31
- * assigned
28
+ * The name of the agent, optional otherwise a random one will be assigned
32
29
  */
33
30
  agent_name?: string;
34
31
 
35
32
  /**
36
- * Body param: The identity ids to assign to the agent
33
+ * The identity ids to assign to the agent
37
34
  */
38
35
  identity_ids?: Array<string>;
39
36
 
40
37
  /**
41
- * Body param: Set an initial sequence of messages, if not provided, the agent will
42
- * start with the default message sequence, if an empty array is provided, the
43
- * agent will start with no messages
38
+ * Set an initial sequence of messages, if not provided, the agent will start with
39
+ * the default message sequence, if an empty array is provided, the agent will
40
+ * start with no messages
44
41
  */
45
42
  initial_message_sequence?: Array<AgentCreateParams.InitialMessageSequence>;
46
43
 
47
44
  /**
48
- * Body param: The memory variables to assign to the agent
45
+ * The memory variables to assign to the agent
49
46
  */
50
47
  memory_variables?: { [key: string]: string };
51
48
 
52
49
  /**
53
- * Body param: The tags to assign to the agent
50
+ * The tags to assign to the agent
54
51
  */
55
52
  tags?: Array<string>;
56
53
 
57
54
  /**
58
- * Body param: The tool variables to assign to the agent
55
+ * The tool variables to assign to the agent
59
56
  */
60
57
  tool_variables?: { [key: string]: string };
61
58
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.0.0-alpha.13'; // x-release-please-version
1
+ export const VERSION = '1.0.0-alpha.15'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0-alpha.13";
1
+ export declare const VERSION = "1.0.0-alpha.15";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.0.0-alpha.13";
1
+ export declare const VERSION = "1.0.0-alpha.15";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.0.0-alpha.13'; // x-release-please-version
4
+ exports.VERSION = '1.0.0-alpha.15'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.0.0-alpha.13'; // x-release-please-version
1
+ export const VERSION = '1.0.0-alpha.15'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map