@letta-ai/letta-client 0.1.200 → 0.1.202

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 (212) hide show
  1. package/api/resources/agents/client/Client.js +11 -11
  2. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  3. package/api/resources/agents/resources/context/client/Client.js +1 -1
  4. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  5. package/api/resources/agents/resources/files/client/Client.js +4 -4
  6. package/api/resources/agents/resources/folders/client/Client.js +3 -3
  7. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  8. package/api/resources/agents/resources/index.d.ts +2 -1
  9. package/api/resources/agents/resources/index.js +3 -2
  10. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  11. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  12. package/api/resources/agents/resources/passages/client/Client.d.ts +20 -0
  13. package/api/resources/agents/resources/passages/client/Client.js +111 -4
  14. package/api/resources/agents/resources/passages/client/requests/PassagesSearchRequest.d.ts +36 -0
  15. package/api/resources/agents/resources/passages/client/requests/PassagesSearchRequest.js +5 -0
  16. package/api/resources/agents/resources/passages/client/requests/index.d.ts +1 -0
  17. package/api/resources/agents/resources/passages/index.d.ts +1 -0
  18. package/api/resources/agents/resources/passages/index.js +1 -0
  19. package/api/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.d.ts +11 -0
  20. package/api/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.js +10 -0
  21. package/api/resources/agents/resources/passages/types/index.d.ts +1 -0
  22. package/api/resources/agents/resources/passages/types/index.js +17 -0
  23. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  24. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  25. package/api/resources/agents/resources/tools/client/Client.js +4 -4
  26. package/api/resources/batches/client/Client.js +4 -4
  27. package/api/resources/blocks/client/Client.js +6 -6
  28. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  29. package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  30. package/api/resources/embeddingModels/client/Client.js +1 -1
  31. package/api/resources/folders/client/Client.js +9 -9
  32. package/api/resources/folders/resources/files/client/Client.js +3 -3
  33. package/api/resources/folders/resources/passages/client/Client.js +1 -1
  34. package/api/resources/groups/client/Client.js +6 -6
  35. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  36. package/api/resources/health/client/Client.js +1 -1
  37. package/api/resources/identities/client/Client.js +7 -7
  38. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  39. package/api/resources/jobs/client/Client.js +5 -5
  40. package/api/resources/messages/client/Client.js +1 -1
  41. package/api/resources/models/client/Client.js +2 -2
  42. package/api/resources/projects/client/Client.js +1 -1
  43. package/api/resources/providers/client/Client.js +6 -6
  44. package/api/resources/runs/client/Client.js +5 -5
  45. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  46. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  47. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  48. package/api/resources/sources/client/Client.js +10 -10
  49. package/api/resources/sources/resources/files/client/Client.js +3 -3
  50. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  51. package/api/resources/steps/client/Client.js +3 -3
  52. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  53. package/api/resources/tags/client/Client.js +1 -1
  54. package/api/resources/telemetry/client/Client.js +1 -1
  55. package/api/resources/templates/client/Client.js +8 -8
  56. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  57. package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +1 -0
  58. package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.d.ts +14 -0
  59. package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.js +16 -0
  60. package/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +1 -1
  61. package/api/resources/templates/types/index.d.ts +1 -0
  62. package/api/resources/templates/types/index.js +1 -0
  63. package/api/resources/tools/client/Client.js +103 -24
  64. package/api/resources/tools/client/requests/ToolsCountRequest.d.ts +27 -2
  65. package/api/resources/tools/client/requests/ToolsListRequest.d.ts +24 -0
  66. package/api/resources/voice/client/Client.js +1 -1
  67. package/api/types/ArchivalMemorySearchResponse.d.ts +10 -0
  68. package/api/types/ArchivalMemorySearchResponse.js +5 -0
  69. package/api/types/ArchivalMemorySearchResult.d.ts +11 -0
  70. package/api/types/ArchivalMemorySearchResult.js +5 -0
  71. package/api/types/UpdateSsemcpServer.d.ts +0 -2
  72. package/api/types/UpdateStdioMcpServer.d.ts +0 -2
  73. package/api/types/UpdateStreamableHttpmcpServer.d.ts +0 -2
  74. package/api/types/index.d.ts +2 -0
  75. package/api/types/index.js +2 -0
  76. package/dist/api/resources/agents/client/Client.js +11 -11
  77. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  78. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  79. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  80. package/dist/api/resources/agents/resources/files/client/Client.js +4 -4
  81. package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
  82. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  83. package/dist/api/resources/agents/resources/index.d.ts +2 -1
  84. package/dist/api/resources/agents/resources/index.js +3 -2
  85. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  86. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  87. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +20 -0
  88. package/dist/api/resources/agents/resources/passages/client/Client.js +111 -4
  89. package/dist/api/resources/agents/resources/passages/client/requests/PassagesSearchRequest.d.ts +36 -0
  90. package/dist/api/resources/agents/resources/passages/client/requests/PassagesSearchRequest.js +5 -0
  91. package/dist/api/resources/agents/resources/passages/client/requests/index.d.ts +1 -0
  92. package/dist/api/resources/agents/resources/passages/index.d.ts +1 -0
  93. package/dist/api/resources/agents/resources/passages/index.js +1 -0
  94. package/dist/api/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.d.ts +11 -0
  95. package/dist/api/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.js +10 -0
  96. package/dist/api/resources/agents/resources/passages/types/index.d.ts +1 -0
  97. package/dist/api/resources/agents/resources/passages/types/index.js +17 -0
  98. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  99. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  100. package/dist/api/resources/agents/resources/tools/client/Client.js +4 -4
  101. package/dist/api/resources/batches/client/Client.js +4 -4
  102. package/dist/api/resources/blocks/client/Client.js +6 -6
  103. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  104. package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  105. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  106. package/dist/api/resources/folders/client/Client.js +9 -9
  107. package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
  108. package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
  109. package/dist/api/resources/groups/client/Client.js +6 -6
  110. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  111. package/dist/api/resources/health/client/Client.js +1 -1
  112. package/dist/api/resources/identities/client/Client.js +7 -7
  113. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  114. package/dist/api/resources/jobs/client/Client.js +5 -5
  115. package/dist/api/resources/messages/client/Client.js +1 -1
  116. package/dist/api/resources/models/client/Client.js +2 -2
  117. package/dist/api/resources/projects/client/Client.js +1 -1
  118. package/dist/api/resources/providers/client/Client.js +6 -6
  119. package/dist/api/resources/runs/client/Client.js +5 -5
  120. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  121. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  122. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  123. package/dist/api/resources/sources/client/Client.js +10 -10
  124. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  125. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  126. package/dist/api/resources/steps/client/Client.js +3 -3
  127. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  128. package/dist/api/resources/tags/client/Client.js +1 -1
  129. package/dist/api/resources/telemetry/client/Client.js +1 -1
  130. package/dist/api/resources/templates/client/Client.js +8 -8
  131. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  132. package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +1 -0
  133. package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.d.ts +14 -0
  134. package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.js +16 -0
  135. package/dist/api/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +1 -1
  136. package/dist/api/resources/templates/types/index.d.ts +1 -0
  137. package/dist/api/resources/templates/types/index.js +1 -0
  138. package/dist/api/resources/tools/client/Client.js +103 -24
  139. package/dist/api/resources/tools/client/requests/ToolsCountRequest.d.ts +27 -2
  140. package/dist/api/resources/tools/client/requests/ToolsListRequest.d.ts +24 -0
  141. package/dist/api/resources/voice/client/Client.js +1 -1
  142. package/dist/api/types/ArchivalMemorySearchResponse.d.ts +10 -0
  143. package/dist/api/types/ArchivalMemorySearchResponse.js +5 -0
  144. package/dist/api/types/ArchivalMemorySearchResult.d.ts +11 -0
  145. package/dist/api/types/ArchivalMemorySearchResult.js +5 -0
  146. package/dist/api/types/UpdateSsemcpServer.d.ts +0 -2
  147. package/dist/api/types/UpdateStdioMcpServer.d.ts +0 -2
  148. package/dist/api/types/UpdateStreamableHttpmcpServer.d.ts +0 -2
  149. package/dist/api/types/index.d.ts +2 -0
  150. package/dist/api/types/index.js +2 -0
  151. package/dist/serialization/resources/agents/resources/index.d.ts +2 -1
  152. package/dist/serialization/resources/agents/resources/index.js +3 -2
  153. package/dist/serialization/resources/agents/resources/passages/index.d.ts +1 -0
  154. package/dist/serialization/resources/agents/resources/passages/index.js +1 -0
  155. package/dist/serialization/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.d.ts +10 -0
  156. package/dist/serialization/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.js +41 -0
  157. package/dist/serialization/resources/agents/resources/passages/types/index.d.ts +1 -0
  158. package/dist/serialization/resources/agents/resources/passages/types/index.js +17 -0
  159. package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +2 -0
  160. package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.js +2 -0
  161. package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.d.ts +10 -0
  162. package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.js +50 -0
  163. package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +1 -1
  164. package/dist/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.js +1 -1
  165. package/dist/serialization/resources/templates/types/index.d.ts +1 -0
  166. package/dist/serialization/resources/templates/types/index.js +1 -0
  167. package/dist/serialization/types/ArchivalMemorySearchResponse.d.ts +14 -0
  168. package/dist/serialization/types/ArchivalMemorySearchResponse.js +45 -0
  169. package/dist/serialization/types/ArchivalMemorySearchResult.d.ts +14 -0
  170. package/dist/serialization/types/ArchivalMemorySearchResult.js +45 -0
  171. package/dist/serialization/types/UpdateSsemcpServer.d.ts +0 -1
  172. package/dist/serialization/types/UpdateSsemcpServer.js +0 -1
  173. package/dist/serialization/types/UpdateStdioMcpServer.d.ts +0 -1
  174. package/dist/serialization/types/UpdateStdioMcpServer.js +0 -1
  175. package/dist/serialization/types/UpdateStreamableHttpmcpServer.d.ts +0 -1
  176. package/dist/serialization/types/UpdateStreamableHttpmcpServer.js +0 -1
  177. package/dist/serialization/types/index.d.ts +2 -0
  178. package/dist/serialization/types/index.js +2 -0
  179. package/dist/version.d.ts +1 -1
  180. package/dist/version.js +1 -1
  181. package/package.json +1 -1
  182. package/reference.md +77 -0
  183. package/serialization/resources/agents/resources/index.d.ts +2 -1
  184. package/serialization/resources/agents/resources/index.js +3 -2
  185. package/serialization/resources/agents/resources/passages/index.d.ts +1 -0
  186. package/serialization/resources/agents/resources/passages/index.js +1 -0
  187. package/serialization/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.d.ts +10 -0
  188. package/serialization/resources/agents/resources/passages/types/PassagesSearchRequestTagMatchMode.js +41 -0
  189. package/serialization/resources/agents/resources/passages/types/index.d.ts +1 -0
  190. package/serialization/resources/agents/resources/passages/types/index.js +17 -0
  191. package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.d.ts +2 -0
  192. package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItem.js +2 -0
  193. package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.d.ts +10 -0
  194. package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseAgentsItemAgentType.js +50 -0
  195. package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.d.ts +1 -1
  196. package/serialization/resources/templates/types/TemplatesGetTemplateSnapshotResponseConfiguration.js +1 -1
  197. package/serialization/resources/templates/types/index.d.ts +1 -0
  198. package/serialization/resources/templates/types/index.js +1 -0
  199. package/serialization/types/ArchivalMemorySearchResponse.d.ts +14 -0
  200. package/serialization/types/ArchivalMemorySearchResponse.js +45 -0
  201. package/serialization/types/ArchivalMemorySearchResult.d.ts +14 -0
  202. package/serialization/types/ArchivalMemorySearchResult.js +45 -0
  203. package/serialization/types/UpdateSsemcpServer.d.ts +0 -1
  204. package/serialization/types/UpdateSsemcpServer.js +0 -1
  205. package/serialization/types/UpdateStdioMcpServer.d.ts +0 -1
  206. package/serialization/types/UpdateStdioMcpServer.js +0 -1
  207. package/serialization/types/UpdateStreamableHttpmcpServer.d.ts +0 -1
  208. package/serialization/types/UpdateStreamableHttpmcpServer.js +0 -1
  209. package/serialization/types/index.d.ts +2 -0
  210. package/serialization/types/index.js +2 -0
  211. package/version.d.ts +1 -1
  212. package/version.js +1 -1
@@ -99,7 +99,7 @@ class Passages {
99
99
  method: "GET",
100
100
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
101
101
  ? yield core.Supplier.get(this._options.project)
102
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
102
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
103
103
  contentType: "application/json",
104
104
  queryParameters: _queryParams,
105
105
  requestType: "json",
@@ -179,7 +179,7 @@ class Passages {
179
179
  method: "POST",
180
180
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
181
181
  ? yield core.Supplier.get(this._options.project)
182
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
182
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
183
183
  contentType: "application/json",
184
184
  requestType: "json",
185
185
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -234,6 +234,113 @@ class Passages {
234
234
  }
235
235
  });
236
236
  }
237
+ /**
238
+ * Search archival memory using semantic (embedding-based) search with optional temporal filtering.
239
+ *
240
+ * This endpoint allows manual triggering of archival memory searches, enabling users to query
241
+ * an agent's archival memory store directly via the API. The search uses the same functionality
242
+ * as the agent's archival_memory_search tool but is accessible for external API usage.
243
+ *
244
+ * @param {string} agentId
245
+ * @param {Letta.agents.PassagesSearchRequest} request
246
+ * @param {Passages.RequestOptions} requestOptions - Request-specific configuration.
247
+ *
248
+ * @throws {@link Letta.UnprocessableEntityError}
249
+ *
250
+ * @example
251
+ * await client.agents.passages.search("agent_id", {
252
+ * query: "query"
253
+ * })
254
+ */
255
+ search(agentId, request, requestOptions) {
256
+ return core.HttpResponsePromise.fromPromise(this.__search(agentId, request, requestOptions));
257
+ }
258
+ __search(agentId, request, requestOptions) {
259
+ return __awaiter(this, void 0, void 0, function* () {
260
+ var _a, _b, _c;
261
+ const { query, tags, tagMatchMode, topK, startDatetime, endDatetime } = request;
262
+ const _queryParams = {};
263
+ _queryParams["query"] = query;
264
+ if (tags != null) {
265
+ if (Array.isArray(tags)) {
266
+ _queryParams["tags"] = tags.map((item) => item);
267
+ }
268
+ else {
269
+ _queryParams["tags"] = tags;
270
+ }
271
+ }
272
+ if (tagMatchMode != null) {
273
+ _queryParams["tag_match_mode"] = serializers.agents.PassagesSearchRequestTagMatchMode.jsonOrThrow(tagMatchMode, { unrecognizedObjectKeys: "strip" });
274
+ }
275
+ if (topK != null) {
276
+ _queryParams["top_k"] = topK.toString();
277
+ }
278
+ if (startDatetime != null) {
279
+ _queryParams["start_datetime"] = startDatetime;
280
+ }
281
+ if (endDatetime != null) {
282
+ _queryParams["end_datetime"] = endDatetime;
283
+ }
284
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
285
+ url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/search`),
286
+ method: "GET",
287
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
288
+ ? yield core.Supplier.get(this._options.project)
289
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
290
+ contentType: "application/json",
291
+ queryParameters: _queryParams,
292
+ requestType: "json",
293
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
294
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
295
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
296
+ });
297
+ if (_response.ok) {
298
+ return {
299
+ data: serializers.ArchivalMemorySearchResponse.parseOrThrow(_response.body, {
300
+ unrecognizedObjectKeys: "passthrough",
301
+ allowUnrecognizedUnionMembers: true,
302
+ allowUnrecognizedEnumValues: true,
303
+ skipValidation: true,
304
+ breadcrumbsPrefix: ["response"],
305
+ }),
306
+ rawResponse: _response.rawResponse,
307
+ };
308
+ }
309
+ if (_response.error.reason === "status-code") {
310
+ switch (_response.error.statusCode) {
311
+ case 422:
312
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
313
+ unrecognizedObjectKeys: "passthrough",
314
+ allowUnrecognizedUnionMembers: true,
315
+ allowUnrecognizedEnumValues: true,
316
+ skipValidation: true,
317
+ breadcrumbsPrefix: ["response"],
318
+ }), _response.rawResponse);
319
+ default:
320
+ throw new errors.LettaError({
321
+ statusCode: _response.error.statusCode,
322
+ body: _response.error.body,
323
+ rawResponse: _response.rawResponse,
324
+ });
325
+ }
326
+ }
327
+ switch (_response.error.reason) {
328
+ case "non-json":
329
+ throw new errors.LettaError({
330
+ statusCode: _response.error.statusCode,
331
+ body: _response.error.rawBody,
332
+ rawResponse: _response.rawResponse,
333
+ });
334
+ case "timeout":
335
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/archival-memory/search.");
336
+ case "unknown":
337
+ throw new errors.LettaError({
338
+ message: _response.error.errorMessage,
339
+ rawResponse: _response.rawResponse,
340
+ });
341
+ }
342
+ });
343
+ }
237
344
  /**
238
345
  * Delete a memory from an agent's archival memory store.
239
346
  *
@@ -257,7 +364,7 @@ class Passages {
257
364
  method: "DELETE",
258
365
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
259
366
  ? yield core.Supplier.get(this._options.project)
260
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
367
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
261
368
  contentType: "application/json",
262
369
  requestType: "json",
263
370
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -321,7 +428,7 @@ class Passages {
321
428
  method: "PATCH",
322
429
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
323
430
  ? yield core.Supplier.get(this._options.project)
324
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
431
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
325
432
  contentType: "application/json",
326
433
  requestType: "json",
327
434
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,36 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * query: "query"
9
+ * }
10
+ */
11
+ export interface PassagesSearchRequest {
12
+ /**
13
+ * String to search for using semantic similarity
14
+ */
15
+ query: string;
16
+ /**
17
+ * Optional list of tags to filter search results
18
+ */
19
+ tags?: string | string[];
20
+ /**
21
+ * How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags
22
+ */
23
+ tagMatchMode?: Letta.agents.PassagesSearchRequestTagMatchMode;
24
+ /**
25
+ * Maximum number of results to return. Uses system default if not specified
26
+ */
27
+ topK?: number;
28
+ /**
29
+ * Filter results to passages created after this datetime. ISO 8601 format
30
+ */
31
+ startDatetime?: string;
32
+ /**
33
+ * Filter results to passages created before this datetime. ISO 8601 format
34
+ */
35
+ endDatetime?: string;
36
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,3 @@
1
1
  export { type PassagesListRequest } from "./PassagesListRequest";
2
2
  export { type CreateArchivalMemory } from "./CreateArchivalMemory";
3
+ export { type PassagesSearchRequest } from "./PassagesSearchRequest";
@@ -1 +1,2 @@
1
+ export * from "./types";
1
2
  export * from "./client";
@@ -14,4 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
17
18
  __exportStar(require("./client"), exports);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * How to match tags - 'any' to match passages with any of the tags, 'all' to match only passages with all tags
6
+ */
7
+ export type PassagesSearchRequestTagMatchMode = "any" | "all";
8
+ export declare const PassagesSearchRequestTagMatchMode: {
9
+ readonly Any: "any";
10
+ readonly All: "all";
11
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PassagesSearchRequestTagMatchMode = void 0;
7
+ exports.PassagesSearchRequestTagMatchMode = {
8
+ Any: "any",
9
+ All: "all",
10
+ };
@@ -0,0 +1 @@
1
+ export * from "./PassagesSearchRequestTagMatchMode";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PassagesSearchRequestTagMatchMode"), exports);
@@ -82,7 +82,7 @@ class Sources {
82
82
  method: "PATCH",
83
83
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
84
84
  ? yield core.Supplier.get(this._options.project)
85
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
86
  contentType: "application/json",
87
87
  requestType: "json",
88
88
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -159,7 +159,7 @@ class Sources {
159
159
  method: "PATCH",
160
160
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
161
161
  ? yield core.Supplier.get(this._options.project)
162
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
162
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
163
163
  contentType: "application/json",
164
164
  requestType: "json",
165
165
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -235,7 +235,7 @@ class Sources {
235
235
  method: "GET",
236
236
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
237
237
  ? yield core.Supplier.get(this._options.project)
238
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
238
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
239
  contentType: "application/json",
240
240
  requestType: "json",
241
241
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -84,7 +84,7 @@ class Templates {
84
84
  method: "POST",
85
85
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
86
86
  ? yield core.Supplier.get(this._options.project)
87
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
88
  contentType: "application/json",
89
89
  requestType: "json",
90
90
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -150,7 +150,7 @@ class Templates {
150
150
  method: "POST",
151
151
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
152
152
  ? yield core.Supplier.get(this._options.project)
153
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
153
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
154
154
  contentType: "application/json",
155
155
  requestType: "json",
156
156
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -206,7 +206,7 @@ class Templates {
206
206
  method: "POST",
207
207
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
208
208
  ? yield core.Supplier.get(this._options.project)
209
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
209
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
210
210
  contentType: "application/json",
211
211
  requestType: "json",
212
212
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -81,7 +81,7 @@ class Tools {
81
81
  method: "GET",
82
82
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
83
83
  ? yield core.Supplier.get(this._options.project)
84
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
85
  contentType: "application/json",
86
86
  requestType: "json",
87
87
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -158,7 +158,7 @@ class Tools {
158
158
  method: "PATCH",
159
159
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
160
160
  ? yield core.Supplier.get(this._options.project)
161
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
161
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
162
162
  contentType: "application/json",
163
163
  requestType: "json",
164
164
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -235,7 +235,7 @@ class Tools {
235
235
  method: "PATCH",
236
236
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
237
237
  ? yield core.Supplier.get(this._options.project)
238
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
238
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
239
  contentType: "application/json",
240
240
  requestType: "json",
241
241
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -318,7 +318,7 @@ class Tools {
318
318
  method: "PATCH",
319
319
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
320
320
  ? yield core.Supplier.get(this._options.project)
321
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
321
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
322
322
  contentType: "application/json",
323
323
  queryParameters: _queryParams,
324
324
  requestType: "json",
@@ -80,7 +80,7 @@ class Batches {
80
80
  method: "GET",
81
81
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
82
82
  ? yield core.Supplier.get(this._options.project)
83
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  requestType: "json",
86
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -168,7 +168,7 @@ class Batches {
168
168
  method: "POST",
169
169
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
170
170
  ? yield core.Supplier.get(this._options.project)
171
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
171
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
172
172
  contentType: "application/json",
173
173
  requestType: "json",
174
174
  body: serializers.CreateBatch.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -245,7 +245,7 @@ class Batches {
245
245
  method: "GET",
246
246
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
247
247
  ? yield core.Supplier.get(this._options.project)
248
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
248
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
249
249
  contentType: "application/json",
250
250
  requestType: "json",
251
251
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -321,7 +321,7 @@ class Batches {
321
321
  method: "PATCH",
322
322
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
323
323
  ? yield core.Supplier.get(this._options.project)
324
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
324
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
325
325
  contentType: "application/json",
326
326
  requestType: "json",
327
327
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -141,7 +141,7 @@ class Blocks {
141
141
  method: "GET",
142
142
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
143
143
  ? yield core.Supplier.get(this._options.project)
144
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
144
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
145
145
  contentType: "application/json",
146
146
  queryParameters: _queryParams,
147
147
  requestType: "json",
@@ -219,7 +219,7 @@ class Blocks {
219
219
  method: "POST",
220
220
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
221
221
  ? yield core.Supplier.get(this._options.project)
222
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
222
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
223
223
  contentType: "application/json",
224
224
  requestType: "json",
225
225
  body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -295,7 +295,7 @@ class Blocks {
295
295
  method: "GET",
296
296
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
297
297
  ? yield core.Supplier.get(this._options.project)
298
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
298
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
299
299
  contentType: "application/json",
300
300
  requestType: "json",
301
301
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -369,7 +369,7 @@ class Blocks {
369
369
  method: "GET",
370
370
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
371
371
  ? yield core.Supplier.get(this._options.project)
372
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
372
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
373
373
  contentType: "application/json",
374
374
  requestType: "json",
375
375
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -443,7 +443,7 @@ class Blocks {
443
443
  method: "DELETE",
444
444
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
445
445
  ? yield core.Supplier.get(this._options.project)
446
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
446
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
447
447
  contentType: "application/json",
448
448
  requestType: "json",
449
449
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -509,7 +509,7 @@ class Blocks {
509
509
  method: "PATCH",
510
510
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
511
511
  ? yield core.Supplier.get(this._options.project)
512
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
512
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
513
513
  contentType: "application/json",
514
514
  requestType: "json",
515
515
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -93,7 +93,7 @@ class Agents {
93
93
  method: "GET",
94
94
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
95
95
  ? yield core.Supplier.get(this._options.project)
96
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
96
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
97
97
  contentType: "application/json",
98
98
  queryParameters: _queryParams,
99
99
  requestType: "json",
@@ -92,7 +92,7 @@ class ClientSideAccessTokens {
92
92
  method: "GET",
93
93
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
94
94
  ? yield core.Supplier.get(this._options.project)
95
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
95
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
96
96
  contentType: "application/json",
97
97
  queryParameters: _queryParams,
98
98
  requestType: "json",
@@ -170,7 +170,7 @@ class ClientSideAccessTokens {
170
170
  method: "POST",
171
171
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
172
172
  ? yield core.Supplier.get(this._options.project)
173
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
173
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
174
174
  contentType: "application/json",
175
175
  requestType: "json",
176
176
  body: serializers.ClientSideAccessTokensCreateRequest.jsonOrThrow(request, {
@@ -246,7 +246,7 @@ class ClientSideAccessTokens {
246
246
  method: "DELETE",
247
247
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
248
248
  ? yield core.Supplier.get(this._options.project)
249
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
249
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
250
250
  contentType: "application/json",
251
251
  requestType: "json",
252
252
  body: request,
@@ -80,7 +80,7 @@ class EmbeddingModels {
80
80
  method: "GET",
81
81
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
82
82
  ? yield core.Supplier.get(this._options.project)
83
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.200", "User-Agent": "@letta-ai/letta-client/0.1.200", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
83
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.202", "User-Agent": "@letta-ai/letta-client/0.1.202", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  requestType: "json",
86
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,