@letta-ai/letta-client 0.1.103 → 0.1.105

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 (170) hide show
  1. package/api/resources/agents/client/Client.d.ts +11 -0
  2. package/api/resources/agents/client/Client.js +72 -8
  3. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  4. package/api/resources/agents/resources/context/client/Client.js +1 -1
  5. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  6. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  7. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  8. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  9. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  10. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  11. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  12. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  13. package/api/resources/batches/client/Client.js +4 -4
  14. package/api/resources/blocks/client/Client.js +5 -5
  15. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  16. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  17. package/api/resources/embeddings/client/Client.js +1 -1
  18. package/api/resources/groups/client/Client.js +5 -5
  19. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  20. package/api/resources/health/client/Client.js +1 -1
  21. package/api/resources/identities/client/Client.d.ts +11 -0
  22. package/api/resources/identities/client/Client.js +70 -6
  23. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  24. package/api/resources/jobs/client/Client.js +4 -4
  25. package/api/resources/models/client/Client.js +1 -1
  26. package/api/resources/projects/client/Client.js +1 -1
  27. package/api/resources/providers/client/Client.js +4 -4
  28. package/api/resources/runs/client/Client.js +4 -4
  29. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  30. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  31. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  32. package/api/resources/sources/client/Client.d.ts +11 -0
  33. package/api/resources/sources/client/Client.js +70 -6
  34. package/api/resources/sources/resources/files/client/Client.js +3 -3
  35. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  36. package/api/resources/steps/client/Client.js +3 -3
  37. package/api/resources/tags/client/Client.js +1 -1
  38. package/api/resources/templates/client/Client.js +1 -1
  39. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  40. package/api/resources/tools/client/Client.d.ts +12 -0
  41. package/api/resources/tools/client/Client.js +87 -16
  42. package/api/resources/tools/client/requests/ToolsCountRequest.d.ts +13 -0
  43. package/api/resources/tools/client/requests/ToolsCountRequest.js +5 -0
  44. package/api/resources/tools/client/requests/index.d.ts +1 -0
  45. package/api/resources/voice/client/Client.js +1 -1
  46. package/api/types/MessageCreate.d.ts +2 -0
  47. package/api/types/OmittedReasoningContent.d.ts +0 -2
  48. package/api/types/UsageStatistics.d.ts +3 -0
  49. package/api/types/UsageStatisticsCompletionTokenDetails.d.ts +6 -0
  50. package/api/types/UsageStatisticsCompletionTokenDetails.js +5 -0
  51. package/api/types/UsageStatisticsPromptTokenDetails.d.ts +6 -0
  52. package/api/types/UsageStatisticsPromptTokenDetails.js +5 -0
  53. package/api/types/index.d.ts +2 -0
  54. package/api/types/index.js +2 -0
  55. package/dist/api/resources/agents/client/Client.d.ts +11 -0
  56. package/dist/api/resources/agents/client/Client.js +72 -8
  57. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  58. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  59. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  60. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  61. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  62. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  63. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  64. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  65. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  66. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  67. package/dist/api/resources/batches/client/Client.js +4 -4
  68. package/dist/api/resources/blocks/client/Client.js +5 -5
  69. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  70. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  71. package/dist/api/resources/embeddings/client/Client.js +1 -1
  72. package/dist/api/resources/groups/client/Client.js +5 -5
  73. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  74. package/dist/api/resources/health/client/Client.js +1 -1
  75. package/dist/api/resources/identities/client/Client.d.ts +11 -0
  76. package/dist/api/resources/identities/client/Client.js +70 -6
  77. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  78. package/dist/api/resources/jobs/client/Client.js +4 -4
  79. package/dist/api/resources/models/client/Client.js +1 -1
  80. package/dist/api/resources/projects/client/Client.js +1 -1
  81. package/dist/api/resources/providers/client/Client.js +4 -4
  82. package/dist/api/resources/runs/client/Client.js +4 -4
  83. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  84. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  85. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  86. package/dist/api/resources/sources/client/Client.d.ts +11 -0
  87. package/dist/api/resources/sources/client/Client.js +70 -6
  88. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  89. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  90. package/dist/api/resources/steps/client/Client.js +3 -3
  91. package/dist/api/resources/tags/client/Client.js +1 -1
  92. package/dist/api/resources/templates/client/Client.js +1 -1
  93. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  94. package/dist/api/resources/tools/client/Client.d.ts +12 -0
  95. package/dist/api/resources/tools/client/Client.js +87 -16
  96. package/dist/api/resources/tools/client/requests/ToolsCountRequest.d.ts +13 -0
  97. package/dist/api/resources/tools/client/requests/ToolsCountRequest.js +5 -0
  98. package/dist/api/resources/tools/client/requests/index.d.ts +1 -0
  99. package/dist/api/resources/voice/client/Client.js +1 -1
  100. package/dist/api/types/MessageCreate.d.ts +2 -0
  101. package/dist/api/types/OmittedReasoningContent.d.ts +0 -2
  102. package/dist/api/types/UsageStatistics.d.ts +3 -0
  103. package/dist/api/types/UsageStatisticsCompletionTokenDetails.d.ts +6 -0
  104. package/dist/api/types/UsageStatisticsCompletionTokenDetails.js +5 -0
  105. package/dist/api/types/UsageStatisticsPromptTokenDetails.d.ts +6 -0
  106. package/dist/api/types/UsageStatisticsPromptTokenDetails.js +5 -0
  107. package/dist/api/types/index.d.ts +2 -0
  108. package/dist/api/types/index.js +2 -0
  109. package/dist/serialization/resources/agents/client/count.d.ts +9 -0
  110. package/dist/serialization/resources/agents/client/count.js +41 -0
  111. package/dist/serialization/resources/agents/client/index.d.ts +1 -0
  112. package/dist/serialization/resources/agents/client/index.js +2 -1
  113. package/dist/serialization/resources/identities/client/count.d.ts +9 -0
  114. package/dist/serialization/resources/identities/client/count.js +41 -0
  115. package/dist/serialization/resources/identities/client/index.d.ts +1 -0
  116. package/dist/serialization/resources/identities/client/index.js +2 -1
  117. package/dist/serialization/resources/sources/client/count.d.ts +9 -0
  118. package/dist/serialization/resources/sources/client/count.js +41 -0
  119. package/dist/serialization/resources/sources/client/index.d.ts +1 -0
  120. package/dist/serialization/resources/sources/client/index.js +2 -1
  121. package/dist/serialization/resources/tools/client/count.d.ts +9 -0
  122. package/dist/serialization/resources/tools/client/count.js +41 -0
  123. package/dist/serialization/resources/tools/client/index.d.ts +1 -0
  124. package/dist/serialization/resources/tools/client/index.js +2 -1
  125. package/dist/serialization/types/MessageCreate.d.ts +1 -0
  126. package/dist/serialization/types/MessageCreate.js +1 -0
  127. package/dist/serialization/types/OmittedReasoningContent.d.ts +0 -1
  128. package/dist/serialization/types/OmittedReasoningContent.js +0 -1
  129. package/dist/serialization/types/UsageStatistics.d.ts +4 -0
  130. package/dist/serialization/types/UsageStatistics.js +4 -0
  131. package/dist/serialization/types/UsageStatisticsCompletionTokenDetails.d.ts +12 -0
  132. package/dist/serialization/types/UsageStatisticsCompletionTokenDetails.js +43 -0
  133. package/dist/serialization/types/UsageStatisticsPromptTokenDetails.d.ts +12 -0
  134. package/dist/serialization/types/UsageStatisticsPromptTokenDetails.js +43 -0
  135. package/dist/serialization/types/index.d.ts +2 -0
  136. package/dist/serialization/types/index.js +2 -0
  137. package/dist/version.d.ts +1 -1
  138. package/dist/version.js +1 -1
  139. package/package.json +1 -1
  140. package/reference.md +228 -0
  141. package/serialization/resources/agents/client/count.d.ts +9 -0
  142. package/serialization/resources/agents/client/count.js +41 -0
  143. package/serialization/resources/agents/client/index.d.ts +1 -0
  144. package/serialization/resources/agents/client/index.js +2 -1
  145. package/serialization/resources/identities/client/count.d.ts +9 -0
  146. package/serialization/resources/identities/client/count.js +41 -0
  147. package/serialization/resources/identities/client/index.d.ts +1 -0
  148. package/serialization/resources/identities/client/index.js +2 -1
  149. package/serialization/resources/sources/client/count.d.ts +9 -0
  150. package/serialization/resources/sources/client/count.js +41 -0
  151. package/serialization/resources/sources/client/index.d.ts +1 -0
  152. package/serialization/resources/sources/client/index.js +2 -1
  153. package/serialization/resources/tools/client/count.d.ts +9 -0
  154. package/serialization/resources/tools/client/count.js +41 -0
  155. package/serialization/resources/tools/client/index.d.ts +1 -0
  156. package/serialization/resources/tools/client/index.js +2 -1
  157. package/serialization/types/MessageCreate.d.ts +1 -0
  158. package/serialization/types/MessageCreate.js +1 -0
  159. package/serialization/types/OmittedReasoningContent.d.ts +0 -1
  160. package/serialization/types/OmittedReasoningContent.js +0 -1
  161. package/serialization/types/UsageStatistics.d.ts +4 -0
  162. package/serialization/types/UsageStatistics.js +4 -0
  163. package/serialization/types/UsageStatisticsCompletionTokenDetails.d.ts +12 -0
  164. package/serialization/types/UsageStatisticsCompletionTokenDetails.js +43 -0
  165. package/serialization/types/UsageStatisticsPromptTokenDetails.d.ts +12 -0
  166. package/serialization/types/UsageStatisticsPromptTokenDetails.js +43 -0
  167. package/serialization/types/index.d.ts +2 -0
  168. package/serialization/types/index.js +2 -0
  169. package/version.d.ts +1 -1
  170. package/version.js +1 -1
@@ -76,7 +76,7 @@ class Tools {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  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/tools/${encodeURIComponent(toolId)}`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
80
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -141,7 +141,7 @@ class Tools {
141
141
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
142
142
  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/tools/${encodeURIComponent(toolId)}`),
143
143
  method: "DELETE",
144
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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
  requestType: "json",
147
147
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -201,7 +201,7 @@ class Tools {
201
201
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
202
202
  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/tools/${encodeURIComponent(toolId)}`),
203
203
  method: "PATCH",
204
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
204
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
205
205
  contentType: "application/json",
206
206
  requestType: "json",
207
207
  body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -250,6 +250,77 @@ class Tools {
250
250
  }
251
251
  });
252
252
  }
253
+ /**
254
+ * Get a count of all tools available to agents belonging to the org of the user.
255
+ *
256
+ * @param {Letta.ToolsCountRequest} request
257
+ * @param {Tools.RequestOptions} requestOptions - Request-specific configuration.
258
+ *
259
+ * @throws {@link Letta.UnprocessableEntityError}
260
+ *
261
+ * @example
262
+ * await client.tools.count()
263
+ */
264
+ count() {
265
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
266
+ var _a, _b, _c;
267
+ const { includeBaseTools } = request;
268
+ const _queryParams = {};
269
+ if (includeBaseTools != null) {
270
+ _queryParams["include_base_tools"] = includeBaseTools.toString();
271
+ }
272
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
273
+ 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/tools/count"),
274
+ method: "GET",
275
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
276
+ contentType: "application/json",
277
+ queryParameters: _queryParams,
278
+ requestType: "json",
279
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
280
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
281
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
282
+ });
283
+ if (_response.ok) {
284
+ return serializers.tools.count.Response.parseOrThrow(_response.body, {
285
+ unrecognizedObjectKeys: "passthrough",
286
+ allowUnrecognizedUnionMembers: true,
287
+ allowUnrecognizedEnumValues: true,
288
+ skipValidation: true,
289
+ breadcrumbsPrefix: ["response"],
290
+ });
291
+ }
292
+ if (_response.error.reason === "status-code") {
293
+ switch (_response.error.statusCode) {
294
+ case 422:
295
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
296
+ unrecognizedObjectKeys: "passthrough",
297
+ allowUnrecognizedUnionMembers: true,
298
+ allowUnrecognizedEnumValues: true,
299
+ skipValidation: true,
300
+ breadcrumbsPrefix: ["response"],
301
+ }));
302
+ default:
303
+ throw new errors.LettaError({
304
+ statusCode: _response.error.statusCode,
305
+ body: _response.error.body,
306
+ });
307
+ }
308
+ }
309
+ switch (_response.error.reason) {
310
+ case "non-json":
311
+ throw new errors.LettaError({
312
+ statusCode: _response.error.statusCode,
313
+ body: _response.error.rawBody,
314
+ });
315
+ case "timeout":
316
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/tools/count.");
317
+ case "unknown":
318
+ throw new errors.LettaError({
319
+ message: _response.error.errorMessage,
320
+ });
321
+ }
322
+ });
323
+ }
253
324
  /**
254
325
  * Get a list of all tools available to agents belonging to the org of the user
255
326
  *
@@ -278,7 +349,7 @@ class Tools {
278
349
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
279
350
  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/tools/"),
280
351
  method: "GET",
281
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
352
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
282
353
  contentType: "application/json",
283
354
  queryParameters: _queryParams,
284
355
  requestType: "json",
@@ -346,7 +417,7 @@ class Tools {
346
417
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
347
418
  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/tools/"),
348
419
  method: "POST",
349
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
420
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
350
421
  contentType: "application/json",
351
422
  requestType: "json",
352
423
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -414,7 +485,7 @@ class Tools {
414
485
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
415
486
  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/tools/"),
416
487
  method: "PUT",
417
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
488
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
418
489
  contentType: "application/json",
419
490
  requestType: "json",
420
491
  body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -479,7 +550,7 @@ class Tools {
479
550
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
480
551
  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/tools/add-base-tools"),
481
552
  method: "POST",
482
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
553
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
483
554
  contentType: "application/json",
484
555
  requestType: "json",
485
556
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -549,7 +620,7 @@ class Tools {
549
620
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
550
621
  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/tools/run"),
551
622
  method: "POST",
552
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
623
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
553
624
  contentType: "application/json",
554
625
  requestType: "json",
555
626
  body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -616,7 +687,7 @@ class Tools {
616
687
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
617
688
  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/tools/composio/apps"),
618
689
  method: "GET",
619
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
690
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
620
691
  contentType: "application/json",
621
692
  requestType: "json",
622
693
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -681,7 +752,7 @@ class Tools {
681
752
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
682
753
  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/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
683
754
  method: "GET",
684
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
755
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
685
756
  contentType: "application/json",
686
757
  requestType: "json",
687
758
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -746,7 +817,7 @@ class Tools {
746
817
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
747
818
  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/tools/composio/${encodeURIComponent(composioActionName)}`),
748
819
  method: "POST",
749
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
820
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
750
821
  contentType: "application/json",
751
822
  requestType: "json",
752
823
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -812,7 +883,7 @@ class Tools {
812
883
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
813
884
  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/tools/mcp/servers"),
814
885
  method: "GET",
815
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
886
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
816
887
  contentType: "application/json",
817
888
  requestType: "json",
818
889
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -881,7 +952,7 @@ class Tools {
881
952
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
882
953
  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/tools/mcp/servers"),
883
954
  method: "PUT",
884
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
955
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
885
956
  contentType: "application/json",
886
957
  requestType: "json",
887
958
  body: serializers.AddMcpServerRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -947,7 +1018,7 @@ class Tools {
947
1018
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
948
1019
  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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/tools`),
949
1020
  method: "GET",
950
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
1021
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
951
1022
  contentType: "application/json",
952
1023
  requestType: "json",
953
1024
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1013,7 +1084,7 @@ class Tools {
1013
1084
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1014
1085
  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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}/${encodeURIComponent(mcpToolName)}`),
1015
1086
  method: "POST",
1016
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
1087
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
1017
1088
  contentType: "application/json",
1018
1089
  requestType: "json",
1019
1090
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -1078,7 +1149,7 @@ class Tools {
1078
1149
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1079
1150
  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/tools/mcp/servers/${encodeURIComponent(mcpServerName)}`),
1080
1151
  method: "DELETE",
1081
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "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),
1152
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "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),
1082
1153
  contentType: "application/json",
1083
1154
  requestType: "json",
1084
1155
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ToolsCountRequest {
9
+ /**
10
+ * Include built-in Letta tools in the count
11
+ */
12
+ includeBaseTools?: boolean;
13
+ }
@@ -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,4 +1,5 @@
1
1
  export { type ToolUpdate } from "./ToolUpdate";
2
+ export { type ToolsCountRequest } from "./ToolsCountRequest";
2
3
  export { type ToolsListRequest } from "./ToolsListRequest";
3
4
  export { type ToolRunFromSource } from "./ToolRunFromSource";
4
5
  export { type ListComposioAppsRequest } from "./ListComposioAppsRequest";
@@ -84,7 +84,7 @@ class Voice {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  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/voice-beta/${encodeURIComponent(agentId)}/chat/completions`),
86
86
  method: "POST",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.103", "User-Agent": "@letta-ai/letta-client/0.1.103", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.105", "User-Agent": "@letta-ai/letta-client/0.1.105", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "user-id": userId != null ? userId : undefined }, (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.CreateVoiceChatCompletionsRequestBody.jsonOrThrow(_body, {
@@ -16,4 +16,6 @@ export interface MessageCreate {
16
16
  otid?: string;
17
17
  /** The id of the sender of the message, can be an identity id or agent id */
18
18
  senderId?: string;
19
+ /** The multi-agent group that the message was sent in */
20
+ groupId?: string;
19
21
  }
@@ -3,6 +3,4 @@
3
3
  */
4
4
  export interface OmittedReasoningContent {
5
5
  type: "omitted_reasoning";
6
- /** The reasoning token count for intermediate reasoning content. */
7
- tokens: number;
8
6
  }
@@ -1,8 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Letta from "../index";
4
5
  export interface UsageStatistics {
5
6
  completionTokens?: number;
6
7
  promptTokens?: number;
7
8
  totalTokens?: number;
9
+ promptTokensDetails?: Letta.UsageStatisticsPromptTokenDetails;
10
+ completionTokensDetails?: Letta.UsageStatisticsCompletionTokenDetails;
8
11
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface UsageStatisticsCompletionTokenDetails {
5
+ reasoningTokens?: number;
6
+ }
@@ -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 });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface UsageStatisticsPromptTokenDetails {
5
+ cachedTokens?: number;
6
+ }
@@ -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 });
@@ -204,6 +204,8 @@ export * from "./UpdateSystemMessage";
204
204
  export * from "./UpdateUserMessageContent";
205
205
  export * from "./UpdateUserMessage";
206
206
  export * from "./UsageStatistics";
207
+ export * from "./UsageStatisticsCompletionTokenDetails";
208
+ export * from "./UsageStatisticsPromptTokenDetails";
207
209
  export * from "./User";
208
210
  export * from "./UserCreate";
209
211
  export * from "./UserMessageContent";
@@ -220,6 +220,8 @@ __exportStar(require("./UpdateSystemMessage"), exports);
220
220
  __exportStar(require("./UpdateUserMessageContent"), exports);
221
221
  __exportStar(require("./UpdateUserMessage"), exports);
222
222
  __exportStar(require("./UsageStatistics"), exports);
223
+ __exportStar(require("./UsageStatisticsCompletionTokenDetails"), exports);
224
+ __exportStar(require("./UsageStatisticsPromptTokenDetails"), exports);
223
225
  __exportStar(require("./User"), exports);
224
226
  __exportStar(require("./UserCreate"), exports);
225
227
  __exportStar(require("./UserMessageContent"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as core from "../../../../core";
6
+ export declare const Response: core.serialization.Schema<serializers.agents.count.Response.Raw, number>;
7
+ export declare namespace Response {
8
+ type Raw = number;
9
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Response = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.Response = core.serialization.number();
@@ -1,3 +1,4 @@
1
1
  export * as list from "./list";
2
+ export * as count from "./count";
2
3
  export * as exportFile from "./exportFile";
3
4
  export * from "./requests";
@@ -36,7 +36,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.exportFile = exports.list = void 0;
39
+ exports.exportFile = exports.count = exports.list = void 0;
40
40
  exports.list = __importStar(require("./list"));
41
+ exports.count = __importStar(require("./count"));
41
42
  exports.exportFile = __importStar(require("./exportFile"));
42
43
  __exportStar(require("./requests"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as core from "../../../../core";
6
+ export declare const Response: core.serialization.Schema<serializers.identities.count.Response.Raw, number>;
7
+ export declare namespace Response {
8
+ type Raw = number;
9
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Response = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.Response = core.serialization.number();
@@ -1,2 +1,3 @@
1
1
  export * as list from "./list";
2
+ export * as count from "./count";
2
3
  export * from "./requests";
@@ -36,6 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.list = void 0;
39
+ exports.count = exports.list = void 0;
40
40
  exports.list = __importStar(require("./list"));
41
+ exports.count = __importStar(require("./count"));
41
42
  __exportStar(require("./requests"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as core from "../../../../core";
6
+ export declare const Response: core.serialization.Schema<serializers.sources.count.Response.Raw, number>;
7
+ export declare namespace Response {
8
+ type Raw = number;
9
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || (function () {
22
+ var ownKeys = function(o) {
23
+ ownKeys = Object.getOwnPropertyNames || function (o) {
24
+ var ar = [];
25
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
+ return ar;
27
+ };
28
+ return ownKeys(o);
29
+ };
30
+ return function (mod) {
31
+ if (mod && mod.__esModule) return mod;
32
+ var result = {};
33
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
+ __setModuleDefault(result, mod);
35
+ return result;
36
+ };
37
+ })();
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.Response = void 0;
40
+ const core = __importStar(require("../../../../core"));
41
+ exports.Response = core.serialization.number();
@@ -1,3 +1,4 @@
1
+ export * as count from "./count";
1
2
  export * as retrieveByName from "./retrieveByName";
2
3
  export * as list from "./list";
3
4
  export * from "./requests";
@@ -36,7 +36,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.list = exports.retrieveByName = void 0;
39
+ exports.list = exports.retrieveByName = exports.count = void 0;
40
+ exports.count = __importStar(require("./count"));
40
41
  exports.retrieveByName = __importStar(require("./retrieveByName"));
41
42
  exports.list = __importStar(require("./list"));
42
43
  __exportStar(require("./requests"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as serializers from "../../../index";
5
+ import * as core from "../../../../core";
6
+ export declare const Response: core.serialization.Schema<serializers.tools.count.Response.Raw, number>;
7
+ export declare namespace Response {
8
+ type Raw = number;
9
+ }