@letta-ai/letta-client 0.1.158 → 0.1.160

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 (152) hide show
  1. package/api/resources/agents/client/Client.d.ts +33 -0
  2. package/api/resources/agents/client/Client.js +148 -11
  3. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  4. package/api/resources/agents/resources/context/client/Client.js +1 -1
  5. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  6. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  7. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  8. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  9. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  10. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  11. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  12. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  13. package/api/resources/batches/client/Client.js +4 -4
  14. package/api/resources/blocks/client/Client.js +6 -6
  15. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  16. package/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  17. package/api/resources/embeddingModels/client/Client.js +1 -1
  18. package/api/resources/groups/client/Client.js +6 -6
  19. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  20. package/api/resources/health/client/Client.js +1 -1
  21. package/api/resources/identities/client/Client.js +7 -7
  22. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  23. package/api/resources/jobs/client/Client.js +5 -5
  24. package/api/resources/messages/client/Client.js +1 -1
  25. package/api/resources/models/client/Client.js +1 -1
  26. package/api/resources/projects/client/Client.js +1 -1
  27. package/api/resources/providers/client/Client.js +5 -5
  28. package/api/resources/runs/client/Client.js +4 -4
  29. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  30. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  31. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  32. package/api/resources/sources/client/Client.js +10 -10
  33. package/api/resources/sources/resources/files/client/Client.js +3 -3
  34. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  35. package/api/resources/steps/client/Client.js +2 -2
  36. package/api/resources/steps/resources/feedback/client/Client.js +1 -1
  37. package/api/resources/tags/client/Client.js +1 -1
  38. package/api/resources/telemetry/client/Client.js +1 -1
  39. package/api/resources/templates/client/Client.js +1 -1
  40. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  41. package/api/resources/tools/client/Client.js +19 -19
  42. package/api/resources/voice/client/Client.js +1 -1
  43. package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
  44. package/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
  45. package/api/types/FileBlock.d.ts +37 -0
  46. package/api/types/FileBlock.js +5 -0
  47. package/api/types/GenerateToolInput.d.ts +15 -0
  48. package/api/types/GenerateToolInput.js +5 -0
  49. package/api/types/GenerateToolOutput.d.ts +12 -0
  50. package/api/types/GenerateToolOutput.js +5 -0
  51. package/api/types/Memory.d.ts +2 -2
  52. package/api/types/ProviderType.d.ts +3 -1
  53. package/api/types/ProviderType.js +2 -0
  54. package/api/types/index.d.ts +3 -0
  55. package/api/types/index.js +3 -0
  56. package/dist/api/resources/agents/client/Client.d.ts +33 -0
  57. package/dist/api/resources/agents/client/Client.js +148 -11
  58. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  59. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  60. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  61. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  62. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  63. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  64. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  65. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  66. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  67. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  68. package/dist/api/resources/batches/client/Client.js +4 -4
  69. package/dist/api/resources/blocks/client/Client.js +6 -6
  70. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  71. package/dist/api/resources/clientSideAccessTokens/client/Client.js +3 -3
  72. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  73. package/dist/api/resources/groups/client/Client.js +6 -6
  74. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  75. package/dist/api/resources/health/client/Client.js +1 -1
  76. package/dist/api/resources/identities/client/Client.js +7 -7
  77. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  78. package/dist/api/resources/jobs/client/Client.js +5 -5
  79. package/dist/api/resources/messages/client/Client.js +1 -1
  80. package/dist/api/resources/models/client/Client.js +1 -1
  81. package/dist/api/resources/projects/client/Client.js +1 -1
  82. package/dist/api/resources/providers/client/Client.js +5 -5
  83. package/dist/api/resources/runs/client/Client.js +4 -4
  84. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  85. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  86. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  87. package/dist/api/resources/sources/client/Client.js +10 -10
  88. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  89. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  90. package/dist/api/resources/steps/client/Client.js +2 -2
  91. package/dist/api/resources/steps/resources/feedback/client/Client.js +1 -1
  92. package/dist/api/resources/tags/client/Client.js +1 -1
  93. package/dist/api/resources/telemetry/client/Client.js +1 -1
  94. package/dist/api/resources/templates/client/Client.js +1 -1
  95. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  96. package/dist/api/resources/tools/client/Client.js +19 -19
  97. package/dist/api/resources/voice/client/Client.js +1 -1
  98. package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
  99. package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
  100. package/dist/api/types/FileBlock.d.ts +37 -0
  101. package/dist/api/types/FileBlock.js +5 -0
  102. package/dist/api/types/GenerateToolInput.d.ts +15 -0
  103. package/dist/api/types/GenerateToolInput.js +5 -0
  104. package/dist/api/types/GenerateToolOutput.d.ts +12 -0
  105. package/dist/api/types/GenerateToolOutput.js +5 -0
  106. package/dist/api/types/Memory.d.ts +2 -2
  107. package/dist/api/types/ProviderType.d.ts +3 -1
  108. package/dist/api/types/ProviderType.js +2 -0
  109. package/dist/api/types/index.d.ts +3 -0
  110. package/dist/api/types/index.js +3 -0
  111. package/dist/serialization/resources/agents/client/index.d.ts +1 -0
  112. package/dist/serialization/resources/agents/client/index.js +2 -1
  113. package/dist/serialization/resources/agents/client/openFile.d.ts +9 -0
  114. package/dist/serialization/resources/agents/client/openFile.js +41 -0
  115. package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
  116. package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
  117. package/dist/serialization/types/FileBlock.d.ts +27 -0
  118. package/dist/serialization/types/FileBlock.js +58 -0
  119. package/dist/serialization/types/GenerateToolInput.d.ts +16 -0
  120. package/dist/serialization/types/GenerateToolInput.js +47 -0
  121. package/dist/serialization/types/GenerateToolOutput.d.ts +15 -0
  122. package/dist/serialization/types/GenerateToolOutput.js +46 -0
  123. package/dist/serialization/types/Memory.d.ts +2 -1
  124. package/dist/serialization/types/Memory.js +2 -1
  125. package/dist/serialization/types/ProviderType.d.ts +1 -1
  126. package/dist/serialization/types/ProviderType.js +2 -0
  127. package/dist/serialization/types/index.d.ts +3 -0
  128. package/dist/serialization/types/index.js +3 -0
  129. package/dist/version.d.ts +1 -1
  130. package/dist/version.js +1 -1
  131. package/package.json +1 -1
  132. package/reference.md +149 -0
  133. package/serialization/resources/agents/client/index.d.ts +1 -0
  134. package/serialization/resources/agents/client/index.js +2 -1
  135. package/serialization/resources/agents/client/openFile.d.ts +9 -0
  136. package/serialization/resources/agents/client/openFile.js +41 -0
  137. package/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
  138. package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
  139. package/serialization/types/FileBlock.d.ts +27 -0
  140. package/serialization/types/FileBlock.js +58 -0
  141. package/serialization/types/GenerateToolInput.d.ts +16 -0
  142. package/serialization/types/GenerateToolInput.js +47 -0
  143. package/serialization/types/GenerateToolOutput.d.ts +15 -0
  144. package/serialization/types/GenerateToolOutput.js +46 -0
  145. package/serialization/types/Memory.d.ts +2 -1
  146. package/serialization/types/Memory.js +2 -1
  147. package/serialization/types/ProviderType.d.ts +1 -1
  148. package/serialization/types/ProviderType.js +2 -0
  149. package/serialization/types/index.d.ts +3 -0
  150. package/serialization/types/index.js +3 -0
  151. package/version.d.ts +1 -1
  152. package/version.js +1 -1
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface GenerateToolInput {
5
+ /** Name of the tool to generate code for */
6
+ toolName: string;
7
+ /** User prompt to generate code */
8
+ prompt: string;
9
+ /** Handle of the tool to generate code for */
10
+ handle?: string;
11
+ /** Python source code to parse for JSON schema */
12
+ starterCode?: string;
13
+ /** List of validation errors */
14
+ validationErrors: string[];
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../index";
5
+ export interface GenerateToolOutput {
6
+ /** Generated tool */
7
+ tool: Letta.Tool;
8
+ /** Sample arguments for the tool */
9
+ sampleArgs: Record<string, unknown>;
10
+ /** Response from the assistant */
11
+ response: string;
12
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,8 +8,8 @@ import * as Letta from "../index";
8
8
  export interface Memory {
9
9
  /** Memory blocks contained in the agent's in-context memory */
10
10
  blocks: Letta.Block[];
11
- /** Blocks representing the agent's in-context memory of an attached file */
12
- fileBlocks?: Letta.Block[];
11
+ /** Special blocks representing the agent's in-context memory of an attached file */
12
+ fileBlocks?: Letta.FileBlock[];
13
13
  /** Jinja2 template for compiling memory blocks into a prompt string */
14
14
  promptTemplate?: string;
15
15
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type ProviderType = "anthropic" | "google_ai" | "google_vertex" | "openai" | "letta" | "deepseek" | "lmstudio_openai" | "xai" | "mistral" | "ollama" | "groq" | "together" | "azure" | "vllm" | "bedrock";
4
+ export type ProviderType = "anthropic" | "google_ai" | "google_vertex" | "openai" | "letta" | "deepseek" | "cerebras" | "lmstudio_openai" | "xai" | "mistral" | "ollama" | "groq" | "together" | "azure" | "vllm" | "bedrock" | "cohere";
5
5
  export declare const ProviderType: {
6
6
  readonly Anthropic: "anthropic";
7
7
  readonly GoogleAi: "google_ai";
@@ -9,6 +9,7 @@ export declare const ProviderType: {
9
9
  readonly Openai: "openai";
10
10
  readonly Letta: "letta";
11
11
  readonly Deepseek: "deepseek";
12
+ readonly Cerebras: "cerebras";
12
13
  readonly LmstudioOpenai: "lmstudio_openai";
13
14
  readonly Xai: "xai";
14
15
  readonly Mistral: "mistral";
@@ -18,4 +19,5 @@ export declare const ProviderType: {
18
19
  readonly Azure: "azure";
19
20
  readonly Vllm: "vllm";
20
21
  readonly Bedrock: "bedrock";
22
+ readonly Cohere: "cohere";
21
23
  };
@@ -11,6 +11,7 @@ exports.ProviderType = {
11
11
  Openai: "openai",
12
12
  Letta: "letta",
13
13
  Deepseek: "deepseek",
14
+ Cerebras: "cerebras",
14
15
  LmstudioOpenai: "lmstudio_openai",
15
16
  Xai: "xai",
16
17
  Mistral: "mistral",
@@ -20,4 +21,5 @@ exports.ProviderType = {
20
21
  Azure: "azure",
21
22
  Vllm: "vllm",
22
23
  Bedrock: "bedrock",
24
+ Cohere: "cohere",
23
25
  };
@@ -93,6 +93,7 @@ export * from "./EmbeddingConfigEmbeddingEndpointType";
93
93
  export * from "./EmbeddingConfig";
94
94
  export * from "./FeedbackType";
95
95
  export * from "./File_";
96
+ export * from "./FileBlock";
96
97
  export * from "./FileFile";
97
98
  export * from "./FileMetadata";
98
99
  export * from "./FileProcessingStatus";
@@ -102,6 +103,8 @@ export * from "./FunctionCall";
102
103
  export * from "./FunctionDefinitionInput";
103
104
  export * from "./FunctionDefinitionOutput";
104
105
  export * from "./FunctionTool";
106
+ export * from "./GenerateToolInput";
107
+ export * from "./GenerateToolOutput";
105
108
  export * from "./Group";
106
109
  export * from "./HttpValidationError";
107
110
  export * from "./Health";
@@ -109,6 +109,7 @@ __exportStar(require("./EmbeddingConfigEmbeddingEndpointType"), exports);
109
109
  __exportStar(require("./EmbeddingConfig"), exports);
110
110
  __exportStar(require("./FeedbackType"), exports);
111
111
  __exportStar(require("./File_"), exports);
112
+ __exportStar(require("./FileBlock"), exports);
112
113
  __exportStar(require("./FileFile"), exports);
113
114
  __exportStar(require("./FileMetadata"), exports);
114
115
  __exportStar(require("./FileProcessingStatus"), exports);
@@ -118,6 +119,8 @@ __exportStar(require("./FunctionCall"), exports);
118
119
  __exportStar(require("./FunctionDefinitionInput"), exports);
119
120
  __exportStar(require("./FunctionDefinitionOutput"), exports);
120
121
  __exportStar(require("./FunctionTool"), exports);
122
+ __exportStar(require("./GenerateToolInput"), exports);
123
+ __exportStar(require("./GenerateToolOutput"), exports);
121
124
  __exportStar(require("./Group"), exports);
122
125
  __exportStar(require("./HttpValidationError"), exports);
123
126
  __exportStar(require("./Health"), exports);
@@ -178,6 +178,39 @@ export declare class Agents {
178
178
  * await client.agents.closeAllOpenFiles("agent_id")
179
179
  */
180
180
  closeAllOpenFiles(agentId: string, requestOptions?: Agents.RequestOptions): Promise<string[]>;
181
+ /**
182
+ * Opens a specific file for a given agent.
183
+ *
184
+ * This endpoint marks a specific file as open in the agent's file state.
185
+ * The file will be included in the agent's working memory view.
186
+ * Returns a list of file names that were closed due to LRU eviction.
187
+ *
188
+ * @param {string} agentId
189
+ * @param {string} fileId
190
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
191
+ *
192
+ * @throws {@link Letta.UnprocessableEntityError}
193
+ *
194
+ * @example
195
+ * await client.agents.openFile("agent_id", "file_id")
196
+ */
197
+ openFile(agentId: string, fileId: string, requestOptions?: Agents.RequestOptions): Promise<string[]>;
198
+ /**
199
+ * Closes a specific file for a given agent.
200
+ *
201
+ * This endpoint marks a specific file as closed in the agent's file state.
202
+ * The file will be removed from the agent's working memory view.
203
+ *
204
+ * @param {string} agentId
205
+ * @param {string} fileId
206
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
207
+ *
208
+ * @throws {@link Letta.UnprocessableEntityError}
209
+ *
210
+ * @example
211
+ * await client.agents.closeFile("agent_id", "file_id")
212
+ */
213
+ closeFile(agentId: string, fileId: string, requestOptions?: Agents.RequestOptions): Promise<unknown>;
181
214
  /**
182
215
  * Summarize an agent's conversation history to a target message length.
183
216
  *
@@ -193,7 +193,7 @@ class Agents {
193
193
  method: "GET",
194
194
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
195
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
196
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
197
197
  contentType: "application/json",
198
198
  queryParameters: _queryParams,
199
199
  requestType: "json",
@@ -261,7 +261,7 @@ class Agents {
261
261
  method: "POST",
262
262
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
263
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
264
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
265
265
  contentType: "application/json",
266
266
  requestType: "json",
267
267
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -328,7 +328,7 @@ class Agents {
328
328
  method: "GET",
329
329
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
330
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
331
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
332
332
  contentType: "application/json",
333
333
  requestType: "json",
334
334
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -395,7 +395,7 @@ class Agents {
395
395
  method: "GET",
396
396
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
397
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
398
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
399
399
  contentType: "application/json",
400
400
  requestType: "json",
401
401
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -479,7 +479,7 @@ class Agents {
479
479
  method: "POST",
480
480
  headers: Object.assign(Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
481
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
482
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
483
483
  queryParameters: _queryParams,
484
484
  requestType: "file",
485
485
  duplex: _maybeEncodedRequest.duplex,
@@ -559,7 +559,7 @@ class Agents {
559
559
  method: "GET",
560
560
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
561
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
562
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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",
@@ -627,7 +627,7 @@ class Agents {
627
627
  method: "DELETE",
628
628
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
629
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
630
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
631
631
  contentType: "application/json",
632
632
  requestType: "json",
633
633
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -689,7 +689,7 @@ class Agents {
689
689
  method: "PATCH",
690
690
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
691
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
692
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
693
693
  contentType: "application/json",
694
694
  requestType: "json",
695
695
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -760,7 +760,7 @@ class Agents {
760
760
  method: "PATCH",
761
761
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
762
762
  ? yield core.Supplier.get(this._options.project)
763
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
763
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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
764
  contentType: "application/json",
765
765
  requestType: "json",
766
766
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -808,6 +808,143 @@ class Agents {
808
808
  }
809
809
  });
810
810
  }
811
+ /**
812
+ * Opens a specific file for a given agent.
813
+ *
814
+ * This endpoint marks a specific file as open in the agent's file state.
815
+ * The file will be included in the agent's working memory view.
816
+ * Returns a list of file names that were closed due to LRU eviction.
817
+ *
818
+ * @param {string} agentId
819
+ * @param {string} fileId
820
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
821
+ *
822
+ * @throws {@link Letta.UnprocessableEntityError}
823
+ *
824
+ * @example
825
+ * await client.agents.openFile("agent_id", "file_id")
826
+ */
827
+ openFile(agentId, fileId, requestOptions) {
828
+ return __awaiter(this, void 0, void 0, function* () {
829
+ var _a, _b, _c;
830
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
831
+ 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)}/files/${encodeURIComponent(fileId)}/open`),
832
+ method: "PATCH",
833
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
834
+ ? yield core.Supplier.get(this._options.project)
835
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
836
+ contentType: "application/json",
837
+ requestType: "json",
838
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
839
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
840
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
841
+ });
842
+ if (_response.ok) {
843
+ return serializers.agents.openFile.Response.parseOrThrow(_response.body, {
844
+ unrecognizedObjectKeys: "passthrough",
845
+ allowUnrecognizedUnionMembers: true,
846
+ allowUnrecognizedEnumValues: true,
847
+ skipValidation: true,
848
+ breadcrumbsPrefix: ["response"],
849
+ });
850
+ }
851
+ if (_response.error.reason === "status-code") {
852
+ switch (_response.error.statusCode) {
853
+ case 422:
854
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
855
+ unrecognizedObjectKeys: "passthrough",
856
+ allowUnrecognizedUnionMembers: true,
857
+ allowUnrecognizedEnumValues: true,
858
+ skipValidation: true,
859
+ breadcrumbsPrefix: ["response"],
860
+ }));
861
+ default:
862
+ throw new errors.LettaError({
863
+ statusCode: _response.error.statusCode,
864
+ body: _response.error.body,
865
+ });
866
+ }
867
+ }
868
+ switch (_response.error.reason) {
869
+ case "non-json":
870
+ throw new errors.LettaError({
871
+ statusCode: _response.error.statusCode,
872
+ body: _response.error.rawBody,
873
+ });
874
+ case "timeout":
875
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/files/{file_id}/open.");
876
+ case "unknown":
877
+ throw new errors.LettaError({
878
+ message: _response.error.errorMessage,
879
+ });
880
+ }
881
+ });
882
+ }
883
+ /**
884
+ * Closes a specific file for a given agent.
885
+ *
886
+ * This endpoint marks a specific file as closed in the agent's file state.
887
+ * The file will be removed from the agent's working memory view.
888
+ *
889
+ * @param {string} agentId
890
+ * @param {string} fileId
891
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
892
+ *
893
+ * @throws {@link Letta.UnprocessableEntityError}
894
+ *
895
+ * @example
896
+ * await client.agents.closeFile("agent_id", "file_id")
897
+ */
898
+ closeFile(agentId, fileId, requestOptions) {
899
+ return __awaiter(this, void 0, void 0, function* () {
900
+ var _a, _b, _c;
901
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
902
+ 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)}/files/${encodeURIComponent(fileId)}/close`),
903
+ method: "PATCH",
904
+ headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
905
+ ? yield core.Supplier.get(this._options.project)
906
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
907
+ contentType: "application/json",
908
+ requestType: "json",
909
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
910
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
911
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
912
+ });
913
+ if (_response.ok) {
914
+ return _response.body;
915
+ }
916
+ if (_response.error.reason === "status-code") {
917
+ switch (_response.error.statusCode) {
918
+ case 422:
919
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
920
+ unrecognizedObjectKeys: "passthrough",
921
+ allowUnrecognizedUnionMembers: true,
922
+ allowUnrecognizedEnumValues: true,
923
+ skipValidation: true,
924
+ breadcrumbsPrefix: ["response"],
925
+ }));
926
+ default:
927
+ throw new errors.LettaError({
928
+ statusCode: _response.error.statusCode,
929
+ body: _response.error.body,
930
+ });
931
+ }
932
+ }
933
+ switch (_response.error.reason) {
934
+ case "non-json":
935
+ throw new errors.LettaError({
936
+ statusCode: _response.error.statusCode,
937
+ body: _response.error.rawBody,
938
+ });
939
+ case "timeout":
940
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/files/{file_id}/close.");
941
+ case "unknown":
942
+ throw new errors.LettaError({
943
+ message: _response.error.errorMessage,
944
+ });
945
+ }
946
+ });
947
+ }
811
948
  /**
812
949
  * Summarize an agent's conversation history to a target message length.
813
950
  *
@@ -836,7 +973,7 @@ class Agents {
836
973
  method: "POST",
837
974
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
838
975
  ? yield core.Supplier.get(this._options.project)
839
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
976
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
840
977
  contentType: "application/json",
841
978
  queryParameters: _queryParams,
842
979
  requestType: "json",
@@ -904,7 +1041,7 @@ class Agents {
904
1041
  method: "POST",
905
1042
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
906
1043
  ? yield core.Supplier.get(this._options.project)
907
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
1044
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
908
1045
  contentType: "application/json",
909
1046
  requestType: "json",
910
1047
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -79,7 +79,7 @@ class Blocks {
79
79
  method: "GET",
80
80
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
81
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
83
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -148,7 +148,7 @@ class Blocks {
148
148
  method: "PATCH",
149
149
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
150
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
151
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
152
152
  contentType: "application/json",
153
153
  requestType: "json",
154
154
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -216,7 +216,7 @@ class Blocks {
216
216
  method: "GET",
217
217
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
218
218
  ? yield core.Supplier.get(this._options.project)
219
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
219
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
220
220
  contentType: "application/json",
221
221
  requestType: "json",
222
222
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -284,7 +284,7 @@ class Blocks {
284
284
  method: "PATCH",
285
285
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
286
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
287
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
288
288
  contentType: "application/json",
289
289
  requestType: "json",
290
290
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -352,7 +352,7 @@ class Blocks {
352
352
  method: "PATCH",
353
353
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
354
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
355
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
356
356
  contentType: "application/json",
357
357
  requestType: "json",
358
358
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -78,7 +78,7 @@ class Context {
78
78
  method: "GET",
79
79
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
80
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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
82
  contentType: "application/json",
83
83
  requestType: "json",
84
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -79,7 +79,7 @@ class CoreMemory {
79
79
  method: "GET",
80
80
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
81
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
83
83
  contentType: "application/json",
84
84
  requestType: "json",
85
85
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -84,7 +84,7 @@ class Groups {
84
84
  method: "GET",
85
85
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
86
86
  ? yield core.Supplier.get(this._options.project)
87
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -80,7 +80,7 @@ class MemoryVariables {
80
80
  method: "GET",
81
81
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
82
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.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
83
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
84
84
  contentType: "application/json",
85
85
  requestType: "json",
86
86
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -105,7 +105,7 @@ class Messages {
105
105
  method: "GET",
106
106
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
107
107
  ? yield core.Supplier.get(this._options.project)
108
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
108
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
109
109
  contentType: "application/json",
110
110
  queryParameters: _queryParams,
111
111
  requestType: "json",
@@ -183,7 +183,7 @@ class Messages {
183
183
  method: "POST",
184
184
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
185
185
  ? yield core.Supplier.get(this._options.project)
186
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
186
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
187
187
  contentType: "application/json",
188
188
  requestType: "json",
189
189
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -255,7 +255,7 @@ class Messages {
255
255
  method: "PATCH",
256
256
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
257
257
  ? yield core.Supplier.get(this._options.project)
258
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
258
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
259
259
  contentType: "application/json",
260
260
  requestType: "json",
261
261
  body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -317,7 +317,7 @@ class Messages {
317
317
  method: "POST",
318
318
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
319
319
  ? yield core.Supplier.get(this._options.project)
320
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
320
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
321
321
  contentType: "application/json",
322
322
  requestType: "json",
323
323
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -399,7 +399,7 @@ class Messages {
399
399
  method: "POST",
400
400
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
401
401
  ? yield core.Supplier.get(this._options.project)
402
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
402
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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
403
  contentType: "application/json",
404
404
  requestType: "json",
405
405
  body: request != null
@@ -484,7 +484,7 @@ class Messages {
484
484
  method: "POST",
485
485
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
486
486
  ? yield core.Supplier.get(this._options.project)
487
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
487
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
488
488
  contentType: "application/json",
489
489
  requestType: "json",
490
490
  body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -558,7 +558,7 @@ class Messages {
558
558
  method: "PATCH",
559
559
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
560
560
  ? yield core.Supplier.get(this._options.project)
561
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
561
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
562
562
  contentType: "application/json",
563
563
  queryParameters: _queryParams,
564
564
  requestType: "json",
@@ -639,7 +639,7 @@ class Messages {
639
639
  method: "POST",
640
640
  headers: Object.assign(Object.assign({ "X-Project": (yield core.Supplier.get(this._options.project)) != null
641
641
  ? yield core.Supplier.get(this._options.project)
642
- : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.158", "User-Agent": "@letta-ai/letta-client/0.1.158", "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),
642
+ : undefined, "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.160", "User-Agent": "@letta-ai/letta-client/0.1.160", "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),
643
643
  contentType: "application/json",
644
644
  requestType: "json",
645
645
  body: serializers.agents.MessagesPreviewRawPayloadRequest.jsonOrThrow(request, {