@letta-ai/letta-client 0.1.4 → 0.1.5

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 (148) hide show
  1. package/api/resources/agents/client/Client.d.ts +0 -19
  2. package/api/resources/agents/client/Client.js +13 -86
  3. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -1
  4. package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  5. package/api/resources/agents/resources/context/client/Client.js +1 -1
  6. package/api/resources/agents/resources/memory/client/Client.js +1 -1
  7. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +1 -1
  8. package/api/resources/agents/resources/memoryBlocks/client/Client.js +2 -2
  9. package/api/resources/agents/resources/messages/client/Client.d.ts +19 -0
  10. package/api/resources/agents/resources/messages/client/Client.js +77 -4
  11. package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -0
  12. package/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  13. package/api/resources/agents/resources/sources/client/Client.js +1 -1
  14. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  15. package/api/resources/blocks/client/Client.js +7 -7
  16. package/api/resources/health/client/Client.js +1 -1
  17. package/api/resources/jobs/client/Client.js +4 -4
  18. package/api/resources/models/client/Client.js +2 -2
  19. package/api/resources/sources/client/Client.js +8 -8
  20. package/api/resources/sources/resources/files/client/Client.js +3 -3
  21. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  22. package/api/resources/tools/client/Client.js +12 -12
  23. package/api/types/AgentEnvironmentVariable.d.ts +0 -2
  24. package/api/types/AgentState.d.ts +1 -3
  25. package/api/types/Block.d.ts +0 -2
  26. package/api/types/FileMetadata.d.ts +0 -2
  27. package/api/types/Job.d.ts +0 -2
  28. package/api/types/LettaRequest.d.ts +2 -0
  29. package/api/types/LettaSchemasMessageMessage.d.ts +0 -2
  30. package/api/types/LettaSchemasToolTool.d.ts +0 -2
  31. package/api/types/Passage.d.ts +0 -2
  32. package/api/types/SandboxConfig.d.ts +0 -2
  33. package/api/types/SandboxEnvironmentVariable.d.ts +0 -2
  34. package/api/types/Source.d.ts +0 -2
  35. package/api/types/User.d.ts +0 -2
  36. package/api/types/UserCreate.d.ts +0 -2
  37. package/api/types/UserUpdate.d.ts +0 -2
  38. package/dist/api/resources/agents/client/Client.d.ts +0 -19
  39. package/dist/api/resources/agents/client/Client.js +13 -86
  40. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -1
  41. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  42. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  43. package/dist/api/resources/agents/resources/memory/client/Client.js +1 -1
  44. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +1 -1
  45. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +2 -2
  46. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +19 -0
  47. package/dist/api/resources/agents/resources/messages/client/Client.js +77 -4
  48. package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -0
  49. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  50. package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
  51. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  52. package/dist/api/resources/blocks/client/Client.js +7 -7
  53. package/dist/api/resources/health/client/Client.js +1 -1
  54. package/dist/api/resources/jobs/client/Client.js +4 -4
  55. package/dist/api/resources/models/client/Client.js +2 -2
  56. package/dist/api/resources/sources/client/Client.js +8 -8
  57. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  58. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  59. package/dist/api/resources/tools/client/Client.js +12 -12
  60. package/dist/api/types/AgentEnvironmentVariable.d.ts +0 -2
  61. package/dist/api/types/AgentState.d.ts +1 -3
  62. package/dist/api/types/Block.d.ts +0 -2
  63. package/dist/api/types/FileMetadata.d.ts +0 -2
  64. package/dist/api/types/Job.d.ts +0 -2
  65. package/dist/api/types/LettaRequest.d.ts +2 -0
  66. package/dist/api/types/LettaSchemasMessageMessage.d.ts +0 -2
  67. package/dist/api/types/LettaSchemasToolTool.d.ts +0 -2
  68. package/dist/api/types/Passage.d.ts +0 -2
  69. package/dist/api/types/SandboxConfig.d.ts +0 -2
  70. package/dist/api/types/SandboxEnvironmentVariable.d.ts +0 -2
  71. package/dist/api/types/Source.d.ts +0 -2
  72. package/dist/api/types/User.d.ts +0 -2
  73. package/dist/api/types/UserCreate.d.ts +0 -2
  74. package/dist/api/types/UserUpdate.d.ts +0 -2
  75. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  76. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -1
  77. package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -0
  78. package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +1 -0
  79. package/dist/serialization/types/AgentEnvironmentVariable.d.ts +0 -1
  80. package/dist/serialization/types/AgentEnvironmentVariable.js +0 -1
  81. package/dist/serialization/types/AgentState.d.ts +1 -2
  82. package/dist/serialization/types/AgentState.js +1 -2
  83. package/dist/serialization/types/Block.d.ts +0 -1
  84. package/dist/serialization/types/Block.js +0 -1
  85. package/dist/serialization/types/FileMetadata.d.ts +0 -1
  86. package/dist/serialization/types/FileMetadata.js +0 -1
  87. package/dist/serialization/types/Job.d.ts +0 -1
  88. package/dist/serialization/types/Job.js +0 -1
  89. package/dist/serialization/types/LettaRequest.d.ts +1 -0
  90. package/dist/serialization/types/LettaRequest.js +1 -0
  91. package/dist/serialization/types/LettaSchemasMessageMessage.d.ts +0 -1
  92. package/dist/serialization/types/LettaSchemasMessageMessage.js +0 -1
  93. package/dist/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  94. package/dist/serialization/types/LettaSchemasToolTool.js +0 -1
  95. package/dist/serialization/types/Passage.d.ts +0 -1
  96. package/dist/serialization/types/Passage.js +0 -1
  97. package/dist/serialization/types/SandboxConfig.d.ts +0 -1
  98. package/dist/serialization/types/SandboxConfig.js +0 -1
  99. package/dist/serialization/types/SandboxEnvironmentVariable.d.ts +0 -1
  100. package/dist/serialization/types/SandboxEnvironmentVariable.js +0 -1
  101. package/dist/serialization/types/Source.d.ts +0 -1
  102. package/dist/serialization/types/Source.js +0 -1
  103. package/dist/serialization/types/User.d.ts +0 -1
  104. package/dist/serialization/types/User.js +0 -1
  105. package/dist/serialization/types/UserCreate.d.ts +0 -1
  106. package/dist/serialization/types/UserCreate.js +0 -1
  107. package/dist/serialization/types/UserUpdate.d.ts +0 -1
  108. package/dist/serialization/types/UserUpdate.js +0 -1
  109. package/dist/version.d.ts +1 -1
  110. package/dist/version.js +1 -1
  111. package/package.json +1 -1
  112. package/reference.md +79 -79
  113. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  114. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -1
  115. package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -0
  116. package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +1 -0
  117. package/serialization/types/AgentEnvironmentVariable.d.ts +0 -1
  118. package/serialization/types/AgentEnvironmentVariable.js +0 -1
  119. package/serialization/types/AgentState.d.ts +1 -2
  120. package/serialization/types/AgentState.js +1 -2
  121. package/serialization/types/Block.d.ts +0 -1
  122. package/serialization/types/Block.js +0 -1
  123. package/serialization/types/FileMetadata.d.ts +0 -1
  124. package/serialization/types/FileMetadata.js +0 -1
  125. package/serialization/types/Job.d.ts +0 -1
  126. package/serialization/types/Job.js +0 -1
  127. package/serialization/types/LettaRequest.d.ts +1 -0
  128. package/serialization/types/LettaRequest.js +1 -0
  129. package/serialization/types/LettaSchemasMessageMessage.d.ts +0 -1
  130. package/serialization/types/LettaSchemasMessageMessage.js +0 -1
  131. package/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  132. package/serialization/types/LettaSchemasToolTool.js +0 -1
  133. package/serialization/types/Passage.d.ts +0 -1
  134. package/serialization/types/Passage.js +0 -1
  135. package/serialization/types/SandboxConfig.d.ts +0 -1
  136. package/serialization/types/SandboxConfig.js +0 -1
  137. package/serialization/types/SandboxEnvironmentVariable.d.ts +0 -1
  138. package/serialization/types/SandboxEnvironmentVariable.js +0 -1
  139. package/serialization/types/Source.d.ts +0 -1
  140. package/serialization/types/Source.js +0 -1
  141. package/serialization/types/User.d.ts +0 -1
  142. package/serialization/types/User.js +0 -1
  143. package/serialization/types/UserCreate.d.ts +0 -1
  144. package/serialization/types/UserCreate.js +0 -1
  145. package/serialization/types/UserUpdate.d.ts +0 -1
  146. package/serialization/types/UserUpdate.js +0 -1
  147. package/version.d.ts +1 -1
  148. package/version.js +1 -1
@@ -154,25 +154,6 @@ export declare class Agents {
154
154
  * await client.agents.getAgentMemoryBlocks("agent_id")
155
155
  */
156
156
  getAgentMemoryBlocks(agentId: string, requestOptions?: Agents.RequestOptions): Promise<Letta.Block[]>;
157
- /**
158
- * Asynchronously process a user message and return a job ID.
159
- * The actual processing happens in the background, and the status can be checked using the job ID.
160
- *
161
- * @param {string} agentId
162
- * @param {Letta.LettaRequest} request
163
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
164
- *
165
- * @throws {@link Letta.UnprocessableEntityError}
166
- *
167
- * @example
168
- * await client.agents.createAgentMessageAsync("agent_id", {
169
- * messages: [{
170
- * role: "user",
171
- * text: "text"
172
- * }]
173
- * })
174
- */
175
- createAgentMessageAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.Job>;
176
157
  /**
177
158
  * Search deployed agents
178
159
  *
@@ -140,7 +140,7 @@ class Agents {
140
140
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
141
141
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
142
142
  method: "GET",
143
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
143
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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
144
  contentType: "application/json",
145
145
  queryParameters: _queryParams,
146
146
  requestType: "json",
@@ -211,7 +211,7 @@ class Agents {
211
211
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
212
212
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
213
213
  method: "POST",
214
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
214
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
215
215
  contentType: "application/json",
216
216
  requestType: "json",
217
217
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -277,7 +277,7 @@ class Agents {
277
277
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
278
278
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
279
279
  method: "GET",
280
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
281
281
  contentType: "application/json",
282
282
  requestType: "json",
283
283
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -342,7 +342,7 @@ class Agents {
342
342
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
343
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
344
344
  method: "DELETE",
345
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
345
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
346
346
  contentType: "application/json",
347
347
  requestType: "json",
348
348
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -402,7 +402,7 @@ class Agents {
402
402
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
403
403
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
404
404
  method: "PATCH",
405
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
405
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
406
406
  contentType: "application/json",
407
407
  requestType: "json",
408
408
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -469,7 +469,7 @@ class Agents {
469
469
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
470
470
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
471
471
  method: "GET",
472
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
472
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
473
473
  contentType: "application/json",
474
474
  requestType: "json",
475
475
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -536,7 +536,7 @@ class Agents {
536
536
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
537
537
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
538
538
  method: "PATCH",
539
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
539
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
540
540
  contentType: "application/json",
541
541
  requestType: "json",
542
542
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -602,7 +602,7 @@ class Agents {
602
602
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
603
603
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
604
604
  method: "GET",
605
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
605
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
606
606
  contentType: "application/json",
607
607
  requestType: "json",
608
608
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -650,79 +650,6 @@ class Agents {
650
650
  }
651
651
  });
652
652
  }
653
- /**
654
- * Asynchronously process a user message and return a job ID.
655
- * The actual processing happens in the background, and the status can be checked using the job ID.
656
- *
657
- * @param {string} agentId
658
- * @param {Letta.LettaRequest} request
659
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
660
- *
661
- * @throws {@link Letta.UnprocessableEntityError}
662
- *
663
- * @example
664
- * await client.agents.createAgentMessageAsync("agent_id", {
665
- * messages: [{
666
- * role: "user",
667
- * text: "text"
668
- * }]
669
- * })
670
- */
671
- createAgentMessageAsync(agentId, request, requestOptions) {
672
- var _a, _b;
673
- return __awaiter(this, void 0, void 0, function* () {
674
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
675
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
676
- method: "POST",
677
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
678
- contentType: "application/json",
679
- requestType: "json",
680
- body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
681
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
682
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
683
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
684
- });
685
- if (_response.ok) {
686
- return serializers.Job.parseOrThrow(_response.body, {
687
- unrecognizedObjectKeys: "passthrough",
688
- allowUnrecognizedUnionMembers: true,
689
- allowUnrecognizedEnumValues: true,
690
- skipValidation: true,
691
- breadcrumbsPrefix: ["response"],
692
- });
693
- }
694
- if (_response.error.reason === "status-code") {
695
- switch (_response.error.statusCode) {
696
- case 422:
697
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
698
- unrecognizedObjectKeys: "passthrough",
699
- allowUnrecognizedUnionMembers: true,
700
- allowUnrecognizedEnumValues: true,
701
- skipValidation: true,
702
- breadcrumbsPrefix: ["response"],
703
- }));
704
- default:
705
- throw new errors.LettaError({
706
- statusCode: _response.error.statusCode,
707
- body: _response.error.body,
708
- });
709
- }
710
- }
711
- switch (_response.error.reason) {
712
- case "non-json":
713
- throw new errors.LettaError({
714
- statusCode: _response.error.statusCode,
715
- body: _response.error.rawBody,
716
- });
717
- case "timeout":
718
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/messages/async.");
719
- case "unknown":
720
- throw new errors.LettaError({
721
- message: _response.error.errorMessage,
722
- });
723
- }
724
- });
725
- }
726
653
  /**
727
654
  * Search deployed agents
728
655
  *
@@ -738,7 +665,7 @@ class Agents {
738
665
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
739
666
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
740
667
  method: "POST",
741
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
668
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
742
669
  contentType: "application/json",
743
670
  requestType: "json",
744
671
  body: serializers.AgentsSearchDeployedAgentsRequest.jsonOrThrow(request, {
@@ -796,7 +723,7 @@ class Agents {
796
723
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
797
724
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
798
725
  method: "POST",
799
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
800
727
  contentType: "application/json",
801
728
  queryParameters: _queryParams,
802
729
  requestType: "json",
@@ -859,7 +786,7 @@ class Agents {
859
786
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
860
787
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
861
788
  method: "POST",
862
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
789
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
863
790
  contentType: "application/json",
864
791
  requestType: "json",
865
792
  body: serializers.AgentsMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -931,7 +858,7 @@ class Agents {
931
858
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
932
859
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
933
860
  method: "POST",
934
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
861
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
935
862
  contentType: "application/json",
936
863
  requestType: "json",
937
864
  body: serializers.AgentsCreateTemplateFromAgentRequest.jsonOrThrow(request, {
@@ -989,7 +916,7 @@ class Agents {
989
916
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
990
917
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/variables`),
991
918
  method: "GET",
992
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
919
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
993
920
  contentType: "application/json",
994
921
  requestType: "json",
995
922
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -58,5 +58,6 @@ export interface CreateAgentRequest {
58
58
  projectId?: string;
59
59
  /** The environment variables for tool execution specific to this agent. */
60
60
  toolExecEnvironmentVariables?: Record<string, string | undefined>;
61
- userId?: string;
61
+ /** The variables that should be set for the agent. */
62
+ variables?: Record<string, string | undefined>;
62
63
  }
@@ -66,7 +66,7 @@ class ArchivalMemory {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/archival`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -143,7 +143,7 @@ class ArchivalMemory {
143
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
144
144
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival`),
145
145
  method: "GET",
146
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
146
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
147
147
  contentType: "application/json",
148
148
  queryParameters: _queryParams,
149
149
  requestType: "json",
@@ -212,7 +212,7 @@ class ArchivalMemory {
212
212
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
213
213
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival`),
214
214
  method: "POST",
215
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
215
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
216
216
  contentType: "application/json",
217
217
  requestType: "json",
218
218
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -279,7 +279,7 @@ class ArchivalMemory {
279
279
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
280
280
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival/${encodeURIComponent(memoryId)}`),
281
281
  method: "DELETE",
282
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
283
283
  contentType: "application/json",
284
284
  requestType: "json",
285
285
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -66,7 +66,7 @@ class Context {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/context`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -72,7 +72,7 @@ class Memory {
72
72
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
73
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory`),
74
74
  method: "GET",
75
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
75
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
76
76
  contentType: "application/json",
77
77
  requestType: "json",
78
78
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -66,7 +66,7 @@ class Messages {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/messages`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -67,7 +67,7 @@ class MemoryBlocks {
67
67
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
68
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
69
69
  method: "DELETE",
70
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
70
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
71
71
  contentType: "application/json",
72
72
  requestType: "json",
73
73
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -136,7 +136,7 @@ class MemoryBlocks {
136
136
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
137
137
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
138
138
  method: "POST",
139
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
139
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
140
140
  contentType: "application/json",
141
141
  requestType: "json",
142
142
  body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -76,6 +76,25 @@ export declare class Messages {
76
76
  * It will stream the steps of the response always, and stream the tokens if 'stream_tokens' is set to True.
77
77
  */
78
78
  stream(agentId: string, request: Letta.agents.LettaStreamingRequest, requestOptions?: Messages.RequestOptions): Promise<core.Stream<Letta.agents.LettaStreamingResponse>>;
79
+ /**
80
+ * Asynchronously process a user message and return a job ID.
81
+ * The actual processing happens in the background, and the status can be checked using the job ID.
82
+ *
83
+ * @param {string} agentId
84
+ * @param {Letta.LettaRequest} request
85
+ * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
86
+ *
87
+ * @throws {@link Letta.UnprocessableEntityError}
88
+ *
89
+ * @example
90
+ * await client.agents.messages.createAsync("agent_id", {
91
+ * messages: [{
92
+ * role: "user",
93
+ * text: "text"
94
+ * }]
95
+ * })
96
+ */
97
+ createAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Job>;
79
98
  protected _getCustomAuthorizationHeaders(): Promise<{
80
99
  Authorization: string;
81
100
  }>;
@@ -84,7 +84,7 @@ class Messages {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -157,7 +157,7 @@ class Messages {
157
157
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
158
158
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
159
159
  method: "POST",
160
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
160
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
161
161
  contentType: "application/json",
162
162
  requestType: "json",
163
163
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -225,7 +225,7 @@ class Messages {
225
225
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
226
226
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
227
227
  method: "PATCH",
228
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
228
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
229
229
  contentType: "application/json",
230
230
  requestType: "json",
231
231
  body: serializers.agents.MessageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -285,7 +285,7 @@ class Messages {
285
285
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
286
286
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
287
287
  method: "POST",
288
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
288
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
289
289
  contentType: "application/json",
290
290
  requestType: "json",
291
291
  body: serializers.agents.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -345,6 +345,79 @@ class Messages {
345
345
  }
346
346
  });
347
347
  }
348
+ /**
349
+ * Asynchronously process a user message and return a job ID.
350
+ * The actual processing happens in the background, and the status can be checked using the job ID.
351
+ *
352
+ * @param {string} agentId
353
+ * @param {Letta.LettaRequest} request
354
+ * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
355
+ *
356
+ * @throws {@link Letta.UnprocessableEntityError}
357
+ *
358
+ * @example
359
+ * await client.agents.messages.createAsync("agent_id", {
360
+ * messages: [{
361
+ * role: "user",
362
+ * text: "text"
363
+ * }]
364
+ * })
365
+ */
366
+ createAsync(agentId, request, requestOptions) {
367
+ var _a, _b;
368
+ return __awaiter(this, void 0, void 0, function* () {
369
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
370
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
371
+ method: "POST",
372
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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
+ contentType: "application/json",
374
+ requestType: "json",
375
+ body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
376
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
377
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
378
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
379
+ });
380
+ if (_response.ok) {
381
+ return serializers.Job.parseOrThrow(_response.body, {
382
+ unrecognizedObjectKeys: "passthrough",
383
+ allowUnrecognizedUnionMembers: true,
384
+ allowUnrecognizedEnumValues: true,
385
+ skipValidation: true,
386
+ breadcrumbsPrefix: ["response"],
387
+ });
388
+ }
389
+ if (_response.error.reason === "status-code") {
390
+ switch (_response.error.statusCode) {
391
+ case 422:
392
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
393
+ unrecognizedObjectKeys: "passthrough",
394
+ allowUnrecognizedUnionMembers: true,
395
+ allowUnrecognizedEnumValues: true,
396
+ skipValidation: true,
397
+ breadcrumbsPrefix: ["response"],
398
+ }));
399
+ default:
400
+ throw new errors.LettaError({
401
+ statusCode: _response.error.statusCode,
402
+ body: _response.error.body,
403
+ });
404
+ }
405
+ }
406
+ switch (_response.error.reason) {
407
+ case "non-json":
408
+ throw new errors.LettaError({
409
+ statusCode: _response.error.statusCode,
410
+ body: _response.error.rawBody,
411
+ });
412
+ case "timeout":
413
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/messages/async.");
414
+ case "unknown":
415
+ throw new errors.LettaError({
416
+ message: _response.error.errorMessage,
417
+ });
418
+ }
419
+ });
420
+ }
348
421
  _getCustomAuthorizationHeaders() {
349
422
  return __awaiter(this, void 0, void 0, function* () {
350
423
  const tokenValue = yield core.Supplier.get(this._options.token);
@@ -14,6 +14,8 @@ import * as Letta from "../../../../../../index";
14
14
  export interface LettaStreamingRequest {
15
15
  /** The messages to be sent to the agent. */
16
16
  messages: Letta.MessageCreate[];
17
+ /** Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects. */
18
+ useAssistantMessage?: boolean;
17
19
  /** The name of the designated message tool. */
18
20
  assistantMessageToolName?: string;
19
21
  /** The name of the message argument in the designated message tool. */
@@ -66,7 +66,7 @@ class RecallMemory {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/recall`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -66,7 +66,7 @@ class Sources {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -66,7 +66,7 @@ class Tools {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/tools`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -132,7 +132,7 @@ class Tools {
132
132
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
133
133
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`),
134
134
  method: "PATCH",
135
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
135
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
136
136
  contentType: "application/json",
137
137
  requestType: "json",
138
138
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -198,7 +198,7 @@ class Tools {
198
198
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
199
199
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`),
200
200
  method: "PATCH",
201
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
201
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
202
202
  contentType: "application/json",
203
203
  requestType: "json",
204
204
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,