@letta-ai/letta-client 0.1.123 → 0.1.125

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 (309) hide show
  1. package/README.md +1 -1
  2. package/api/resources/agents/client/Client.d.ts +18 -0
  3. package/api/resources/agents/client/Client.js +84 -9
  4. package/api/resources/agents/client/requests/SummarizeAgentConversationRequest.d.ts +15 -0
  5. package/api/resources/agents/client/requests/SummarizeAgentConversationRequest.js +5 -0
  6. package/api/resources/agents/client/requests/index.d.ts +1 -0
  7. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  8. package/api/resources/agents/resources/context/client/Client.js +1 -1
  9. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  10. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  11. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  12. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  13. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  14. package/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -0
  15. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  16. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  17. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  18. package/api/resources/batches/client/Client.js +4 -4
  19. package/api/resources/blocks/client/Client.js +6 -6
  20. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  21. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  22. package/api/resources/embeddingModels/client/Client.js +1 -1
  23. package/api/resources/groups/client/Client.js +6 -6
  24. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  25. package/api/resources/health/client/Client.js +1 -1
  26. package/api/resources/identities/client/Client.js +7 -7
  27. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  28. package/api/resources/jobs/client/Client.d.ts +2 -1
  29. package/api/resources/jobs/client/Client.js +13 -6
  30. package/api/resources/jobs/client/requests/JobsListActiveRequest.d.ts +13 -0
  31. package/api/resources/jobs/client/requests/JobsListActiveRequest.js +5 -0
  32. package/api/resources/jobs/client/requests/index.d.ts +1 -0
  33. package/api/resources/messages/client/Client.js +1 -1
  34. package/api/resources/models/client/Client.js +1 -1
  35. package/api/resources/projects/client/Client.js +1 -1
  36. package/api/resources/providers/client/Client.js +5 -5
  37. package/api/resources/runs/client/Client.js +4 -4
  38. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  39. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  40. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  41. package/api/resources/sources/client/Client.js +7 -7
  42. package/api/resources/sources/resources/files/client/Client.js +7 -4
  43. package/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +4 -0
  44. package/api/resources/sources/resources/index.d.ts +1 -0
  45. package/api/resources/sources/resources/index.js +1 -0
  46. package/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  47. package/api/resources/sources/resources/passages/client/Client.js +16 -3
  48. package/api/resources/sources/resources/passages/client/index.d.ts +1 -1
  49. package/api/resources/sources/resources/passages/client/index.js +15 -0
  50. package/api/resources/sources/resources/passages/client/requests/PassagesListRequest.d.ts +21 -0
  51. package/api/resources/sources/resources/passages/client/requests/PassagesListRequest.js +5 -0
  52. package/api/resources/sources/resources/passages/client/requests/index.d.ts +1 -0
  53. package/api/resources/sources/resources/passages/client/requests/index.js +2 -0
  54. package/api/resources/steps/client/Client.js +11 -3
  55. package/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
  56. package/api/resources/tags/client/Client.js +1 -1
  57. package/api/resources/telemetry/client/Client.js +1 -1
  58. package/api/resources/templates/client/Client.js +1 -1
  59. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  60. package/api/resources/tools/client/Client.js +17 -17
  61. package/api/resources/tools/types/AddMcpServerResponseItem.d.ts +1 -1
  62. package/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +1 -1
  63. package/api/resources/voice/client/Client.js +1 -1
  64. package/api/types/AgentType.d.ts +2 -1
  65. package/api/types/AgentType.js +1 -0
  66. package/api/types/Base64Image.d.ts +12 -0
  67. package/api/types/Base64Image.js +5 -0
  68. package/api/types/Block.d.ts +2 -0
  69. package/api/types/BlockUpdate.d.ts +2 -0
  70. package/api/types/CreateBlock.d.ts +2 -0
  71. package/api/types/FileMetadata.d.ts +7 -0
  72. package/api/types/FileProcessingStatus.d.ts +11 -0
  73. package/api/types/FileProcessingStatus.js +13 -0
  74. package/api/types/ImageContent.d.ts +9 -0
  75. package/api/types/ImageContent.js +5 -0
  76. package/api/types/ImageContentSource.d.ts +8 -0
  77. package/api/types/ImageContentSource.js +5 -0
  78. package/api/types/LettaBatchRequest.d.ts +2 -0
  79. package/api/types/LettaImage.d.ts +14 -0
  80. package/api/types/LettaImage.js +5 -0
  81. package/api/types/LettaMessageContentUnion.d.ts +1 -1
  82. package/api/types/LettaRequest.d.ts +2 -0
  83. package/api/types/LettaStreamingRequest.d.ts +2 -0
  84. package/api/types/LettaUserMessageContentUnion.d.ts +5 -0
  85. package/api/types/LettaUserMessageContentUnion.js +5 -0
  86. package/api/types/Memory.d.ts +2 -0
  87. package/api/types/MessageContentItem.d.ts +1 -1
  88. package/api/types/MessageType.d.ts +13 -0
  89. package/api/types/MessageType.js +15 -0
  90. package/api/types/Passage.d.ts +2 -0
  91. package/api/types/ToolType.d.ts +2 -1
  92. package/api/types/ToolType.js +1 -0
  93. package/api/types/UpdateUserMessageContent.d.ts +1 -1
  94. package/api/types/UrlImage.d.ts +8 -0
  95. package/api/types/UrlImage.js +5 -0
  96. package/api/types/UserMessageContent.d.ts +1 -1
  97. package/api/types/index.d.ts +8 -0
  98. package/api/types/index.js +8 -0
  99. package/dist/api/resources/agents/client/Client.d.ts +18 -0
  100. package/dist/api/resources/agents/client/Client.js +84 -9
  101. package/dist/api/resources/agents/client/requests/SummarizeAgentConversationRequest.d.ts +15 -0
  102. package/dist/api/resources/agents/client/requests/SummarizeAgentConversationRequest.js +5 -0
  103. package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
  104. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  105. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  106. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  107. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  108. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  109. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  110. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  111. package/dist/api/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +2 -0
  112. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  113. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  114. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  115. package/dist/api/resources/batches/client/Client.js +4 -4
  116. package/dist/api/resources/blocks/client/Client.js +6 -6
  117. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  118. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  119. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  120. package/dist/api/resources/groups/client/Client.js +6 -6
  121. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  122. package/dist/api/resources/health/client/Client.js +1 -1
  123. package/dist/api/resources/identities/client/Client.js +7 -7
  124. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  125. package/dist/api/resources/jobs/client/Client.d.ts +2 -1
  126. package/dist/api/resources/jobs/client/Client.js +13 -6
  127. package/dist/api/resources/jobs/client/requests/JobsListActiveRequest.d.ts +13 -0
  128. package/dist/api/resources/jobs/client/requests/JobsListActiveRequest.js +5 -0
  129. package/dist/api/resources/jobs/client/requests/index.d.ts +1 -0
  130. package/dist/api/resources/messages/client/Client.js +1 -1
  131. package/dist/api/resources/models/client/Client.js +1 -1
  132. package/dist/api/resources/projects/client/Client.js +1 -1
  133. package/dist/api/resources/providers/client/Client.js +5 -5
  134. package/dist/api/resources/runs/client/Client.js +4 -4
  135. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  136. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  137. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  138. package/dist/api/resources/sources/client/Client.js +7 -7
  139. package/dist/api/resources/sources/resources/files/client/Client.js +7 -4
  140. package/dist/api/resources/sources/resources/files/client/requests/FilesListRequest.d.ts +4 -0
  141. package/dist/api/resources/sources/resources/index.d.ts +1 -0
  142. package/dist/api/resources/sources/resources/index.js +1 -0
  143. package/dist/api/resources/sources/resources/passages/client/Client.d.ts +2 -1
  144. package/dist/api/resources/sources/resources/passages/client/Client.js +16 -3
  145. package/dist/api/resources/sources/resources/passages/client/index.d.ts +1 -1
  146. package/dist/api/resources/sources/resources/passages/client/index.js +15 -0
  147. package/dist/api/resources/sources/resources/passages/client/requests/PassagesListRequest.d.ts +21 -0
  148. package/dist/api/resources/sources/resources/passages/client/requests/PassagesListRequest.js +5 -0
  149. package/dist/api/resources/sources/resources/passages/client/requests/index.d.ts +1 -0
  150. package/dist/api/resources/sources/resources/passages/client/requests/index.js +2 -0
  151. package/dist/api/resources/steps/client/Client.js +11 -3
  152. package/dist/api/resources/steps/client/requests/StepsListRequest.d.ts +4 -0
  153. package/dist/api/resources/tags/client/Client.js +1 -1
  154. package/dist/api/resources/telemetry/client/Client.js +1 -1
  155. package/dist/api/resources/templates/client/Client.js +1 -1
  156. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  157. package/dist/api/resources/tools/client/Client.js +17 -17
  158. package/dist/api/resources/tools/types/AddMcpServerResponseItem.d.ts +1 -1
  159. package/dist/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +1 -1
  160. package/dist/api/resources/voice/client/Client.js +1 -1
  161. package/dist/api/types/AgentType.d.ts +2 -1
  162. package/dist/api/types/AgentType.js +1 -0
  163. package/dist/api/types/Base64Image.d.ts +12 -0
  164. package/dist/api/types/Base64Image.js +5 -0
  165. package/dist/api/types/Block.d.ts +2 -0
  166. package/dist/api/types/BlockUpdate.d.ts +2 -0
  167. package/dist/api/types/CreateBlock.d.ts +2 -0
  168. package/dist/api/types/FileMetadata.d.ts +7 -0
  169. package/dist/api/types/FileProcessingStatus.d.ts +11 -0
  170. package/dist/api/types/FileProcessingStatus.js +13 -0
  171. package/dist/api/types/ImageContent.d.ts +9 -0
  172. package/dist/api/types/ImageContent.js +5 -0
  173. package/dist/api/types/ImageContentSource.d.ts +8 -0
  174. package/dist/api/types/ImageContentSource.js +5 -0
  175. package/dist/api/types/LettaBatchRequest.d.ts +2 -0
  176. package/dist/api/types/LettaImage.d.ts +14 -0
  177. package/dist/api/types/LettaImage.js +5 -0
  178. package/dist/api/types/LettaMessageContentUnion.d.ts +1 -1
  179. package/dist/api/types/LettaRequest.d.ts +2 -0
  180. package/dist/api/types/LettaStreamingRequest.d.ts +2 -0
  181. package/dist/api/types/LettaUserMessageContentUnion.d.ts +5 -0
  182. package/dist/api/types/LettaUserMessageContentUnion.js +5 -0
  183. package/dist/api/types/Memory.d.ts +2 -0
  184. package/dist/api/types/MessageContentItem.d.ts +1 -1
  185. package/dist/api/types/MessageType.d.ts +13 -0
  186. package/dist/api/types/MessageType.js +15 -0
  187. package/dist/api/types/Passage.d.ts +2 -0
  188. package/dist/api/types/ToolType.d.ts +2 -1
  189. package/dist/api/types/ToolType.js +1 -0
  190. package/dist/api/types/UpdateUserMessageContent.d.ts +1 -1
  191. package/dist/api/types/UrlImage.d.ts +8 -0
  192. package/dist/api/types/UrlImage.js +5 -0
  193. package/dist/api/types/UserMessageContent.d.ts +1 -1
  194. package/dist/api/types/index.d.ts +8 -0
  195. package/dist/api/types/index.js +8 -0
  196. package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -0
  197. package/dist/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -0
  198. package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +2 -2
  199. package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.js +2 -2
  200. package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +2 -2
  201. package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +2 -2
  202. package/dist/serialization/types/AgentType.d.ts +1 -1
  203. package/dist/serialization/types/AgentType.js +1 -0
  204. package/dist/serialization/types/Base64Image.d.ts +15 -0
  205. package/dist/serialization/types/Base64Image.js +46 -0
  206. package/dist/serialization/types/Block.d.ts +1 -0
  207. package/dist/serialization/types/Block.js +1 -0
  208. package/dist/serialization/types/BlockUpdate.d.ts +1 -0
  209. package/dist/serialization/types/BlockUpdate.js +1 -0
  210. package/dist/serialization/types/CreateBlock.d.ts +1 -0
  211. package/dist/serialization/types/CreateBlock.js +1 -0
  212. package/dist/serialization/types/FileMetadata.d.ts +4 -0
  213. package/dist/serialization/types/FileMetadata.js +4 -0
  214. package/dist/serialization/types/FileProcessingStatus.d.ts +10 -0
  215. package/dist/serialization/types/FileProcessingStatus.js +41 -0
  216. package/dist/serialization/types/ImageContent.d.ts +14 -0
  217. package/dist/serialization/types/ImageContent.js +45 -0
  218. package/dist/serialization/types/ImageContentSource.d.ts +13 -0
  219. package/dist/serialization/types/ImageContentSource.js +44 -0
  220. package/dist/serialization/types/LettaBatchRequest.d.ts +2 -0
  221. package/dist/serialization/types/LettaBatchRequest.js +2 -0
  222. package/dist/serialization/types/LettaImage.d.ts +16 -0
  223. package/dist/serialization/types/LettaImage.js +47 -0
  224. package/dist/serialization/types/LettaMessageContentUnion.d.ts +2 -1
  225. package/dist/serialization/types/LettaMessageContentUnion.js +2 -0
  226. package/dist/serialization/types/LettaRequest.d.ts +2 -0
  227. package/dist/serialization/types/LettaRequest.js +2 -0
  228. package/dist/serialization/types/LettaStreamingRequest.d.ts +2 -0
  229. package/dist/serialization/types/LettaStreamingRequest.js +2 -0
  230. package/dist/serialization/types/LettaUserMessageContentUnion.d.ts +12 -0
  231. package/dist/serialization/types/LettaUserMessageContentUnion.js +43 -0
  232. package/dist/serialization/types/Memory.d.ts +1 -0
  233. package/dist/serialization/types/Memory.js +1 -0
  234. package/dist/serialization/types/MessageContentItem.d.ts +2 -1
  235. package/dist/serialization/types/MessageContentItem.js +2 -0
  236. package/dist/serialization/types/MessageType.d.ts +10 -0
  237. package/dist/serialization/types/MessageType.js +49 -0
  238. package/dist/serialization/types/Passage.d.ts +1 -0
  239. package/dist/serialization/types/Passage.js +1 -0
  240. package/dist/serialization/types/ToolType.d.ts +1 -1
  241. package/dist/serialization/types/ToolType.js +1 -0
  242. package/dist/serialization/types/UpdateUserMessageContent.d.ts +2 -2
  243. package/dist/serialization/types/UpdateUserMessageContent.js +2 -2
  244. package/dist/serialization/types/UrlImage.d.ts +13 -0
  245. package/dist/serialization/types/UrlImage.js +44 -0
  246. package/dist/serialization/types/UserMessageContent.d.ts +2 -2
  247. package/dist/serialization/types/UserMessageContent.js +2 -2
  248. package/dist/serialization/types/index.d.ts +8 -0
  249. package/dist/serialization/types/index.js +8 -0
  250. package/dist/version.d.ts +1 -1
  251. package/dist/version.js +1 -1
  252. package/package.json +1 -1
  253. package/reference.md +94 -2
  254. package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.d.ts +1 -0
  255. package/serialization/resources/agents/resources/passages/client/requests/PassageUpdate.js +1 -0
  256. package/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +2 -2
  257. package/serialization/resources/tools/types/AddMcpServerResponseItem.js +2 -2
  258. package/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +2 -2
  259. package/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +2 -2
  260. package/serialization/types/AgentType.d.ts +1 -1
  261. package/serialization/types/AgentType.js +1 -0
  262. package/serialization/types/Base64Image.d.ts +15 -0
  263. package/serialization/types/Base64Image.js +46 -0
  264. package/serialization/types/Block.d.ts +1 -0
  265. package/serialization/types/Block.js +1 -0
  266. package/serialization/types/BlockUpdate.d.ts +1 -0
  267. package/serialization/types/BlockUpdate.js +1 -0
  268. package/serialization/types/CreateBlock.d.ts +1 -0
  269. package/serialization/types/CreateBlock.js +1 -0
  270. package/serialization/types/FileMetadata.d.ts +4 -0
  271. package/serialization/types/FileMetadata.js +4 -0
  272. package/serialization/types/FileProcessingStatus.d.ts +10 -0
  273. package/serialization/types/FileProcessingStatus.js +41 -0
  274. package/serialization/types/ImageContent.d.ts +14 -0
  275. package/serialization/types/ImageContent.js +45 -0
  276. package/serialization/types/ImageContentSource.d.ts +13 -0
  277. package/serialization/types/ImageContentSource.js +44 -0
  278. package/serialization/types/LettaBatchRequest.d.ts +2 -0
  279. package/serialization/types/LettaBatchRequest.js +2 -0
  280. package/serialization/types/LettaImage.d.ts +16 -0
  281. package/serialization/types/LettaImage.js +47 -0
  282. package/serialization/types/LettaMessageContentUnion.d.ts +2 -1
  283. package/serialization/types/LettaMessageContentUnion.js +2 -0
  284. package/serialization/types/LettaRequest.d.ts +2 -0
  285. package/serialization/types/LettaRequest.js +2 -0
  286. package/serialization/types/LettaStreamingRequest.d.ts +2 -0
  287. package/serialization/types/LettaStreamingRequest.js +2 -0
  288. package/serialization/types/LettaUserMessageContentUnion.d.ts +12 -0
  289. package/serialization/types/LettaUserMessageContentUnion.js +43 -0
  290. package/serialization/types/Memory.d.ts +1 -0
  291. package/serialization/types/Memory.js +1 -0
  292. package/serialization/types/MessageContentItem.d.ts +2 -1
  293. package/serialization/types/MessageContentItem.js +2 -0
  294. package/serialization/types/MessageType.d.ts +10 -0
  295. package/serialization/types/MessageType.js +49 -0
  296. package/serialization/types/Passage.d.ts +1 -0
  297. package/serialization/types/Passage.js +1 -0
  298. package/serialization/types/ToolType.d.ts +1 -1
  299. package/serialization/types/ToolType.js +1 -0
  300. package/serialization/types/UpdateUserMessageContent.d.ts +2 -2
  301. package/serialization/types/UpdateUserMessageContent.js +2 -2
  302. package/serialization/types/UrlImage.d.ts +13 -0
  303. package/serialization/types/UrlImage.js +44 -0
  304. package/serialization/types/UserMessageContent.d.ts +2 -2
  305. package/serialization/types/UserMessageContent.js +2 -2
  306. package/serialization/types/index.d.ts +8 -0
  307. package/serialization/types/index.js +8 -0
  308. package/version.d.ts +1 -1
  309. package/version.js +1 -1
package/README.md CHANGED
@@ -13,7 +13,7 @@ npm i -s @letta-ai/letta-client
13
13
 
14
14
  ## Reference
15
15
 
16
- A full reference for this library is available [here](./reference.md).
16
+ A full reference for this library is available [here](https://github.com/letta-ai/letta-node/blob/HEAD/./reference.md).
17
17
 
18
18
  ## Usage
19
19
 
@@ -158,6 +158,24 @@ export declare class Agents {
158
158
  * await client.agents.modify("agent_id")
159
159
  */
160
160
  modify(agentId: string, request?: Letta.UpdateAgent, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
161
+ /**
162
+ * Summarize an agent's conversation history to a target message length.
163
+ *
164
+ * This endpoint summarizes the current message history for a given agent,
165
+ * truncating and compressing it down to the specified `max_message_length`.
166
+ *
167
+ * @param {string} agentId
168
+ * @param {Letta.SummarizeAgentConversationRequest} request
169
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
170
+ *
171
+ * @throws {@link Letta.UnprocessableEntityError}
172
+ *
173
+ * @example
174
+ * await client.agents.summarizeAgentConversation("agent_id", {
175
+ * maxMessageLength: 1
176
+ * })
177
+ */
178
+ summarizeAgentConversation(agentId: string, request: Letta.SummarizeAgentConversationRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentState>;
161
179
  /**
162
180
  * <Note>This endpoint is only available on Letta Cloud.</Note>
163
181
  *
@@ -199,7 +199,7 @@ class Agents {
199
199
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
200
200
  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/"),
201
201
  method: "GET",
202
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
202
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
203
203
  contentType: "application/json",
204
204
  queryParameters: _queryParams,
205
205
  requestType: "json",
@@ -266,7 +266,7 @@ class Agents {
266
266
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
267
267
  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/"),
268
268
  method: "POST",
269
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
269
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
270
270
  contentType: "application/json",
271
271
  requestType: "json",
272
272
  body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -331,7 +331,7 @@ class Agents {
331
331
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
332
332
  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"),
333
333
  method: "GET",
334
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
334
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
335
335
  contentType: "application/json",
336
336
  requestType: "json",
337
337
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -396,7 +396,7 @@ class Agents {
396
396
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
397
397
  url: (0, url_join_1.default)((_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`),
398
398
  method: "GET",
399
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
399
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
400
400
  contentType: "application/json",
401
401
  requestType: "json",
402
402
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -478,7 +478,7 @@ class Agents {
478
478
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
479
479
  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"),
480
480
  method: "POST",
481
- 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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
481
+ 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.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
482
  queryParameters: _queryParams,
483
483
  requestType: "file",
484
484
  duplex: _maybeEncodedRequest.duplex,
@@ -545,7 +545,7 @@ class Agents {
545
545
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
546
546
  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)}`),
547
547
  method: "GET",
548
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
548
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
549
549
  contentType: "application/json",
550
550
  requestType: "json",
551
551
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -610,7 +610,7 @@ class Agents {
610
610
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
611
611
  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)}`),
612
612
  method: "DELETE",
613
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
613
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
614
614
  contentType: "application/json",
615
615
  requestType: "json",
616
616
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -670,7 +670,7 @@ class Agents {
670
670
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
671
671
  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)}`),
672
672
  method: "PATCH",
673
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
673
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
674
674
  contentType: "application/json",
675
675
  requestType: "json",
676
676
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -719,6 +719,81 @@ class Agents {
719
719
  }
720
720
  });
721
721
  }
722
+ /**
723
+ * Summarize an agent's conversation history to a target message length.
724
+ *
725
+ * This endpoint summarizes the current message history for a given agent,
726
+ * truncating and compressing it down to the specified `max_message_length`.
727
+ *
728
+ * @param {string} agentId
729
+ * @param {Letta.SummarizeAgentConversationRequest} request
730
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
731
+ *
732
+ * @throws {@link Letta.UnprocessableEntityError}
733
+ *
734
+ * @example
735
+ * await client.agents.summarizeAgentConversation("agent_id", {
736
+ * maxMessageLength: 1
737
+ * })
738
+ */
739
+ summarizeAgentConversation(agentId, request, requestOptions) {
740
+ return __awaiter(this, void 0, void 0, function* () {
741
+ var _a, _b, _c;
742
+ const { maxMessageLength } = request;
743
+ const _queryParams = {};
744
+ _queryParams["max_message_length"] = maxMessageLength.toString();
745
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
746
+ 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`),
747
+ method: "POST",
748
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
749
+ contentType: "application/json",
750
+ queryParameters: _queryParams,
751
+ requestType: "json",
752
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
753
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
754
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
755
+ });
756
+ if (_response.ok) {
757
+ return serializers.AgentState.parseOrThrow(_response.body, {
758
+ unrecognizedObjectKeys: "passthrough",
759
+ allowUnrecognizedUnionMembers: true,
760
+ allowUnrecognizedEnumValues: true,
761
+ skipValidation: true,
762
+ breadcrumbsPrefix: ["response"],
763
+ });
764
+ }
765
+ if (_response.error.reason === "status-code") {
766
+ switch (_response.error.statusCode) {
767
+ case 422:
768
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
769
+ unrecognizedObjectKeys: "passthrough",
770
+ allowUnrecognizedUnionMembers: true,
771
+ allowUnrecognizedEnumValues: true,
772
+ skipValidation: true,
773
+ breadcrumbsPrefix: ["response"],
774
+ }));
775
+ default:
776
+ throw new errors.LettaError({
777
+ statusCode: _response.error.statusCode,
778
+ body: _response.error.body,
779
+ });
780
+ }
781
+ }
782
+ switch (_response.error.reason) {
783
+ case "non-json":
784
+ throw new errors.LettaError({
785
+ statusCode: _response.error.statusCode,
786
+ body: _response.error.rawBody,
787
+ });
788
+ case "timeout":
789
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/summarize.");
790
+ case "unknown":
791
+ throw new errors.LettaError({
792
+ message: _response.error.errorMessage,
793
+ });
794
+ }
795
+ });
796
+ }
722
797
  /**
723
798
  * <Note>This endpoint is only available on Letta Cloud.</Note>
724
799
  *
@@ -736,7 +811,7 @@ class Agents {
736
811
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
737
812
  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"),
738
813
  method: "POST",
739
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
814
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
740
815
  contentType: "application/json",
741
816
  requestType: "json",
742
817
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * maxMessageLength: 1
8
+ * }
9
+ */
10
+ export interface SummarizeAgentConversationRequest {
11
+ /**
12
+ * Maximum number of messages to retain after summarization.
13
+ */
14
+ maxMessageLength: number;
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 });
@@ -2,4 +2,5 @@ export { type AgentsListRequest } from "./AgentsListRequest";
2
2
  export { type CreateAgentRequest } from "./CreateAgentRequest";
3
3
  export { type BodyImportAgentSerialized } from "./BodyImportAgentSerialized";
4
4
  export { type UpdateAgent } from "./UpdateAgent";
5
+ export { type SummarizeAgentConversationRequest } from "./SummarizeAgentConversationRequest";
5
6
  export { type AgentsSearchRequest } from "./AgentsSearchRequest";
@@ -77,7 +77,7 @@ 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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -144,7 +144,7 @@ class Blocks {
144
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
145
  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
146
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
148
  contentType: "application/json",
149
149
  requestType: "json",
150
150
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -210,7 +210,7 @@ class Blocks {
210
210
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
211
211
  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
212
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
213
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
214
  contentType: "application/json",
215
215
  requestType: "json",
216
216
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +276,7 @@ class Blocks {
276
276
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
277
  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
278
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
279
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
280
  contentType: "application/json",
281
281
  requestType: "json",
282
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -342,7 +342,7 @@ class Blocks {
342
342
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
343
  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
344
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
345
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
346
346
  contentType: "application/json",
347
347
  requestType: "json",
348
348
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -76,7 +76,7 @@ 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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -77,7 +77,7 @@ 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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -82,7 +82,7 @@ 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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
86
  contentType: "application/json",
87
87
  queryParameters: _queryParams,
88
88
  requestType: "json",
@@ -78,7 +78,7 @@ 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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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,
@@ -100,7 +100,7 @@ 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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
104
  contentType: "application/json",
105
105
  queryParameters: _queryParams,
106
106
  requestType: "json",
@@ -176,7 +176,7 @@ class Messages {
176
176
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
177
177
  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
178
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
179
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
180
  contentType: "application/json",
181
181
  requestType: "json",
182
182
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -246,7 +246,7 @@ class Messages {
246
246
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
247
247
  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
248
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
249
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
250
  contentType: "application/json",
251
251
  requestType: "json",
252
252
  body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -306,7 +306,7 @@ class Messages {
306
306
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
307
307
  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
308
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
309
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
310
  contentType: "application/json",
311
311
  requestType: "json",
312
312
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -393,7 +393,7 @@ class Messages {
393
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
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)}/messages/async`),
395
395
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
397
  contentType: "application/json",
398
398
  requestType: "json",
399
399
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -465,7 +465,7 @@ class Messages {
465
465
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
466
466
  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
467
  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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
468
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
469
  contentType: "application/json",
470
470
  queryParameters: _queryParams,
471
471
  requestType: "json",
@@ -94,7 +94,7 @@ class Passages {
94
94
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
95
95
  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)}/archival-memory`),
96
96
  method: "GET",
97
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
97
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
98
98
  contentType: "application/json",
99
99
  queryParameters: _queryParams,
100
100
  requestType: "json",
@@ -163,7 +163,7 @@ class Passages {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  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)}/archival-memory`),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -230,7 +230,7 @@ class Passages {
230
230
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
231
231
  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)}/archival-memory/${encodeURIComponent(memoryId)}`),
232
232
  method: "DELETE",
233
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
233
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
234
234
  contentType: "application/json",
235
235
  requestType: "json",
236
236
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -293,7 +293,7 @@ class Passages {
293
293
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
294
294
  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)}/archival-memory/${encodeURIComponent(memoryId)}`),
295
295
  method: "PATCH",
296
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
296
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
297
297
  contentType: "application/json",
298
298
  requestType: "json",
299
299
  body: serializers.agents.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -25,6 +25,8 @@ export interface PassageUpdate {
25
25
  sourceId?: string;
26
26
  /** The unique identifier of the file associated with the passage. */
27
27
  fileId?: string;
28
+ /** The name of the file (only for source passages). */
29
+ fileName?: string;
28
30
  /** The metadata of the passage. */
29
31
  metadata?: Record<string, unknown>;
30
32
  /** The text of the passage. */
@@ -77,7 +77,7 @@ class Sources {
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)}/sources/attach/${encodeURIComponent(sourceId)}`),
79
79
  method: "PATCH",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -143,7 +143,7 @@ class Sources {
143
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
144
144
  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)}/sources/detach/${encodeURIComponent(sourceId)}`),
145
145
  method: "PATCH",
146
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
146
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
147
  contentType: "application/json",
148
148
  requestType: "json",
149
149
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Sources {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  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)}/sources`),
210
210
  method: "GET",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -96,7 +96,7 @@ class Templates {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  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)}/version-template`),
98
98
  method: "POST",
99
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  requestType: "json",
@@ -163,7 +163,7 @@ class Templates {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  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)}/migrate`),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -236,7 +236,7 @@ class Templates {
236
236
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
237
237
  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)}/template`),
238
238
  method: "POST",
239
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
239
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
240
240
  contentType: "application/json",
241
241
  requestType: "json",
242
242
  body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -76,7 +76,7 @@ class Tools {
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)}/tools`),
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.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -142,7 +142,7 @@ class Tools {
142
142
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
143
143
  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)}/tools/attach/${encodeURIComponent(toolId)}`),
144
144
  method: "PATCH",
145
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
145
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
146
146
  contentType: "application/json",
147
147
  requestType: "json",
148
148
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Tools {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  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)}/tools/detach/${encodeURIComponent(toolId)}`),
210
210
  method: "PATCH",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.123", "User-Agent": "@letta-ai/letta-client/0.1.123", "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),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.125", "User-Agent": "@letta-ai/letta-client/0.1.125", "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),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,