@letta-ai/letta-client 1.6.5 → 1.6.7

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 (277) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/client.d.mts +2 -11
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +2 -11
  5. package/client.d.ts.map +1 -1
  6. package/client.js +0 -9
  7. package/client.js.map +1 -1
  8. package/client.mjs +0 -9
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agents/agents.d.mts +182 -13
  12. package/resources/agents/agents.d.mts.map +1 -1
  13. package/resources/agents/agents.d.ts +182 -13
  14. package/resources/agents/agents.d.ts.map +1 -1
  15. package/resources/agents/agents.js +0 -4
  16. package/resources/agents/agents.js.map +1 -1
  17. package/resources/agents/agents.mjs +0 -4
  18. package/resources/agents/agents.mjs.map +1 -1
  19. package/resources/agents/blocks.d.mts +12 -0
  20. package/resources/agents/blocks.d.mts.map +1 -1
  21. package/resources/agents/blocks.d.ts +12 -0
  22. package/resources/agents/blocks.d.ts.map +1 -1
  23. package/resources/agents/index.d.mts +1 -2
  24. package/resources/agents/index.d.mts.map +1 -1
  25. package/resources/agents/index.d.ts +1 -2
  26. package/resources/agents/index.d.ts.map +1 -1
  27. package/resources/agents/index.js +1 -3
  28. package/resources/agents/index.js.map +1 -1
  29. package/resources/agents/index.mjs +0 -1
  30. package/resources/agents/index.mjs.map +1 -1
  31. package/resources/agents/messages.d.mts +10 -7
  32. package/resources/agents/messages.d.mts.map +1 -1
  33. package/resources/agents/messages.d.ts +10 -7
  34. package/resources/agents/messages.d.ts.map +1 -1
  35. package/resources/agents/messages.js.map +1 -1
  36. package/resources/agents/messages.mjs.map +1 -1
  37. package/resources/agents/passages.d.mts +4 -0
  38. package/resources/agents/passages.d.mts.map +1 -1
  39. package/resources/agents/passages.d.ts +4 -0
  40. package/resources/agents/passages.d.ts.map +1 -1
  41. package/resources/blocks/agents.d.mts +1 -1
  42. package/resources/blocks/agents.d.mts.map +1 -1
  43. package/resources/blocks/agents.d.ts +1 -1
  44. package/resources/blocks/agents.d.ts.map +1 -1
  45. package/resources/blocks/blocks.d.mts +25 -0
  46. package/resources/blocks/blocks.d.mts.map +1 -1
  47. package/resources/blocks/blocks.d.ts +25 -0
  48. package/resources/blocks/blocks.d.ts.map +1 -1
  49. package/resources/blocks/blocks.js.map +1 -1
  50. package/resources/blocks/blocks.mjs.map +1 -1
  51. package/resources/conversations/conversations.d.mts +19 -2
  52. package/resources/conversations/conversations.d.mts.map +1 -1
  53. package/resources/conversations/conversations.d.ts +19 -2
  54. package/resources/conversations/conversations.d.ts.map +1 -1
  55. package/resources/conversations/conversations.js.map +1 -1
  56. package/resources/conversations/conversations.mjs.map +1 -1
  57. package/resources/conversations/index.d.mts +1 -1
  58. package/resources/conversations/index.d.mts.map +1 -1
  59. package/resources/conversations/index.d.ts +1 -1
  60. package/resources/conversations/index.d.ts.map +1 -1
  61. package/resources/conversations/index.js.map +1 -1
  62. package/resources/conversations/index.mjs.map +1 -1
  63. package/resources/conversations/messages.d.mts +12 -16
  64. package/resources/conversations/messages.d.mts.map +1 -1
  65. package/resources/conversations/messages.d.ts +12 -16
  66. package/resources/conversations/messages.d.ts.map +1 -1
  67. package/resources/conversations/messages.js +3 -3
  68. package/resources/conversations/messages.js.map +1 -1
  69. package/resources/conversations/messages.mjs +3 -3
  70. package/resources/conversations/messages.mjs.map +1 -1
  71. package/resources/folders/files.d.mts +1 -1
  72. package/resources/folders/files.d.ts +1 -1
  73. package/resources/index.d.mts +1 -4
  74. package/resources/index.d.mts.map +1 -1
  75. package/resources/index.d.ts +1 -4
  76. package/resources/index.d.ts.map +1 -1
  77. package/resources/index.js +1 -7
  78. package/resources/index.js.map +1 -1
  79. package/resources/index.mjs +0 -3
  80. package/resources/index.mjs.map +1 -1
  81. package/resources/mcp-servers/tools.d.mts +1 -1
  82. package/resources/mcp-servers/tools.d.ts +1 -1
  83. package/resources/messages.d.mts +18 -1
  84. package/resources/messages.d.mts.map +1 -1
  85. package/resources/messages.d.ts +18 -1
  86. package/resources/messages.d.ts.map +1 -1
  87. package/resources/messages.js +7 -0
  88. package/resources/messages.js.map +1 -1
  89. package/resources/messages.mjs +7 -0
  90. package/resources/messages.mjs.map +1 -1
  91. package/resources/runs/index.d.mts +1 -0
  92. package/resources/runs/index.d.mts.map +1 -1
  93. package/resources/runs/index.d.ts +1 -0
  94. package/resources/runs/index.d.ts.map +1 -1
  95. package/resources/runs/index.js +3 -1
  96. package/resources/runs/index.js.map +1 -1
  97. package/resources/runs/index.mjs +1 -0
  98. package/resources/runs/index.mjs.map +1 -1
  99. package/resources/runs/runs.d.mts +8 -0
  100. package/resources/runs/runs.d.mts.map +1 -1
  101. package/resources/runs/runs.d.ts +8 -0
  102. package/resources/runs/runs.d.ts.map +1 -1
  103. package/resources/runs/runs.js +4 -0
  104. package/resources/runs/runs.js.map +1 -1
  105. package/resources/runs/runs.mjs +4 -0
  106. package/resources/runs/runs.mjs.map +1 -1
  107. package/resources/runs/trace.d.mts +31 -0
  108. package/resources/runs/trace.d.mts.map +1 -0
  109. package/resources/runs/trace.d.ts +31 -0
  110. package/resources/runs/trace.d.ts.map +1 -0
  111. package/resources/runs/trace.js +25 -0
  112. package/resources/runs/trace.js.map +1 -0
  113. package/resources/runs/trace.mjs +21 -0
  114. package/resources/runs/trace.mjs.map +1 -0
  115. package/resources/tags.d.mts +1 -1
  116. package/resources/tags.d.ts +1 -1
  117. package/resources/tags.js +1 -1
  118. package/resources/tags.mjs +1 -1
  119. package/src/client.ts +2 -79
  120. package/src/resources/agents/agents.ts +229 -13
  121. package/src/resources/agents/blocks.ts +15 -0
  122. package/src/resources/agents/index.ts +0 -2
  123. package/src/resources/agents/messages.ts +12 -9
  124. package/src/resources/agents/passages.ts +5 -0
  125. package/src/resources/blocks/agents.ts +1 -0
  126. package/src/resources/blocks/blocks.ts +31 -0
  127. package/src/resources/conversations/conversations.ts +20 -2
  128. package/src/resources/conversations/index.ts +0 -1
  129. package/src/resources/conversations/messages.ts +17 -19
  130. package/src/resources/folders/files.ts +1 -1
  131. package/src/resources/index.ts +1 -35
  132. package/src/resources/mcp-servers/tools.ts +1 -1
  133. package/src/resources/messages.ts +26 -0
  134. package/src/resources/runs/index.ts +1 -0
  135. package/src/resources/runs/runs.ts +15 -0
  136. package/src/resources/runs/trace.ts +44 -0
  137. package/src/resources/tags.ts +1 -1
  138. package/src/version.ts +1 -1
  139. package/version.d.mts +1 -1
  140. package/version.d.ts +1 -1
  141. package/version.js +1 -1
  142. package/version.mjs +1 -1
  143. package/resources/agents/groups.d.mts +0 -22
  144. package/resources/agents/groups.d.mts.map +0 -1
  145. package/resources/agents/groups.d.ts +0 -22
  146. package/resources/agents/groups.d.ts.map +0 -1
  147. package/resources/agents/groups.js +0 -20
  148. package/resources/agents/groups.js.map +0 -1
  149. package/resources/agents/groups.mjs +0 -16
  150. package/resources/agents/groups.mjs.map +0 -1
  151. package/resources/batches/batches.d.mts +0 -240
  152. package/resources/batches/batches.d.mts.map +0 -1
  153. package/resources/batches/batches.d.ts +0 -240
  154. package/resources/batches/batches.d.ts.map +0 -1
  155. package/resources/batches/batches.js +0 -46
  156. package/resources/batches/batches.js.map +0 -1
  157. package/resources/batches/batches.mjs +0 -41
  158. package/resources/batches/batches.mjs.map +0 -1
  159. package/resources/batches/index.d.mts +0 -3
  160. package/resources/batches/index.d.mts.map +0 -1
  161. package/resources/batches/index.d.ts +0 -3
  162. package/resources/batches/index.d.ts.map +0 -1
  163. package/resources/batches/index.js +0 -9
  164. package/resources/batches/index.js.map +0 -1
  165. package/resources/batches/index.mjs +0 -4
  166. package/resources/batches/index.mjs.map +0 -1
  167. package/resources/batches/messages.d.mts +0 -22
  168. package/resources/batches/messages.d.mts.map +0 -1
  169. package/resources/batches/messages.d.ts +0 -22
  170. package/resources/batches/messages.d.ts.map +0 -1
  171. package/resources/batches/messages.js +0 -17
  172. package/resources/batches/messages.js.map +0 -1
  173. package/resources/batches/messages.mjs +0 -13
  174. package/resources/batches/messages.mjs.map +0 -1
  175. package/resources/batches.d.mts +0 -2
  176. package/resources/batches.d.mts.map +0 -1
  177. package/resources/batches.d.ts +0 -2
  178. package/resources/batches.d.ts.map +0 -1
  179. package/resources/batches.js +0 -6
  180. package/resources/batches.js.map +0 -1
  181. package/resources/batches.mjs +0 -3
  182. package/resources/batches.mjs.map +0 -1
  183. package/resources/groups/groups.d.mts +0 -197
  184. package/resources/groups/groups.d.mts.map +0 -1
  185. package/resources/groups/groups.d.ts +0 -197
  186. package/resources/groups/groups.d.ts.map +0 -1
  187. package/resources/groups/groups.js +0 -49
  188. package/resources/groups/groups.js.map +0 -1
  189. package/resources/groups/groups.mjs +0 -44
  190. package/resources/groups/groups.mjs.map +0 -1
  191. package/resources/groups/index.d.mts +0 -3
  192. package/resources/groups/index.d.mts.map +0 -1
  193. package/resources/groups/index.d.ts +0 -3
  194. package/resources/groups/index.d.ts.map +0 -1
  195. package/resources/groups/index.js +0 -9
  196. package/resources/groups/index.js.map +0 -1
  197. package/resources/groups/index.mjs +0 -4
  198. package/resources/groups/index.mjs.map +0 -1
  199. package/resources/groups/messages.d.mts +0 -360
  200. package/resources/groups/messages.d.mts.map +0 -1
  201. package/resources/groups/messages.d.ts +0 -360
  202. package/resources/groups/messages.d.ts.map +0 -1
  203. package/resources/groups/messages.js +0 -54
  204. package/resources/groups/messages.js.map +0 -1
  205. package/resources/groups/messages.mjs +0 -50
  206. package/resources/groups/messages.mjs.map +0 -1
  207. package/resources/groups.d.mts +0 -2
  208. package/resources/groups.d.mts.map +0 -1
  209. package/resources/groups.d.ts +0 -2
  210. package/resources/groups.d.ts.map +0 -1
  211. package/resources/groups.js +0 -6
  212. package/resources/groups.js.map +0 -1
  213. package/resources/groups.mjs +0 -3
  214. package/resources/groups.mjs.map +0 -1
  215. package/resources/identities/agents.d.mts +0 -23
  216. package/resources/identities/agents.d.mts.map +0 -1
  217. package/resources/identities/agents.d.ts +0 -23
  218. package/resources/identities/agents.d.ts.map +0 -1
  219. package/resources/identities/agents.js +0 -17
  220. package/resources/identities/agents.js.map +0 -1
  221. package/resources/identities/agents.mjs +0 -13
  222. package/resources/identities/agents.mjs.map +0 -1
  223. package/resources/identities/blocks.d.mts +0 -18
  224. package/resources/identities/blocks.d.mts.map +0 -1
  225. package/resources/identities/blocks.d.ts +0 -18
  226. package/resources/identities/blocks.d.ts.map +0 -1
  227. package/resources/identities/blocks.js +0 -17
  228. package/resources/identities/blocks.js.map +0 -1
  229. package/resources/identities/blocks.mjs +0 -13
  230. package/resources/identities/blocks.mjs.map +0 -1
  231. package/resources/identities/identities.d.mts +0 -204
  232. package/resources/identities/identities.d.mts.map +0 -1
  233. package/resources/identities/identities.d.ts +0 -204
  234. package/resources/identities/identities.d.ts.map +0 -1
  235. package/resources/identities/identities.js +0 -63
  236. package/resources/identities/identities.js.map +0 -1
  237. package/resources/identities/identities.mjs +0 -58
  238. package/resources/identities/identities.mjs.map +0 -1
  239. package/resources/identities/index.d.mts +0 -5
  240. package/resources/identities/index.d.mts.map +0 -1
  241. package/resources/identities/index.d.ts +0 -5
  242. package/resources/identities/index.d.ts.map +0 -1
  243. package/resources/identities/index.js +0 -13
  244. package/resources/identities/index.js.map +0 -1
  245. package/resources/identities/index.mjs +0 -6
  246. package/resources/identities/index.mjs.map +0 -1
  247. package/resources/identities/properties.d.mts +0 -18
  248. package/resources/identities/properties.d.mts.map +0 -1
  249. package/resources/identities/properties.d.ts +0 -18
  250. package/resources/identities/properties.d.ts.map +0 -1
  251. package/resources/identities/properties.js +0 -17
  252. package/resources/identities/properties.js.map +0 -1
  253. package/resources/identities/properties.mjs +0 -13
  254. package/resources/identities/properties.mjs.map +0 -1
  255. package/resources/identities.d.mts +0 -2
  256. package/resources/identities.d.mts.map +0 -1
  257. package/resources/identities.d.ts +0 -2
  258. package/resources/identities.d.ts.map +0 -1
  259. package/resources/identities.js +0 -6
  260. package/resources/identities.js.map +0 -1
  261. package/resources/identities.mjs +0 -3
  262. package/resources/identities.mjs.map +0 -1
  263. package/src/resources/agents/groups.ts +0 -37
  264. package/src/resources/batches/batches.ts +0 -317
  265. package/src/resources/batches/index.ts +0 -11
  266. package/src/resources/batches/messages.ts +0 -38
  267. package/src/resources/batches.ts +0 -3
  268. package/src/resources/groups/groups.ts +0 -334
  269. package/src/resources/groups/index.ts +0 -27
  270. package/src/resources/groups/messages.ts +0 -505
  271. package/src/resources/groups.ts +0 -3
  272. package/src/resources/identities/agents.ts +0 -47
  273. package/src/resources/identities/blocks.ts +0 -33
  274. package/src/resources/identities/identities.ts +0 -286
  275. package/src/resources/identities/index.ts +0 -17
  276. package/src/resources/identities/properties.ts +0 -30
  277. package/src/resources/identities.ts +0 -3
@@ -76,7 +76,6 @@ export {
76
76
  type FolderDetachParams,
77
77
  type FolderListResponsesArrayPage,
78
78
  } from './folders';
79
- export { Groups, type GroupListParams } from './groups';
80
79
  export {
81
80
  Identities,
82
81
  type IdentityAttachResponse,
@@ -138,7 +137,6 @@ export {
138
137
  type MessageStreamParams,
139
138
  type RunsArrayPage,
140
139
  type MessagesArrayPage,
141
- type InternalMessagesObjectPage,
142
140
  } from './messages';
143
141
  export {
144
142
  Passages,
@@ -6,7 +6,7 @@ import * as ToolsAPI from '../tools';
6
6
  import * as AgentsAPI from './agents';
7
7
  import * as RunsAPI from '../runs/runs';
8
8
  import { APIPromise } from '../../core/api-promise';
9
- import { ArrayPage, type ArrayPageParams, ObjectPage, PagePromise } from '../../core/pagination';
9
+ import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
10
10
  import { Stream } from '../../core/streaming';
11
11
  import { RequestOptions } from '../../internal/request-options';
12
12
  import { path } from '../../internal/utils/path';
@@ -146,8 +146,6 @@ export type MessagesArrayPage = ArrayPage<Message>;
146
146
 
147
147
  export type RunsArrayPage = ArrayPage<Run>;
148
148
 
149
- export type InternalMessagesObjectPage = ObjectPage<InternalMessage>;
150
-
151
149
  /**
152
150
  * Input to approve or deny a tool call request
153
151
  */
@@ -508,6 +506,7 @@ export namespace ImageContent {
508
506
  * tool_returns (List[ToolReturn]): The list of tool returns requested.
509
507
  * group_id (str): The multi-agent group that the message was sent in.
510
508
  * sender_id (str): The id of the sender of the message, can be an identity id or agent id.
509
+ * conversation_id (str): The conversation this message belongs to.
511
510
  *
512
511
  * t
513
512
  */
@@ -562,6 +561,11 @@ export interface InternalMessage {
562
561
  | InternalMessage.SummarizedReasoningContent
563
562
  > | null;
564
563
 
564
+ /**
565
+ * The conversation this message belongs to
566
+ */
567
+ conversation_id?: string | null;
568
+
565
569
  /**
566
570
  * The timestamp when the object was created.
567
571
  */
@@ -2050,6 +2054,11 @@ export interface MessageListParams extends ArrayPageParams {
2050
2054
  */
2051
2055
  assistant_message_tool_name?: string;
2052
2056
 
2057
+ /**
2058
+ * Conversation ID to filter messages by.
2059
+ */
2060
+ conversation_id?: string | null;
2061
+
2053
2062
  /**
2054
2063
  * Group ID to filter messages by.
2055
2064
  */
@@ -2061,12 +2070,6 @@ export interface MessageListParams extends ArrayPageParams {
2061
2070
  */
2062
2071
  include_err?: boolean | null;
2063
2072
 
2064
- /**
2065
- * Filter to only return specified message types. If None (default), returns all
2066
- * message types.
2067
- */
2068
- message_types?: Array<MessageType> | null;
2069
-
2070
2073
  /**
2071
2074
  * @deprecated Whether to use assistant messages
2072
2075
  */
@@ -83,6 +83,11 @@ export interface PassageSearchResponse {
83
83
 
84
84
  export namespace PassageSearchResponse {
85
85
  export interface Result {
86
+ /**
87
+ * Unique identifier of the archival memory passage
88
+ */
89
+ id: string;
90
+
86
91
  /**
87
92
  * Text content of the archival memory passage
88
93
  */
@@ -33,6 +33,7 @@ export interface AgentListParams extends ArrayPageParams {
33
33
  | 'agent.blocks'
34
34
  | 'agent.identities'
35
35
  | 'agent.managed_group'
36
+ | 'agent.pending_approval'
36
37
  | 'agent.secrets'
37
38
  | 'agent.sources'
38
39
  | 'agent.tags'
@@ -133,6 +133,11 @@ export interface BlockResponse {
133
133
  */
134
134
  read_only?: boolean;
135
135
 
136
+ /**
137
+ * The tags associated with the block.
138
+ */
139
+ tags?: Array<string> | null;
140
+
136
141
  /**
137
142
  * @deprecated (Deprecated) The id of the template.
138
143
  */
@@ -210,6 +215,11 @@ export interface CreateBlock {
210
215
  */
211
216
  read_only?: boolean;
212
217
 
218
+ /**
219
+ * The tags to associate with the block.
220
+ */
221
+ tags?: Array<string> | null;
222
+
213
223
  /**
214
224
  * The id of the template.
215
225
  */
@@ -286,6 +296,11 @@ export interface BlockCreateParams {
286
296
  */
287
297
  read_only?: boolean;
288
298
 
299
+ /**
300
+ * The tags to associate with the block.
301
+ */
302
+ tags?: Array<string> | null;
303
+
289
304
  /**
290
305
  * The id of the template.
291
306
  */
@@ -358,6 +373,11 @@ export interface BlockUpdateParams {
358
373
  */
359
374
  read_only?: boolean;
360
375
 
376
+ /**
377
+ * The tags to associate with the block.
378
+ */
379
+ tags?: Array<string> | null;
380
+
361
381
  /**
362
382
  * The id of the template.
363
383
  */
@@ -420,6 +440,12 @@ export interface BlockListParams extends ArrayPageParams {
420
440
  */
421
441
  label_search?: string | null;
422
442
 
443
+ /**
444
+ * If True, only returns blocks that match ALL given tags. Otherwise, return blocks
445
+ * that have ANY of the passed-in tags.
446
+ */
447
+ match_all_tags?: boolean;
448
+
423
449
  /**
424
450
  * Name filter (alphanumeric, spaces, hyphens, underscores)
425
451
  */
@@ -430,6 +456,11 @@ export interface BlockListParams extends ArrayPageParams {
430
456
  */
431
457
  project_id?: string | null;
432
458
 
459
+ /**
460
+ * List of tags to filter blocks by
461
+ */
462
+ tags?: Array<string> | null;
463
+
433
464
  /**
434
465
  * Whether to include only templates
435
466
  */
@@ -5,7 +5,6 @@ import * as MessagesAPI from './messages';
5
5
  import {
6
6
  MessageCreateParams,
7
7
  MessageListParams,
8
- MessageListResponse,
9
8
  MessageStreamParams,
10
9
  MessageStreamResponse,
11
10
  Messages,
@@ -69,6 +68,12 @@ export interface Conversation {
69
68
  */
70
69
  in_context_message_ids?: Array<string>;
71
70
 
71
+ /**
72
+ * IDs of blocks that are isolated (specific to this conversation, overriding agent
73
+ * defaults).
74
+ */
75
+ isolated_block_ids?: Array<string>;
76
+
72
77
  /**
73
78
  * The id of the user that made this object.
74
79
  */
@@ -89,6 +94,13 @@ export interface Conversation {
89
94
  * Request model for creating a new conversation.
90
95
  */
91
96
  export interface CreateConversation {
97
+ /**
98
+ * List of block labels that should be isolated (conversation-specific) rather than
99
+ * shared across conversations. New blocks will be created as copies of the agent's
100
+ * blocks with these labels.
101
+ */
102
+ isolated_block_labels?: Array<string> | null;
103
+
92
104
  /**
93
105
  * A summary of the conversation.
94
106
  */
@@ -103,6 +115,13 @@ export interface ConversationCreateParams {
103
115
  */
104
116
  agent_id: string;
105
117
 
118
+ /**
119
+ * Body param: List of block labels that should be isolated (conversation-specific)
120
+ * rather than shared across conversations. New blocks will be created as copies of
121
+ * the agent's blocks with these labels.
122
+ */
123
+ isolated_block_labels?: Array<string> | null;
124
+
106
125
  /**
107
126
  * Body param: A summary of the conversation.
108
127
  */
@@ -139,7 +158,6 @@ export declare namespace Conversations {
139
158
 
140
159
  export {
141
160
  Messages as Messages,
142
- type MessageListResponse as MessageListResponse,
143
161
  type MessageStreamResponse as MessageStreamResponse,
144
162
  type MessageCreateParams as MessageCreateParams,
145
163
  type MessageListParams as MessageListParams,
@@ -10,7 +10,6 @@ export {
10
10
  } from './conversations';
11
11
  export {
12
12
  Messages,
13
- type MessageListResponse,
14
13
  type MessageStreamResponse,
15
14
  type MessageCreateParams,
16
15
  type MessageListParams,
@@ -3,7 +3,9 @@
3
3
  import { APIResource } from '../../core/resource';
4
4
  import * as AgentsAPI from '../agents/agents';
5
5
  import * as MessagesAPI from '../agents/messages';
6
+ import { MessagesArrayPage } from '../agents/messages';
6
7
  import { APIPromise } from '../../core/api-promise';
8
+ import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
7
9
  import { Stream } from '../../core/streaming';
8
10
  import { RequestOptions } from '../../internal/request-options';
9
11
  import { path } from '../../internal/utils/path';
@@ -31,15 +33,18 @@ export class Messages extends APIResource {
31
33
  * List all messages in a conversation.
32
34
  *
33
35
  * Returns LettaMessage objects (UserMessage, AssistantMessage, etc.) for all
34
- * messages in the conversation, ordered by position (oldest first), with support
35
- * for cursor-based pagination.
36
+ * messages in the conversation, with support for cursor-based pagination.
36
37
  */
37
38
  list(
38
39
  conversationID: string,
39
40
  query: MessageListParams | null | undefined = {},
40
41
  options?: RequestOptions,
41
- ): APIPromise<MessageListResponse> {
42
- return this._client.get(path`/v1/conversations/${conversationID}/messages`, { query, ...options });
42
+ ): PagePromise<MessagesArrayPage, MessagesAPI.Message> {
43
+ return this._client.getAPIList(
44
+ path`/v1/conversations/${conversationID}/messages`,
45
+ ArrayPage<MessagesAPI.Message>,
46
+ { query, ...options },
47
+ );
43
48
  }
44
49
 
45
50
  /**
@@ -61,8 +66,6 @@ export class Messages extends APIResource {
61
66
  }
62
67
  }
63
68
 
64
- export type MessageListResponse = Array<MessagesAPI.Message>;
65
-
66
69
  export type MessageStreamResponse = unknown;
67
70
 
68
71
  export interface MessageCreateParams {
@@ -223,23 +226,17 @@ export namespace MessageCreateParams {
223
226
  }
224
227
  }
225
228
 
226
- export interface MessageListParams {
229
+ export interface MessageListParams extends ArrayPageParams {
227
230
  /**
228
- * Message ID cursor for pagination. Returns messages that come after this message
229
- * ID in the conversation
231
+ * Group ID to filter messages by.
230
232
  */
231
- after?: string | null;
233
+ group_id?: string | null;
232
234
 
233
235
  /**
234
- * Message ID cursor for pagination. Returns messages that come before this message
235
- * ID in the conversation
236
+ * Whether to include error messages and error statuses. For debugging purposes
237
+ * only.
236
238
  */
237
- before?: string | null;
238
-
239
- /**
240
- * Maximum number of messages to return
241
- */
242
- limit?: number | null;
239
+ include_err?: boolean | null;
243
240
  }
244
241
 
245
242
  export interface MessageStreamParams {
@@ -268,10 +265,11 @@ export interface MessageStreamParams {
268
265
 
269
266
  export declare namespace Messages {
270
267
  export {
271
- type MessageListResponse as MessageListResponse,
272
268
  type MessageStreamResponse as MessageStreamResponse,
273
269
  type MessageCreateParams as MessageCreateParams,
274
270
  type MessageListParams as MessageListParams,
275
271
  type MessageStreamParams as MessageStreamParams,
276
272
  };
277
273
  }
274
+
275
+ export { type MessagesArrayPage };
@@ -357,7 +357,7 @@ export interface FileDeleteParams {
357
357
 
358
358
  export interface FileUploadParams {
359
359
  /**
360
- * Body param:
360
+ * Body param
361
361
  */
362
362
  file: Uploadable;
363
363
 
@@ -58,14 +58,6 @@ export {
58
58
  type ArchiveListParams,
59
59
  type ArchivesArrayPage,
60
60
  } from './archives/archives';
61
- export {
62
- Batches,
63
- type BatchJob,
64
- type BatchCancelResponse,
65
- type BatchCreateParams,
66
- type BatchListParams,
67
- type BatchJobsArrayPage,
68
- } from './batches/batches';
69
61
  export {
70
62
  Blocks,
71
63
  type BlockResponse,
@@ -93,33 +85,6 @@ export {
93
85
  type FolderListParams,
94
86
  type FoldersArrayPage,
95
87
  } from './folders/folders';
96
- export {
97
- Groups,
98
- type DynamicManager,
99
- type Group,
100
- type ManagerType,
101
- type RoundRobinManager,
102
- type SleeptimeManager,
103
- type SupervisorManager,
104
- type VoiceSleeptimeManager,
105
- type GroupDeleteResponse,
106
- type GroupCreateParams,
107
- type GroupUpdateParams,
108
- type GroupListParams,
109
- type GroupsArrayPage,
110
- } from './groups/groups';
111
- export {
112
- Identities,
113
- type Identity,
114
- type IdentityProperty,
115
- type IdentityType,
116
- type IdentityDeleteResponse,
117
- type IdentityCreateParams,
118
- type IdentityUpdateParams,
119
- type IdentityListParams,
120
- type IdentityUpsertParams,
121
- type IdentitiesArrayPage,
122
- } from './identities/identities';
123
88
  export {
124
89
  McpServers,
125
90
  type CreateSseMcpServer,
@@ -144,6 +109,7 @@ export {
144
109
  Messages,
145
110
  type MessageSearchRequest,
146
111
  type MessageSearchResult,
112
+ type MessageRetrieveResponse,
147
113
  type MessageListResponse,
148
114
  type MessageSearchResponse,
149
115
  type MessageListParams,
@@ -50,7 +50,7 @@ export interface ToolRetrieveParams {
50
50
 
51
51
  export interface ToolRunParams {
52
52
  /**
53
- * Path param:
53
+ * Path param
54
54
  */
55
55
  mcp_server_id: string;
56
56
 
@@ -4,8 +4,16 @@ import { APIResource } from '../core/resource';
4
4
  import * as AgentsMessagesAPI from './agents/messages';
5
5
  import { APIPromise } from '../core/api-promise';
6
6
  import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
7
8
 
8
9
  export class Messages extends APIResource {
10
+ /**
11
+ * Retrieve a message by ID.
12
+ */
13
+ retrieve(messageID: string, options?: RequestOptions): APIPromise<MessageRetrieveResponse> {
14
+ return this._client.get(path`/v1/messages/${messageID}`, options);
15
+ }
16
+
9
17
  /**
10
18
  * List messages across all agents for the current user.
11
19
  */
@@ -38,6 +46,11 @@ export interface MessageSearchRequest {
38
46
  */
39
47
  agent_id?: string | null;
40
48
 
49
+ /**
50
+ * Filter messages by conversation ID
51
+ */
52
+ conversation_id?: string | null;
53
+
41
54
  /**
42
55
  * Filter messages created on or before this date
43
56
  */
@@ -89,6 +102,8 @@ export interface MessageSearchResult {
89
102
  vector_rank?: number | null;
90
103
  }
91
104
 
105
+ export type MessageRetrieveResponse = Array<AgentsMessagesAPI.Message>;
106
+
92
107
  export type MessageListResponse = Array<AgentsMessagesAPI.Message>;
93
108
 
94
109
  export type MessageSearchResponse = Array<
@@ -233,6 +248,11 @@ export interface MessageListParams {
233
248
  */
234
249
  before?: string | null;
235
250
 
251
+ /**
252
+ * Conversation ID to filter messages by
253
+ */
254
+ conversation_id?: string | null;
255
+
236
256
  /**
237
257
  * Maximum number of messages to return
238
258
  */
@@ -256,6 +276,11 @@ export interface MessageSearchParams {
256
276
  */
257
277
  agent_id?: string | null;
258
278
 
279
+ /**
280
+ * Filter messages by conversation ID
281
+ */
282
+ conversation_id?: string | null;
283
+
259
284
  /**
260
285
  * Filter messages created on or before this date
261
286
  */
@@ -281,6 +306,7 @@ export declare namespace Messages {
281
306
  export {
282
307
  type MessageSearchRequest as MessageSearchRequest,
283
308
  type MessageSearchResult as MessageSearchResult,
309
+ type MessageRetrieveResponse as MessageRetrieveResponse,
284
310
  type MessageListResponse as MessageListResponse,
285
311
  type MessageSearchResponse as MessageSearchResponse,
286
312
  type MessageListParams as MessageListParams,
@@ -8,4 +8,5 @@ export {
8
8
  } from './messages';
9
9
  export { Runs, type Job, type StopReasonType, type RunListParams } from './runs';
10
10
  export { Steps, type StepListParams } from './steps';
11
+ export { Trace, type TraceRetrieveResponse, type TraceRetrieveParams } from './trace';
11
12
  export { Usage, type UsageRetrieveResponse } from './usage';
@@ -7,6 +7,8 @@ import * as RunsMessagesAPI from './messages';
7
7
  import { MessageListParams, MessageStreamParams, MessageStreamResponse, Messages } from './messages';
8
8
  import * as StepsAPI from './steps';
9
9
  import { StepListParams, Steps } from './steps';
10
+ import * as TraceAPI from './trace';
11
+ import { Trace, TraceRetrieveParams, TraceRetrieveResponse } from './trace';
10
12
  import * as UsageAPI from './usage';
11
13
  import { Usage, UsageRetrieveResponse } from './usage';
12
14
  import { APIPromise } from '../../core/api-promise';
@@ -18,6 +20,7 @@ export class Runs extends APIResource {
18
20
  messages: RunsMessagesAPI.Messages = new RunsMessagesAPI.Messages(this._client);
19
21
  usage: UsageAPI.Usage = new UsageAPI.Usage(this._client);
20
22
  steps: StepsAPI.Steps = new StepsAPI.Steps(this._client);
23
+ trace: TraceAPI.Trace = new TraceAPI.Trace(this._client);
21
24
 
22
25
  /**
23
26
  * Get the status of a run.
@@ -175,6 +178,11 @@ export interface RunListParams extends ArrayPageParams {
175
178
  */
176
179
  background?: boolean | null;
177
180
 
181
+ /**
182
+ * Filter runs by conversation ID.
183
+ */
184
+ conversation_id?: string | null;
185
+
178
186
  /**
179
187
  * Filter runs by status. Can specify multiple statuses.
180
188
  */
@@ -189,6 +197,7 @@ export interface RunListParams extends ArrayPageParams {
189
197
  Runs.Messages = Messages;
190
198
  Runs.Usage = Usage;
191
199
  Runs.Steps = Steps;
200
+ Runs.Trace = Trace;
192
201
 
193
202
  export declare namespace Runs {
194
203
  export { type Job as Job, type StopReasonType as StopReasonType, type RunListParams as RunListParams };
@@ -203,6 +212,12 @@ export declare namespace Runs {
203
212
  export { Usage as Usage, type UsageRetrieveResponse as UsageRetrieveResponse };
204
213
 
205
214
  export { Steps as Steps, type StepListParams as StepListParams };
215
+
216
+ export {
217
+ Trace as Trace,
218
+ type TraceRetrieveResponse as TraceRetrieveResponse,
219
+ type TraceRetrieveParams as TraceRetrieveParams,
220
+ };
206
221
  }
207
222
 
208
223
  export { type RunsArrayPage };
@@ -0,0 +1,44 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import { APIPromise } from '../../core/api-promise';
5
+ import { RequestOptions } from '../../internal/request-options';
6
+ import { path } from '../../internal/utils/path';
7
+
8
+ export class Trace extends APIResource {
9
+ /**
10
+ * Retrieve OTEL trace spans for a run.
11
+ *
12
+ * Returns a filtered set of spans relevant for observability:
13
+ *
14
+ * - agent_step: Individual agent reasoning steps
15
+ * - tool executions: Tool call spans
16
+ * - Root span: The top-level request span
17
+ * - time_to_first_token: TTFT measurement span
18
+ *
19
+ * Requires ClickHouse to be configured for trace storage.
20
+ */
21
+ retrieve(
22
+ runID: string,
23
+ query: TraceRetrieveParams | null | undefined = {},
24
+ options?: RequestOptions,
25
+ ): APIPromise<TraceRetrieveResponse> {
26
+ return this._client.get(path`/v1/runs/${runID}/trace`, { query, ...options });
27
+ }
28
+ }
29
+
30
+ export type TraceRetrieveResponse = Array<{ [key: string]: unknown }>;
31
+
32
+ export interface TraceRetrieveParams {
33
+ /**
34
+ * Maximum number of spans to return
35
+ */
36
+ limit?: number;
37
+ }
38
+
39
+ export declare namespace Trace {
40
+ export {
41
+ type TraceRetrieveResponse as TraceRetrieveResponse,
42
+ type TraceRetrieveParams as TraceRetrieveParams,
43
+ };
44
+ }
@@ -6,7 +6,7 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class Tags extends APIResource {
8
8
  /**
9
- * Get the list of all agent tags that have been created.
9
+ * Get the list of all tags (from agents and blocks) that have been created.
10
10
  */
11
11
  list(query: TagListParams | null | undefined = {}, options?: RequestOptions): APIPromise<TagListResponse> {
12
12
  return this._client.get('/v1/tags/', { query, ...options });
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.6.5'; // x-release-please-version
1
+ export const VERSION = '1.6.7'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.6.5";
1
+ export declare const VERSION = "1.6.7";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "1.6.5";
1
+ export declare const VERSION = "1.6.7";
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.6.5'; // x-release-please-version
4
+ exports.VERSION = '1.6.7'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '1.6.5'; // x-release-please-version
1
+ export const VERSION = '1.6.7'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,22 +0,0 @@
1
- import { APIResource } from "../../core/resource.mjs";
2
- import * as GroupsGroupsAPI from "../groups/groups.mjs";
3
- import { GroupsArrayPage } from "../groups/groups.mjs";
4
- import { type ArrayPageParams, PagePromise } from "../../core/pagination.mjs";
5
- import { RequestOptions } from "../../internal/request-options.mjs";
6
- export declare class Groups extends APIResource {
7
- /**
8
- * Lists the groups for an agent.
9
- */
10
- list(agentID: string, query?: GroupListParams | null | undefined, options?: RequestOptions): PagePromise<GroupsArrayPage, GroupsGroupsAPI.Group>;
11
- }
12
- export interface GroupListParams extends ArrayPageParams {
13
- /**
14
- * Manager type to filter groups by
15
- */
16
- manager_type?: string | null;
17
- }
18
- export declare namespace Groups {
19
- export { type GroupListParams as GroupListParams };
20
- }
21
- export { type GroupsArrayPage };
22
- //# sourceMappingURL=groups.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.d.mts","sourceRoot":"","sources":["../../src/resources/agents/groups.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAAE,eAAe,EAAE;OACnB,EAAa,KAAK,eAAe,EAAE,WAAW,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC;CAMvD;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACpD;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}
@@ -1,22 +0,0 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import * as GroupsGroupsAPI from "../groups/groups.js";
3
- import { GroupsArrayPage } from "../groups/groups.js";
4
- import { type ArrayPageParams, PagePromise } from "../../core/pagination.js";
5
- import { RequestOptions } from "../../internal/request-options.js";
6
- export declare class Groups extends APIResource {
7
- /**
8
- * Lists the groups for an agent.
9
- */
10
- list(agentID: string, query?: GroupListParams | null | undefined, options?: RequestOptions): PagePromise<GroupsArrayPage, GroupsGroupsAPI.Group>;
11
- }
12
- export interface GroupListParams extends ArrayPageParams {
13
- /**
14
- * Manager type to filter groups by
15
- */
16
- manager_type?: string | null;
17
- }
18
- export declare namespace Groups {
19
- export { type GroupListParams as GroupListParams };
20
- }
21
- export { type GroupsArrayPage };
22
- //# sourceMappingURL=groups.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/resources/agents/groups.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAAE,eAAe,EAAE;OACnB,EAAa,KAAK,eAAe,EAAE,WAAW,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC;CAMvD;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACpD;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}