@letta-ai/letta-client 0.1.130 → 0.1.132

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 (380) hide show
  1. package/api/resources/agents/client/Client.js +14 -11
  2. package/api/resources/agents/client/requests/AgentsListRequest.d.ts +4 -0
  3. package/api/resources/agents/client/requests/AgentsSearchRequest.d.ts +2 -0
  4. package/api/resources/agents/client/requests/UpdateAgent.d.ts +4 -0
  5. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  6. package/api/resources/agents/resources/context/client/Client.js +1 -1
  7. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  8. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  9. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  10. package/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  11. package/api/resources/agents/resources/messages/client/Client.js +8 -8
  12. package/api/resources/agents/resources/messages/client/requests/LettaAsyncRequest.d.ts +32 -0
  13. package/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  14. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  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/agents/types/AgentsSearchRequestSortBy.d.ts +8 -0
  19. package/api/resources/agents/types/AgentsSearchRequestSortBy.js +10 -0
  20. package/api/resources/agents/types/index.d.ts +1 -0
  21. package/api/resources/agents/types/index.js +1 -0
  22. package/api/resources/batches/client/Client.js +4 -4
  23. package/api/resources/blocks/client/Client.js +6 -6
  24. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  25. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  26. package/api/resources/embeddingModels/client/Client.js +1 -1
  27. package/api/resources/groups/client/Client.js +6 -6
  28. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  29. package/api/resources/health/client/Client.js +1 -1
  30. package/api/resources/identities/client/Client.js +7 -7
  31. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  32. package/api/resources/index.d.ts +1 -2
  33. package/api/resources/index.js +2 -3
  34. package/api/resources/jobs/client/Client.js +4 -4
  35. package/api/resources/messages/client/Client.js +1 -1
  36. package/api/resources/models/client/Client.js +1 -1
  37. package/api/resources/projects/client/Client.js +1 -1
  38. package/api/resources/providers/client/Client.d.ts +2 -6
  39. package/api/resources/providers/client/Client.js +7 -15
  40. package/api/resources/providers/client/requests/ProviderCreate.d.ts +5 -1
  41. package/api/resources/providers/client/requests/ProviderUpdate.d.ts +5 -1
  42. package/api/resources/providers/client/requests/index.d.ts +0 -1
  43. package/api/resources/runs/client/Client.js +4 -4
  44. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  45. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  46. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  47. package/api/resources/sources/client/Client.js +7 -7
  48. package/api/resources/sources/resources/files/client/Client.js +3 -3
  49. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  50. package/api/resources/steps/client/Client.js +2 -2
  51. package/api/resources/tags/client/Client.js +1 -1
  52. package/api/resources/telemetry/client/Client.js +1 -1
  53. package/api/resources/templates/client/Client.js +1 -1
  54. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  55. package/api/resources/tools/client/Client.d.ts +13 -0
  56. package/api/resources/tools/client/Client.js +84 -17
  57. package/api/resources/tools/types/AddMcpServerRequest.d.ts +1 -1
  58. package/api/resources/tools/types/AddMcpServerResponseItem.d.ts +1 -1
  59. package/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +1 -1
  60. package/api/resources/tools/types/ListMcpServersResponseValue.d.ts +1 -1
  61. package/api/resources/tools/types/UpdateMcpServerRequest.d.ts +5 -0
  62. package/api/resources/tools/types/UpdateMcpServerResponse.d.ts +5 -0
  63. package/api/resources/tools/types/index.d.ts +2 -0
  64. package/api/resources/tools/types/index.js +2 -0
  65. package/api/resources/voice/client/Client.d.ts +1 -5
  66. package/api/resources/voice/client/Client.js +3 -7
  67. package/api/resources/voice/client/requests/CreateVoiceChatCompletionsRequest.d.ts +2 -7
  68. package/api/resources/voice/index.d.ts +0 -1
  69. package/api/resources/voice/index.js +0 -1
  70. package/api/types/AgentState.d.ts +4 -0
  71. package/api/types/BatchJob.d.ts +2 -0
  72. package/api/types/Job.d.ts +2 -0
  73. package/api/types/LettaRequestConfig.d.ts +3 -0
  74. package/api/types/LettaResponse.d.ts +1 -0
  75. package/api/types/LettaStopReason.d.ts +3 -2
  76. package/api/types/McpServerType.d.ts +2 -1
  77. package/api/types/McpServerType.js +1 -0
  78. package/api/types/McpTool.d.ts +2 -0
  79. package/api/types/Provider.d.ts +5 -1
  80. package/api/types/ProviderCheck.d.ts +14 -0
  81. package/api/types/ProviderType.d.ts +2 -2
  82. package/api/types/ProviderType.js +1 -1
  83. package/api/types/Run.d.ts +2 -0
  84. package/api/types/SseServerConfig.d.ts +16 -0
  85. package/{dist/api/types/LettaStopReasonStopReason.d.ts → api/types/StopReasonType.d.ts} +3 -2
  86. package/{dist/api/types/LettaStopReasonStopReason.js → api/types/StopReasonType.js} +3 -2
  87. package/api/types/StreamableHttpServerConfig.d.ts +27 -0
  88. package/api/types/StreamableHttpServerConfig.js +5 -0
  89. package/api/types/ToolAnnotations.d.ts +22 -0
  90. package/api/types/ToolAnnotations.js +5 -0
  91. package/api/types/UpdateSsemcpServer.d.ts +14 -0
  92. package/api/types/UpdateSsemcpServer.js +5 -0
  93. package/api/types/UpdateStreamableHttpmcpServer.d.ts +16 -0
  94. package/api/types/UpdateStreamableHttpmcpServer.js +5 -0
  95. package/api/types/index.d.ts +7 -2
  96. package/api/types/index.js +7 -2
  97. package/dist/api/resources/agents/client/Client.js +14 -11
  98. package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +4 -0
  99. package/dist/api/resources/agents/client/requests/AgentsSearchRequest.d.ts +2 -0
  100. package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +4 -0
  101. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  102. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  103. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  104. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  105. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  106. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  107. package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
  108. package/dist/api/resources/agents/resources/messages/client/requests/LettaAsyncRequest.d.ts +32 -0
  109. package/dist/api/resources/agents/resources/messages/client/requests/LettaAsyncRequest.js +5 -0
  110. package/dist/api/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  111. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  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/agents/types/AgentsSearchRequestSortBy.d.ts +8 -0
  116. package/dist/api/resources/agents/types/AgentsSearchRequestSortBy.js +10 -0
  117. package/dist/api/resources/agents/types/index.d.ts +1 -0
  118. package/dist/api/resources/agents/types/index.js +1 -0
  119. package/dist/api/resources/batches/client/Client.js +4 -4
  120. package/dist/api/resources/blocks/client/Client.js +6 -6
  121. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  122. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  123. package/dist/api/resources/embeddingModels/client/Client.js +1 -1
  124. package/dist/api/resources/groups/client/Client.js +6 -6
  125. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  126. package/dist/api/resources/health/client/Client.js +1 -1
  127. package/dist/api/resources/identities/client/Client.js +7 -7
  128. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  129. package/dist/api/resources/index.d.ts +1 -2
  130. package/dist/api/resources/index.js +2 -3
  131. package/dist/api/resources/jobs/client/Client.js +4 -4
  132. package/dist/api/resources/messages/client/Client.js +1 -1
  133. package/dist/api/resources/models/client/Client.js +1 -1
  134. package/dist/api/resources/projects/client/Client.js +1 -1
  135. package/dist/api/resources/providers/client/Client.d.ts +2 -6
  136. package/dist/api/resources/providers/client/Client.js +7 -15
  137. package/dist/api/resources/providers/client/requests/ProviderCreate.d.ts +5 -1
  138. package/dist/api/resources/providers/client/requests/ProviderUpdate.d.ts +5 -1
  139. package/dist/api/resources/providers/client/requests/index.d.ts +0 -1
  140. package/dist/api/resources/runs/client/Client.js +4 -4
  141. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  142. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  143. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  144. package/dist/api/resources/sources/client/Client.js +7 -7
  145. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  146. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  147. package/dist/api/resources/steps/client/Client.js +2 -2
  148. package/dist/api/resources/tags/client/Client.js +1 -1
  149. package/dist/api/resources/telemetry/client/Client.js +1 -1
  150. package/dist/api/resources/templates/client/Client.js +1 -1
  151. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  152. package/dist/api/resources/tools/client/Client.d.ts +13 -0
  153. package/dist/api/resources/tools/client/Client.js +84 -17
  154. package/dist/api/resources/tools/types/AddMcpServerRequest.d.ts +1 -1
  155. package/dist/api/resources/tools/types/AddMcpServerResponseItem.d.ts +1 -1
  156. package/dist/api/resources/tools/types/DeleteMcpServerResponseItem.d.ts +1 -1
  157. package/dist/api/resources/tools/types/ListMcpServersResponseValue.d.ts +1 -1
  158. package/dist/api/resources/tools/types/UpdateMcpServerRequest.d.ts +5 -0
  159. package/dist/api/resources/tools/types/UpdateMcpServerRequest.js +5 -0
  160. package/dist/api/resources/tools/types/UpdateMcpServerResponse.d.ts +5 -0
  161. package/dist/api/resources/tools/types/UpdateMcpServerResponse.js +5 -0
  162. package/dist/api/resources/tools/types/index.d.ts +2 -0
  163. package/dist/api/resources/tools/types/index.js +2 -0
  164. package/dist/api/resources/voice/client/Client.d.ts +1 -5
  165. package/dist/api/resources/voice/client/Client.js +3 -7
  166. package/dist/api/resources/voice/client/requests/CreateVoiceChatCompletionsRequest.d.ts +2 -7
  167. package/dist/api/resources/voice/index.d.ts +0 -1
  168. package/dist/api/resources/voice/index.js +0 -1
  169. package/dist/api/types/AgentState.d.ts +4 -0
  170. package/dist/api/types/BatchJob.d.ts +2 -0
  171. package/dist/api/types/Job.d.ts +2 -0
  172. package/dist/api/types/LettaRequestConfig.d.ts +3 -0
  173. package/dist/api/types/LettaResponse.d.ts +1 -0
  174. package/dist/api/types/LettaStopReason.d.ts +3 -2
  175. package/dist/api/types/McpServerType.d.ts +2 -1
  176. package/dist/api/types/McpServerType.js +1 -0
  177. package/dist/api/types/McpTool.d.ts +2 -0
  178. package/dist/api/types/Provider.d.ts +5 -1
  179. package/dist/api/types/ProviderCheck.d.ts +14 -0
  180. package/dist/api/types/ProviderCheck.js +5 -0
  181. package/dist/api/types/ProviderType.d.ts +2 -2
  182. package/dist/api/types/ProviderType.js +1 -1
  183. package/dist/api/types/Run.d.ts +2 -0
  184. package/dist/api/types/SseServerConfig.d.ts +16 -0
  185. package/{api/types/LettaStopReasonStopReason.d.ts → dist/api/types/StopReasonType.d.ts} +3 -2
  186. package/{api/types/LettaStopReasonStopReason.js → dist/api/types/StopReasonType.js} +3 -2
  187. package/dist/api/types/StreamableHttpServerConfig.d.ts +27 -0
  188. package/dist/api/types/StreamableHttpServerConfig.js +5 -0
  189. package/dist/api/types/ToolAnnotations.d.ts +22 -0
  190. package/dist/api/types/ToolAnnotations.js +5 -0
  191. package/dist/api/types/UpdateSsemcpServer.d.ts +14 -0
  192. package/dist/api/types/UpdateSsemcpServer.js +5 -0
  193. package/dist/api/types/UpdateStreamableHttpmcpServer.d.ts +16 -0
  194. package/dist/api/types/UpdateStreamableHttpmcpServer.js +5 -0
  195. package/dist/api/types/index.d.ts +7 -2
  196. package/dist/api/types/index.js +7 -2
  197. package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +3 -0
  198. package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js +3 -0
  199. package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  200. package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
  201. package/dist/serialization/resources/agents/resources/index.d.ts +1 -0
  202. package/dist/serialization/resources/agents/resources/index.js +1 -0
  203. package/dist/serialization/resources/agents/resources/messages/client/index.d.ts +1 -0
  204. package/dist/serialization/resources/agents/resources/messages/client/index.js +4 -0
  205. package/dist/serialization/resources/agents/resources/messages/client/requests/LettaAsyncRequest.d.ts +20 -0
  206. package/dist/serialization/resources/agents/resources/messages/client/requests/LettaAsyncRequest.js +51 -0
  207. package/dist/serialization/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  208. package/dist/serialization/resources/agents/resources/messages/client/requests/index.js +5 -0
  209. package/dist/serialization/resources/agents/types/AgentsSearchRequestSortBy.d.ts +10 -0
  210. package/dist/serialization/resources/{voice/types/CreateVoiceChatCompletionsRequestBody.js → agents/types/AgentsSearchRequestSortBy.js} +2 -4
  211. package/dist/serialization/resources/agents/types/index.d.ts +1 -0
  212. package/dist/serialization/resources/agents/types/index.js +1 -0
  213. package/dist/serialization/resources/index.d.ts +1 -2
  214. package/dist/serialization/resources/index.js +2 -3
  215. package/dist/serialization/resources/providers/client/requests/ProviderCreate.d.ts +2 -0
  216. package/dist/serialization/resources/providers/client/requests/ProviderCreate.js +2 -0
  217. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +2 -0
  218. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +2 -0
  219. package/dist/serialization/resources/tools/types/AddMcpServerRequest.d.ts +2 -1
  220. package/dist/serialization/resources/tools/types/AddMcpServerRequest.js +2 -1
  221. package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +2 -1
  222. package/dist/serialization/resources/tools/types/AddMcpServerResponseItem.js +2 -1
  223. package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +2 -1
  224. package/dist/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +2 -1
  225. package/dist/serialization/resources/tools/types/ListMcpServersResponseValue.d.ts +2 -1
  226. package/dist/serialization/resources/tools/types/ListMcpServersResponseValue.js +2 -1
  227. package/dist/serialization/resources/tools/types/UpdateMcpServerRequest.d.ts +12 -0
  228. package/{serialization/resources/voice/types/CreateVoiceChatCompletionsRequestBody.js → dist/serialization/resources/tools/types/UpdateMcpServerRequest.js} +4 -4
  229. package/dist/serialization/resources/tools/types/UpdateMcpServerResponse.d.ts +13 -0
  230. package/dist/serialization/resources/tools/types/UpdateMcpServerResponse.js +44 -0
  231. package/dist/serialization/resources/tools/types/index.d.ts +2 -0
  232. package/dist/serialization/resources/tools/types/index.js +2 -0
  233. package/dist/serialization/resources/voice/client/createVoiceChatCompletions.d.ts +9 -0
  234. package/dist/serialization/resources/voice/client/createVoiceChatCompletions.js +41 -0
  235. package/dist/serialization/resources/voice/client/index.d.ts +1 -0
  236. package/dist/serialization/resources/voice/client/index.js +37 -0
  237. package/dist/serialization/resources/voice/index.d.ts +1 -1
  238. package/dist/serialization/resources/voice/index.js +1 -1
  239. package/dist/serialization/types/AgentState.d.ts +2 -0
  240. package/dist/serialization/types/AgentState.js +2 -0
  241. package/dist/serialization/types/BatchJob.d.ts +1 -0
  242. package/dist/serialization/types/BatchJob.js +1 -0
  243. package/dist/serialization/types/Job.d.ts +1 -0
  244. package/dist/serialization/types/Job.js +1 -0
  245. package/dist/serialization/types/LettaRequestConfig.d.ts +2 -0
  246. package/dist/serialization/types/LettaRequestConfig.js +2 -0
  247. package/dist/serialization/types/LettaResponse.d.ts +2 -0
  248. package/dist/serialization/types/LettaResponse.js +2 -0
  249. package/dist/serialization/types/LettaStopReason.d.ts +2 -2
  250. package/dist/serialization/types/LettaStopReason.js +2 -2
  251. package/dist/serialization/types/McpServerType.d.ts +1 -1
  252. package/dist/serialization/types/McpServerType.js +1 -1
  253. package/dist/serialization/types/McpTool.d.ts +2 -0
  254. package/dist/serialization/types/McpTool.js +2 -0
  255. package/dist/serialization/types/Provider.d.ts +2 -0
  256. package/dist/serialization/types/Provider.js +2 -0
  257. package/dist/serialization/types/ProviderCheck.d.ts +16 -0
  258. package/dist/serialization/types/ProviderCheck.js +47 -0
  259. package/dist/serialization/types/ProviderType.d.ts +1 -1
  260. package/dist/serialization/types/ProviderType.js +1 -1
  261. package/dist/serialization/types/Run.d.ts +1 -0
  262. package/dist/serialization/types/Run.js +1 -0
  263. package/dist/serialization/types/SseServerConfig.d.ts +3 -0
  264. package/dist/serialization/types/SseServerConfig.js +3 -0
  265. package/dist/serialization/types/{LettaStopReasonStopReason.d.ts → StopReasonType.d.ts} +3 -3
  266. package/dist/serialization/types/{LettaStopReasonStopReason.js → StopReasonType.js} +2 -2
  267. package/dist/serialization/types/StreamableHttpServerConfig.d.ts +18 -0
  268. package/dist/serialization/types/StreamableHttpServerConfig.js +49 -0
  269. package/dist/serialization/types/ToolAnnotations.d.ts +17 -0
  270. package/dist/serialization/types/ToolAnnotations.js +49 -0
  271. package/dist/serialization/types/UpdateSsemcpServer.d.ts +14 -0
  272. package/dist/serialization/types/UpdateSsemcpServer.js +45 -0
  273. package/dist/serialization/types/UpdateStreamableHttpmcpServer.d.ts +15 -0
  274. package/dist/serialization/types/UpdateStreamableHttpmcpServer.js +46 -0
  275. package/dist/serialization/types/index.d.ts +7 -2
  276. package/dist/serialization/types/index.js +7 -2
  277. package/dist/version.d.ts +1 -1
  278. package/dist/version.js +1 -1
  279. package/package.json +1 -1
  280. package/reference.md +75 -21
  281. package/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +3 -0
  282. package/serialization/resources/agents/client/requests/AgentsSearchRequest.js +3 -0
  283. package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  284. package/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
  285. package/serialization/resources/agents/resources/index.d.ts +1 -0
  286. package/serialization/resources/agents/resources/index.js +1 -0
  287. package/serialization/resources/agents/resources/messages/client/index.d.ts +1 -0
  288. package/serialization/resources/agents/resources/messages/client/index.js +4 -0
  289. package/serialization/resources/agents/resources/messages/client/requests/LettaAsyncRequest.d.ts +20 -0
  290. package/serialization/resources/agents/resources/messages/client/requests/LettaAsyncRequest.js +51 -0
  291. package/serialization/resources/agents/resources/messages/client/requests/index.d.ts +1 -0
  292. package/serialization/resources/agents/resources/messages/client/requests/index.js +5 -0
  293. package/serialization/resources/agents/types/AgentsSearchRequestSortBy.d.ts +10 -0
  294. package/serialization/resources/agents/types/AgentsSearchRequestSortBy.js +41 -0
  295. package/serialization/resources/agents/types/index.d.ts +1 -0
  296. package/serialization/resources/agents/types/index.js +1 -0
  297. package/serialization/resources/index.d.ts +1 -2
  298. package/serialization/resources/index.js +2 -3
  299. package/serialization/resources/providers/client/requests/ProviderCreate.d.ts +2 -0
  300. package/serialization/resources/providers/client/requests/ProviderCreate.js +2 -0
  301. package/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +2 -0
  302. package/serialization/resources/providers/client/requests/ProviderUpdate.js +2 -0
  303. package/serialization/resources/tools/types/AddMcpServerRequest.d.ts +2 -1
  304. package/serialization/resources/tools/types/AddMcpServerRequest.js +2 -1
  305. package/serialization/resources/tools/types/AddMcpServerResponseItem.d.ts +2 -1
  306. package/serialization/resources/tools/types/AddMcpServerResponseItem.js +2 -1
  307. package/serialization/resources/tools/types/DeleteMcpServerResponseItem.d.ts +2 -1
  308. package/serialization/resources/tools/types/DeleteMcpServerResponseItem.js +2 -1
  309. package/serialization/resources/tools/types/ListMcpServersResponseValue.d.ts +2 -1
  310. package/serialization/resources/tools/types/ListMcpServersResponseValue.js +2 -1
  311. package/serialization/resources/tools/types/UpdateMcpServerRequest.d.ts +12 -0
  312. package/serialization/resources/tools/types/UpdateMcpServerRequest.js +43 -0
  313. package/serialization/resources/tools/types/UpdateMcpServerResponse.d.ts +13 -0
  314. package/serialization/resources/tools/types/UpdateMcpServerResponse.js +44 -0
  315. package/serialization/resources/tools/types/index.d.ts +2 -0
  316. package/serialization/resources/tools/types/index.js +2 -0
  317. package/serialization/resources/voice/client/createVoiceChatCompletions.d.ts +9 -0
  318. package/serialization/resources/voice/client/createVoiceChatCompletions.js +41 -0
  319. package/serialization/resources/voice/client/index.d.ts +1 -0
  320. package/serialization/resources/voice/client/index.js +37 -0
  321. package/serialization/resources/voice/index.d.ts +1 -1
  322. package/serialization/resources/voice/index.js +1 -1
  323. package/serialization/types/AgentState.d.ts +2 -0
  324. package/serialization/types/AgentState.js +2 -0
  325. package/serialization/types/BatchJob.d.ts +1 -0
  326. package/serialization/types/BatchJob.js +1 -0
  327. package/serialization/types/Job.d.ts +1 -0
  328. package/serialization/types/Job.js +1 -0
  329. package/serialization/types/LettaRequestConfig.d.ts +2 -0
  330. package/serialization/types/LettaRequestConfig.js +2 -0
  331. package/serialization/types/LettaResponse.d.ts +2 -0
  332. package/serialization/types/LettaResponse.js +2 -0
  333. package/serialization/types/LettaStopReason.d.ts +2 -2
  334. package/serialization/types/LettaStopReason.js +2 -2
  335. package/serialization/types/McpServerType.d.ts +1 -1
  336. package/serialization/types/McpServerType.js +1 -1
  337. package/serialization/types/McpTool.d.ts +2 -0
  338. package/serialization/types/McpTool.js +2 -0
  339. package/serialization/types/Provider.d.ts +2 -0
  340. package/serialization/types/Provider.js +2 -0
  341. package/serialization/types/ProviderCheck.d.ts +16 -0
  342. package/serialization/types/ProviderCheck.js +47 -0
  343. package/serialization/types/ProviderType.d.ts +1 -1
  344. package/serialization/types/ProviderType.js +1 -1
  345. package/serialization/types/Run.d.ts +1 -0
  346. package/serialization/types/Run.js +1 -0
  347. package/serialization/types/SseServerConfig.d.ts +3 -0
  348. package/serialization/types/SseServerConfig.js +3 -0
  349. package/serialization/types/{LettaStopReasonStopReason.d.ts → StopReasonType.d.ts} +3 -3
  350. package/serialization/types/{LettaStopReasonStopReason.js → StopReasonType.js} +2 -2
  351. package/serialization/types/StreamableHttpServerConfig.d.ts +18 -0
  352. package/serialization/types/StreamableHttpServerConfig.js +49 -0
  353. package/serialization/types/ToolAnnotations.d.ts +17 -0
  354. package/serialization/types/ToolAnnotations.js +49 -0
  355. package/serialization/types/UpdateSsemcpServer.d.ts +14 -0
  356. package/serialization/types/UpdateSsemcpServer.js +45 -0
  357. package/serialization/types/UpdateStreamableHttpmcpServer.d.ts +15 -0
  358. package/serialization/types/UpdateStreamableHttpmcpServer.js +46 -0
  359. package/serialization/types/index.d.ts +7 -2
  360. package/serialization/types/index.js +7 -2
  361. package/version.d.ts +1 -1
  362. package/version.js +1 -1
  363. package/api/resources/providers/client/requests/ProvidersCheckRequest.d.ts +0 -15
  364. package/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -5
  365. package/api/resources/voice/types/index.d.ts +0 -1
  366. package/api/resources/voice/types/index.js +0 -17
  367. package/dist/api/resources/providers/client/requests/ProvidersCheckRequest.d.ts +0 -15
  368. package/dist/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -5
  369. package/dist/api/resources/voice/types/index.d.ts +0 -1
  370. package/dist/api/resources/voice/types/index.js +0 -17
  371. package/dist/serialization/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -12
  372. package/dist/serialization/resources/voice/types/index.d.ts +0 -1
  373. package/dist/serialization/resources/voice/types/index.js +0 -17
  374. package/serialization/resources/voice/types/CreateVoiceChatCompletionsRequestBody.d.ts +0 -12
  375. package/serialization/resources/voice/types/index.d.ts +0 -1
  376. package/serialization/resources/voice/types/index.js +0 -17
  377. /package/api/resources/{providers/client/requests/ProvidersCheckRequest.js → agents/resources/messages/client/requests/LettaAsyncRequest.js} +0 -0
  378. /package/api/resources/{voice/types/CreateVoiceChatCompletionsRequestBody.js → tools/types/UpdateMcpServerRequest.js} +0 -0
  379. /package/{dist/api/resources/providers/client/requests/ProvidersCheckRequest.js → api/resources/tools/types/UpdateMcpServerResponse.js} +0 -0
  380. /package/{dist/api/resources/voice/types/CreateVoiceChatCompletionsRequestBody.js → api/types/ProviderCheck.js} +0 -0
@@ -137,7 +137,7 @@ class Agents {
137
137
  list() {
138
138
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
139
139
  var _a, _b, _c;
140
- const { name, tags, matchAllTags, before, after, limit, queryText, projectId, templateId, baseTemplateId, identityId, identifierKeys, includeRelationships, ascending, } = request;
140
+ const { name, tags, matchAllTags, before, after, limit, queryText, projectId, templateId, baseTemplateId, identityId, identifierKeys, includeRelationships, ascending, sortBy, } = request;
141
141
  const _queryParams = {};
142
142
  if (name != null) {
143
143
  _queryParams["name"] = name;
@@ -196,10 +196,13 @@ class Agents {
196
196
  if (ascending != null) {
197
197
  _queryParams["ascending"] = ascending.toString();
198
198
  }
199
+ if (sortBy != null) {
200
+ _queryParams["sort_by"] = sortBy;
201
+ }
199
202
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
200
203
  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
204
  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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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),
205
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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
206
  contentType: "application/json",
204
207
  queryParameters: _queryParams,
205
208
  requestType: "json",
@@ -266,7 +269,7 @@ class Agents {
266
269
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
267
270
  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
271
  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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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),
272
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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
273
  contentType: "application/json",
271
274
  requestType: "json",
272
275
  body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -331,7 +334,7 @@ class Agents {
331
334
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
332
335
  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
336
  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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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),
337
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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
338
  contentType: "application/json",
336
339
  requestType: "json",
337
340
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -396,7 +399,7 @@ class Agents {
396
399
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
397
400
  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
401
  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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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
403
  contentType: "application/json",
401
404
  requestType: "json",
402
405
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -478,7 +481,7 @@ class Agents {
478
481
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
479
482
  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
483
  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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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),
484
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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
485
  queryParameters: _queryParams,
483
486
  requestType: "file",
484
487
  duplex: _maybeEncodedRequest.duplex,
@@ -556,7 +559,7 @@ class Agents {
556
559
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
557
560
  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)}`),
558
561
  method: "GET",
559
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
560
563
  contentType: "application/json",
561
564
  queryParameters: _queryParams,
562
565
  requestType: "json",
@@ -622,7 +625,7 @@ class Agents {
622
625
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
623
626
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
624
627
  method: "DELETE",
625
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
628
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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),
626
629
  contentType: "application/json",
627
630
  requestType: "json",
628
631
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -682,7 +685,7 @@ class Agents {
682
685
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
683
686
  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)}`),
684
687
  method: "PATCH",
685
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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),
688
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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),
686
689
  contentType: "application/json",
687
690
  requestType: "json",
688
691
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -757,7 +760,7 @@ class Agents {
757
760
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
758
761
  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`),
759
762
  method: "POST",
760
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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),
761
764
  contentType: "application/json",
762
765
  queryParameters: _queryParams,
763
766
  requestType: "json",
@@ -823,7 +826,7 @@ class Agents {
823
826
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
824
827
  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"),
825
828
  method: "POST",
826
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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),
829
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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),
827
830
  contentType: "application/json",
828
831
  requestType: "json",
829
832
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -62,4 +62,8 @@ export interface AgentsListRequest {
62
62
  * Whether to sort agents oldest to newest (True) or newest to oldest (False, default)
63
63
  */
64
64
  ascending?: boolean;
65
+ /**
66
+ * Field to sort by. Options: 'created_at' (default), 'last_run_completion'
67
+ */
68
+ sortBy?: string;
65
69
  }
@@ -12,4 +12,6 @@ export interface AgentsSearchRequest {
12
12
  combinator?: "AND";
13
13
  limit?: number;
14
14
  after?: string;
15
+ sortBy?: Letta.AgentsSearchRequestSortBy;
16
+ ascending?: boolean;
15
17
  }
@@ -51,4 +51,8 @@ export interface UpdateAgent {
51
51
  enableSleeptime?: boolean;
52
52
  /** The response format for the agent. */
53
53
  responseFormat?: Letta.UpdateAgentResponseFormat;
54
+ /** The timestamp when the agent last completed a run. */
55
+ lastRunCompletion?: Date;
56
+ /** The duration in milliseconds of the agent's last run. */
57
+ lastRunDurationMs?: number;
54
58
  }
@@ -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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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,
@@ -88,7 +88,7 @@ export declare class Messages {
88
88
  * The actual processing happens in the background, and the status can be checked using the run ID.
89
89
  *
90
90
  * @param {string} agentId
91
- * @param {Letta.LettaRequest} request
91
+ * @param {Letta.agents.LettaAsyncRequest} request
92
92
  * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
93
93
  *
94
94
  * @throws {@link Letta.UnprocessableEntityError}
@@ -104,7 +104,7 @@ export declare class Messages {
104
104
  * }]
105
105
  * })
106
106
  */
107
- createAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Run>;
107
+ createAsync(agentId: string, request: Letta.agents.LettaAsyncRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Run>;
108
108
  /**
109
109
  * Resets the messages for an agent
110
110
  *
@@ -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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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" }),
@@ -371,7 +371,7 @@ class Messages {
371
371
  * The actual processing happens in the background, and the status can be checked using the run ID.
372
372
  *
373
373
  * @param {string} agentId
374
- * @param {Letta.LettaRequest} request
374
+ * @param {Letta.agents.LettaAsyncRequest} request
375
375
  * @param {Messages.RequestOptions} requestOptions - Request-specific configuration.
376
376
  *
377
377
  * @throws {@link Letta.UnprocessableEntityError}
@@ -393,10 +393,10 @@ 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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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
- body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
399
+ body: serializers.agents.LettaAsyncRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
400
400
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
401
401
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
402
402
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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",
@@ -0,0 +1,32 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Letta from "../../../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * messages: [{
9
+ * role: "user",
10
+ * content: [{
11
+ * type: "text",
12
+ * text: "text"
13
+ * }]
14
+ * }]
15
+ * }
16
+ */
17
+ export interface LettaAsyncRequest {
18
+ /** The messages to be sent to the agent. */
19
+ messages: Letta.MessageCreate[];
20
+ /** Maximum number of steps the agent should take to process the request. */
21
+ maxSteps?: number;
22
+ /** Whether the server should parse specific tool call arguments (default `send_message`) as `AssistantMessage` objects. */
23
+ useAssistantMessage?: boolean;
24
+ /** The name of the designated message tool. */
25
+ assistantMessageToolName?: string;
26
+ /** The name of the message argument in the designated message tool. */
27
+ assistantMessageToolKwarg?: string;
28
+ /** Only return specified message types in the response. If `None` (default) returns all messages. */
29
+ includeReturnMessageTypes?: Letta.MessageType[];
30
+ /** Optional callback URL to POST to when the job completes */
31
+ callbackUrl?: string;
32
+ }
@@ -1,2 +1,3 @@
1
1
  export { type MessagesListRequest } from "./MessagesListRequest";
2
+ export { type LettaAsyncRequest } from "./LettaAsyncRequest";
2
3
  export { type MessagesResetRequest } from "./MessagesResetRequest";
@@ -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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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" }),
@@ -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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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.130", "User-Agent": "@letta-ai/letta-client/0.1.130", "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.132", "User-Agent": "@letta-ai/letta-client/0.1.132", "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,
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export type AgentsSearchRequestSortBy = "created_at" | "last_run_completion";
5
+ export declare const AgentsSearchRequestSortBy: {
6
+ readonly CreatedAt: "created_at";
7
+ readonly LastRunCompletion: "last_run_completion";
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.AgentsSearchRequestSortBy = void 0;
7
+ exports.AgentsSearchRequestSortBy = {
8
+ CreatedAt: "created_at",
9
+ LastRunCompletion: "last_run_completion",
10
+ };
@@ -8,4 +8,5 @@ export * from "./AgentsSearchRequestSearchItemOne";
8
8
  export * from "./AgentsSearchRequestSearchItemTwo";
9
9
  export * from "./AgentsSearchRequestSearchItemOperator";
10
10
  export * from "./AgentsSearchRequestSearchItem";
11
+ export * from "./AgentsSearchRequestSortBy";
11
12
  export * from "./AgentsSearchResponse";
@@ -24,4 +24,5 @@ __exportStar(require("./AgentsSearchRequestSearchItemOne"), exports);
24
24
  __exportStar(require("./AgentsSearchRequestSearchItemTwo"), exports);
25
25
  __exportStar(require("./AgentsSearchRequestSearchItemOperator"), exports);
26
26
  __exportStar(require("./AgentsSearchRequestSearchItem"), exports);
27
+ __exportStar(require("./AgentsSearchRequestSortBy"), exports);
27
28
  __exportStar(require("./AgentsSearchResponse"), exports);