@letta-ai/letta-client 0.1.7 → 0.1.8

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 (172) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +5 -0
  3. package/api/resources/agents/client/Client.d.ts +13 -0
  4. package/api/resources/agents/client/Client.js +78 -6
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  6. package/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  7. package/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
  8. package/api/resources/agents/client/requests/index.d.ts +1 -0
  9. package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  10. package/api/resources/agents/resources/context/client/Client.js +1 -1
  11. package/api/resources/agents/resources/coreMemory/client/Client.js +7 -7
  12. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  13. package/api/resources/agents/resources/messages/client/Client.d.ts +1 -1
  14. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  15. package/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  16. package/api/resources/agents/resources/sources/client/Client.js +1 -1
  17. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  18. package/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  19. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  20. package/api/resources/blocks/client/Client.js +7 -7
  21. package/api/resources/health/client/Client.js +1 -1
  22. package/api/resources/index.d.ts +2 -0
  23. package/api/resources/index.js +3 -1
  24. package/api/resources/jobs/client/Client.js +4 -4
  25. package/api/resources/models/client/Client.js +2 -2
  26. package/api/resources/providers/client/Client.js +4 -4
  27. package/api/resources/runs/client/Client.d.ts +115 -0
  28. package/api/resources/runs/client/Client.js +500 -0
  29. package/api/resources/runs/client/index.d.ts +1 -0
  30. package/api/resources/runs/client/index.js +17 -0
  31. package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  32. package/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  33. package/api/resources/runs/client/requests/index.d.ts +1 -0
  34. package/api/resources/runs/client/requests/index.js +2 -0
  35. package/api/resources/runs/index.d.ts +1 -0
  36. package/api/resources/runs/index.js +17 -0
  37. package/api/resources/sources/client/Client.js +8 -8
  38. package/api/resources/sources/resources/files/client/Client.js +3 -3
  39. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  40. package/api/resources/tools/client/Client.js +12 -12
  41. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  42. package/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
  43. package/api/types/Job.d.ts +2 -0
  44. package/api/types/JobType.d.ts +8 -0
  45. package/api/types/JobType.js +10 -0
  46. package/api/types/LettaSchemasToolTool.d.ts +0 -2
  47. package/api/types/Run.d.ts +34 -0
  48. package/api/types/Run.js +5 -0
  49. package/api/types/ToolCreate.d.ts +0 -2
  50. package/api/types/index.d.ts +2 -0
  51. package/api/types/index.js +2 -0
  52. package/dist/Client.d.ts +3 -0
  53. package/dist/Client.js +5 -0
  54. package/dist/api/resources/agents/client/Client.d.ts +13 -0
  55. package/dist/api/resources/agents/client/Client.js +78 -6
  56. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  57. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  58. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.js +5 -0
  59. package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
  60. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  61. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  62. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +7 -7
  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 +1 -1
  65. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  66. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  67. package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
  68. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  69. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  70. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  71. package/dist/api/resources/blocks/client/Client.js +7 -7
  72. package/dist/api/resources/health/client/Client.js +1 -1
  73. package/dist/api/resources/index.d.ts +2 -0
  74. package/dist/api/resources/index.js +3 -1
  75. package/dist/api/resources/jobs/client/Client.js +4 -4
  76. package/dist/api/resources/models/client/Client.js +2 -2
  77. package/dist/api/resources/providers/client/Client.js +4 -4
  78. package/dist/api/resources/runs/client/Client.d.ts +115 -0
  79. package/dist/api/resources/runs/client/Client.js +500 -0
  80. package/dist/api/resources/runs/client/index.d.ts +1 -0
  81. package/dist/api/resources/runs/client/index.js +17 -0
  82. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  83. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  84. package/dist/api/resources/runs/client/requests/index.d.ts +1 -0
  85. package/dist/api/resources/runs/client/requests/index.js +2 -0
  86. package/dist/api/resources/runs/index.d.ts +1 -0
  87. package/dist/api/resources/runs/index.js +17 -0
  88. package/dist/api/resources/sources/client/Client.js +8 -8
  89. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  90. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  91. package/dist/api/resources/tools/client/Client.js +12 -12
  92. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  93. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +0 -2
  94. package/dist/api/types/Job.d.ts +2 -0
  95. package/dist/api/types/JobType.d.ts +8 -0
  96. package/dist/api/types/JobType.js +10 -0
  97. package/dist/api/types/LettaSchemasToolTool.d.ts +0 -2
  98. package/dist/api/types/Run.d.ts +34 -0
  99. package/dist/api/types/Run.js +5 -0
  100. package/dist/api/types/ToolCreate.d.ts +0 -2
  101. package/dist/api/types/index.d.ts +2 -0
  102. package/dist/api/types/index.js +2 -0
  103. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  104. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  105. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  106. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +1 -1
  107. package/dist/serialization/resources/index.d.ts +1 -0
  108. package/dist/serialization/resources/index.js +2 -1
  109. package/dist/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  110. package/dist/serialization/resources/runs/client/getRunMessages.js +32 -0
  111. package/dist/serialization/resources/runs/client/index.d.ts +3 -0
  112. package/dist/serialization/resources/runs/client/index.js +29 -0
  113. package/dist/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  114. package/dist/serialization/resources/runs/client/listActiveRuns.js +32 -0
  115. package/dist/serialization/resources/runs/client/listRuns.d.ts +11 -0
  116. package/dist/serialization/resources/runs/client/listRuns.js +32 -0
  117. package/dist/serialization/resources/runs/index.d.ts +1 -0
  118. package/dist/serialization/resources/runs/index.js +17 -0
  119. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  120. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +1 -1
  121. package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
  122. package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +0 -1
  123. package/dist/serialization/types/Job.d.ts +2 -0
  124. package/dist/serialization/types/Job.js +2 -0
  125. package/dist/serialization/types/JobType.d.ts +10 -0
  126. package/dist/serialization/types/JobType.js +34 -0
  127. package/dist/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  128. package/dist/serialization/types/LettaSchemasToolTool.js +0 -1
  129. package/dist/serialization/types/Run.d.ts +22 -0
  130. package/dist/serialization/types/Run.js +43 -0
  131. package/dist/serialization/types/ToolCreate.d.ts +0 -1
  132. package/dist/serialization/types/ToolCreate.js +0 -1
  133. package/dist/serialization/types/index.d.ts +2 -0
  134. package/dist/serialization/types/index.js +2 -0
  135. package/dist/version.d.ts +1 -1
  136. package/dist/version.js +1 -1
  137. package/package.json +1 -1
  138. package/reference.md +458 -1
  139. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  140. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  141. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +1 -1
  142. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +1 -1
  143. package/serialization/resources/index.d.ts +1 -0
  144. package/serialization/resources/index.js +2 -1
  145. package/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  146. package/serialization/resources/runs/client/getRunMessages.js +32 -0
  147. package/serialization/resources/runs/client/index.d.ts +3 -0
  148. package/serialization/resources/runs/client/index.js +29 -0
  149. package/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  150. package/serialization/resources/runs/client/listActiveRuns.js +32 -0
  151. package/serialization/resources/runs/client/listRuns.d.ts +11 -0
  152. package/serialization/resources/runs/client/listRuns.js +32 -0
  153. package/serialization/resources/runs/index.d.ts +1 -0
  154. package/serialization/resources/runs/index.js +17 -0
  155. package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +1 -1
  156. package/serialization/resources/tools/client/requests/ToolRunFromSource.js +1 -1
  157. package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +0 -1
  158. package/serialization/resources/tools/client/requests/ToolUpdate.js +0 -1
  159. package/serialization/types/Job.d.ts +2 -0
  160. package/serialization/types/Job.js +2 -0
  161. package/serialization/types/JobType.d.ts +10 -0
  162. package/serialization/types/JobType.js +34 -0
  163. package/serialization/types/LettaSchemasToolTool.d.ts +0 -1
  164. package/serialization/types/LettaSchemasToolTool.js +0 -1
  165. package/serialization/types/Run.d.ts +22 -0
  166. package/serialization/types/Run.js +43 -0
  167. package/serialization/types/ToolCreate.d.ts +0 -1
  168. package/serialization/types/ToolCreate.js +0 -1
  169. package/serialization/types/index.d.ts +2 -0
  170. package/serialization/types/index.js +2 -0
  171. package/version.d.ts +1 -1
  172. package/version.js +1 -1
package/Client.d.ts CHANGED
@@ -11,6 +11,7 @@ import { Blocks } from "./api/resources/blocks/client/Client";
11
11
  import { Jobs } from "./api/resources/jobs/client/Client";
12
12
  import { Health } from "./api/resources/health/client/Client";
13
13
  import { Providers } from "./api/resources/providers/client/Client";
14
+ import { Runs } from "./api/resources/runs/client/Client";
14
15
  export declare namespace LettaClient {
15
16
  interface Options {
16
17
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -38,6 +39,7 @@ export declare class LettaClient {
38
39
  protected _jobs: Jobs | undefined;
39
40
  protected _health: Health | undefined;
40
41
  protected _providers: Providers | undefined;
42
+ protected _runs: Runs | undefined;
41
43
  constructor(_options?: LettaClient.Options);
42
44
  get tools(): Tools;
43
45
  get sources(): Sources;
@@ -47,4 +49,5 @@ export declare class LettaClient {
47
49
  get jobs(): Jobs;
48
50
  get health(): Health;
49
51
  get providers(): Providers;
52
+ get runs(): Runs;
50
53
  }
package/Client.js CHANGED
@@ -12,6 +12,7 @@ const Client_5 = require("./api/resources/blocks/client/Client");
12
12
  const Client_6 = require("./api/resources/jobs/client/Client");
13
13
  const Client_7 = require("./api/resources/health/client/Client");
14
14
  const Client_8 = require("./api/resources/providers/client/Client");
15
+ const Client_9 = require("./api/resources/runs/client/Client");
15
16
  class LettaClient {
16
17
  constructor(_options = {}) {
17
18
  this._options = _options;
@@ -48,5 +49,9 @@ class LettaClient {
48
49
  var _a;
49
50
  return ((_a = this._providers) !== null && _a !== void 0 ? _a : (this._providers = new Client_8.Providers(this._options)));
50
51
  }
52
+ get runs() {
53
+ var _a;
54
+ return ((_a = this._runs) !== null && _a !== void 0 ? _a : (this._runs = new Client_9.Runs(this._options)));
55
+ }
51
56
  }
52
57
  exports.LettaClient = LettaClient;
@@ -118,6 +118,19 @@ export declare class Agents {
118
118
  * await client.agents.update("agent_id")
119
119
  */
120
120
  update(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
121
+ /**
122
+ * Resets the messages for an agent
123
+ *
124
+ * @param {string} agentId
125
+ * @param {Letta.ResetMessagesRequest} request
126
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
127
+ *
128
+ * @throws {@link Letta.UnprocessableEntityError}
129
+ *
130
+ * @example
131
+ * await client.agents.resetMessages("agent_id")
132
+ */
133
+ resetMessages(agentId: string, request?: Letta.ResetMessagesRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
121
134
  /**
122
135
  * <Note>This endpoint is only available on Letta Cloud.</Note>
123
136
  *
@@ -134,7 +134,7 @@ class Agents {
134
134
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
135
135
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
136
136
  method: "GET",
137
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
137
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
138
138
  contentType: "application/json",
139
139
  queryParameters: _queryParams,
140
140
  requestType: "json",
@@ -205,7 +205,7 @@ class Agents {
205
205
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
206
206
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
207
207
  method: "POST",
208
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
208
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
209
209
  contentType: "application/json",
210
210
  requestType: "json",
211
211
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -271,7 +271,7 @@ class Agents {
271
271
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
272
272
  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)}`),
273
273
  method: "GET",
274
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
274
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
275
275
  contentType: "application/json",
276
276
  requestType: "json",
277
277
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -336,7 +336,7 @@ class Agents {
336
336
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
337
337
  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)}`),
338
338
  method: "DELETE",
339
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
339
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
340
340
  contentType: "application/json",
341
341
  requestType: "json",
342
342
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -396,7 +396,7 @@ class Agents {
396
396
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
397
397
  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)}`),
398
398
  method: "PATCH",
399
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
399
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
400
400
  contentType: "application/json",
401
401
  requestType: "json",
402
402
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -445,6 +445,78 @@ class Agents {
445
445
  }
446
446
  });
447
447
  }
448
+ /**
449
+ * Resets the messages for an agent
450
+ *
451
+ * @param {string} agentId
452
+ * @param {Letta.ResetMessagesRequest} request
453
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
454
+ *
455
+ * @throws {@link Letta.UnprocessableEntityError}
456
+ *
457
+ * @example
458
+ * await client.agents.resetMessages("agent_id")
459
+ */
460
+ resetMessages(agentId, request = {}, requestOptions) {
461
+ var _a, _b;
462
+ return __awaiter(this, void 0, void 0, function* () {
463
+ const { addDefaultInitialMessages } = request;
464
+ const _queryParams = {};
465
+ if (addDefaultInitialMessages != null) {
466
+ _queryParams["add_default_initial_messages"] = addDefaultInitialMessages.toString();
467
+ }
468
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
469
+ 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)}/reset-messages`),
470
+ method: "PATCH",
471
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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
+ contentType: "application/json",
473
+ queryParameters: _queryParams,
474
+ requestType: "json",
475
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
476
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
477
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
478
+ });
479
+ if (_response.ok) {
480
+ return serializers.AgentState.parseOrThrow(_response.body, {
481
+ unrecognizedObjectKeys: "passthrough",
482
+ allowUnrecognizedUnionMembers: true,
483
+ allowUnrecognizedEnumValues: true,
484
+ skipValidation: true,
485
+ breadcrumbsPrefix: ["response"],
486
+ });
487
+ }
488
+ if (_response.error.reason === "status-code") {
489
+ switch (_response.error.statusCode) {
490
+ case 422:
491
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
492
+ unrecognizedObjectKeys: "passthrough",
493
+ allowUnrecognizedUnionMembers: true,
494
+ allowUnrecognizedEnumValues: true,
495
+ skipValidation: true,
496
+ breadcrumbsPrefix: ["response"],
497
+ }));
498
+ default:
499
+ throw new errors.LettaError({
500
+ statusCode: _response.error.statusCode,
501
+ body: _response.error.body,
502
+ });
503
+ }
504
+ }
505
+ switch (_response.error.reason) {
506
+ case "non-json":
507
+ throw new errors.LettaError({
508
+ statusCode: _response.error.statusCode,
509
+ body: _response.error.rawBody,
510
+ });
511
+ case "timeout":
512
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/reset-messages.");
513
+ case "unknown":
514
+ throw new errors.LettaError({
515
+ message: _response.error.errorMessage,
516
+ });
517
+ }
518
+ });
519
+ }
448
520
  /**
449
521
  * <Note>This endpoint is only available on Letta Cloud.</Note>
450
522
  *
@@ -462,7 +534,7 @@ class Agents {
462
534
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
463
535
  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"),
464
536
  method: "POST",
465
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
537
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
466
538
  contentType: "application/json",
467
539
  requestType: "json",
468
540
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -54,8 +54,8 @@ export interface CreateAgentRequest {
54
54
  embeddingChunkSize?: number;
55
55
  /** The template id used to configure the agent */
56
56
  fromTemplate?: string;
57
- /** The project id that the agent will be associated with. */
58
- projectId?: string;
57
+ /** The project slug that the agent will be associated with. */
58
+ project?: string;
59
59
  /** The environment variables for tool execution specific to this agent. */
60
60
  toolExecEnvironmentVariables?: Record<string, string | undefined>;
61
61
  /** The variables that should be set for the agent. */
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface ResetMessagesRequest {
9
+ /**
10
+ * If true, adds the default initial messages after resetting.
11
+ */
12
+ addDefaultInitialMessages?: boolean;
13
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  export { type AgentsListRequest } from "./AgentsListRequest";
2
2
  export { type CreateAgentRequest } from "./CreateAgentRequest";
3
3
  export { type UpdateAgent } from "./UpdateAgent";
4
+ export { type ResetMessagesRequest } from "./ResetMessagesRequest";
4
5
  export { type AgentsSearchRequest } from "./AgentsSearchRequest";
@@ -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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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 CoreMemory {
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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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 CoreMemory {
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)}/memory`),
134
134
  method: "GET",
135
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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 CoreMemory {
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)}/memory/block/${encodeURIComponent(blockLabel)}`),
200
200
  method: "GET",
201
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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,
@@ -264,7 +264,7 @@ class CoreMemory {
264
264
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
265
265
  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)}`),
266
266
  method: "DELETE",
267
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
267
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
268
268
  contentType: "application/json",
269
269
  requestType: "json",
270
270
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -331,7 +331,7 @@ class CoreMemory {
331
331
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
332
332
  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)}`),
333
333
  method: "PATCH",
334
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
334
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
335
335
  contentType: "application/json",
336
336
  requestType: "json",
337
337
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -397,7 +397,7 @@ class CoreMemory {
397
397
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
398
398
  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`),
399
399
  method: "GET",
400
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
400
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
401
401
  contentType: "application/json",
402
402
  requestType: "json",
403
403
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -466,7 +466,7 @@ class CoreMemory {
466
466
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
467
467
  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`),
468
468
  method: "POST",
469
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
469
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
470
470
  contentType: "application/json",
471
471
  requestType: "json",
472
472
  body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -68,7 +68,7 @@ class MemoryVariables {
68
68
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
69
69
  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`),
70
70
  method: "GET",
71
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
72
72
  contentType: "application/json",
73
73
  requestType: "json",
74
74
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -94,7 +94,7 @@ export declare class Messages {
94
94
  * }]
95
95
  * })
96
96
  */
97
- createAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Job>;
97
+ createAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Run>;
98
98
  protected _getCustomAuthorizationHeaders(): Promise<{
99
99
  Authorization: string;
100
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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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" }),
@@ -369,7 +369,7 @@ class Messages {
369
369
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
370
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
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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -378,7 +378,7 @@ class Messages {
378
378
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
379
379
  });
380
380
  if (_response.ok) {
381
- return serializers.Job.parseOrThrow(_response.body, {
381
+ return serializers.Run.parseOrThrow(_response.body, {
382
382
  unrecognizedObjectKeys: "passthrough",
383
383
  allowUnrecognizedUnionMembers: true,
384
384
  allowUnrecognizedEnumValues: true,
@@ -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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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,
@@ -86,7 +86,7 @@ class Templates {
86
86
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
87
87
  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`),
88
88
  method: "POST",
89
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
89
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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
90
  contentType: "application/json",
91
91
  queryParameters: _queryParams,
92
92
  requestType: "json",
@@ -153,7 +153,7 @@ class Templates {
153
153
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
154
154
  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`),
155
155
  method: "POST",
156
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
156
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
157
157
  contentType: "application/json",
158
158
  requestType: "json",
159
159
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -227,7 +227,7 @@ class Templates {
227
227
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
228
228
  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`),
229
229
  method: "POST",
230
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
230
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
231
231
  contentType: "application/json",
232
232
  requestType: "json",
233
233
  body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -6,5 +6,5 @@
6
6
  * {}
7
7
  */
8
8
  export interface TemplatesCreateRequest {
9
- projectId?: string;
9
+ project?: string;
10
10
  }
@@ -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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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,