@letta-ai/letta-client 0.0.68650 → 0.0.68652

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 (114) hide show
  1. package/api/resources/agents/client/Client.d.ts +0 -19
  2. package/api/resources/agents/client/Client.js +9 -86
  3. package/api/resources/agents/client/requests/index.d.ts +0 -1
  4. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  5. package/api/resources/agents/resources/context/client/Client.js +1 -1
  6. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  7. package/api/resources/agents/resources/files/client/Client.js +4 -4
  8. package/api/resources/agents/resources/folders/client/Client.js +3 -3
  9. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  10. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  11. package/api/resources/agents/resources/messages/client/Client.d.ts +19 -0
  12. package/api/resources/agents/resources/messages/client/Client.js +86 -9
  13. package/api/resources/agents/{client/requests/SummarizeAgentConversationRequest.d.ts → resources/messages/client/requests/MessagesSummarizeRequest.d.ts} +1 -1
  14. package/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  15. package/api/resources/agents/resources/passages/client/Client.js +5 -5
  16. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  17. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  18. package/api/resources/agents/resources/tools/client/Client.js +4 -4
  19. package/api/resources/batches/client/Client.js +4 -4
  20. package/api/resources/batches/resources/messages/client/Client.js +1 -1
  21. package/api/resources/blocks/client/Client.js +6 -6
  22. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  23. package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  24. package/api/resources/folders/client/Client.js +9 -9
  25. package/api/resources/folders/resources/files/client/Client.js +3 -3
  26. package/api/resources/folders/resources/passages/client/Client.js +1 -1
  27. package/api/resources/groups/client/Client.js +6 -6
  28. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  29. package/api/resources/health/client/Client.js +1 -1
  30. package/api/resources/identities/client/Client.js +7 -7
  31. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  32. package/api/resources/jobs/client/Client.js +5 -5
  33. package/api/resources/models/client/Client.js +2 -2
  34. package/api/resources/models/resources/embeddings/client/Client.js +1 -1
  35. package/api/resources/projects/client/Client.js +1 -1
  36. package/api/resources/providers/client/Client.js +6 -6
  37. package/api/resources/runs/client/Client.js +5 -5
  38. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  39. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  40. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  41. package/api/resources/sources/client/Client.js +10 -10
  42. package/api/resources/sources/resources/files/client/Client.js +3 -3
  43. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  44. package/api/resources/steps/client/Client.js +2 -2
  45. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  46. package/api/resources/steps/resources/metrics/client/Client.js +1 -1
  47. package/api/resources/steps/resources/trace/client/Client.js +1 -1
  48. package/api/resources/tags/client/Client.js +1 -1
  49. package/api/resources/telemetry/client/Client.js +1 -1
  50. package/api/resources/templates/client/Client.js +9 -9
  51. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  52. package/api/resources/tools/client/Client.js +20 -20
  53. package/api/resources/voice/client/Client.js +1 -1
  54. package/dist/api/resources/agents/client/Client.d.ts +0 -19
  55. package/dist/api/resources/agents/client/Client.js +9 -86
  56. package/dist/api/resources/agents/client/requests/index.d.ts +0 -1
  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/files/client/Client.js +4 -4
  61. package/dist/api/resources/agents/resources/folders/client/Client.js +3 -3
  62. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  63. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  64. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +19 -0
  65. package/dist/api/resources/agents/resources/messages/client/Client.js +86 -9
  66. package/dist/api/resources/agents/{client/requests/SummarizeAgentConversationRequest.d.ts → resources/messages/client/requests/MessagesSummarizeRequest.d.ts} +1 -1
  67. package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  68. package/dist/api/resources/agents/resources/passages/client/Client.js +5 -5
  69. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  70. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  71. package/dist/api/resources/agents/resources/tools/client/Client.js +4 -4
  72. package/dist/api/resources/batches/client/Client.js +4 -4
  73. package/dist/api/resources/batches/resources/messages/client/Client.js +1 -1
  74. package/dist/api/resources/blocks/client/Client.js +6 -6
  75. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  76. package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  77. package/dist/api/resources/folders/client/Client.js +9 -9
  78. package/dist/api/resources/folders/resources/files/client/Client.js +3 -3
  79. package/dist/api/resources/folders/resources/passages/client/Client.js +1 -1
  80. package/dist/api/resources/groups/client/Client.js +6 -6
  81. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  82. package/dist/api/resources/health/client/Client.js +1 -1
  83. package/dist/api/resources/identities/client/Client.js +7 -7
  84. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  85. package/dist/api/resources/jobs/client/Client.js +5 -5
  86. package/dist/api/resources/models/client/Client.js +2 -2
  87. package/dist/api/resources/models/resources/embeddings/client/Client.js +1 -1
  88. package/dist/api/resources/projects/client/Client.js +1 -1
  89. package/dist/api/resources/providers/client/Client.js +6 -6
  90. package/dist/api/resources/runs/client/Client.js +5 -5
  91. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  92. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  93. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  94. package/dist/api/resources/sources/client/Client.js +10 -10
  95. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  96. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  97. package/dist/api/resources/steps/client/Client.js +2 -2
  98. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  99. package/dist/api/resources/steps/resources/metrics/client/Client.js +1 -1
  100. package/dist/api/resources/steps/resources/trace/client/Client.js +1 -1
  101. package/dist/api/resources/tags/client/Client.js +1 -1
  102. package/dist/api/resources/telemetry/client/Client.js +1 -1
  103. package/dist/api/resources/templates/client/Client.js +9 -9
  104. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  105. package/dist/api/resources/tools/client/Client.js +20 -20
  106. package/dist/api/resources/voice/client/Client.js +1 -1
  107. package/dist/version.d.ts +1 -1
  108. package/dist/version.js +1 -1
  109. package/package.json +1 -1
  110. package/reference.md +76 -76
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. /package/api/resources/agents/{client/requests/SummarizeAgentConversationRequest.js → resources/messages/client/requests/MessagesSummarizeRequest.js} +0 -0
  114. /package/dist/api/resources/agents/{client/requests/SummarizeAgentConversationRequest.js → resources/messages/client/requests/MessagesSummarizeRequest.js} +0 -0
@@ -183,25 +183,6 @@ export declare class Agents {
183
183
  */
184
184
  modify(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Letta.AgentState>;
185
185
  private __modify;
186
- /**
187
- * Summarize an agent's conversation history to a target message length.
188
- *
189
- * This endpoint summarizes the current message history for a given agent,
190
- * truncating and compressing it down to the specified `max_message_length`.
191
- *
192
- * @param {string} agentId
193
- * @param {Letta.SummarizeAgentConversationRequest} request
194
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
195
- *
196
- * @throws {@link Letta.UnprocessableEntityError}
197
- *
198
- * @example
199
- * await client.agents.summarizeAgentConversation("agent_id", {
200
- * maxMessageLength: 1
201
- * })
202
- */
203
- summarizeAgentConversation(agentId: string, request: Letta.SummarizeAgentConversationRequest, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<void>;
204
- private __summarizeAgentConversation;
205
186
  /**
206
187
  * <Note>This endpoint is only available on Letta Cloud.</Note>
207
188
  *
@@ -216,7 +216,7 @@ class Agents {
216
216
  method: "GET",
217
217
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
218
218
  ? yield core.Supplier.get(this._options.project)
219
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
219
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
220
220
  contentType: "application/json",
221
221
  queryParameters: _queryParams,
222
222
  requestType: "json",
@@ -293,7 +293,7 @@ class Agents {
293
293
  method: "POST",
294
294
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
295
295
  ? yield core.Supplier.get(this._options.project)
296
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
296
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
297
297
  contentType: "application/json",
298
298
  requestType: "json",
299
299
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -369,7 +369,7 @@ class Agents {
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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,
@@ -458,7 +458,7 @@ class Agents {
458
458
  method: "GET",
459
459
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
460
460
  ? yield core.Supplier.get(this._options.project)
461
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
461
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
462
462
  contentType: "application/json",
463
463
  queryParameters: _queryParams,
464
464
  requestType: "json",
@@ -558,7 +558,7 @@ class Agents {
558
558
  method: "POST",
559
559
  headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
560
560
  ? yield core.Supplier.get(this._options.project)
561
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-override-embedding-model": request.overrideEmbeddingModel != null ? request.overrideEmbeddingModel : undefined }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
561
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-override-embedding-model": request.overrideEmbeddingModel != null ? request.overrideEmbeddingModel : undefined }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
562
562
  requestType: "file",
563
563
  duplex: _maybeEncodedRequest.duplex,
564
564
  body: _maybeEncodedRequest.body,
@@ -646,7 +646,7 @@ class Agents {
646
646
  method: "GET",
647
647
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
648
648
  ? yield core.Supplier.get(this._options.project)
649
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
649
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
650
650
  contentType: "application/json",
651
651
  queryParameters: _queryParams,
652
652
  requestType: "json",
@@ -723,7 +723,7 @@ class Agents {
723
723
  method: "DELETE",
724
724
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
725
725
  ? yield core.Supplier.get(this._options.project)
726
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
726
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
727
727
  contentType: "application/json",
728
728
  requestType: "json",
729
729
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -791,7 +791,7 @@ class Agents {
791
791
  method: "PATCH",
792
792
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
793
793
  ? yield core.Supplier.get(this._options.project)
794
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
794
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
795
795
  contentType: "application/json",
796
796
  requestType: "json",
797
797
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -846,83 +846,6 @@ class Agents {
846
846
  }
847
847
  });
848
848
  }
849
- /**
850
- * Summarize an agent's conversation history to a target message length.
851
- *
852
- * This endpoint summarizes the current message history for a given agent,
853
- * truncating and compressing it down to the specified `max_message_length`.
854
- *
855
- * @param {string} agentId
856
- * @param {Letta.SummarizeAgentConversationRequest} request
857
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
858
- *
859
- * @throws {@link Letta.UnprocessableEntityError}
860
- *
861
- * @example
862
- * await client.agents.summarizeAgentConversation("agent_id", {
863
- * maxMessageLength: 1
864
- * })
865
- */
866
- summarizeAgentConversation(agentId, request, requestOptions) {
867
- return core.HttpResponsePromise.fromPromise(this.__summarizeAgentConversation(agentId, request, requestOptions));
868
- }
869
- __summarizeAgentConversation(agentId, request, requestOptions) {
870
- return __awaiter(this, void 0, void 0, function* () {
871
- var _a, _b, _c;
872
- const { maxMessageLength } = request;
873
- const _queryParams = {};
874
- _queryParams["max_message_length"] = maxMessageLength.toString();
875
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
876
- 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)}/summarize`),
877
- method: "POST",
878
- headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
879
- ? yield core.Supplier.get(this._options.project)
880
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
881
- contentType: "application/json",
882
- queryParameters: _queryParams,
883
- requestType: "json",
884
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
885
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
886
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
887
- });
888
- if (_response.ok) {
889
- return { data: undefined, rawResponse: _response.rawResponse };
890
- }
891
- if (_response.error.reason === "status-code") {
892
- switch (_response.error.statusCode) {
893
- case 422:
894
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
895
- unrecognizedObjectKeys: "passthrough",
896
- allowUnrecognizedUnionMembers: true,
897
- allowUnrecognizedEnumValues: true,
898
- skipValidation: true,
899
- breadcrumbsPrefix: ["response"],
900
- }), _response.rawResponse);
901
- default:
902
- throw new errors.LettaError({
903
- statusCode: _response.error.statusCode,
904
- body: _response.error.body,
905
- rawResponse: _response.rawResponse,
906
- });
907
- }
908
- }
909
- switch (_response.error.reason) {
910
- case "non-json":
911
- throw new errors.LettaError({
912
- statusCode: _response.error.statusCode,
913
- body: _response.error.rawBody,
914
- rawResponse: _response.rawResponse,
915
- });
916
- case "timeout":
917
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/summarize.");
918
- case "unknown":
919
- throw new errors.LettaError({
920
- message: _response.error.errorMessage,
921
- rawResponse: _response.rawResponse,
922
- });
923
- }
924
- });
925
- }
926
849
  /**
927
850
  * <Note>This endpoint is only available on Letta Cloud.</Note>
928
851
  *
@@ -945,7 +868,7 @@ class Agents {
945
868
  method: "POST",
946
869
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
947
870
  ? yield core.Supplier.get(this._options.project)
948
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
871
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
949
872
  contentType: "application/json",
950
873
  requestType: "json",
951
874
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -4,5 +4,4 @@ export { type AgentsExportFileRequest } from "./AgentsExportFileRequest";
4
4
  export { type BodyImportAgent } from "./BodyImportAgent";
5
5
  export { type AgentsRetrieveRequest } from "./AgentsRetrieveRequest";
6
6
  export { type UpdateAgent } from "./UpdateAgent";
7
- export { type SummarizeAgentConversationRequest } from "./SummarizeAgentConversationRequest";
8
7
  export { type AgentsSearchRequest } from "./AgentsSearchRequest";
@@ -82,7 +82,7 @@ class Blocks {
82
82
  method: "GET",
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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,
@@ -160,7 +160,7 @@ class Blocks {
160
160
  method: "PATCH",
161
161
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
162
162
  ? yield core.Supplier.get(this._options.project)
163
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
164
164
  contentType: "application/json",
165
165
  requestType: "json",
166
166
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -237,7 +237,7 @@ class Blocks {
237
237
  method: "GET",
238
238
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
239
239
  ? yield core.Supplier.get(this._options.project)
240
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
240
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
241
241
  contentType: "application/json",
242
242
  requestType: "json",
243
243
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -314,7 +314,7 @@ class Blocks {
314
314
  method: "PATCH",
315
315
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
316
316
  ? yield core.Supplier.get(this._options.project)
317
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
317
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
318
318
  contentType: "application/json",
319
319
  requestType: "json",
320
320
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -391,7 +391,7 @@ class Blocks {
391
391
  method: "PATCH",
392
392
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
393
393
  ? yield core.Supplier.get(this._options.project)
394
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
394
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
395
395
  contentType: "application/json",
396
396
  requestType: "json",
397
397
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -81,7 +81,7 @@ class Context {
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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,
@@ -82,7 +82,7 @@ class CoreMemory {
82
82
  method: "GET",
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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,
@@ -84,7 +84,7 @@ class Files {
84
84
  method: "PATCH",
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -165,7 +165,7 @@ class Files {
165
165
  method: "PATCH",
166
166
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
167
167
  ? yield core.Supplier.get(this._options.project)
168
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
168
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
169
169
  contentType: "application/json",
170
170
  requestType: "json",
171
171
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -245,7 +245,7 @@ class Files {
245
245
  method: "PATCH",
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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,
@@ -324,7 +324,7 @@ class Files {
324
324
  method: "GET",
325
325
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
326
326
  ? yield core.Supplier.get(this._options.project)
327
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
327
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
328
328
  contentType: "application/json",
329
329
  queryParameters: _queryParams,
330
330
  requestType: "json",
@@ -82,7 +82,7 @@ class Folders {
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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 Folders {
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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 Folders {
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.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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,
@@ -87,7 +87,7 @@ class Groups {
87
87
  method: "GET",
88
88
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
89
89
  ? yield core.Supplier.get(this._options.project)
90
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
90
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
91
91
  contentType: "application/json",
92
92
  queryParameters: _queryParams,
93
93
  requestType: "json",
@@ -83,7 +83,7 @@ class MemoryVariables {
83
83
  method: "GET",
84
84
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
85
85
  ? yield core.Supplier.get(this._options.project)
86
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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
87
  contentType: "application/json",
88
88
  requestType: "json",
89
89
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -188,6 +188,25 @@ export declare class Messages {
188
188
  */
189
189
  preview(agentId: string, request: Letta.agents.MessagesPreviewRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
190
190
  private __preview;
191
+ /**
192
+ * Summarize an agent's conversation history to a target message length.
193
+ *
194
+ * This endpoint summarizes the current message history for a given agent,
195
+ * truncating and compressing it down to the specified `max_message_length`.
196
+ *
197
+ * @param {string} agentId
198
+ * @param {Letta.agents.MessagesSummarizeRequest} request
199
+ * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
200
+ *
201
+ * @throws {@link Letta.UnprocessableEntityError}
202
+ *
203
+ * @example
204
+ * await client.agents.messages.summarize("agent_id", {
205
+ * maxMessageLength: 1
206
+ * })
207
+ */
208
+ summarize(agentId: string, request: Letta.agents.MessagesSummarizeRequest, requestOptions?: Messages.RequestOptions): core.HttpResponsePromise<void>;
209
+ private __summarize;
191
210
  protected _getCustomAuthorizationHeaders(): Promise<{
192
211
  Authorization: string;
193
212
  }>;
@@ -108,7 +108,7 @@ class Messages {
108
108
  method: "GET",
109
109
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
110
110
  ? yield core.Supplier.get(this._options.project)
111
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
111
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
112
112
  contentType: "application/json",
113
113
  queryParameters: _queryParams,
114
114
  requestType: "json",
@@ -195,7 +195,7 @@ class Messages {
195
195
  method: "POST",
196
196
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
197
197
  ? yield core.Supplier.get(this._options.project)
198
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
198
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
199
199
  contentType: "application/json",
200
200
  requestType: "json",
201
201
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -276,7 +276,7 @@ class Messages {
276
276
  method: "PATCH",
277
277
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
278
278
  ? yield core.Supplier.get(this._options.project)
279
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
279
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
280
280
  contentType: "application/json",
281
281
  requestType: "json",
282
282
  body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -347,7 +347,7 @@ class Messages {
347
347
  method: "POST",
348
348
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
349
349
  ? yield core.Supplier.get(this._options.project)
350
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
351
351
  contentType: "application/json",
352
352
  requestType: "json",
353
353
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -438,7 +438,7 @@ class Messages {
438
438
  method: "POST",
439
439
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
440
440
  ? yield core.Supplier.get(this._options.project)
441
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
441
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
442
442
  contentType: "application/json",
443
443
  requestType: "json",
444
444
  body: serializers.agents.CancelAgentRunRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -517,7 +517,7 @@ class Messages {
517
517
  method: "POST",
518
518
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
519
519
  ? yield core.Supplier.get(this._options.project)
520
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
520
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
521
521
  contentType: "application/json",
522
522
  requestType: "json",
523
523
  body: serializers.agents.MessageSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -607,7 +607,7 @@ class Messages {
607
607
  method: "POST",
608
608
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
609
609
  ? yield core.Supplier.get(this._options.project)
610
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
610
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
611
611
  contentType: "application/json",
612
612
  requestType: "json",
613
613
  body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -690,7 +690,7 @@ class Messages {
690
690
  method: "PATCH",
691
691
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
692
692
  ? yield core.Supplier.get(this._options.project)
693
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
693
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
694
694
  contentType: "application/json",
695
695
  queryParameters: _queryParams,
696
696
  requestType: "json",
@@ -780,7 +780,7 @@ class Messages {
780
780
  method: "POST",
781
781
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
782
782
  ? yield core.Supplier.get(this._options.project)
783
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68650", "User-Agent": "@letta-ai/letta-client/0.0.68650", "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),
783
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
784
784
  contentType: "application/json",
785
785
  requestType: "json",
786
786
  body: serializers.agents.MessagesPreviewRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -835,6 +835,83 @@ class Messages {
835
835
  }
836
836
  });
837
837
  }
838
+ /**
839
+ * Summarize an agent's conversation history to a target message length.
840
+ *
841
+ * This endpoint summarizes the current message history for a given agent,
842
+ * truncating and compressing it down to the specified `max_message_length`.
843
+ *
844
+ * @param {string} agentId
845
+ * @param {Letta.agents.MessagesSummarizeRequest} request
846
+ * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
847
+ *
848
+ * @throws {@link Letta.UnprocessableEntityError}
849
+ *
850
+ * @example
851
+ * await client.agents.messages.summarize("agent_id", {
852
+ * maxMessageLength: 1
853
+ * })
854
+ */
855
+ summarize(agentId, request, requestOptions) {
856
+ return core.HttpResponsePromise.fromPromise(this.__summarize(agentId, request, requestOptions));
857
+ }
858
+ __summarize(agentId, request, requestOptions) {
859
+ return __awaiter(this, void 0, void 0, function* () {
860
+ var _a, _b, _c;
861
+ const { maxMessageLength } = request;
862
+ const _queryParams = {};
863
+ _queryParams["max_message_length"] = maxMessageLength.toString();
864
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
865
+ 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)}/summarize`),
866
+ method: "POST",
867
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
868
+ ? yield core.Supplier.get(this._options.project)
869
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.0.68652", "User-Agent": "@letta-ai/letta-client/0.0.68652", "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),
870
+ contentType: "application/json",
871
+ queryParameters: _queryParams,
872
+ requestType: "json",
873
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
874
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
875
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
876
+ });
877
+ if (_response.ok) {
878
+ return { data: undefined, rawResponse: _response.rawResponse };
879
+ }
880
+ if (_response.error.reason === "status-code") {
881
+ switch (_response.error.statusCode) {
882
+ case 422:
883
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
884
+ unrecognizedObjectKeys: "passthrough",
885
+ allowUnrecognizedUnionMembers: true,
886
+ allowUnrecognizedEnumValues: true,
887
+ skipValidation: true,
888
+ breadcrumbsPrefix: ["response"],
889
+ }), _response.rawResponse);
890
+ default:
891
+ throw new errors.LettaError({
892
+ statusCode: _response.error.statusCode,
893
+ body: _response.error.body,
894
+ rawResponse: _response.rawResponse,
895
+ });
896
+ }
897
+ }
898
+ switch (_response.error.reason) {
899
+ case "non-json":
900
+ throw new errors.LettaError({
901
+ statusCode: _response.error.statusCode,
902
+ body: _response.error.rawBody,
903
+ rawResponse: _response.rawResponse,
904
+ });
905
+ case "timeout":
906
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/summarize.");
907
+ case "unknown":
908
+ throw new errors.LettaError({
909
+ message: _response.error.errorMessage,
910
+ rawResponse: _response.rawResponse,
911
+ });
912
+ }
913
+ });
914
+ }
838
915
  _getCustomAuthorizationHeaders() {
839
916
  return __awaiter(this, void 0, void 0, function* () {
840
917
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -7,7 +7,7 @@
7
7
  * maxMessageLength: 1
8
8
  * }
9
9
  */
10
- export interface SummarizeAgentConversationRequest {
10
+ export interface MessagesSummarizeRequest {
11
11
  /**
12
12
  * Maximum number of messages to retain after summarization.
13
13
  */
@@ -3,3 +3,4 @@ export { type CancelAgentRunRequest } from "./CancelAgentRunRequest";
3
3
  export { type MessageSearchRequest } from "./MessageSearchRequest";
4
4
  export { type LettaAsyncRequest } from "./LettaAsyncRequest";
5
5
  export { type MessagesResetRequest } from "./MessagesResetRequest";
6
+ export { type MessagesSummarizeRequest } from "./MessagesSummarizeRequest";