@letta-ai/letta-client 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/api/resources/agents/client/Client.d.ts +13 -1
  2. package/api/resources/agents/client/Client.js +79 -26
  3. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  4. package/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
  5. package/api/resources/agents/resources/context/client/Client.js +2 -2
  6. package/api/resources/agents/resources/memory/client/Client.js +2 -2
  7. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
  8. package/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
  9. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  10. package/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
  11. package/api/resources/agents/resources/sources/client/Client.js +2 -2
  12. package/api/resources/agents/resources/tools/client/Client.js +6 -6
  13. package/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
  14. package/api/resources/agents/types/index.d.ts +1 -0
  15. package/api/resources/agents/types/index.js +1 -0
  16. package/api/resources/blocks/client/Client.js +14 -14
  17. package/api/resources/health/client/Client.js +2 -2
  18. package/api/resources/jobs/client/Client.js +8 -8
  19. package/api/resources/models/client/Client.js +4 -4
  20. package/api/resources/sources/client/Client.js +16 -16
  21. package/api/resources/sources/resources/files/client/Client.js +6 -6
  22. package/api/resources/sources/resources/passages/client/Client.js +2 -2
  23. package/api/resources/tools/client/Client.js +24 -24
  24. package/api/types/LettaResponse.d.ts +12 -62
  25. package/api/types/index.d.ts +0 -13
  26. package/api/types/index.js +0 -13
  27. package/dist/api/resources/agents/client/Client.d.ts +13 -1
  28. package/dist/api/resources/agents/client/Client.js +79 -26
  29. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  30. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +8 -8
  31. package/dist/api/resources/agents/resources/context/client/Client.js +2 -2
  32. package/dist/api/resources/agents/resources/memory/client/Client.js +2 -2
  33. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +2 -2
  34. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +4 -4
  35. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  36. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +2 -2
  37. package/dist/api/resources/agents/resources/sources/client/Client.js +2 -2
  38. package/dist/api/resources/agents/resources/tools/client/Client.js +6 -6
  39. package/dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +6 -0
  40. package/dist/api/resources/agents/types/index.d.ts +1 -0
  41. package/dist/api/resources/agents/types/index.js +1 -0
  42. package/dist/api/resources/blocks/client/Client.js +14 -14
  43. package/dist/api/resources/health/client/Client.js +2 -2
  44. package/dist/api/resources/jobs/client/Client.js +8 -8
  45. package/dist/api/resources/models/client/Client.js +4 -4
  46. package/dist/api/resources/sources/client/Client.js +16 -16
  47. package/dist/api/resources/sources/resources/files/client/Client.js +6 -6
  48. package/dist/api/resources/sources/resources/passages/client/Client.js +2 -2
  49. package/dist/api/resources/tools/client/Client.js +24 -24
  50. package/dist/api/types/LettaResponse.d.ts +12 -62
  51. package/dist/api/types/index.d.ts +0 -13
  52. package/dist/api/types/index.js +0 -13
  53. package/dist/environments.d.ts +2 -2
  54. package/dist/environments.js +1 -1
  55. package/dist/version.d.ts +1 -1
  56. package/dist/version.js +1 -1
  57. package/environments.d.ts +2 -2
  58. package/environments.js +1 -1
  59. package/package.json +1 -1
  60. package/reference.md +64 -1
  61. package/version.d.ts +1 -1
  62. package/version.js +1 -1
  63. package/api/types/LettaResponseAssistantMessage.d.ts +0 -9
  64. package/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -23
  65. package/api/types/LettaResponseReasoningMessage.d.ts +0 -17
  66. package/api/types/LettaResponseReasoningMessage.js +0 -5
  67. package/api/types/LettaResponseSystemMessage.d.ts +0 -17
  68. package/api/types/LettaResponseSystemMessage.js +0 -5
  69. package/api/types/LettaResponseToolCall.d.ts +0 -8
  70. package/api/types/LettaResponseToolCall.js +0 -5
  71. package/api/types/LettaResponseToolCallDelta.d.ts +0 -8
  72. package/api/types/LettaResponseToolCallDelta.js +0 -5
  73. package/api/types/LettaResponseToolCallMessage.d.ts +0 -18
  74. package/api/types/LettaResponseToolCallMessage.js +0 -5
  75. package/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
  76. package/api/types/LettaResponseToolCallMessageToolCall.js +0 -5
  77. package/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
  78. package/api/types/LettaResponseToolCallMessageToolCallOne.js +0 -5
  79. package/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
  80. package/api/types/LettaResponseToolCallMessageToolCallZero.js +0 -5
  81. package/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
  82. package/api/types/LettaResponseToolReturnMessage.js +0 -5
  83. package/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
  84. package/api/types/LettaResponseToolReturnMessageStatus.js +0 -10
  85. package/api/types/LettaResponseUserMessage.d.ts +0 -17
  86. package/api/types/LettaResponseUserMessage.js +0 -5
  87. package/dist/api/types/LettaResponseAssistantMessage.d.ts +0 -9
  88. package/dist/api/types/LettaResponseAssistantMessage.js +0 -5
  89. package/dist/api/types/LettaResponseLettaUsageStatistics.d.ts +0 -23
  90. package/dist/api/types/LettaResponseLettaUsageStatistics.js +0 -5
  91. package/dist/api/types/LettaResponseReasoningMessage.d.ts +0 -17
  92. package/dist/api/types/LettaResponseReasoningMessage.js +0 -5
  93. package/dist/api/types/LettaResponseSystemMessage.d.ts +0 -17
  94. package/dist/api/types/LettaResponseSystemMessage.js +0 -5
  95. package/dist/api/types/LettaResponseToolCall.d.ts +0 -8
  96. package/dist/api/types/LettaResponseToolCall.js +0 -5
  97. package/dist/api/types/LettaResponseToolCallDelta.d.ts +0 -8
  98. package/dist/api/types/LettaResponseToolCallDelta.js +0 -5
  99. package/dist/api/types/LettaResponseToolCallMessage.d.ts +0 -18
  100. package/dist/api/types/LettaResponseToolCallMessage.js +0 -5
  101. package/dist/api/types/LettaResponseToolCallMessageToolCall.d.ts +0 -5
  102. package/dist/api/types/LettaResponseToolCallMessageToolCall.js +0 -5
  103. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.d.ts +0 -8
  104. package/dist/api/types/LettaResponseToolCallMessageToolCallOne.js +0 -5
  105. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.d.ts +0 -8
  106. package/dist/api/types/LettaResponseToolCallMessageToolCallZero.js +0 -5
  107. package/dist/api/types/LettaResponseToolReturnMessage.d.ts +0 -26
  108. package/dist/api/types/LettaResponseToolReturnMessage.js +0 -5
  109. package/dist/api/types/LettaResponseToolReturnMessageStatus.d.ts +0 -8
  110. package/dist/api/types/LettaResponseToolReturnMessageStatus.js +0 -10
  111. package/dist/api/types/LettaResponseUserMessage.d.ts +0 -17
  112. package/dist/api/types/LettaResponseUserMessage.js +0 -5
  113. /package/api/{types/LettaResponseAssistantMessage.js → resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
  114. /package/{api/types/LettaResponseLettaUsageStatistics.js → dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js} +0 -0
@@ -101,7 +101,7 @@ export declare class Agents {
101
101
  * @example
102
102
  * await client.agents.delete("agent_id")
103
103
  */
104
- delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
104
+ delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<unknown>;
105
105
  /**
106
106
  * Update an exsiting agent
107
107
  *
@@ -229,5 +229,17 @@ export declare class Agents {
229
229
  * await client.agents.createtemplatefromagent("agent_id")
230
230
  */
231
231
  createtemplatefromagent(agentId: string, request?: Letta.AgentsCreateTemplateFromAgentRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
232
+ /**
233
+ * Get the variables associated with an agent
234
+ *
235
+ * @param {string} agentId
236
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
237
+ *
238
+ * @throws {@link Letta.NotFoundError}
239
+ *
240
+ * @example
241
+ * await client.agents.getagentvariables("agent_id")
242
+ */
243
+ getagentvariables(agentId: string, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentsGetAgentVariablesResponse>;
232
244
  protected _getAuthorizationHeader(): Promise<string>;
233
245
  }
@@ -131,9 +131,9 @@ class Agents {
131
131
  _queryParams["match_all_tags"] = matchAllTags.toString();
132
132
  }
133
133
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
134
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/agents/"),
134
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
135
135
  method: "GET",
136
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
136
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
137
137
  contentType: "application/json",
138
138
  queryParameters: _queryParams,
139
139
  requestType: "json",
@@ -190,9 +190,9 @@ class Agents {
190
190
  var _a, _b;
191
191
  return __awaiter(this, void 0, void 0, function* () {
192
192
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
193
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/agents/"),
193
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
194
194
  method: "POST",
195
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
195
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
196
196
  contentType: "application/json",
197
197
  requestType: "json",
198
198
  body: request,
@@ -244,9 +244,9 @@ class Agents {
244
244
  var _a, _b;
245
245
  return __awaiter(this, void 0, void 0, function* () {
246
246
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
247
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}`),
247
+ 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)}`),
248
248
  method: "GET",
249
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
249
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
250
250
  contentType: "application/json",
251
251
  requestType: "json",
252
252
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -297,9 +297,9 @@ class Agents {
297
297
  var _a, _b;
298
298
  return __awaiter(this, void 0, void 0, function* () {
299
299
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
300
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}`),
300
+ 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)}`),
301
301
  method: "DELETE",
302
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
302
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
303
303
  contentType: "application/json",
304
304
  requestType: "json",
305
305
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -351,9 +351,9 @@ class Agents {
351
351
  var _a, _b;
352
352
  return __awaiter(this, void 0, void 0, function* () {
353
353
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
354
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}`),
354
+ 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)}`),
355
355
  method: "PATCH",
356
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
356
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
357
357
  contentType: "application/json",
358
358
  requestType: "json",
359
359
  body: request,
@@ -406,9 +406,9 @@ class Agents {
406
406
  var _a, _b;
407
407
  return __awaiter(this, void 0, void 0, function* () {
408
408
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
409
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
409
+ 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)}`),
410
410
  method: "GET",
411
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
411
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
412
412
  contentType: "application/json",
413
413
  requestType: "json",
414
414
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -461,9 +461,9 @@ class Agents {
461
461
  var _a, _b;
462
462
  return __awaiter(this, void 0, void 0, function* () {
463
463
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
464
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
464
+ 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)}`),
465
465
  method: "PATCH",
466
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
466
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
467
467
  contentType: "application/json",
468
468
  requestType: "json",
469
469
  body: request,
@@ -515,9 +515,9 @@ class Agents {
515
515
  var _a, _b;
516
516
  return __awaiter(this, void 0, void 0, function* () {
517
517
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
518
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
518
+ 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`),
519
519
  method: "GET",
520
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
520
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
521
521
  contentType: "application/json",
522
522
  requestType: "json",
523
523
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -575,9 +575,9 @@ class Agents {
575
575
  var _a, _b;
576
576
  return __awaiter(this, void 0, void 0, function* () {
577
577
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
578
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
578
+ 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`),
579
579
  method: "POST",
580
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
580
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
581
581
  contentType: "application/json",
582
582
  requestType: "json",
583
583
  body: request,
@@ -627,9 +627,9 @@ class Agents {
627
627
  var _a, _b;
628
628
  return __awaiter(this, void 0, void 0, function* () {
629
629
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
630
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/agents/search"),
630
+ 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"),
631
631
  method: "POST",
632
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
632
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
633
633
  contentType: "application/json",
634
634
  requestType: "json",
635
635
  body: request,
@@ -683,9 +683,9 @@ class Agents {
683
683
  _queryParams["returnAgentState"] = returnAgentState.toString();
684
684
  }
685
685
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
686
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
686
+ 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`),
687
687
  method: "POST",
688
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
688
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
689
689
  contentType: "application/json",
690
690
  queryParameters: _queryParams,
691
691
  requestType: "json",
@@ -746,9 +746,9 @@ class Agents {
746
746
  var _a, _b;
747
747
  return __awaiter(this, void 0, void 0, function* () {
748
748
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
749
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
749
+ 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`),
750
750
  method: "POST",
751
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
751
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
752
752
  contentType: "application/json",
753
753
  requestType: "json",
754
754
  body: request,
@@ -806,9 +806,9 @@ class Agents {
806
806
  var _a, _b;
807
807
  return __awaiter(this, void 0, void 0, function* () {
808
808
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
809
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/template`),
809
+ 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`),
810
810
  method: "POST",
811
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
811
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
812
812
  contentType: "application/json",
813
813
  requestType: "json",
814
814
  body: request,
@@ -847,6 +847,59 @@ class Agents {
847
847
  }
848
848
  });
849
849
  }
850
+ /**
851
+ * Get the variables associated with an agent
852
+ *
853
+ * @param {string} agentId
854
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
855
+ *
856
+ * @throws {@link Letta.NotFoundError}
857
+ *
858
+ * @example
859
+ * await client.agents.getagentvariables("agent_id")
860
+ */
861
+ getagentvariables(agentId, requestOptions) {
862
+ var _a, _b;
863
+ return __awaiter(this, void 0, void 0, function* () {
864
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
865
+ 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`),
866
+ method: "GET",
867
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
868
+ contentType: "application/json",
869
+ requestType: "json",
870
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
871
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
872
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
873
+ });
874
+ if (_response.ok) {
875
+ return _response.body;
876
+ }
877
+ if (_response.error.reason === "status-code") {
878
+ switch (_response.error.statusCode) {
879
+ case 404:
880
+ throw new Letta.NotFoundError(_response.error.body);
881
+ default:
882
+ throw new errors.LettaError({
883
+ statusCode: _response.error.statusCode,
884
+ body: _response.error.body,
885
+ });
886
+ }
887
+ }
888
+ switch (_response.error.reason) {
889
+ case "non-json":
890
+ throw new errors.LettaError({
891
+ statusCode: _response.error.statusCode,
892
+ body: _response.error.rawBody,
893
+ });
894
+ case "timeout":
895
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/variables.");
896
+ case "unknown":
897
+ throw new errors.LettaError({
898
+ message: _response.error.errorMessage,
899
+ });
900
+ }
901
+ });
902
+ }
850
903
  _getAuthorizationHeader() {
851
904
  return __awaiter(this, void 0, void 0, function* () {
852
905
  return `Bearer ${yield core.Supplier.get(this._options.token)}`;
@@ -54,5 +54,7 @@ export interface CreateAgentRequest {
54
54
  embedding_chunk_size?: number;
55
55
  /** The template id used to configure the agent */
56
56
  from_template?: string;
57
+ /** The project id that the agent will be associated with. */
58
+ project_id?: string;
57
59
  user_id?: string;
58
60
  }
@@ -63,9 +63,9 @@ class ArchivalMemory {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/archival`),
66
+ 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`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -128,9 +128,9 @@ class ArchivalMemory {
128
128
  _queryParams["limit"] = limit.toString();
129
129
  }
130
130
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
131
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/archival`),
131
+ 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`),
132
132
  method: "GET",
133
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
133
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
134
134
  contentType: "application/json",
135
135
  queryParameters: _queryParams,
136
136
  requestType: "json",
@@ -185,9 +185,9 @@ class ArchivalMemory {
185
185
  var _a, _b;
186
186
  return __awaiter(this, void 0, void 0, function* () {
187
187
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
188
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/archival`),
188
+ 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`),
189
189
  method: "POST",
190
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
190
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
191
191
  contentType: "application/json",
192
192
  requestType: "json",
193
193
  body: request,
@@ -240,9 +240,9 @@ class ArchivalMemory {
240
240
  var _a, _b;
241
241
  return __awaiter(this, void 0, void 0, function* () {
242
242
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
243
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/archival/${encodeURIComponent(memoryId)}`),
243
+ 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)}`),
244
244
  method: "DELETE",
245
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
245
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
246
246
  contentType: "application/json",
247
247
  requestType: "json",
248
248
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Context {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/context`),
66
+ 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`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -69,9 +69,9 @@ class Memory {
69
69
  var _a, _b;
70
70
  return __awaiter(this, void 0, void 0, function* () {
71
71
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
72
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory`),
72
+ 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`),
73
73
  method: "GET",
74
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
74
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
75
75
  contentType: "application/json",
76
76
  requestType: "json",
77
77
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Messages {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/messages`),
66
+ 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`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -64,9 +64,9 @@ class MemoryBlocks {
64
64
  var _a, _b;
65
65
  return __awaiter(this, void 0, void 0, function* () {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
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/block/${encodeURIComponent(blockLabel)}`),
68
68
  method: "DELETE",
69
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, 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,
@@ -121,9 +121,9 @@ class MemoryBlocks {
121
121
  var _a, _b;
122
122
  return __awaiter(this, void 0, void 0, function* () {
123
123
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
124
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
124
+ 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`),
125
125
  method: "POST",
126
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
126
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
127
127
  contentType: "application/json",
128
128
  requestType: "json",
129
129
  body: request,
@@ -81,9 +81,9 @@ class Messages {
81
81
  _queryParams["assistant_message_tool_kwarg"] = assistantMessageToolKwarg;
82
82
  }
83
83
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
84
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages`),
84
+ 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`),
85
85
  method: "GET",
86
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
87
  contentType: "application/json",
88
88
  queryParameters: _queryParams,
89
89
  requestType: "json",
@@ -142,9 +142,9 @@ class Messages {
142
142
  var _a, _b;
143
143
  return __awaiter(this, void 0, void 0, function* () {
144
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages`),
145
+ 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`),
146
146
  method: "POST",
147
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
148
148
  contentType: "application/json",
149
149
  requestType: "json",
150
150
  body: request,
@@ -198,9 +198,9 @@ class Messages {
198
198
  var _a, _b;
199
199
  return __awaiter(this, void 0, void 0, function* () {
200
200
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
201
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
201
+ 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)}`),
202
202
  method: "PATCH",
203
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
203
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
204
204
  contentType: "application/json",
205
205
  requestType: "json",
206
206
  body: request,
@@ -246,9 +246,9 @@ class Messages {
246
246
  var _a, _b;
247
247
  return __awaiter(this, void 0, void 0, function* () {
248
248
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
249
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
249
+ 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`),
250
250
  method: "POST",
251
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
251
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
252
252
  contentType: "application/json",
253
253
  requestType: "json",
254
254
  body: request,
@@ -63,9 +63,9 @@ class RecallMemory {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/recall`),
66
+ 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`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Sources {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/sources`),
66
+ 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`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -63,9 +63,9 @@ class Tools {
63
63
  var _a, _b;
64
64
  return __awaiter(this, void 0, void 0, function* () {
65
65
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
66
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/tools`),
66
+ 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`),
67
67
  method: "GET",
68
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
68
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
69
69
  contentType: "application/json",
70
70
  requestType: "json",
71
71
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -117,9 +117,9 @@ class Tools {
117
117
  var _a, _b;
118
118
  return __awaiter(this, void 0, void 0, function* () {
119
119
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
120
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`),
120
+ 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)}`),
121
121
  method: "PATCH",
122
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
122
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
123
123
  contentType: "application/json",
124
124
  requestType: "json",
125
125
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -171,9 +171,9 @@ class Tools {
171
171
  var _a, _b;
172
172
  return __awaiter(this, void 0, void 0, function* () {
173
173
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
174
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`),
174
+ 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)}`),
175
175
  method: "PATCH",
176
- headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
176
+ headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.2", "User-Agent": "@letta-ai/letta-client/0.1.2", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
177
177
  contentType: "application/json",
178
178
  requestType: "json",
179
179
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface AgentsGetAgentVariablesResponse {
5
+ variables: Record<string, string>;
6
+ }
@@ -9,3 +9,4 @@ export * from "./AgentsSearchDeployedAgentsRequestSearchItemDirection";
9
9
  export * from "./AgentsSearchDeployedAgentsRequestSearchItem";
10
10
  export * from "./AgentsSearchDeployedAgentsRequestCombinator";
11
11
  export * from "./AgentsMigrateResponse";
12
+ export * from "./AgentsGetAgentVariablesResponse";
@@ -25,3 +25,4 @@ __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItemDirection"),
25
25
  __exportStar(require("./AgentsSearchDeployedAgentsRequestSearchItem"), exports);
26
26
  __exportStar(require("./AgentsSearchDeployedAgentsRequestCombinator"), exports);
27
27
  __exportStar(require("./AgentsMigrateResponse"), exports);
28
+ __exportStar(require("./AgentsGetAgentVariablesResponse"), exports);