@letta-ai/letta-client 0.1.142 → 0.1.144

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 (215) hide show
  1. package/Client.d.ts +4 -0
  2. package/README.md +1 -1
  3. package/api/resources/agents/client/Client.d.ts +4 -0
  4. package/api/resources/agents/client/Client.js +31 -23
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
  6. package/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
  7. package/api/resources/agents/resources/blocks/client/Client.js +15 -5
  8. package/api/resources/agents/resources/context/client/Client.d.ts +4 -0
  9. package/api/resources/agents/resources/context/client/Client.js +3 -1
  10. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
  11. package/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
  12. package/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
  13. package/api/resources/agents/resources/groups/client/Client.js +3 -1
  14. package/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
  15. package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
  16. package/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
  17. package/api/resources/agents/resources/messages/client/Client.js +18 -6
  18. package/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
  19. package/api/resources/agents/resources/passages/client/Client.js +12 -4
  20. package/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
  21. package/api/resources/agents/resources/sources/client/Client.js +9 -3
  22. package/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
  23. package/api/resources/agents/resources/templates/client/Client.js +9 -3
  24. package/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
  25. package/api/resources/agents/resources/tools/client/Client.js +9 -3
  26. package/api/resources/batches/client/Client.d.ts +4 -0
  27. package/api/resources/batches/client/Client.js +12 -4
  28. package/api/resources/blocks/client/Client.d.ts +4 -0
  29. package/api/resources/blocks/client/Client.js +18 -6
  30. package/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
  31. package/api/resources/blocks/resources/agents/client/Client.js +3 -1
  32. package/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
  33. package/api/resources/clientSideAccessTokens/client/Client.js +6 -2
  34. package/api/resources/embeddingModels/client/Client.d.ts +4 -0
  35. package/api/resources/embeddingModels/client/Client.js +3 -1
  36. package/api/resources/groups/client/Client.d.ts +4 -0
  37. package/api/resources/groups/client/Client.js +20 -21
  38. package/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
  39. package/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
  40. package/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
  41. package/api/resources/groups/resources/messages/client/Client.js +15 -5
  42. package/api/resources/health/client/Client.d.ts +4 -0
  43. package/api/resources/health/client/Client.js +3 -1
  44. package/api/resources/identities/client/Client.d.ts +4 -0
  45. package/api/resources/identities/client/Client.js +23 -22
  46. package/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
  47. package/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
  48. package/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
  49. package/api/resources/identities/resources/properties/client/Client.js +3 -1
  50. package/api/resources/jobs/client/Client.d.ts +4 -0
  51. package/api/resources/jobs/client/Client.js +12 -4
  52. package/api/resources/messages/client/Client.d.ts +4 -0
  53. package/api/resources/messages/client/Client.js +3 -1
  54. package/api/resources/models/client/Client.d.ts +4 -0
  55. package/api/resources/models/client/Client.js +3 -1
  56. package/api/resources/projects/client/Client.d.ts +4 -0
  57. package/api/resources/projects/client/Client.js +3 -1
  58. package/api/resources/providers/client/Client.d.ts +4 -0
  59. package/api/resources/providers/client/Client.js +15 -5
  60. package/api/resources/runs/client/Client.d.ts +4 -0
  61. package/api/resources/runs/client/Client.js +12 -4
  62. package/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
  63. package/api/resources/runs/resources/messages/client/Client.js +3 -1
  64. package/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
  65. package/api/resources/runs/resources/steps/client/Client.js +3 -1
  66. package/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
  67. package/api/resources/runs/resources/usage/client/Client.js +3 -1
  68. package/api/resources/sources/client/Client.d.ts +4 -0
  69. package/api/resources/sources/client/Client.js +24 -8
  70. package/api/resources/sources/resources/files/client/Client.d.ts +4 -0
  71. package/api/resources/sources/resources/files/client/Client.js +9 -3
  72. package/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
  73. package/api/resources/sources/resources/passages/client/Client.js +3 -1
  74. package/api/resources/steps/client/Client.d.ts +4 -13
  75. package/api/resources/steps/client/Client.js +10 -75
  76. package/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
  77. package/api/resources/steps/client/requests/index.d.ts +0 -1
  78. package/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
  79. package/api/resources/steps/resources/feedback/client/Client.js +43 -11
  80. package/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
  81. package/api/resources/steps/resources/feedback/client/index.js +15 -0
  82. package/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
  83. package/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
  84. package/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
  85. package/api/resources/steps/resources/index.d.ts +1 -0
  86. package/api/resources/steps/resources/index.js +4 -0
  87. package/api/resources/tags/client/Client.d.ts +4 -0
  88. package/api/resources/tags/client/Client.js +3 -1
  89. package/api/resources/telemetry/client/Client.d.ts +4 -0
  90. package/api/resources/telemetry/client/Client.js +3 -1
  91. package/api/resources/templates/client/Client.d.ts +4 -0
  92. package/api/resources/templates/client/Client.js +3 -1
  93. package/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
  94. package/api/resources/templates/resources/agents/client/Client.js +3 -1
  95. package/api/resources/tools/client/Client.d.ts +4 -0
  96. package/api/resources/tools/client/Client.js +57 -19
  97. package/api/resources/voice/client/Client.d.ts +4 -0
  98. package/api/resources/voice/client/Client.js +3 -1
  99. package/dist/Client.d.ts +4 -0
  100. package/dist/api/resources/agents/client/Client.d.ts +4 -0
  101. package/dist/api/resources/agents/client/Client.js +31 -23
  102. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -2
  103. package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +4 -0
  104. package/dist/api/resources/agents/resources/blocks/client/Client.js +15 -5
  105. package/dist/api/resources/agents/resources/context/client/Client.d.ts +4 -0
  106. package/dist/api/resources/agents/resources/context/client/Client.js +3 -1
  107. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +4 -0
  108. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +3 -1
  109. package/dist/api/resources/agents/resources/groups/client/Client.d.ts +4 -0
  110. package/dist/api/resources/agents/resources/groups/client/Client.js +3 -1
  111. package/dist/api/resources/agents/resources/memoryVariables/client/Client.d.ts +4 -0
  112. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -1
  113. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +4 -0
  114. package/dist/api/resources/agents/resources/messages/client/Client.js +18 -6
  115. package/dist/api/resources/agents/resources/passages/client/Client.d.ts +4 -0
  116. package/dist/api/resources/agents/resources/passages/client/Client.js +12 -4
  117. package/dist/api/resources/agents/resources/sources/client/Client.d.ts +4 -0
  118. package/dist/api/resources/agents/resources/sources/client/Client.js +9 -3
  119. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +4 -0
  120. package/dist/api/resources/agents/resources/templates/client/Client.js +9 -3
  121. package/dist/api/resources/agents/resources/tools/client/Client.d.ts +4 -0
  122. package/dist/api/resources/agents/resources/tools/client/Client.js +9 -3
  123. package/dist/api/resources/batches/client/Client.d.ts +4 -0
  124. package/dist/api/resources/batches/client/Client.js +12 -4
  125. package/dist/api/resources/blocks/client/Client.d.ts +4 -0
  126. package/dist/api/resources/blocks/client/Client.js +18 -6
  127. package/dist/api/resources/blocks/resources/agents/client/Client.d.ts +4 -0
  128. package/dist/api/resources/blocks/resources/agents/client/Client.js +3 -1
  129. package/dist/api/resources/clientSideAccessTokens/client/Client.d.ts +4 -0
  130. package/dist/api/resources/clientSideAccessTokens/client/Client.js +6 -2
  131. package/dist/api/resources/embeddingModels/client/Client.d.ts +4 -0
  132. package/dist/api/resources/embeddingModels/client/Client.js +3 -1
  133. package/dist/api/resources/groups/client/Client.d.ts +4 -0
  134. package/dist/api/resources/groups/client/Client.js +20 -21
  135. package/dist/api/resources/groups/client/requests/GroupCreate.d.ts +0 -1
  136. package/dist/api/resources/groups/client/requests/GroupUpdate.d.ts +0 -1
  137. package/dist/api/resources/groups/resources/messages/client/Client.d.ts +4 -0
  138. package/dist/api/resources/groups/resources/messages/client/Client.js +15 -5
  139. package/dist/api/resources/health/client/Client.d.ts +4 -0
  140. package/dist/api/resources/health/client/Client.js +3 -1
  141. package/dist/api/resources/identities/client/Client.d.ts +4 -0
  142. package/dist/api/resources/identities/client/Client.js +23 -22
  143. package/dist/api/resources/identities/client/requests/IdentityCreate.d.ts +0 -1
  144. package/dist/api/resources/identities/client/requests/IdentityUpsert.d.ts +0 -1
  145. package/dist/api/resources/identities/resources/properties/client/Client.d.ts +4 -0
  146. package/dist/api/resources/identities/resources/properties/client/Client.js +3 -1
  147. package/dist/api/resources/jobs/client/Client.d.ts +4 -0
  148. package/dist/api/resources/jobs/client/Client.js +12 -4
  149. package/dist/api/resources/messages/client/Client.d.ts +4 -0
  150. package/dist/api/resources/messages/client/Client.js +3 -1
  151. package/dist/api/resources/models/client/Client.d.ts +4 -0
  152. package/dist/api/resources/models/client/Client.js +3 -1
  153. package/dist/api/resources/projects/client/Client.d.ts +4 -0
  154. package/dist/api/resources/projects/client/Client.js +3 -1
  155. package/dist/api/resources/providers/client/Client.d.ts +4 -0
  156. package/dist/api/resources/providers/client/Client.js +15 -5
  157. package/dist/api/resources/runs/client/Client.d.ts +4 -0
  158. package/dist/api/resources/runs/client/Client.js +12 -4
  159. package/dist/api/resources/runs/resources/messages/client/Client.d.ts +4 -0
  160. package/dist/api/resources/runs/resources/messages/client/Client.js +3 -1
  161. package/dist/api/resources/runs/resources/steps/client/Client.d.ts +4 -0
  162. package/dist/api/resources/runs/resources/steps/client/Client.js +3 -1
  163. package/dist/api/resources/runs/resources/usage/client/Client.d.ts +4 -0
  164. package/dist/api/resources/runs/resources/usage/client/Client.js +3 -1
  165. package/dist/api/resources/sources/client/Client.d.ts +4 -0
  166. package/dist/api/resources/sources/client/Client.js +24 -8
  167. package/dist/api/resources/sources/resources/files/client/Client.d.ts +4 -0
  168. package/dist/api/resources/sources/resources/files/client/Client.js +9 -3
  169. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +4 -0
  170. package/dist/api/resources/sources/resources/passages/client/Client.js +3 -1
  171. package/dist/api/resources/steps/client/Client.d.ts +4 -13
  172. package/dist/api/resources/steps/client/Client.js +10 -75
  173. package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
  174. package/dist/api/resources/steps/client/requests/index.d.ts +0 -1
  175. package/dist/api/resources/steps/resources/feedback/client/Client.d.ts +12 -2
  176. package/dist/api/resources/steps/resources/feedback/client/Client.js +43 -11
  177. package/dist/api/resources/steps/resources/feedback/client/index.d.ts +1 -1
  178. package/dist/api/resources/steps/resources/feedback/client/index.js +15 -0
  179. package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.d.ts → resources/feedback/client/requests/FeedbackCreateRequest.d.ts} +2 -2
  180. package/dist/api/resources/steps/resources/feedback/client/requests/index.d.ts +1 -0
  181. package/dist/api/resources/steps/resources/feedback/client/requests/index.js +2 -0
  182. package/dist/api/resources/steps/resources/index.d.ts +1 -0
  183. package/dist/api/resources/steps/resources/index.js +4 -0
  184. package/dist/api/resources/tags/client/Client.d.ts +4 -0
  185. package/dist/api/resources/tags/client/Client.js +3 -1
  186. package/dist/api/resources/telemetry/client/Client.d.ts +4 -0
  187. package/dist/api/resources/telemetry/client/Client.js +3 -1
  188. package/dist/api/resources/templates/client/Client.d.ts +4 -0
  189. package/dist/api/resources/templates/client/Client.js +3 -1
  190. package/dist/api/resources/templates/resources/agents/client/Client.d.ts +4 -0
  191. package/dist/api/resources/templates/resources/agents/client/Client.js +3 -1
  192. package/dist/api/resources/tools/client/Client.d.ts +4 -0
  193. package/dist/api/resources/tools/client/Client.js +57 -19
  194. package/dist/api/resources/voice/client/Client.d.ts +4 -0
  195. package/dist/api/resources/voice/client/Client.js +3 -1
  196. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  197. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  198. package/dist/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
  199. package/dist/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
  200. package/dist/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
  201. package/dist/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
  202. package/dist/version.d.ts +1 -1
  203. package/dist/version.js +1 -1
  204. package/package.json +1 -1
  205. package/reference.md +25 -73
  206. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  207. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  208. package/serialization/resources/groups/client/requests/GroupCreate.d.ts +1 -1
  209. package/serialization/resources/groups/client/requests/GroupUpdate.d.ts +1 -1
  210. package/serialization/resources/identities/client/requests/IdentityCreate.d.ts +1 -1
  211. package/serialization/resources/identities/client/requests/IdentityUpsert.d.ts +1 -1
  212. package/version.d.ts +1 -1
  213. package/version.js +1 -1
  214. /package/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
  215. /package/dist/api/resources/steps/{client/requests/AddFeedbackRequest.js → resources/feedback/client/requests/FeedbackCreateRequest.js} +0 -0
package/Client.d.ts CHANGED
@@ -30,6 +30,8 @@ export declare namespace LettaClient {
30
30
  /** Specify a custom URL to connect the client to. */
31
31
  baseUrl?: core.Supplier<string>;
32
32
  token?: core.Supplier<string | undefined>;
33
+ /** Override the X-Project header */
34
+ project?: core.Supplier<string | undefined>;
33
35
  fetcher?: core.FetchFunction;
34
36
  }
35
37
  interface RequestOptions {
@@ -39,6 +41,8 @@ export declare namespace LettaClient {
39
41
  maxRetries?: number;
40
42
  /** A hook to abort the request. */
41
43
  abortSignal?: AbortSignal;
44
+ /** Override the X-Project header */
45
+ project?: string | undefined;
42
46
  /** Additional headers to include in the request. */
43
47
  headers?: Record<string, string>;
44
48
  }
package/README.md CHANGED
@@ -22,7 +22,7 @@ Instantiate and use the client with the following:
22
22
  ```typescript
23
23
  import { LettaClient } from "@letta-ai/letta-client";
24
24
 
25
- const client = new LettaClient({ token: "YOUR_TOKEN" });
25
+ const client = new LettaClient({ token: "YOUR_TOKEN", project: "YOUR_PROJECT" });
26
26
  await client.tools.create({
27
27
  sourceCode: "source_code",
28
28
  });
@@ -22,6 +22,8 @@ export declare namespace Agents {
22
22
  /** Specify a custom URL to connect the client to. */
23
23
  baseUrl?: core.Supplier<string>;
24
24
  token?: core.Supplier<string | undefined>;
25
+ /** Override the X-Project header */
26
+ project?: core.Supplier<string | undefined>;
25
27
  fetcher?: core.FetchFunction;
26
28
  }
27
29
  interface RequestOptions {
@@ -31,6 +33,8 @@ export declare namespace Agents {
31
33
  maxRetries?: number;
32
34
  /** A hook to abort the request. */
33
35
  abortSignal?: AbortSignal;
36
+ /** Override the X-Project header */
37
+ project?: string | undefined;
34
38
  /** Additional headers to include in the request. */
35
39
  headers?: Record<string, string>;
36
40
  }
@@ -44,17 +44,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
44
44
  step((generator = generator.apply(thisArg, _arguments || [])).next());
45
45
  });
46
46
  };
47
- var __rest = (this && this.__rest) || function (s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- };
58
47
  var __importDefault = (this && this.__importDefault) || function (mod) {
59
48
  return (mod && mod.__esModule) ? mod : { "default": mod };
60
49
  };
@@ -202,7 +191,9 @@ class Agents {
202
191
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
203
192
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
204
193
  method: "GET",
205
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
194
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
195
+ ? yield core.Supplier.get(this._options.project)
196
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
206
197
  contentType: "application/json",
207
198
  queryParameters: _queryParams,
208
199
  requestType: "json",
@@ -265,14 +256,15 @@ class Agents {
265
256
  create() {
266
257
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
267
258
  var _a, _b, _c;
268
- const { project } = request, _body = __rest(request, ["project"]);
269
259
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
270
260
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
271
261
  method: "POST",
272
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
262
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
263
+ ? yield core.Supplier.get(this._options.project)
264
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
273
265
  contentType: "application/json",
274
266
  requestType: "json",
275
- body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
267
+ body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
276
268
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
277
269
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
278
270
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -334,7 +326,9 @@ class Agents {
334
326
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
335
327
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/count"),
336
328
  method: "GET",
337
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
329
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
330
+ ? yield core.Supplier.get(this._options.project)
331
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
338
332
  contentType: "application/json",
339
333
  requestType: "json",
340
334
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -399,7 +393,9 @@ class Agents {
399
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
400
394
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/export`),
401
395
  method: "GET",
402
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
396
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
397
+ ? yield core.Supplier.get(this._options.project)
398
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
403
399
  contentType: "application/json",
404
400
  requestType: "json",
405
401
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -481,7 +477,9 @@ class Agents {
481
477
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
482
478
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/import"),
483
479
  method: "POST",
484
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
480
+ headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
481
+ ? yield core.Supplier.get(this._options.project)
482
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
485
483
  queryParameters: _queryParams,
486
484
  requestType: "file",
487
485
  duplex: _maybeEncodedRequest.duplex,
@@ -559,7 +557,9 @@ class Agents {
559
557
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
560
558
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
561
559
  method: "GET",
562
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
560
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
561
+ ? yield core.Supplier.get(this._options.project)
562
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
563
563
  contentType: "application/json",
564
564
  queryParameters: _queryParams,
565
565
  requestType: "json",
@@ -625,7 +625,9 @@ class Agents {
625
625
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
626
626
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
627
627
  method: "DELETE",
628
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
628
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
629
+ ? yield core.Supplier.get(this._options.project)
630
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
629
631
  contentType: "application/json",
630
632
  requestType: "json",
631
633
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -685,7 +687,9 @@ class Agents {
685
687
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
686
688
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
687
689
  method: "PATCH",
688
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
690
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
691
+ ? yield core.Supplier.get(this._options.project)
692
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
689
693
  contentType: "application/json",
690
694
  requestType: "json",
691
695
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -760,7 +764,9 @@ class Agents {
760
764
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
761
765
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/summarize`),
762
766
  method: "POST",
763
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
767
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
768
+ ? yield core.Supplier.get(this._options.project)
769
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
764
770
  contentType: "application/json",
765
771
  queryParameters: _queryParams,
766
772
  requestType: "json",
@@ -826,7 +832,9 @@ class Agents {
826
832
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
827
833
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
828
834
  method: "POST",
829
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
835
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
836
+ ? yield core.Supplier.get(this._options.project)
837
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
830
838
  contentType: "application/json",
831
839
  requestType: "json",
832
840
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -7,7 +7,6 @@ import * as Letta from "../../../../index";
7
7
  * {}
8
8
  */
9
9
  export interface CreateAgentRequest {
10
- project?: string;
11
10
  /** The name of the agent. */
12
11
  name?: string;
13
12
  /** The blocks to create in the agent's in-context memory. */
@@ -65,7 +64,7 @@ export interface CreateAgentRequest {
65
64
  /** Whether the agent is a template */
66
65
  template?: boolean;
67
66
  /** Deprecated: Project should now be passed via the X-Project header instead of in the request body. If using the sdk, this can be done via the new x_project field below. */
68
- createAgentRequestProject?: string;
67
+ project?: string;
69
68
  /** The environment variables for tool execution specific to this agent. */
70
69
  toolExecEnvironmentVariables?: Record<string, string | undefined>;
71
70
  /** The variables that should be set for the agent. */
@@ -10,6 +10,8 @@ export declare namespace Blocks {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Blocks {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -77,7 +77,9 @@ class Blocks {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
79
79
  method: "GET",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
81
+ ? yield core.Supplier.get(this._options.project)
82
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
81
83
  contentType: "application/json",
82
84
  requestType: "json",
83
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -144,7 +146,9 @@ class Blocks {
144
146
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
147
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
146
148
  method: "PATCH",
147
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
149
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
150
+ ? yield core.Supplier.get(this._options.project)
151
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
148
152
  contentType: "application/json",
149
153
  requestType: "json",
150
154
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -210,7 +214,9 @@ class Blocks {
210
214
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
211
215
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks`),
212
216
  method: "GET",
213
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
217
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
218
+ ? yield core.Supplier.get(this._options.project)
219
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
214
220
  contentType: "application/json",
215
221
  requestType: "json",
216
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +282,9 @@ class Blocks {
276
282
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
283
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/attach/${encodeURIComponent(blockId)}`),
278
284
  method: "PATCH",
279
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
285
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
286
+ ? yield core.Supplier.get(this._options.project)
287
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
288
  contentType: "application/json",
281
289
  requestType: "json",
282
290
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -342,7 +350,9 @@ class Blocks {
342
350
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
351
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/detach/${encodeURIComponent(blockId)}`),
344
352
  method: "PATCH",
345
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
353
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
354
+ ? yield core.Supplier.get(this._options.project)
355
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
346
356
  contentType: "application/json",
347
357
  requestType: "json",
348
358
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace Context {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Context {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -76,7 +76,9 @@ class Context {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/context`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
80
+ ? yield core.Supplier.get(this._options.project)
81
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
82
  contentType: "application/json",
81
83
  requestType: "json",
82
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace CoreMemory {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace CoreMemory {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -77,7 +77,9 @@ class CoreMemory {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory`),
79
79
  method: "GET",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
81
+ ? yield core.Supplier.get(this._options.project)
82
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
81
83
  contentType: "application/json",
82
84
  requestType: "json",
83
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace Groups {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Groups {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -82,7 +82,9 @@ class Groups {
82
82
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
83
83
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/groups`),
84
84
  method: "GET",
85
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
86
+ ? yield core.Supplier.get(this._options.project)
87
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
88
  contentType: "application/json",
87
89
  queryParameters: _queryParams,
88
90
  requestType: "json",
@@ -10,6 +10,8 @@ export declare namespace MemoryVariables {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace MemoryVariables {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -78,7 +78,9 @@ class MemoryVariables {
78
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
79
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/variables`),
80
80
  method: "GET",
81
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
81
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
82
+ ? yield core.Supplier.get(this._options.project)
83
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
82
84
  contentType: "application/json",
83
85
  requestType: "json",
84
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -10,6 +10,8 @@ export declare namespace Messages {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Messages {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }
@@ -100,7 +100,9 @@ class Messages {
100
100
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
101
101
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
102
102
  method: "GET",
103
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
103
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
104
+ ? yield core.Supplier.get(this._options.project)
105
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
104
106
  contentType: "application/json",
105
107
  queryParameters: _queryParams,
106
108
  requestType: "json",
@@ -176,7 +178,9 @@ class Messages {
176
178
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
177
179
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
178
180
  method: "POST",
179
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
181
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
182
+ ? yield core.Supplier.get(this._options.project)
183
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
180
184
  contentType: "application/json",
181
185
  requestType: "json",
182
186
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -246,7 +250,9 @@ class Messages {
246
250
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
247
251
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
248
252
  method: "PATCH",
249
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
253
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
254
+ ? yield core.Supplier.get(this._options.project)
255
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
250
256
  contentType: "application/json",
251
257
  requestType: "json",
252
258
  body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -306,7 +312,9 @@ class Messages {
306
312
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
307
313
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
308
314
  method: "POST",
309
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
315
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
316
+ ? yield core.Supplier.get(this._options.project)
317
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
310
318
  contentType: "application/json",
311
319
  requestType: "json",
312
320
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -393,7 +401,9 @@ class Messages {
393
401
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
402
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
395
403
  method: "POST",
396
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
404
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
405
+ ? yield core.Supplier.get(this._options.project)
406
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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),
397
407
  contentType: "application/json",
398
408
  requestType: "json",
399
409
  body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -465,7 +475,9 @@ class Messages {
465
475
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
466
476
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
467
477
  method: "PATCH",
468
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.142", "User-Agent": "@letta-ai/letta-client/0.1.142", "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),
478
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
479
+ ? yield core.Supplier.get(this._options.project)
480
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.144", "User-Agent": "@letta-ai/letta-client/0.1.144", "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
481
  contentType: "application/json",
470
482
  queryParameters: _queryParams,
471
483
  requestType: "json",
@@ -10,6 +10,8 @@ export declare namespace Passages {
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
12
  token?: core.Supplier<string | undefined>;
13
+ /** Override the X-Project header */
14
+ project?: core.Supplier<string | undefined>;
13
15
  fetcher?: core.FetchFunction;
14
16
  }
15
17
  interface RequestOptions {
@@ -19,6 +21,8 @@ export declare namespace Passages {
19
21
  maxRetries?: number;
20
22
  /** A hook to abort the request. */
21
23
  abortSignal?: AbortSignal;
24
+ /** Override the X-Project header */
25
+ project?: string | undefined;
22
26
  /** Additional headers to include in the request. */
23
27
  headers?: Record<string, string>;
24
28
  }