@letta-ai/letta-client 1.6.6 → 1.6.8

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 (228) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/client.d.mts +4 -13
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -13
  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 +165 -13
  12. package/resources/agents/agents.d.mts.map +1 -1
  13. package/resources/agents/agents.d.ts +165 -13
  14. package/resources/agents/agents.d.ts.map +1 -1
  15. package/resources/agents/agents.js +0 -8
  16. package/resources/agents/agents.js.map +1 -1
  17. package/resources/agents/agents.mjs +0 -8
  18. package/resources/agents/agents.mjs.map +1 -1
  19. package/resources/agents/index.d.mts +1 -3
  20. package/resources/agents/index.d.mts.map +1 -1
  21. package/resources/agents/index.d.ts +1 -3
  22. package/resources/agents/index.d.ts.map +1 -1
  23. package/resources/agents/index.js +1 -5
  24. package/resources/agents/index.js.map +1 -1
  25. package/resources/agents/index.mjs +0 -2
  26. package/resources/agents/index.mjs.map +1 -1
  27. package/resources/agents/messages.d.mts +1 -2
  28. package/resources/agents/messages.d.mts.map +1 -1
  29. package/resources/agents/messages.d.ts +1 -2
  30. package/resources/agents/messages.d.ts.map +1 -1
  31. package/resources/agents/messages.js.map +1 -1
  32. package/resources/agents/messages.mjs.map +1 -1
  33. package/resources/conversations/conversations.d.mts +12 -3
  34. package/resources/conversations/conversations.d.mts.map +1 -1
  35. package/resources/conversations/conversations.d.ts +12 -3
  36. package/resources/conversations/conversations.d.ts.map +1 -1
  37. package/resources/conversations/conversations.js +8 -0
  38. package/resources/conversations/conversations.js.map +1 -1
  39. package/resources/conversations/conversations.mjs +8 -0
  40. package/resources/conversations/conversations.mjs.map +1 -1
  41. package/resources/conversations/index.d.mts +2 -2
  42. package/resources/conversations/index.d.mts.map +1 -1
  43. package/resources/conversations/index.d.ts +2 -2
  44. package/resources/conversations/index.d.ts.map +1 -1
  45. package/resources/conversations/index.js.map +1 -1
  46. package/resources/conversations/index.mjs.map +1 -1
  47. package/resources/conversations/messages.d.mts +12 -16
  48. package/resources/conversations/messages.d.mts.map +1 -1
  49. package/resources/conversations/messages.d.ts +12 -16
  50. package/resources/conversations/messages.d.ts.map +1 -1
  51. package/resources/conversations/messages.js +3 -3
  52. package/resources/conversations/messages.js.map +1 -1
  53. package/resources/conversations/messages.mjs +3 -3
  54. package/resources/conversations/messages.mjs.map +1 -1
  55. package/resources/index.d.mts +2 -5
  56. package/resources/index.d.mts.map +1 -1
  57. package/resources/index.d.ts +2 -5
  58. package/resources/index.d.ts.map +1 -1
  59. package/resources/index.js +1 -7
  60. package/resources/index.js.map +1 -1
  61. package/resources/index.mjs +0 -3
  62. package/resources/index.mjs.map +1 -1
  63. package/resources/messages.d.mts +6 -1
  64. package/resources/messages.d.mts.map +1 -1
  65. package/resources/messages.d.ts +6 -1
  66. package/resources/messages.d.ts.map +1 -1
  67. package/resources/messages.js +7 -0
  68. package/resources/messages.js.map +1 -1
  69. package/resources/messages.mjs +7 -0
  70. package/resources/messages.mjs.map +1 -1
  71. package/src/client.ts +4 -79
  72. package/src/resources/agents/agents.ts +210 -37
  73. package/src/resources/agents/index.ts +0 -13
  74. package/src/resources/agents/messages.ts +1 -3
  75. package/src/resources/conversations/conversations.ts +12 -2
  76. package/src/resources/conversations/index.ts +1 -1
  77. package/src/resources/conversations/messages.ts +17 -19
  78. package/src/resources/index.ts +2 -35
  79. package/src/resources/messages.ts +11 -0
  80. package/src/version.ts +1 -1
  81. package/version.d.mts +1 -1
  82. package/version.d.ts +1 -1
  83. package/version.js +1 -1
  84. package/version.mjs +1 -1
  85. package/resources/agents/groups.d.mts +0 -22
  86. package/resources/agents/groups.d.mts.map +0 -1
  87. package/resources/agents/groups.d.ts +0 -22
  88. package/resources/agents/groups.d.ts.map +0 -1
  89. package/resources/agents/groups.js +0 -20
  90. package/resources/agents/groups.js.map +0 -1
  91. package/resources/agents/groups.mjs +0 -16
  92. package/resources/agents/groups.mjs.map +0 -1
  93. package/resources/agents/schedule.d.mts +0 -197
  94. package/resources/agents/schedule.d.mts.map +0 -1
  95. package/resources/agents/schedule.d.ts +0 -197
  96. package/resources/agents/schedule.d.ts.map +0 -1
  97. package/resources/agents/schedule.js +0 -40
  98. package/resources/agents/schedule.js.map +0 -1
  99. package/resources/agents/schedule.mjs +0 -36
  100. package/resources/agents/schedule.mjs.map +0 -1
  101. package/resources/batches/batches.d.mts +0 -240
  102. package/resources/batches/batches.d.mts.map +0 -1
  103. package/resources/batches/batches.d.ts +0 -240
  104. package/resources/batches/batches.d.ts.map +0 -1
  105. package/resources/batches/batches.js +0 -46
  106. package/resources/batches/batches.js.map +0 -1
  107. package/resources/batches/batches.mjs +0 -41
  108. package/resources/batches/batches.mjs.map +0 -1
  109. package/resources/batches/index.d.mts +0 -3
  110. package/resources/batches/index.d.mts.map +0 -1
  111. package/resources/batches/index.d.ts +0 -3
  112. package/resources/batches/index.d.ts.map +0 -1
  113. package/resources/batches/index.js +0 -9
  114. package/resources/batches/index.js.map +0 -1
  115. package/resources/batches/index.mjs +0 -4
  116. package/resources/batches/index.mjs.map +0 -1
  117. package/resources/batches/messages.d.mts +0 -22
  118. package/resources/batches/messages.d.mts.map +0 -1
  119. package/resources/batches/messages.d.ts +0 -22
  120. package/resources/batches/messages.d.ts.map +0 -1
  121. package/resources/batches/messages.js +0 -17
  122. package/resources/batches/messages.js.map +0 -1
  123. package/resources/batches/messages.mjs +0 -13
  124. package/resources/batches/messages.mjs.map +0 -1
  125. package/resources/batches.d.mts +0 -2
  126. package/resources/batches.d.mts.map +0 -1
  127. package/resources/batches.d.ts +0 -2
  128. package/resources/batches.d.ts.map +0 -1
  129. package/resources/batches.js +0 -6
  130. package/resources/batches.js.map +0 -1
  131. package/resources/batches.mjs +0 -3
  132. package/resources/batches.mjs.map +0 -1
  133. package/resources/groups/groups.d.mts +0 -197
  134. package/resources/groups/groups.d.mts.map +0 -1
  135. package/resources/groups/groups.d.ts +0 -197
  136. package/resources/groups/groups.d.ts.map +0 -1
  137. package/resources/groups/groups.js +0 -49
  138. package/resources/groups/groups.js.map +0 -1
  139. package/resources/groups/groups.mjs +0 -44
  140. package/resources/groups/groups.mjs.map +0 -1
  141. package/resources/groups/index.d.mts +0 -3
  142. package/resources/groups/index.d.mts.map +0 -1
  143. package/resources/groups/index.d.ts +0 -3
  144. package/resources/groups/index.d.ts.map +0 -1
  145. package/resources/groups/index.js +0 -9
  146. package/resources/groups/index.js.map +0 -1
  147. package/resources/groups/index.mjs +0 -4
  148. package/resources/groups/index.mjs.map +0 -1
  149. package/resources/groups/messages.d.mts +0 -360
  150. package/resources/groups/messages.d.mts.map +0 -1
  151. package/resources/groups/messages.d.ts +0 -360
  152. package/resources/groups/messages.d.ts.map +0 -1
  153. package/resources/groups/messages.js +0 -54
  154. package/resources/groups/messages.js.map +0 -1
  155. package/resources/groups/messages.mjs +0 -50
  156. package/resources/groups/messages.mjs.map +0 -1
  157. package/resources/groups.d.mts +0 -2
  158. package/resources/groups.d.mts.map +0 -1
  159. package/resources/groups.d.ts +0 -2
  160. package/resources/groups.d.ts.map +0 -1
  161. package/resources/groups.js +0 -6
  162. package/resources/groups.js.map +0 -1
  163. package/resources/groups.mjs +0 -3
  164. package/resources/groups.mjs.map +0 -1
  165. package/resources/identities/agents.d.mts +0 -23
  166. package/resources/identities/agents.d.mts.map +0 -1
  167. package/resources/identities/agents.d.ts +0 -23
  168. package/resources/identities/agents.d.ts.map +0 -1
  169. package/resources/identities/agents.js +0 -17
  170. package/resources/identities/agents.js.map +0 -1
  171. package/resources/identities/agents.mjs +0 -13
  172. package/resources/identities/agents.mjs.map +0 -1
  173. package/resources/identities/blocks.d.mts +0 -18
  174. package/resources/identities/blocks.d.mts.map +0 -1
  175. package/resources/identities/blocks.d.ts +0 -18
  176. package/resources/identities/blocks.d.ts.map +0 -1
  177. package/resources/identities/blocks.js +0 -17
  178. package/resources/identities/blocks.js.map +0 -1
  179. package/resources/identities/blocks.mjs +0 -13
  180. package/resources/identities/blocks.mjs.map +0 -1
  181. package/resources/identities/identities.d.mts +0 -204
  182. package/resources/identities/identities.d.mts.map +0 -1
  183. package/resources/identities/identities.d.ts +0 -204
  184. package/resources/identities/identities.d.ts.map +0 -1
  185. package/resources/identities/identities.js +0 -63
  186. package/resources/identities/identities.js.map +0 -1
  187. package/resources/identities/identities.mjs +0 -58
  188. package/resources/identities/identities.mjs.map +0 -1
  189. package/resources/identities/index.d.mts +0 -5
  190. package/resources/identities/index.d.mts.map +0 -1
  191. package/resources/identities/index.d.ts +0 -5
  192. package/resources/identities/index.d.ts.map +0 -1
  193. package/resources/identities/index.js +0 -13
  194. package/resources/identities/index.js.map +0 -1
  195. package/resources/identities/index.mjs +0 -6
  196. package/resources/identities/index.mjs.map +0 -1
  197. package/resources/identities/properties.d.mts +0 -18
  198. package/resources/identities/properties.d.mts.map +0 -1
  199. package/resources/identities/properties.d.ts +0 -18
  200. package/resources/identities/properties.d.ts.map +0 -1
  201. package/resources/identities/properties.js +0 -17
  202. package/resources/identities/properties.js.map +0 -1
  203. package/resources/identities/properties.mjs +0 -13
  204. package/resources/identities/properties.mjs.map +0 -1
  205. package/resources/identities.d.mts +0 -2
  206. package/resources/identities.d.mts.map +0 -1
  207. package/resources/identities.d.ts +0 -2
  208. package/resources/identities.d.ts.map +0 -1
  209. package/resources/identities.js +0 -6
  210. package/resources/identities.js.map +0 -1
  211. package/resources/identities.mjs +0 -3
  212. package/resources/identities.mjs.map +0 -1
  213. package/src/resources/agents/groups.ts +0 -37
  214. package/src/resources/agents/schedule.ts +0 -361
  215. package/src/resources/batches/batches.ts +0 -317
  216. package/src/resources/batches/index.ts +0 -11
  217. package/src/resources/batches/messages.ts +0 -38
  218. package/src/resources/batches.ts +0 -3
  219. package/src/resources/groups/groups.ts +0 -334
  220. package/src/resources/groups/index.ts +0 -27
  221. package/src/resources/groups/messages.ts +0 -505
  222. package/src/resources/groups.ts +0 -3
  223. package/src/resources/identities/agents.ts +0 -48
  224. package/src/resources/identities/blocks.ts +0 -33
  225. package/src/resources/identities/identities.ts +0 -286
  226. package/src/resources/identities/index.ts +0 -17
  227. package/src/resources/identities/properties.ts +0 -30
  228. package/src/resources/identities.ts +0 -3
package/src/client.ts CHANGED
@@ -41,6 +41,7 @@ import {
41
41
  import {
42
42
  MessageListParams,
43
43
  MessageListResponse,
44
+ MessageRetrieveResponse,
44
45
  MessageSearchParams,
45
46
  MessageSearchRequest,
46
47
  MessageSearchResponse,
@@ -117,14 +118,6 @@ import {
117
118
  ArchivesArrayPage,
118
119
  VectorDBProvider,
119
120
  } from './resources/archives/archives';
120
- import {
121
- BatchCancelResponse,
122
- BatchCreateParams,
123
- BatchJob,
124
- BatchJobsArrayPage,
125
- BatchListParams,
126
- Batches,
127
- } from './resources/batches/batches';
128
121
  import {
129
122
  BlockCreateParams,
130
123
  BlockDeleteResponse,
@@ -137,6 +130,7 @@ import {
137
130
  } from './resources/blocks/blocks';
138
131
  import {
139
132
  Conversation,
133
+ ConversationCancelResponse,
140
134
  ConversationCreateParams,
141
135
  ConversationListParams,
142
136
  ConversationListResponse,
@@ -152,33 +146,6 @@ import {
152
146
  Folders,
153
147
  FoldersArrayPage,
154
148
  } from './resources/folders/folders';
155
- import {
156
- DynamicManager,
157
- Group,
158
- GroupCreateParams,
159
- GroupDeleteResponse,
160
- GroupListParams,
161
- GroupUpdateParams,
162
- Groups,
163
- GroupsArrayPage,
164
- ManagerType,
165
- RoundRobinManager,
166
- SleeptimeManager,
167
- SupervisorManager,
168
- VoiceSleeptimeManager,
169
- } from './resources/groups/groups';
170
- import {
171
- Identities,
172
- IdentitiesArrayPage,
173
- Identity,
174
- IdentityCreateParams,
175
- IdentityDeleteResponse,
176
- IdentityListParams,
177
- IdentityProperty,
178
- IdentityType,
179
- IdentityUpdateParams,
180
- IdentityUpsertParams,
181
- } from './resources/identities/identities';
182
149
  import {
183
150
  CreateSseMcpServer,
184
151
  CreateStdioMcpServer,
@@ -981,11 +948,8 @@ export class Letta {
981
948
  steps: API.Steps = new API.Steps(this);
982
949
  templates: API.Templates = new API.Templates(this);
983
950
  tags: API.Tags = new API.Tags(this);
984
- identities: API.Identities = new API.Identities(this);
985
- groups: API.Groups = new API.Groups(this);
986
951
  messages: API.Messages = new API.Messages(this);
987
952
  passages: API.Passages = new API.Passages(this);
988
- batches: API.Batches = new API.Batches(this);
989
953
  conversations: API.Conversations = new API.Conversations(this);
990
954
  accessTokens: API.AccessTokens = new API.AccessTokens(this);
991
955
  }
@@ -1001,11 +965,8 @@ Letta.Runs = Runs;
1001
965
  Letta.Steps = Steps;
1002
966
  Letta.Templates = Templates;
1003
967
  Letta.Tags = Tags;
1004
- Letta.Identities = Identities;
1005
- Letta.Groups = Groups;
1006
968
  Letta.Messages = Messages;
1007
969
  Letta.Passages = Passages;
1008
- Letta.Batches = Batches;
1009
970
  Letta.Conversations = Conversations;
1010
971
  Letta.AccessTokens = AccessTokens;
1011
972
 
@@ -1178,39 +1139,11 @@ export declare namespace Letta {
1178
1139
 
1179
1140
  export { Tags as Tags, type TagListResponse as TagListResponse, type TagListParams as TagListParams };
1180
1141
 
1181
- export {
1182
- Identities as Identities,
1183
- type Identity as Identity,
1184
- type IdentityProperty as IdentityProperty,
1185
- type IdentityType as IdentityType,
1186
- type IdentityDeleteResponse as IdentityDeleteResponse,
1187
- type IdentitiesArrayPage as IdentitiesArrayPage,
1188
- type IdentityCreateParams as IdentityCreateParams,
1189
- type IdentityUpdateParams as IdentityUpdateParams,
1190
- type IdentityListParams as IdentityListParams,
1191
- type IdentityUpsertParams as IdentityUpsertParams,
1192
- };
1193
-
1194
- export {
1195
- Groups as Groups,
1196
- type DynamicManager as DynamicManager,
1197
- type Group as Group,
1198
- type ManagerType as ManagerType,
1199
- type RoundRobinManager as RoundRobinManager,
1200
- type SleeptimeManager as SleeptimeManager,
1201
- type SupervisorManager as SupervisorManager,
1202
- type VoiceSleeptimeManager as VoiceSleeptimeManager,
1203
- type GroupDeleteResponse as GroupDeleteResponse,
1204
- type GroupsArrayPage as GroupsArrayPage,
1205
- type GroupCreateParams as GroupCreateParams,
1206
- type GroupUpdateParams as GroupUpdateParams,
1207
- type GroupListParams as GroupListParams,
1208
- };
1209
-
1210
1142
  export {
1211
1143
  Messages as Messages,
1212
1144
  type MessageSearchRequest as MessageSearchRequest,
1213
1145
  type MessageSearchResult as MessageSearchResult,
1146
+ type MessageRetrieveResponse as MessageRetrieveResponse,
1214
1147
  type MessageListResponse as MessageListResponse,
1215
1148
  type MessageSearchResponse as MessageSearchResponse,
1216
1149
  type MessageListParams as MessageListParams,
@@ -1224,20 +1157,12 @@ export declare namespace Letta {
1224
1157
  type PassageSearchParams as PassageSearchParams,
1225
1158
  };
1226
1159
 
1227
- export {
1228
- Batches as Batches,
1229
- type BatchJob as BatchJob,
1230
- type BatchCancelResponse as BatchCancelResponse,
1231
- type BatchJobsArrayPage as BatchJobsArrayPage,
1232
- type BatchCreateParams as BatchCreateParams,
1233
- type BatchListParams as BatchListParams,
1234
- };
1235
-
1236
1160
  export {
1237
1161
  Conversations as Conversations,
1238
1162
  type Conversation as Conversation,
1239
1163
  type CreateConversation as CreateConversation,
1240
1164
  type ConversationListResponse as ConversationListResponse,
1165
+ type ConversationCancelResponse as ConversationCancelResponse,
1241
1166
  type ConversationCreateParams as ConversationCreateParams,
1242
1167
  type ConversationListParams as ConversationListParams,
1243
1168
  };
@@ -43,8 +43,6 @@ import {
43
43
  FolderListResponsesArrayPage,
44
44
  Folders,
45
45
  } from './folders';
46
- import * as GroupsAPI from './groups';
47
- import { GroupListParams, Groups } from './groups';
48
46
  import * as IdentitiesAPI from './identities';
49
47
  import {
50
48
  Identities,
@@ -120,18 +118,6 @@ import {
120
118
  PassageSearchResponse,
121
119
  Passages,
122
120
  } from './passages';
123
- import * as ScheduleAPI from './schedule';
124
- import {
125
- Schedule,
126
- ScheduleCreateParams,
127
- ScheduleCreateResponse,
128
- ScheduleDeleteParams,
129
- ScheduleDeleteResponse,
130
- ScheduleListParams,
131
- ScheduleListResponse,
132
- ScheduleRetrieveParams,
133
- ScheduleRetrieveResponse,
134
- } from './schedule';
135
121
  import * as AgentsToolsAPI from './tools';
136
122
  import {
137
123
  ToolAttachParams,
@@ -145,8 +131,6 @@ import {
145
131
  } from './tools';
146
132
  import * as ArchivesArchivesAPI from '../archives/archives';
147
133
  import * as BlocksBlocksAPI from '../blocks/blocks';
148
- import * as GroupsGroupsAPI from '../groups/groups';
149
- import * as IdentitiesIdentitiesAPI from '../identities/identities';
150
134
  import * as ModelsAPI from '../models/models';
151
135
  import * as RunsAPI from '../runs/runs';
152
136
  import { APIPromise } from '../../core/api-promise';
@@ -159,12 +143,10 @@ import { path } from '../../internal/utils/path';
159
143
 
160
144
  export class Agents extends APIResource {
161
145
  messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
162
- schedule: ScheduleAPI.Schedule = new ScheduleAPI.Schedule(this._client);
163
146
  blocks: BlocksAPI.Blocks = new BlocksAPI.Blocks(this._client);
164
147
  tools: AgentsToolsAPI.Tools = new AgentsToolsAPI.Tools(this._client);
165
148
  folders: FoldersAPI.Folders = new FoldersAPI.Folders(this._client);
166
149
  files: FilesAPI.Files = new FilesAPI.Files(this._client);
167
- groups: GroupsAPI.Groups = new GroupsAPI.Groups(this._client);
168
150
  archives: ArchivesAPI.Archives = new ArchivesAPI.Archives(this._client);
169
151
  passages: PassagesAPI.Passages = new PassagesAPI.Passages(this._client);
170
152
  identities: IdentitiesAPI.Identities = new IdentitiesAPI.Identities(this._client);
@@ -426,7 +408,7 @@ export interface AgentState {
426
408
  /**
427
409
  * The identities associated with this agent.
428
410
  */
429
- identities?: Array<IdentitiesIdentitiesAPI.Identity>;
411
+ identities?: Array<AgentState.Identity>;
430
412
 
431
413
  /**
432
414
  * @deprecated Deprecated: Use `identities` field instead. The ids of the
@@ -457,7 +439,7 @@ export interface AgentState {
457
439
  /**
458
440
  * The multi-agent group that this agent manages
459
441
  */
460
- managed_group?: GroupsGroupsAPI.Group | null;
442
+ managed_group?: AgentState.ManagedGroup | null;
461
443
 
462
444
  /**
463
445
  * Maximum number of files that can be open at once for this agent. Setting this
@@ -508,7 +490,7 @@ export interface AgentState {
508
490
  * @deprecated Deprecated: Use `managed_group` field instead. The multi-agent group
509
491
  * that this agent manages.
510
492
  */
511
- multi_agent_group?: GroupsGroupsAPI.Group | null;
493
+ multi_agent_group?: AgentState.MultiAgentGroup | null;
512
494
 
513
495
  /**
514
496
  * A message representing a request for approval to call a tool (generated by the
@@ -881,6 +863,141 @@ export namespace AgentState {
881
863
  }
882
864
  }
883
865
 
866
+ export interface Identity {
867
+ /**
868
+ * The human-friendly ID of the Identity
869
+ */
870
+ id: string;
871
+
872
+ /**
873
+ * @deprecated The IDs of the agents associated with the identity.
874
+ */
875
+ agent_ids: Array<string>;
876
+
877
+ /**
878
+ * @deprecated The IDs of the blocks associated with the identity.
879
+ */
880
+ block_ids: Array<string>;
881
+
882
+ /**
883
+ * External, user-generated identifier key of the identity.
884
+ */
885
+ identifier_key: string;
886
+
887
+ /**
888
+ * The type of the identity.
889
+ */
890
+ identity_type: 'org' | 'user' | 'other';
891
+
892
+ /**
893
+ * The name of the identity.
894
+ */
895
+ name: string;
896
+
897
+ /**
898
+ * The project id of the identity, if applicable.
899
+ */
900
+ project_id?: string | null;
901
+
902
+ /**
903
+ * List of properties associated with the identity
904
+ */
905
+ properties?: Array<Identity.Property>;
906
+ }
907
+
908
+ export namespace Identity {
909
+ /**
910
+ * A property of an identity
911
+ */
912
+ export interface Property {
913
+ /**
914
+ * The key of the property
915
+ */
916
+ key: string;
917
+
918
+ /**
919
+ * The type of the property
920
+ */
921
+ type: 'string' | 'number' | 'boolean' | 'json';
922
+
923
+ /**
924
+ * The value of the property
925
+ */
926
+ value: string | number | boolean | { [key: string]: unknown };
927
+ }
928
+ }
929
+
930
+ /**
931
+ * The multi-agent group that this agent manages
932
+ */
933
+ export interface ManagedGroup {
934
+ /**
935
+ * The id of the group. Assigned by the database.
936
+ */
937
+ id: string;
938
+
939
+ agent_ids: Array<string>;
940
+
941
+ description: string;
942
+
943
+ manager_type: 'round_robin' | 'supervisor' | 'dynamic' | 'sleeptime' | 'voice_sleeptime' | 'swarm';
944
+
945
+ /**
946
+ * The base template id.
947
+ */
948
+ base_template_id?: string | null;
949
+
950
+ /**
951
+ * The id of the deployment.
952
+ */
953
+ deployment_id?: string | null;
954
+
955
+ /**
956
+ * If set to True, the group will be hidden.
957
+ */
958
+ hidden?: boolean | null;
959
+
960
+ last_processed_message_id?: string | null;
961
+
962
+ manager_agent_id?: string | null;
963
+
964
+ /**
965
+ * The desired maximum length of messages in the context window of the convo agent.
966
+ * This is a best effort, and may be off slightly due to user/assistant
967
+ * interleaving.
968
+ */
969
+ max_message_buffer_length?: number | null;
970
+
971
+ max_turns?: number | null;
972
+
973
+ /**
974
+ * The desired minimum length of messages in the context window of the convo agent.
975
+ * This is a best effort, and may be off-by-one due to user/assistant interleaving.
976
+ */
977
+ min_message_buffer_length?: number | null;
978
+
979
+ /**
980
+ * The associated project id.
981
+ */
982
+ project_id?: string | null;
983
+
984
+ /**
985
+ * @deprecated
986
+ */
987
+ shared_block_ids?: Array<string>;
988
+
989
+ sleeptime_agent_frequency?: number | null;
990
+
991
+ /**
992
+ * The id of the template.
993
+ */
994
+ template_id?: string | null;
995
+
996
+ termination_token?: string | null;
997
+
998
+ turns_counter?: number | null;
999
+ }
1000
+
884
1001
  /**
885
1002
  * Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
886
1003
  */
@@ -914,6 +1031,78 @@ export namespace AgentState {
914
1031
  */
915
1032
  temperature?: number;
916
1033
  }
1034
+
1035
+ /**
1036
+ * @deprecated Deprecated: Use `managed_group` field instead. The multi-agent group
1037
+ * that this agent manages.
1038
+ */
1039
+ export interface MultiAgentGroup {
1040
+ /**
1041
+ * The id of the group. Assigned by the database.
1042
+ */
1043
+ id: string;
1044
+
1045
+ agent_ids: Array<string>;
1046
+
1047
+ description: string;
1048
+
1049
+ manager_type: 'round_robin' | 'supervisor' | 'dynamic' | 'sleeptime' | 'voice_sleeptime' | 'swarm';
1050
+
1051
+ /**
1052
+ * The base template id.
1053
+ */
1054
+ base_template_id?: string | null;
1055
+
1056
+ /**
1057
+ * The id of the deployment.
1058
+ */
1059
+ deployment_id?: string | null;
1060
+
1061
+ /**
1062
+ * If set to True, the group will be hidden.
1063
+ */
1064
+ hidden?: boolean | null;
1065
+
1066
+ last_processed_message_id?: string | null;
1067
+
1068
+ manager_agent_id?: string | null;
1069
+
1070
+ /**
1071
+ * The desired maximum length of messages in the context window of the convo agent.
1072
+ * This is a best effort, and may be off slightly due to user/assistant
1073
+ * interleaving.
1074
+ */
1075
+ max_message_buffer_length?: number | null;
1076
+
1077
+ max_turns?: number | null;
1078
+
1079
+ /**
1080
+ * The desired minimum length of messages in the context window of the convo agent.
1081
+ * This is a best effort, and may be off-by-one due to user/assistant interleaving.
1082
+ */
1083
+ min_message_buffer_length?: number | null;
1084
+
1085
+ /**
1086
+ * The associated project id.
1087
+ */
1088
+ project_id?: string | null;
1089
+
1090
+ /**
1091
+ * @deprecated
1092
+ */
1093
+ shared_block_ids?: Array<string>;
1094
+
1095
+ sleeptime_agent_frequency?: number | null;
1096
+
1097
+ /**
1098
+ * The id of the template.
1099
+ */
1100
+ template_id?: string | null;
1101
+
1102
+ termination_token?: string | null;
1103
+
1104
+ turns_counter?: number | null;
1105
+ }
917
1106
  }
918
1107
 
919
1108
  /**
@@ -2629,12 +2818,10 @@ export interface AgentImportFileParams {
2629
2818
  }
2630
2819
 
2631
2820
  Agents.Messages = Messages;
2632
- Agents.Schedule = Schedule;
2633
2821
  Agents.Blocks = Blocks;
2634
2822
  Agents.Tools = Tools;
2635
2823
  Agents.Folders = Folders;
2636
2824
  Agents.Files = Files;
2637
- Agents.Groups = Groups;
2638
2825
  Agents.Archives = Archives;
2639
2826
  Agents.Passages = Passages;
2640
2827
  Agents.Identities = Identities;
@@ -2735,18 +2922,6 @@ export declare namespace Agents {
2735
2922
  type MessageStreamParams as MessageStreamParams,
2736
2923
  };
2737
2924
 
2738
- export {
2739
- Schedule as Schedule,
2740
- type ScheduleCreateResponse as ScheduleCreateResponse,
2741
- type ScheduleRetrieveResponse as ScheduleRetrieveResponse,
2742
- type ScheduleListResponse as ScheduleListResponse,
2743
- type ScheduleDeleteResponse as ScheduleDeleteResponse,
2744
- type ScheduleCreateParams as ScheduleCreateParams,
2745
- type ScheduleRetrieveParams as ScheduleRetrieveParams,
2746
- type ScheduleListParams as ScheduleListParams,
2747
- type ScheduleDeleteParams as ScheduleDeleteParams,
2748
- };
2749
-
2750
2925
  export {
2751
2926
  Blocks as Blocks,
2752
2927
  type Block as Block,
@@ -2790,8 +2965,6 @@ export declare namespace Agents {
2790
2965
  type FileOpenParams as FileOpenParams,
2791
2966
  };
2792
2967
 
2793
- export { Groups as Groups, type GroupListParams as GroupListParams };
2794
-
2795
2968
  export {
2796
2969
  Archives as Archives,
2797
2970
  type ArchiveAttachResponse as ArchiveAttachResponse,
@@ -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,
@@ -151,17 +149,6 @@ export {
151
149
  type PassageDeleteParams,
152
150
  type PassageSearchParams,
153
151
  } from './passages';
154
- export {
155
- Schedule,
156
- type ScheduleCreateResponse,
157
- type ScheduleRetrieveResponse,
158
- type ScheduleListResponse,
159
- type ScheduleDeleteResponse,
160
- type ScheduleCreateParams,
161
- type ScheduleRetrieveParams,
162
- type ScheduleListParams,
163
- type ScheduleDeleteParams,
164
- } from './schedule';
165
152
  export {
166
153
  Tools,
167
154
  type ToolExecuteRequest,
@@ -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
  */
@@ -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,
@@ -38,6 +37,15 @@ export class Conversations extends APIResource {
38
37
  list(query: ConversationListParams, options?: RequestOptions): APIPromise<ConversationListResponse> {
39
38
  return this._client.get('/v1/conversations/', { query, ...options });
40
39
  }
40
+
41
+ /**
42
+ * Cancel runs associated with a conversation.
43
+ *
44
+ * Note: To cancel active runs, Redis is required.
45
+ */
46
+ cancel(conversationID: string, options?: RequestOptions): APIPromise<ConversationCancelResponse> {
47
+ return this._client.post(path`/v1/conversations/${conversationID}/cancel`, options);
48
+ }
41
49
  }
42
50
 
43
51
  /**
@@ -110,6 +118,8 @@ export interface CreateConversation {
110
118
 
111
119
  export type ConversationListResponse = Array<Conversation>;
112
120
 
121
+ export type ConversationCancelResponse = { [key: string]: unknown };
122
+
113
123
  export interface ConversationCreateParams {
114
124
  /**
115
125
  * Query param: The agent ID to create a conversation for
@@ -153,13 +163,13 @@ export declare namespace Conversations {
153
163
  type Conversation as Conversation,
154
164
  type CreateConversation as CreateConversation,
155
165
  type ConversationListResponse as ConversationListResponse,
166
+ type ConversationCancelResponse as ConversationCancelResponse,
156
167
  type ConversationCreateParams as ConversationCreateParams,
157
168
  type ConversationListParams as ConversationListParams,
158
169
  };
159
170
 
160
171
  export {
161
172
  Messages as Messages,
162
- type MessageListResponse as MessageListResponse,
163
173
  type MessageStreamResponse as MessageStreamResponse,
164
174
  type MessageCreateParams as MessageCreateParams,
165
175
  type MessageListParams as MessageListParams,
@@ -5,12 +5,12 @@ export {
5
5
  type Conversation,
6
6
  type CreateConversation,
7
7
  type ConversationListResponse,
8
+ type ConversationCancelResponse,
8
9
  type ConversationCreateParams,
9
10
  type ConversationListParams,
10
11
  } from './conversations';
11
12
  export {
12
13
  Messages,
13
- type MessageListResponse,
14
14
  type MessageStreamResponse,
15
15
  type MessageCreateParams,
16
16
  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 };