@letta-ai/letta-client 0.1.5 → 0.1.8

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 (540) hide show
  1. package/Client.d.ts +6 -0
  2. package/Client.js +10 -0
  3. package/api/resources/agents/client/Client.d.ts +18 -97
  4. package/api/resources/agents/client/Client.js +44 -436
  5. package/{dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts → api/resources/agents/client/requests/AgentsSearchRequest.d.ts} +3 -3
  6. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  7. package/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  8. package/api/resources/agents/client/requests/index.d.ts +2 -4
  9. package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  10. package/api/resources/agents/resources/context/client/Client.js +1 -1
  11. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
  12. package/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
  13. package/api/resources/agents/resources/index.d.ts +6 -2
  14. package/api/resources/agents/resources/index.js +7 -3
  15. package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
  16. package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
  17. package/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
  18. package/api/resources/agents/resources/memoryVariables/index.js +18 -0
  19. package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
  20. package/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  21. package/api/resources/agents/resources/memoryVariables/types/index.js +17 -0
  22. package/api/resources/agents/resources/messages/client/Client.d.ts +1 -1
  23. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  24. package/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  25. package/api/resources/agents/resources/sources/client/Client.js +1 -1
  26. package/api/resources/agents/resources/templates/client/Client.d.ts +82 -0
  27. package/{dist/api/resources/agents/resources/memoryBlocks → api/resources/agents/resources/templates}/client/Client.js +126 -45
  28. package/api/resources/agents/resources/templates/client/index.d.ts +1 -0
  29. package/api/resources/agents/resources/templates/client/index.js +17 -0
  30. package/api/resources/agents/{client/requests/AgentsCreateTemplateFromAgentRequest.d.ts → resources/templates/client/requests/TemplatesCreateRequest.d.ts} +2 -2
  31. package/api/resources/agents/{client/requests/AgentsCreateVersionRequest.d.ts → resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts} +1 -1
  32. package/api/resources/agents/{client/requests/AgentsMigrateRequest.d.ts → resources/templates/client/requests/TemplatesMigrateRequest.d.ts} +1 -1
  33. package/api/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  34. package/api/resources/agents/resources/templates/index.d.ts +2 -0
  35. package/api/resources/agents/resources/templates/index.js +18 -0
  36. package/api/resources/agents/{types/AgentsMigrateResponse.d.ts → resources/templates/types/TemplatesMigrateResponse.d.ts} +1 -1
  37. package/api/resources/agents/resources/templates/types/index.d.ts +1 -0
  38. package/api/resources/agents/resources/templates/types/index.js +17 -0
  39. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  40. package/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +8 -0
  41. package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestCombinator.js} +2 -2
  42. package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +16 -0
  43. package/api/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +8 -0
  44. package/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +9 -0
  45. package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemNameOperator.js} +2 -2
  46. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +8 -0
  47. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +8 -0
  48. package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js → api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  49. package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +8 -0
  50. package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js → api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js} +2 -2
  51. package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts → AgentsSearchRequestSearchItemVersion.d.ts} +1 -1
  52. package/api/resources/agents/types/index.d.ts +8 -10
  53. package/api/resources/agents/types/index.js +8 -10
  54. package/api/resources/blocks/client/Client.js +7 -7
  55. package/api/resources/health/client/Client.js +1 -1
  56. package/api/resources/index.d.ts +4 -0
  57. package/api/resources/index.js +5 -1
  58. package/api/resources/jobs/client/Client.js +4 -4
  59. package/api/resources/models/client/Client.js +2 -2
  60. package/api/resources/providers/client/Client.d.ts +86 -0
  61. package/api/resources/providers/client/Client.js +336 -0
  62. package/api/resources/providers/client/index.d.ts +1 -0
  63. package/api/resources/providers/client/index.js +17 -0
  64. package/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +15 -0
  65. package/api/resources/providers/client/requests/ListProvidersRequest.d.ts +11 -0
  66. package/api/resources/providers/client/requests/ProviderCreate.d.ts +16 -0
  67. package/api/resources/providers/client/requests/ProviderUpdate.d.ts +16 -0
  68. package/api/resources/providers/client/requests/index.d.ts +4 -0
  69. package/api/resources/runs/client/Client.d.ts +115 -0
  70. package/api/resources/runs/client/Client.js +500 -0
  71. package/api/resources/runs/client/index.d.ts +1 -0
  72. package/api/resources/runs/client/index.js +17 -0
  73. package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  74. package/api/resources/runs/client/requests/index.d.ts +1 -0
  75. package/api/resources/sources/client/Client.js +8 -8
  76. package/api/resources/sources/resources/files/client/Client.js +3 -3
  77. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  78. package/api/resources/tools/client/Client.d.ts +3 -1
  79. package/api/resources/tools/client/Client.js +15 -13
  80. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
  81. package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -2
  82. package/api/types/AgentType.d.ts +1 -2
  83. package/api/types/AgentType.js +0 -1
  84. package/api/types/Job.d.ts +2 -0
  85. package/api/types/JobType.d.ts +8 -0
  86. package/api/types/JobType.js +10 -0
  87. package/api/types/LettaSchemasToolTool.d.ts +4 -3
  88. package/api/types/Provider.d.ts +13 -0
  89. package/api/types/Run.d.ts +34 -0
  90. package/api/types/ToolCreate.d.ts +0 -2
  91. package/api/types/ToolType.d.ts +9 -0
  92. package/api/types/ToolType.js +11 -0
  93. package/api/types/index.d.ts +4 -0
  94. package/api/types/index.js +4 -0
  95. package/dist/Client.d.ts +6 -0
  96. package/dist/Client.js +10 -0
  97. package/dist/api/resources/agents/client/Client.d.ts +18 -97
  98. package/dist/api/resources/agents/client/Client.js +44 -436
  99. package/{api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts → dist/api/resources/agents/client/requests/AgentsSearchRequest.d.ts} +3 -3
  100. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
  101. package/dist/api/resources/agents/client/requests/ResetMessagesRequest.d.ts +13 -0
  102. package/dist/api/resources/agents/client/requests/index.d.ts +2 -4
  103. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  104. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  105. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
  106. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
  107. package/dist/api/resources/agents/resources/index.d.ts +6 -2
  108. package/dist/api/resources/agents/resources/index.js +7 -3
  109. package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
  110. package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
  111. package/dist/api/resources/agents/resources/memoryVariables/client/index.js +2 -0
  112. package/dist/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
  113. package/dist/api/resources/agents/resources/memoryVariables/index.js +18 -0
  114. package/dist/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
  115. package/dist/api/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.js +5 -0
  116. package/dist/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  117. package/dist/api/resources/agents/resources/memoryVariables/types/index.js +17 -0
  118. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +1 -1
  119. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  120. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  121. package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
  122. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +82 -0
  123. package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/templates}/client/Client.js +126 -45
  124. package/dist/api/resources/agents/resources/templates/client/index.d.ts +1 -0
  125. package/dist/api/resources/agents/resources/templates/client/index.js +17 -0
  126. package/dist/api/resources/agents/{client/requests/AgentsCreateTemplateFromAgentRequest.d.ts → resources/templates/client/requests/TemplatesCreateRequest.d.ts} +2 -2
  127. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +5 -0
  128. package/dist/api/resources/agents/{client/requests/AgentsCreateVersionRequest.d.ts → resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts} +1 -1
  129. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.js +5 -0
  130. package/dist/api/resources/agents/{client/requests/AgentsMigrateRequest.d.ts → resources/templates/client/requests/TemplatesMigrateRequest.d.ts} +1 -1
  131. package/dist/api/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js +5 -0
  132. package/dist/api/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  133. package/dist/api/resources/agents/resources/templates/client/requests/index.js +2 -0
  134. package/dist/api/resources/agents/resources/templates/index.d.ts +2 -0
  135. package/dist/api/resources/agents/resources/templates/index.js +18 -0
  136. package/dist/api/resources/agents/{types/AgentsMigrateResponse.d.ts → resources/templates/types/TemplatesMigrateResponse.d.ts} +1 -1
  137. package/dist/api/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +5 -0
  138. package/dist/api/resources/agents/resources/templates/types/index.d.ts +1 -0
  139. package/dist/api/resources/agents/resources/templates/types/index.js +17 -0
  140. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  141. package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +8 -0
  142. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestCombinator.js} +2 -2
  143. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +16 -0
  144. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.js +5 -0
  145. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +8 -0
  146. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.js +5 -0
  147. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +9 -0
  148. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemNameOperator.js} +2 -2
  149. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +8 -0
  150. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +5 -0
  151. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +8 -0
  152. package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  153. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +8 -0
  154. package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js} +2 -2
  155. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts → AgentsSearchRequestSearchItemVersion.d.ts} +1 -1
  156. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +5 -0
  157. package/dist/api/resources/agents/types/index.d.ts +8 -10
  158. package/dist/api/resources/agents/types/index.js +8 -10
  159. package/dist/api/resources/blocks/client/Client.js +7 -7
  160. package/dist/api/resources/health/client/Client.js +1 -1
  161. package/dist/api/resources/index.d.ts +4 -0
  162. package/dist/api/resources/index.js +5 -1
  163. package/dist/api/resources/jobs/client/Client.js +4 -4
  164. package/dist/api/resources/models/client/Client.js +2 -2
  165. package/dist/api/resources/providers/client/Client.d.ts +86 -0
  166. package/dist/api/resources/providers/client/Client.js +336 -0
  167. package/dist/api/resources/providers/client/index.d.ts +1 -0
  168. package/dist/api/resources/providers/client/index.js +17 -0
  169. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +15 -0
  170. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.js +5 -0
  171. package/dist/api/resources/providers/client/requests/ListProvidersRequest.d.ts +11 -0
  172. package/dist/api/resources/providers/client/requests/ListProvidersRequest.js +5 -0
  173. package/dist/api/resources/providers/client/requests/ProviderCreate.d.ts +16 -0
  174. package/dist/api/resources/providers/client/requests/ProviderCreate.js +5 -0
  175. package/dist/api/resources/providers/client/requests/ProviderUpdate.d.ts +16 -0
  176. package/dist/api/resources/providers/client/requests/ProviderUpdate.js +5 -0
  177. package/dist/api/resources/providers/client/requests/index.d.ts +4 -0
  178. package/dist/api/resources/providers/client/requests/index.js +2 -0
  179. package/dist/api/resources/runs/client/Client.d.ts +115 -0
  180. package/dist/api/resources/runs/client/Client.js +500 -0
  181. package/dist/api/resources/runs/client/index.d.ts +1 -0
  182. package/dist/api/resources/runs/client/index.js +17 -0
  183. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +50 -0
  184. package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.js +5 -0
  185. package/dist/api/resources/runs/client/requests/index.d.ts +1 -0
  186. package/dist/api/resources/runs/client/requests/index.js +2 -0
  187. package/dist/api/resources/sources/client/Client.js +8 -8
  188. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  189. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  190. package/dist/api/resources/tools/client/Client.d.ts +3 -1
  191. package/dist/api/resources/tools/client/Client.js +15 -13
  192. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
  193. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -2
  194. package/dist/api/types/AgentType.d.ts +1 -2
  195. package/dist/api/types/AgentType.js +0 -1
  196. package/dist/api/types/Job.d.ts +2 -0
  197. package/dist/api/types/JobType.d.ts +8 -0
  198. package/dist/api/types/JobType.js +10 -0
  199. package/dist/api/types/LettaSchemasToolTool.d.ts +4 -3
  200. package/dist/api/types/Provider.d.ts +13 -0
  201. package/dist/api/types/Provider.js +5 -0
  202. package/dist/api/types/Run.d.ts +34 -0
  203. package/dist/api/types/Run.js +5 -0
  204. package/dist/api/types/ToolCreate.d.ts +0 -2
  205. package/dist/api/types/ToolType.d.ts +9 -0
  206. package/dist/api/types/ToolType.js +11 -0
  207. package/dist/api/types/index.d.ts +4 -0
  208. package/dist/api/types/index.js +4 -0
  209. package/dist/serialization/resources/agents/client/index.d.ts +0 -1
  210. package/dist/serialization/resources/agents/client/index.js +1 -2
  211. package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
  212. package/{serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
  213. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  214. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  215. package/dist/serialization/resources/agents/client/requests/index.d.ts +1 -4
  216. package/dist/serialization/resources/agents/client/requests/index.js +3 -9
  217. package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
  218. package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +32 -0
  219. package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
  220. package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
  221. package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
  222. package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
  223. package/dist/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  224. package/dist/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  225. package/dist/serialization/resources/agents/resources/index.d.ts +6 -1
  226. package/dist/serialization/resources/agents/resources/index.js +7 -2
  227. package/dist/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
  228. package/dist/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
  229. package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
  230. package/dist/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
  231. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  232. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
  233. package/dist/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
  234. package/dist/serialization/resources/agents/resources/templates/client/index.js +17 -0
  235. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
  236. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +33 -0
  237. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
  238. package/dist/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
  239. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
  240. package/{serialization/resources/agents/client/requests/AgentsMigrateRequest.js → dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
  241. package/dist/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  242. package/dist/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
  243. package/dist/serialization/resources/agents/resources/templates/index.d.ts +2 -0
  244. package/dist/serialization/resources/agents/resources/templates/index.js +18 -0
  245. package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
  246. package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
  247. package/dist/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
  248. package/dist/serialization/resources/agents/resources/templates/types/index.js +17 -0
  249. package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
  250. package/dist/serialization/resources/agents/types/{AgentsMigrateResponse.js → AgentsSearchRequestCombinator.js} +2 -4
  251. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
  252. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItem.js} +13 -6
  253. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
  254. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
  255. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
  256. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
  257. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
  258. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItemOrderBy.js} +6 -5
  259. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
  260. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  261. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
  262. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
  263. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
  264. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
  265. package/dist/serialization/resources/agents/types/index.d.ts +8 -10
  266. package/dist/serialization/resources/agents/types/index.js +8 -10
  267. package/dist/serialization/resources/index.d.ts +3 -0
  268. package/dist/serialization/resources/index.js +4 -1
  269. package/dist/serialization/resources/providers/client/index.d.ts +2 -0
  270. package/{api/resources/agents/resources/memory/resources → dist/serialization/resources/providers/client}/index.js +6 -2
  271. package/dist/serialization/resources/providers/client/listProviders.d.ts +11 -0
  272. package/{serialization/resources/agents/types/AgentsMigrateResponse.js → dist/serialization/resources/providers/client/listProviders.js} +3 -4
  273. package/dist/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
  274. package/{serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → dist/serialization/resources/providers/client/requests/ProviderCreate.js} +4 -3
  275. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
  276. package/dist/serialization/resources/{agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → providers/client/requests/ProviderUpdate.js} +4 -3
  277. package/dist/serialization/resources/providers/client/requests/index.d.ts +2 -0
  278. package/dist/serialization/resources/providers/client/requests/index.js +7 -0
  279. package/dist/serialization/resources/providers/index.d.ts +1 -0
  280. package/dist/serialization/resources/providers/index.js +17 -0
  281. package/dist/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  282. package/dist/serialization/resources/runs/client/getRunMessages.js +32 -0
  283. package/dist/serialization/resources/runs/client/index.d.ts +3 -0
  284. package/dist/{api/resources/agents/resources/memory/resources → serialization/resources/runs/client}/index.js +4 -2
  285. package/dist/serialization/resources/{agents/client/getAgentMemoryBlocks.d.ts → runs/client/listActiveRuns.d.ts} +3 -3
  286. package/dist/serialization/resources/{agents/client/getAgentMemoryBlocks.js → runs/client/listActiveRuns.js} +2 -2
  287. package/{serialization/resources/agents/client/getAgentMemoryBlocks.d.ts → dist/serialization/resources/runs/client/listRuns.d.ts} +3 -3
  288. package/{serialization/resources/agents/client/getAgentMemoryBlocks.js → dist/serialization/resources/runs/client/listRuns.js} +2 -2
  289. package/dist/serialization/resources/runs/index.d.ts +1 -0
  290. package/dist/serialization/resources/runs/index.js +17 -0
  291. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
  292. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
  293. package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -1
  294. package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +1 -1
  295. package/dist/serialization/types/AgentType.d.ts +1 -1
  296. package/dist/serialization/types/AgentType.js +1 -7
  297. package/dist/serialization/types/Job.d.ts +2 -0
  298. package/dist/serialization/types/Job.js +2 -0
  299. package/dist/serialization/types/JobType.d.ts +10 -0
  300. package/dist/serialization/types/JobType.js +34 -0
  301. package/dist/serialization/types/LettaSchemasToolTool.d.ts +3 -2
  302. package/dist/serialization/types/LettaSchemasToolTool.js +3 -2
  303. package/dist/serialization/types/Provider.d.ts +15 -0
  304. package/dist/serialization/types/Provider.js +36 -0
  305. package/dist/serialization/types/Run.d.ts +22 -0
  306. package/dist/serialization/types/Run.js +43 -0
  307. package/dist/serialization/types/ToolCreate.d.ts +0 -1
  308. package/dist/serialization/types/ToolCreate.js +0 -1
  309. package/dist/serialization/types/ToolType.d.ts +10 -0
  310. package/dist/serialization/types/ToolType.js +35 -0
  311. package/dist/serialization/types/index.d.ts +4 -0
  312. package/dist/serialization/types/index.js +4 -0
  313. package/dist/version.d.ts +1 -1
  314. package/dist/version.js +1 -1
  315. package/package.json +1 -1
  316. package/reference.md +1048 -317
  317. package/serialization/resources/agents/client/index.d.ts +0 -1
  318. package/serialization/resources/agents/client/index.js +1 -2
  319. package/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
  320. package/{dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
  321. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  322. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +1 -1
  323. package/serialization/resources/agents/client/requests/index.d.ts +1 -4
  324. package/serialization/resources/agents/client/requests/index.js +3 -9
  325. package/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
  326. package/serialization/resources/agents/resources/coreMemory/client/getBlocks.js +32 -0
  327. package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
  328. package/{dist/serialization/resources/agents/resources/memory/resources/messages → serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
  329. package/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
  330. package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
  331. package/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  332. package/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  333. package/serialization/resources/agents/resources/index.d.ts +6 -1
  334. package/serialization/resources/agents/resources/index.js +7 -2
  335. package/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
  336. package/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
  337. package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
  338. package/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
  339. package/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  340. package/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
  341. package/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
  342. package/serialization/resources/agents/resources/templates/client/index.js +17 -0
  343. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
  344. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js +33 -0
  345. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
  346. package/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
  347. package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
  348. package/{dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.js → serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
  349. package/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  350. package/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
  351. package/serialization/resources/agents/resources/templates/index.d.ts +2 -0
  352. package/serialization/resources/agents/resources/templates/index.js +18 -0
  353. package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
  354. package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
  355. package/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
  356. package/serialization/resources/agents/resources/templates/types/index.js +17 -0
  357. package/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
  358. package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +31 -0
  359. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
  360. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +43 -0
  361. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
  362. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
  363. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
  364. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
  365. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
  366. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +36 -0
  367. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
  368. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +31 -0
  369. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
  370. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
  371. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
  372. package/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
  373. package/serialization/resources/agents/types/index.d.ts +8 -10
  374. package/serialization/resources/agents/types/index.js +8 -10
  375. package/serialization/resources/index.d.ts +3 -0
  376. package/serialization/resources/index.js +4 -1
  377. package/serialization/resources/providers/client/index.d.ts +2 -0
  378. package/serialization/resources/providers/client/index.js +31 -0
  379. package/serialization/resources/providers/client/listProviders.d.ts +11 -0
  380. package/serialization/resources/providers/client/listProviders.js +32 -0
  381. package/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
  382. package/serialization/resources/providers/client/requests/ProviderCreate.js +34 -0
  383. package/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
  384. package/serialization/resources/providers/client/requests/ProviderUpdate.js +34 -0
  385. package/serialization/resources/providers/client/requests/index.d.ts +2 -0
  386. package/serialization/resources/providers/client/requests/index.js +7 -0
  387. package/serialization/resources/providers/index.d.ts +1 -0
  388. package/serialization/resources/providers/index.js +17 -0
  389. package/serialization/resources/runs/client/getRunMessages.d.ts +11 -0
  390. package/serialization/resources/runs/client/getRunMessages.js +32 -0
  391. package/serialization/resources/runs/client/index.d.ts +3 -0
  392. package/{dist/serialization/resources/agents/resources/memory/resources → serialization/resources/runs/client}/index.js +4 -2
  393. package/serialization/resources/runs/client/listActiveRuns.d.ts +11 -0
  394. package/serialization/resources/runs/client/listActiveRuns.js +32 -0
  395. package/serialization/resources/runs/client/listRuns.d.ts +11 -0
  396. package/serialization/resources/runs/client/listRuns.js +32 -0
  397. package/serialization/resources/runs/index.d.ts +1 -0
  398. package/serialization/resources/runs/index.js +17 -0
  399. package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
  400. package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
  401. package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -1
  402. package/serialization/resources/tools/client/requests/ToolUpdate.js +1 -1
  403. package/serialization/types/AgentType.d.ts +1 -1
  404. package/serialization/types/AgentType.js +1 -7
  405. package/serialization/types/Job.d.ts +2 -0
  406. package/serialization/types/Job.js +2 -0
  407. package/serialization/types/JobType.d.ts +10 -0
  408. package/serialization/types/JobType.js +34 -0
  409. package/serialization/types/LettaSchemasToolTool.d.ts +3 -2
  410. package/serialization/types/LettaSchemasToolTool.js +3 -2
  411. package/serialization/types/Provider.d.ts +15 -0
  412. package/serialization/types/Provider.js +36 -0
  413. package/serialization/types/Run.d.ts +22 -0
  414. package/serialization/types/Run.js +43 -0
  415. package/serialization/types/ToolCreate.d.ts +0 -1
  416. package/serialization/types/ToolCreate.js +0 -1
  417. package/serialization/types/ToolType.d.ts +10 -0
  418. package/serialization/types/ToolType.js +35 -0
  419. package/serialization/types/index.d.ts +4 -0
  420. package/serialization/types/index.js +4 -0
  421. package/version.d.ts +1 -1
  422. package/version.js +1 -1
  423. package/api/resources/agents/resources/memory/index.d.ts +0 -2
  424. package/api/resources/agents/resources/memory/index.js +0 -18
  425. package/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
  426. package/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
  427. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
  428. package/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
  429. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
  430. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
  431. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
  432. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
  433. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
  434. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
  435. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
  436. package/dist/api/resources/agents/resources/memory/index.d.ts +0 -2
  437. package/dist/api/resources/agents/resources/memory/index.js +0 -18
  438. package/dist/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
  439. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
  440. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
  441. package/dist/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +0 -1
  442. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
  443. package/dist/api/resources/agents/resources/memoryBlocks/client/index.d.ts +0 -1
  444. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
  445. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
  446. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
  447. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
  448. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
  449. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
  450. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
  451. package/dist/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
  452. package/dist/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
  453. package/dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
  454. package/dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
  455. package/dist/serialization/resources/agents/resources/memory/index.d.ts +0 -1
  456. package/dist/serialization/resources/agents/resources/memory/index.js +0 -17
  457. package/dist/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
  458. package/dist/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
  459. package/dist/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
  460. package/dist/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
  461. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
  462. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
  463. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
  464. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
  465. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
  466. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
  467. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
  468. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
  469. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
  470. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
  471. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
  472. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
  473. package/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
  474. package/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
  475. package/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
  476. package/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
  477. package/serialization/resources/agents/resources/memory/index.d.ts +0 -1
  478. package/serialization/resources/agents/resources/memory/index.js +0 -17
  479. package/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
  480. package/serialization/resources/agents/resources/memory/resources/index.js +0 -27
  481. package/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
  482. package/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
  483. package/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
  484. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
  485. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js +0 -31
  486. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
  487. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
  488. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
  489. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.js +0 -35
  490. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
  491. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
  492. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
  493. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js +0 -36
  494. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
  495. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
  496. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
  497. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
  498. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
  499. /package/api/resources/agents/client/requests/{AgentsCreateTemplateFromAgentRequest.js → AgentsSearchRequest.js} +0 -0
  500. /package/api/resources/agents/client/requests/{AgentsCreateVersionRequest.js → ResetMessagesRequest.js} +0 -0
  501. /package/api/resources/agents/resources/{memory → coreMemory}/client/index.d.ts +0 -0
  502. /package/api/resources/agents/resources/{memory → coreMemory}/client/index.js +0 -0
  503. /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
  504. /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
  505. /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.d.ts +0 -0
  506. /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.js +0 -0
  507. /package/api/resources/agents/{client/requests/AgentsMigrateRequest.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +0 -0
  508. /package/api/resources/agents/{client/requests/AgentsSearchDeployedAgentsRequest.js → resources/templates/client/requests/TemplatesCreateRequest.js} +0 -0
  509. /package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +0 -0
  510. /package/api/resources/agents/{types/AgentsMigrateResponse.js → resources/templates/client/requests/TemplatesMigrateRequest.js} +0 -0
  511. /package/api/resources/agents/resources/{memoryBlocks/client → templates/client/requests}/index.js +0 -0
  512. /package/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItem.js → resources/templates/types/TemplatesMigrateResponse.js} +0 -0
  513. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItem.js} +0 -0
  514. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemName.js} +0 -0
  515. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemOrderBy.js} +0 -0
  516. /package/{dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js} +0 -0
  517. /package/{dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.js → api/resources/providers/client/requests/DeleteProviderRequest.js} +0 -0
  518. /package/{dist/api/resources/agents/client/requests/AgentsMigrateRequest.js → api/resources/providers/client/requests/ListProvidersRequest.js} +0 -0
  519. /package/{dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → api/resources/providers/client/requests/ProviderCreate.js} +0 -0
  520. /package/{dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js → api/resources/providers/client/requests/ProviderUpdate.js} +0 -0
  521. /package/{dist/api/resources/agents/resources/memory/client → api/resources/providers/client/requests}/index.js +0 -0
  522. /package/api/resources/{agents/resources/memoryBlocks → providers}/index.d.ts +0 -0
  523. /package/api/resources/{agents/resources/memoryBlocks → providers}/index.js +0 -0
  524. /package/{dist/api/resources/agents/types/AgentsMigrateResponse.js → api/resources/runs/client/requests/GetRunMessagesRequest.js} +0 -0
  525. /package/{dist/api/resources/agents/resources/memory/resources/messages/client → api/resources/runs/client/requests}/index.js +0 -0
  526. /package/{dist/api/resources/agents/resources/memory/resources/messages → api/resources/runs}/index.d.ts +0 -0
  527. /package/{dist/api/resources/agents/resources/memory/resources/messages → api/resources/runs}/index.js +0 -0
  528. /package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js → api/types/Provider.js} +0 -0
  529. /package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.js → api/types/Run.js} +0 -0
  530. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → client/requests/AgentsSearchRequest.js} +0 -0
  531. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemVersion.js → client/requests/ResetMessagesRequest.js} +0 -0
  532. /package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/coreMemory}/client/index.d.ts +0 -0
  533. /package/dist/api/resources/agents/resources/{memoryBlocks → coreMemory}/client/index.js +0 -0
  534. /package/dist/api/resources/agents/resources/{memoryBlocks → coreMemory}/index.d.ts +0 -0
  535. /package/dist/api/resources/agents/resources/{memoryBlocks → coreMemory}/index.js +0 -0
  536. /package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/index.d.ts +0 -0
  537. /package/dist/{serialization/resources/agents/resources/memory/resources/messages → api/resources/providers}/index.d.ts +0 -0
  538. /package/dist/{serialization/resources/agents/resources/memory/resources/messages → api/resources/providers}/index.js +0 -0
  539. /package/{serialization/resources/agents/resources/memory/resources/messages → dist/api/resources/runs}/index.d.ts +0 -0
  540. /package/{serialization/resources/agents/resources/memory/resources/messages → dist/api/resources/runs}/index.js +0 -0
@@ -38,41 +38,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  return (mod && mod.__esModule) ? mod : { "default": mod };
39
39
  };
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.Memory = void 0;
41
+ exports.MemoryVariables = void 0;
42
42
  const environments = __importStar(require("../../../../../../environments"));
43
43
  const core = __importStar(require("../../../../../../core"));
44
44
  const Letta = __importStar(require("../../../../../index"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const serializers = __importStar(require("../../../../../../serialization/index"));
47
47
  const errors = __importStar(require("../../../../../../errors/index"));
48
- const Client_1 = require("../resources/messages/client/Client");
49
- class Memory {
48
+ class MemoryVariables {
50
49
  constructor(_options = {}) {
51
50
  this._options = _options;
52
51
  }
53
- get messages() {
54
- var _a;
55
- return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_1.Messages(this._options)));
56
- }
57
52
  /**
58
- * Retrieve the memory state of a specific agent.
59
- * This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
53
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
54
+ *
55
+ * Returns the memory variables associated with an agent.
60
56
  *
61
57
  * @param {string} agentId
62
- * @param {Memory.RequestOptions} requestOptions - Request-specific configuration.
58
+ * @param {MemoryVariables.RequestOptions} requestOptions - Request-specific configuration.
63
59
  *
64
- * @throws {@link Letta.UnprocessableEntityError}
60
+ * @throws {@link Letta.NotFoundError}
65
61
  *
66
62
  * @example
67
- * await client.agents.memory.get("agent_id")
63
+ * await client.agents.memoryVariables.get("agent_id")
68
64
  */
69
65
  get(agentId, requestOptions) {
70
66
  var _a, _b;
71
67
  return __awaiter(this, void 0, void 0, function* () {
72
68
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
73
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory`),
69
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/variables`),
74
70
  method: "GET",
75
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
71
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
76
72
  contentType: "application/json",
77
73
  requestType: "json",
78
74
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -80,7 +76,7 @@ class Memory {
80
76
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
81
77
  });
82
78
  if (_response.ok) {
83
- return serializers.Memory.parseOrThrow(_response.body, {
79
+ return serializers.agents.MemoryVariablesGetResponse.parseOrThrow(_response.body, {
84
80
  unrecognizedObjectKeys: "passthrough",
85
81
  allowUnrecognizedUnionMembers: true,
86
82
  allowUnrecognizedEnumValues: true,
@@ -90,14 +86,8 @@ class Memory {
90
86
  }
91
87
  if (_response.error.reason === "status-code") {
92
88
  switch (_response.error.statusCode) {
93
- case 422:
94
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
95
- unrecognizedObjectKeys: "passthrough",
96
- allowUnrecognizedUnionMembers: true,
97
- allowUnrecognizedEnumValues: true,
98
- skipValidation: true,
99
- breadcrumbsPrefix: ["response"],
100
- }));
89
+ case 404:
90
+ throw new Letta.NotFoundError(_response.error.body);
101
91
  default:
102
92
  throw new errors.LettaError({
103
93
  statusCode: _response.error.statusCode,
@@ -112,7 +102,7 @@ class Memory {
112
102
  body: _response.error.rawBody,
113
103
  });
114
104
  case "timeout":
115
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/memory.");
105
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/variables.");
116
106
  case "unknown":
117
107
  throw new errors.LettaError({
118
108
  message: _response.error.errorMessage,
@@ -127,4 +117,4 @@ class Memory {
127
117
  });
128
118
  }
129
119
  }
130
- exports.Memory = Memory;
120
+ exports.MemoryVariables = MemoryVariables;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./client";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface AgentsGetAgentVariablesResponse {
4
+ export interface MemoryVariablesGetResponse {
5
5
  variables: Record<string, string>;
6
6
  }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from "./MemoryVariablesGetResponse";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./MemoryVariablesGetResponse"), exports);
@@ -94,7 +94,7 @@ export declare class Messages {
94
94
  * }]
95
95
  * })
96
96
  */
97
- createAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Job>;
97
+ createAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Messages.RequestOptions): Promise<Letta.Run>;
98
98
  protected _getCustomAuthorizationHeaders(): Promise<{
99
99
  Authorization: string;
100
100
  }>;
@@ -84,7 +84,7 @@ class Messages {
84
84
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
85
85
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
86
86
  method: "GET",
87
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
88
88
  contentType: "application/json",
89
89
  queryParameters: _queryParams,
90
90
  requestType: "json",
@@ -157,7 +157,7 @@ class Messages {
157
157
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
158
158
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
159
159
  method: "POST",
160
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
160
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
161
161
  contentType: "application/json",
162
162
  requestType: "json",
163
163
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -225,7 +225,7 @@ class Messages {
225
225
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
226
226
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
227
227
  method: "PATCH",
228
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
228
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
229
229
  contentType: "application/json",
230
230
  requestType: "json",
231
231
  body: serializers.agents.MessageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -285,7 +285,7 @@ class Messages {
285
285
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
286
286
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
287
287
  method: "POST",
288
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
288
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
289
289
  contentType: "application/json",
290
290
  requestType: "json",
291
291
  body: serializers.agents.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -369,7 +369,7 @@ class Messages {
369
369
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
370
370
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
371
371
  method: "POST",
372
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
372
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
373
373
  contentType: "application/json",
374
374
  requestType: "json",
375
375
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -378,7 +378,7 @@ class Messages {
378
378
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
379
379
  });
380
380
  if (_response.ok) {
381
- return serializers.Job.parseOrThrow(_response.body, {
381
+ return serializers.Run.parseOrThrow(_response.body, {
382
382
  unrecognizedObjectKeys: "passthrough",
383
383
  allowUnrecognizedUnionMembers: true,
384
384
  allowUnrecognizedEnumValues: true,
@@ -66,7 +66,7 @@ class RecallMemory {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/recall`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -66,7 +66,7 @@ class Sources {
66
66
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
67
67
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
68
68
  method: "GET",
69
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
69
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
70
70
  contentType: "application/json",
71
71
  requestType: "json",
72
72
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -0,0 +1,82 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../../../environments";
5
+ import * as core from "../../../../../../core";
6
+ import * as Letta from "../../../../../index";
7
+ export declare namespace Templates {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.LettaEnvironment | string>;
10
+ token?: core.Supplier<string | undefined>;
11
+ fetcher?: core.FetchFunction;
12
+ }
13
+ interface RequestOptions {
14
+ /** The maximum time to wait for a response in seconds. */
15
+ timeoutInSeconds?: number;
16
+ /** The number of times to retry the request. Defaults to 2. */
17
+ maxRetries?: number;
18
+ /** A hook to abort the request. */
19
+ abortSignal?: AbortSignal;
20
+ /** Additional headers to include in the request. */
21
+ headers?: Record<string, string>;
22
+ }
23
+ }
24
+ export declare class Templates {
25
+ protected readonly _options: Templates.Options;
26
+ constructor(_options?: Templates.Options);
27
+ /**
28
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
29
+ *
30
+ * Creates a new version of the template version of the agent.
31
+ *
32
+ * @param {string} agentId - The agent ID of the agent to migrate, if this agent is not a template, it will create a agent template from the agent provided as well
33
+ * @param {Letta.agents.TemplatesCreateVersionRequest} request
34
+ * @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
35
+ *
36
+ * @throws {@link Letta.NotFoundError}
37
+ * @throws {@link Letta.InternalServerError}
38
+ *
39
+ * @example
40
+ * await client.agents.templates.createVersion("agent_id")
41
+ */
42
+ createVersion(agentId: string, request?: Letta.agents.TemplatesCreateVersionRequest, requestOptions?: Templates.RequestOptions): Promise<void>;
43
+ /**
44
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
45
+ *
46
+ * Migrate an agent to a new versioned agent template.
47
+ *
48
+ * @param {string} agentId
49
+ * @param {Letta.agents.TemplatesMigrateRequest} request
50
+ * @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
51
+ *
52
+ * @throws {@link Letta.NotFoundError}
53
+ * @throws {@link Letta.ConflictError}
54
+ * @throws {@link Letta.InternalServerError}
55
+ *
56
+ * @example
57
+ * await client.agents.templates.migrate("agent_id", {
58
+ * toTemplate: "to_template",
59
+ * preserveCoreMemories: true
60
+ * })
61
+ */
62
+ migrate(agentId: string, request: Letta.agents.TemplatesMigrateRequest, requestOptions?: Templates.RequestOptions): Promise<Letta.agents.TemplatesMigrateResponse>;
63
+ /**
64
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
65
+ *
66
+ * Creates a template from an agent.
67
+ *
68
+ * @param {string} agentId
69
+ * @param {Letta.agents.TemplatesCreateRequest} request
70
+ * @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
71
+ *
72
+ * @throws {@link Letta.NotFoundError}
73
+ * @throws {@link Letta.InternalServerError}
74
+ *
75
+ * @example
76
+ * await client.agents.templates.create("agent_id")
77
+ */
78
+ create(agentId: string, request?: Letta.agents.TemplatesCreateRequest, requestOptions?: Templates.RequestOptions): Promise<void>;
79
+ protected _getCustomAuthorizationHeaders(): Promise<{
80
+ Authorization: string;
81
+ }>;
82
+ }
@@ -34,65 +34,78 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
34
34
  step((generator = generator.apply(thisArg, _arguments || [])).next());
35
35
  });
36
36
  };
37
+ var __rest = (this && this.__rest) || function (s, e) {
38
+ var t = {};
39
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
40
+ t[p] = s[p];
41
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
42
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
43
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
44
+ t[p[i]] = s[p[i]];
45
+ }
46
+ return t;
47
+ };
37
48
  var __importDefault = (this && this.__importDefault) || function (mod) {
38
49
  return (mod && mod.__esModule) ? mod : { "default": mod };
39
50
  };
40
51
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.MemoryBlocks = void 0;
52
+ exports.Templates = void 0;
42
53
  const environments = __importStar(require("../../../../../../environments"));
43
54
  const core = __importStar(require("../../../../../../core"));
44
55
  const Letta = __importStar(require("../../../../../index"));
45
- const url_join_1 = __importDefault(require("url-join"));
46
56
  const serializers = __importStar(require("../../../../../../serialization/index"));
57
+ const url_join_1 = __importDefault(require("url-join"));
47
58
  const errors = __importStar(require("../../../../../../errors/index"));
48
- class MemoryBlocks {
59
+ class Templates {
49
60
  constructor(_options = {}) {
50
61
  this._options = _options;
51
62
  }
52
63
  /**
53
- * Removes a memory block from an agent by unlnking it. If the block is not linked to any other agent, it is deleted.
64
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
54
65
  *
55
- * @param {string} agentId
56
- * @param {string} blockLabel
57
- * @param {MemoryBlocks.RequestOptions} requestOptions - Request-specific configuration.
66
+ * Creates a new version of the template version of the agent.
58
67
  *
59
- * @throws {@link Letta.UnprocessableEntityError}
68
+ * @param {string} agentId - The agent ID of the agent to migrate, if this agent is not a template, it will create a agent template from the agent provided as well
69
+ * @param {Letta.agents.TemplatesCreateVersionRequest} request
70
+ * @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
71
+ *
72
+ * @throws {@link Letta.NotFoundError}
73
+ * @throws {@link Letta.InternalServerError}
60
74
  *
61
75
  * @example
62
- * await client.agents.memoryBlocks.remove("agent_id", "block_label")
76
+ * await client.agents.templates.createVersion("agent_id")
63
77
  */
64
- remove(agentId, blockLabel, requestOptions) {
78
+ createVersion(agentId, request = {}, requestOptions) {
65
79
  var _a, _b;
66
80
  return __awaiter(this, void 0, void 0, function* () {
81
+ const { returnAgentState } = request, _body = __rest(request, ["returnAgentState"]);
82
+ const _queryParams = {};
83
+ if (returnAgentState != null) {
84
+ _queryParams["returnAgentState"] = returnAgentState.toString();
85
+ }
67
86
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
68
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
69
- method: "DELETE",
70
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
87
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
88
+ method: "POST",
89
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
71
90
  contentType: "application/json",
91
+ queryParameters: _queryParams,
72
92
  requestType: "json",
93
+ body: serializers.agents.TemplatesCreateVersionRequest.jsonOrThrow(_body, {
94
+ unrecognizedObjectKeys: "strip",
95
+ }),
73
96
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
74
97
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
75
98
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
76
99
  });
77
100
  if (_response.ok) {
78
- return serializers.Memory.parseOrThrow(_response.body, {
79
- unrecognizedObjectKeys: "passthrough",
80
- allowUnrecognizedUnionMembers: true,
81
- allowUnrecognizedEnumValues: true,
82
- skipValidation: true,
83
- breadcrumbsPrefix: ["response"],
84
- });
101
+ return;
85
102
  }
86
103
  if (_response.error.reason === "status-code") {
87
104
  switch (_response.error.statusCode) {
88
- case 422:
89
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
90
- unrecognizedObjectKeys: "passthrough",
91
- allowUnrecognizedUnionMembers: true,
92
- allowUnrecognizedEnumValues: true,
93
- skipValidation: true,
94
- breadcrumbsPrefix: ["response"],
95
- }));
105
+ case 404:
106
+ throw new Letta.NotFoundError(_response.error.body);
107
+ case 500:
108
+ throw new Letta.InternalServerError(_response.error.body);
96
109
  default:
97
110
  throw new errors.LettaError({
98
111
  statusCode: _response.error.statusCode,
@@ -107,7 +120,7 @@ class MemoryBlocks {
107
120
  body: _response.error.rawBody,
108
121
  });
109
122
  case "timeout":
110
- throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/agents/{agent_id}/memory/block/{block_label}.");
123
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/version-template.");
111
124
  case "unknown":
112
125
  throw new errors.LettaError({
113
126
  message: _response.error.errorMessage,
@@ -116,36 +129,40 @@ class MemoryBlocks {
116
129
  });
117
130
  }
118
131
  /**
119
- * Creates a memory block and links it to the agent.
132
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
133
+ *
134
+ * Migrate an agent to a new versioned agent template.
120
135
  *
121
136
  * @param {string} agentId
122
- * @param {Letta.CreateBlock} request
123
- * @param {MemoryBlocks.RequestOptions} requestOptions - Request-specific configuration.
137
+ * @param {Letta.agents.TemplatesMigrateRequest} request
138
+ * @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
124
139
  *
125
- * @throws {@link Letta.UnprocessableEntityError}
140
+ * @throws {@link Letta.NotFoundError}
141
+ * @throws {@link Letta.ConflictError}
142
+ * @throws {@link Letta.InternalServerError}
126
143
  *
127
144
  * @example
128
- * await client.agents.memoryBlocks.add("agent_id", {
129
- * value: "value",
130
- * label: "label"
145
+ * await client.agents.templates.migrate("agent_id", {
146
+ * toTemplate: "to_template",
147
+ * preserveCoreMemories: true
131
148
  * })
132
149
  */
133
- add(agentId, request, requestOptions) {
150
+ migrate(agentId, request, requestOptions) {
134
151
  var _a, _b;
135
152
  return __awaiter(this, void 0, void 0, function* () {
136
153
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
137
- url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
154
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
138
155
  method: "POST",
139
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "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),
156
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
140
157
  contentType: "application/json",
141
158
  requestType: "json",
142
- body: serializers.CreateBlock.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
159
+ body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
143
160
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
144
161
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
145
162
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
146
163
  });
147
164
  if (_response.ok) {
148
- return serializers.Memory.parseOrThrow(_response.body, {
165
+ return serializers.agents.TemplatesMigrateResponse.parseOrThrow(_response.body, {
149
166
  unrecognizedObjectKeys: "passthrough",
150
167
  allowUnrecognizedUnionMembers: true,
151
168
  allowUnrecognizedEnumValues: true,
@@ -155,14 +172,78 @@ class MemoryBlocks {
155
172
  }
156
173
  if (_response.error.reason === "status-code") {
157
174
  switch (_response.error.statusCode) {
158
- case 422:
159
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
175
+ case 404:
176
+ throw new Letta.NotFoundError(_response.error.body);
177
+ case 409:
178
+ throw new Letta.ConflictError(serializers.ConflictErrorBody.parseOrThrow(_response.error.body, {
160
179
  unrecognizedObjectKeys: "passthrough",
161
180
  allowUnrecognizedUnionMembers: true,
162
181
  allowUnrecognizedEnumValues: true,
163
182
  skipValidation: true,
164
183
  breadcrumbsPrefix: ["response"],
165
184
  }));
185
+ case 500:
186
+ throw new Letta.InternalServerError(_response.error.body);
187
+ default:
188
+ throw new errors.LettaError({
189
+ statusCode: _response.error.statusCode,
190
+ body: _response.error.body,
191
+ });
192
+ }
193
+ }
194
+ switch (_response.error.reason) {
195
+ case "non-json":
196
+ throw new errors.LettaError({
197
+ statusCode: _response.error.statusCode,
198
+ body: _response.error.rawBody,
199
+ });
200
+ case "timeout":
201
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/migrate.");
202
+ case "unknown":
203
+ throw new errors.LettaError({
204
+ message: _response.error.errorMessage,
205
+ });
206
+ }
207
+ });
208
+ }
209
+ /**
210
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
211
+ *
212
+ * Creates a template from an agent.
213
+ *
214
+ * @param {string} agentId
215
+ * @param {Letta.agents.TemplatesCreateRequest} request
216
+ * @param {Templates.RequestOptions} requestOptions - Request-specific configuration.
217
+ *
218
+ * @throws {@link Letta.NotFoundError}
219
+ * @throws {@link Letta.InternalServerError}
220
+ *
221
+ * @example
222
+ * await client.agents.templates.create("agent_id")
223
+ */
224
+ create(agentId, request = {}, requestOptions) {
225
+ var _a, _b;
226
+ return __awaiter(this, void 0, void 0, function* () {
227
+ const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
228
+ url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
229
+ method: "POST",
230
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.8", "User-Agent": "@letta-ai/letta-client/0.1.8", "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),
231
+ contentType: "application/json",
232
+ requestType: "json",
233
+ body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
234
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
235
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
236
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
237
+ });
238
+ if (_response.ok) {
239
+ return;
240
+ }
241
+ if (_response.error.reason === "status-code") {
242
+ switch (_response.error.statusCode) {
243
+ case 404:
244
+ throw new Letta.NotFoundError(_response.error.body);
245
+ case 500:
246
+ throw new Letta.InternalServerError(_response.error.body);
166
247
  default:
167
248
  throw new errors.LettaError({
168
249
  statusCode: _response.error.statusCode,
@@ -177,7 +258,7 @@ class MemoryBlocks {
177
258
  body: _response.error.rawBody,
178
259
  });
179
260
  case "timeout":
180
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/memory/block.");
261
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/template.");
181
262
  case "unknown":
182
263
  throw new errors.LettaError({
183
264
  message: _response.error.errorMessage,
@@ -192,4 +273,4 @@ class MemoryBlocks {
192
273
  });
193
274
  }
194
275
  }
195
- exports.MemoryBlocks = MemoryBlocks;
276
+ exports.Templates = Templates;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);