@letta-ai/letta-client 1.6.6 → 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 (226) hide show
  1. package/CHANGELOG.md +15 -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 +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 +2 -2
  34. package/resources/conversations/conversations.d.mts.map +1 -1
  35. package/resources/conversations/conversations.d.ts +2 -2
  36. package/resources/conversations/conversations.d.ts.map +1 -1
  37. package/resources/conversations/conversations.js.map +1 -1
  38. package/resources/conversations/conversations.mjs.map +1 -1
  39. package/resources/conversations/index.d.mts +1 -1
  40. package/resources/conversations/index.d.mts.map +1 -1
  41. package/resources/conversations/index.d.ts +1 -1
  42. package/resources/conversations/index.d.ts.map +1 -1
  43. package/resources/conversations/index.js.map +1 -1
  44. package/resources/conversations/index.mjs.map +1 -1
  45. package/resources/conversations/messages.d.mts +12 -16
  46. package/resources/conversations/messages.d.mts.map +1 -1
  47. package/resources/conversations/messages.d.ts +12 -16
  48. package/resources/conversations/messages.d.ts.map +1 -1
  49. package/resources/conversations/messages.js +3 -3
  50. package/resources/conversations/messages.js.map +1 -1
  51. package/resources/conversations/messages.mjs +3 -3
  52. package/resources/conversations/messages.mjs.map +1 -1
  53. package/resources/index.d.mts +1 -4
  54. package/resources/index.d.mts.map +1 -1
  55. package/resources/index.d.ts +1 -4
  56. package/resources/index.d.ts.map +1 -1
  57. package/resources/index.js +1 -7
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +0 -3
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/messages.d.mts +6 -1
  62. package/resources/messages.d.mts.map +1 -1
  63. package/resources/messages.d.ts +6 -1
  64. package/resources/messages.d.ts.map +1 -1
  65. package/resources/messages.js +7 -0
  66. package/resources/messages.js.map +1 -1
  67. package/resources/messages.mjs +7 -0
  68. package/resources/messages.mjs.map +1 -1
  69. package/src/client.ts +2 -79
  70. package/src/resources/agents/agents.ts +210 -37
  71. package/src/resources/agents/index.ts +0 -13
  72. package/src/resources/agents/messages.ts +1 -3
  73. package/src/resources/conversations/conversations.ts +0 -2
  74. package/src/resources/conversations/index.ts +0 -1
  75. package/src/resources/conversations/messages.ts +17 -19
  76. package/src/resources/index.ts +1 -35
  77. package/src/resources/messages.ts +11 -0
  78. package/src/version.ts +1 -1
  79. package/version.d.mts +1 -1
  80. package/version.d.ts +1 -1
  81. package/version.js +1 -1
  82. package/version.mjs +1 -1
  83. package/resources/agents/groups.d.mts +0 -22
  84. package/resources/agents/groups.d.mts.map +0 -1
  85. package/resources/agents/groups.d.ts +0 -22
  86. package/resources/agents/groups.d.ts.map +0 -1
  87. package/resources/agents/groups.js +0 -20
  88. package/resources/agents/groups.js.map +0 -1
  89. package/resources/agents/groups.mjs +0 -16
  90. package/resources/agents/groups.mjs.map +0 -1
  91. package/resources/agents/schedule.d.mts +0 -197
  92. package/resources/agents/schedule.d.mts.map +0 -1
  93. package/resources/agents/schedule.d.ts +0 -197
  94. package/resources/agents/schedule.d.ts.map +0 -1
  95. package/resources/agents/schedule.js +0 -40
  96. package/resources/agents/schedule.js.map +0 -1
  97. package/resources/agents/schedule.mjs +0 -36
  98. package/resources/agents/schedule.mjs.map +0 -1
  99. package/resources/batches/batches.d.mts +0 -240
  100. package/resources/batches/batches.d.mts.map +0 -1
  101. package/resources/batches/batches.d.ts +0 -240
  102. package/resources/batches/batches.d.ts.map +0 -1
  103. package/resources/batches/batches.js +0 -46
  104. package/resources/batches/batches.js.map +0 -1
  105. package/resources/batches/batches.mjs +0 -41
  106. package/resources/batches/batches.mjs.map +0 -1
  107. package/resources/batches/index.d.mts +0 -3
  108. package/resources/batches/index.d.mts.map +0 -1
  109. package/resources/batches/index.d.ts +0 -3
  110. package/resources/batches/index.d.ts.map +0 -1
  111. package/resources/batches/index.js +0 -9
  112. package/resources/batches/index.js.map +0 -1
  113. package/resources/batches/index.mjs +0 -4
  114. package/resources/batches/index.mjs.map +0 -1
  115. package/resources/batches/messages.d.mts +0 -22
  116. package/resources/batches/messages.d.mts.map +0 -1
  117. package/resources/batches/messages.d.ts +0 -22
  118. package/resources/batches/messages.d.ts.map +0 -1
  119. package/resources/batches/messages.js +0 -17
  120. package/resources/batches/messages.js.map +0 -1
  121. package/resources/batches/messages.mjs +0 -13
  122. package/resources/batches/messages.mjs.map +0 -1
  123. package/resources/batches.d.mts +0 -2
  124. package/resources/batches.d.mts.map +0 -1
  125. package/resources/batches.d.ts +0 -2
  126. package/resources/batches.d.ts.map +0 -1
  127. package/resources/batches.js +0 -6
  128. package/resources/batches.js.map +0 -1
  129. package/resources/batches.mjs +0 -3
  130. package/resources/batches.mjs.map +0 -1
  131. package/resources/groups/groups.d.mts +0 -197
  132. package/resources/groups/groups.d.mts.map +0 -1
  133. package/resources/groups/groups.d.ts +0 -197
  134. package/resources/groups/groups.d.ts.map +0 -1
  135. package/resources/groups/groups.js +0 -49
  136. package/resources/groups/groups.js.map +0 -1
  137. package/resources/groups/groups.mjs +0 -44
  138. package/resources/groups/groups.mjs.map +0 -1
  139. package/resources/groups/index.d.mts +0 -3
  140. package/resources/groups/index.d.mts.map +0 -1
  141. package/resources/groups/index.d.ts +0 -3
  142. package/resources/groups/index.d.ts.map +0 -1
  143. package/resources/groups/index.js +0 -9
  144. package/resources/groups/index.js.map +0 -1
  145. package/resources/groups/index.mjs +0 -4
  146. package/resources/groups/index.mjs.map +0 -1
  147. package/resources/groups/messages.d.mts +0 -360
  148. package/resources/groups/messages.d.mts.map +0 -1
  149. package/resources/groups/messages.d.ts +0 -360
  150. package/resources/groups/messages.d.ts.map +0 -1
  151. package/resources/groups/messages.js +0 -54
  152. package/resources/groups/messages.js.map +0 -1
  153. package/resources/groups/messages.mjs +0 -50
  154. package/resources/groups/messages.mjs.map +0 -1
  155. package/resources/groups.d.mts +0 -2
  156. package/resources/groups.d.mts.map +0 -1
  157. package/resources/groups.d.ts +0 -2
  158. package/resources/groups.d.ts.map +0 -1
  159. package/resources/groups.js +0 -6
  160. package/resources/groups.js.map +0 -1
  161. package/resources/groups.mjs +0 -3
  162. package/resources/groups.mjs.map +0 -1
  163. package/resources/identities/agents.d.mts +0 -23
  164. package/resources/identities/agents.d.mts.map +0 -1
  165. package/resources/identities/agents.d.ts +0 -23
  166. package/resources/identities/agents.d.ts.map +0 -1
  167. package/resources/identities/agents.js +0 -17
  168. package/resources/identities/agents.js.map +0 -1
  169. package/resources/identities/agents.mjs +0 -13
  170. package/resources/identities/agents.mjs.map +0 -1
  171. package/resources/identities/blocks.d.mts +0 -18
  172. package/resources/identities/blocks.d.mts.map +0 -1
  173. package/resources/identities/blocks.d.ts +0 -18
  174. package/resources/identities/blocks.d.ts.map +0 -1
  175. package/resources/identities/blocks.js +0 -17
  176. package/resources/identities/blocks.js.map +0 -1
  177. package/resources/identities/blocks.mjs +0 -13
  178. package/resources/identities/blocks.mjs.map +0 -1
  179. package/resources/identities/identities.d.mts +0 -204
  180. package/resources/identities/identities.d.mts.map +0 -1
  181. package/resources/identities/identities.d.ts +0 -204
  182. package/resources/identities/identities.d.ts.map +0 -1
  183. package/resources/identities/identities.js +0 -63
  184. package/resources/identities/identities.js.map +0 -1
  185. package/resources/identities/identities.mjs +0 -58
  186. package/resources/identities/identities.mjs.map +0 -1
  187. package/resources/identities/index.d.mts +0 -5
  188. package/resources/identities/index.d.mts.map +0 -1
  189. package/resources/identities/index.d.ts +0 -5
  190. package/resources/identities/index.d.ts.map +0 -1
  191. package/resources/identities/index.js +0 -13
  192. package/resources/identities/index.js.map +0 -1
  193. package/resources/identities/index.mjs +0 -6
  194. package/resources/identities/index.mjs.map +0 -1
  195. package/resources/identities/properties.d.mts +0 -18
  196. package/resources/identities/properties.d.mts.map +0 -1
  197. package/resources/identities/properties.d.ts +0 -18
  198. package/resources/identities/properties.d.ts.map +0 -1
  199. package/resources/identities/properties.js +0 -17
  200. package/resources/identities/properties.js.map +0 -1
  201. package/resources/identities/properties.mjs +0 -13
  202. package/resources/identities/properties.mjs.map +0 -1
  203. package/resources/identities.d.mts +0 -2
  204. package/resources/identities.d.mts.map +0 -1
  205. package/resources/identities.d.ts +0 -2
  206. package/resources/identities.d.ts.map +0 -1
  207. package/resources/identities.js +0 -6
  208. package/resources/identities.js.map +0 -1
  209. package/resources/identities.mjs +0 -3
  210. package/resources/identities.mjs.map +0 -1
  211. package/src/resources/agents/groups.ts +0 -37
  212. package/src/resources/agents/schedule.ts +0 -361
  213. package/src/resources/batches/batches.ts +0 -317
  214. package/src/resources/batches/index.ts +0 -11
  215. package/src/resources/batches/messages.ts +0 -38
  216. package/src/resources/batches.ts +0 -3
  217. package/src/resources/groups/groups.ts +0 -334
  218. package/src/resources/groups/index.ts +0 -27
  219. package/src/resources/groups/messages.ts +0 -505
  220. package/src/resources/groups.ts +0 -3
  221. package/src/resources/identities/agents.ts +0 -48
  222. package/src/resources/identities/blocks.ts +0 -33
  223. package/src/resources/identities/identities.ts +0 -286
  224. package/src/resources/identities/index.ts +0 -17
  225. package/src/resources/identities/properties.ts +0 -30
  226. package/src/resources/identities.ts +0 -3
@@ -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,
@@ -159,7 +158,6 @@ export declare namespace Conversations {
159
158
 
160
159
  export {
161
160
  Messages as Messages,
162
- type MessageListResponse as MessageListResponse,
163
161
  type MessageStreamResponse as MessageStreamResponse,
164
162
  type MessageCreateParams as MessageCreateParams,
165
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 };
@@ -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,
@@ -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
  */
@@ -94,6 +102,8 @@ export interface MessageSearchResult {
94
102
  vector_rank?: number | null;
95
103
  }
96
104
 
105
+ export type MessageRetrieveResponse = Array<AgentsMessagesAPI.Message>;
106
+
97
107
  export type MessageListResponse = Array<AgentsMessagesAPI.Message>;
98
108
 
99
109
  export type MessageSearchResponse = Array<
@@ -296,6 +306,7 @@ export declare namespace Messages {
296
306
  export {
297
307
  type MessageSearchRequest as MessageSearchRequest,
298
308
  type MessageSearchResult as MessageSearchResult,
309
+ type MessageRetrieveResponse as MessageRetrieveResponse,
299
310
  type MessageListResponse as MessageListResponse,
300
311
  type MessageSearchResponse as MessageSearchResponse,
301
312
  type MessageListParams as MessageListParams,
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '1.6.6'; // 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.6";
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.6";
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.6'; // 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.6'; // 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"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Groups = void 0;
5
- const resource_1 = require("../../core/resource.js");
6
- const pagination_1 = require("../../core/pagination.js");
7
- const path_1 = require("../../internal/utils/path.js");
8
- class Groups extends resource_1.APIResource {
9
- /**
10
- * Lists the groups for an agent.
11
- */
12
- list(agentID, query = {}, options) {
13
- return this._client.getAPIList((0, path_1.path) `/v1/agents/${agentID}/groups`, (pagination_1.ArrayPage), {
14
- query,
15
- ...options,
16
- });
17
- }
18
- }
19
- exports.Groups = Groups;
20
- //# sourceMappingURL=groups.js.map