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