@letta-ai/letta-client 0.1.4 → 0.1.7

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 (559) hide show
  1. package/Client.d.ts +3 -0
  2. package/Client.js +5 -0
  3. package/api/resources/agents/client/Client.d.ts +14 -125
  4. package/api/resources/agents/client/Client.js +31 -568
  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 -1
  7. package/api/resources/agents/client/requests/index.d.ts +1 -4
  8. package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  9. package/api/resources/agents/resources/context/client/Client.js +1 -1
  10. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
  11. package/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
  12. package/api/resources/agents/resources/index.d.ts +6 -2
  13. package/api/resources/agents/resources/index.js +7 -3
  14. package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
  15. package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
  16. package/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
  17. package/api/resources/agents/resources/memoryVariables/index.js +18 -0
  18. package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
  19. package/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  20. package/api/resources/agents/resources/memoryVariables/types/index.js +17 -0
  21. package/api/resources/agents/resources/messages/client/Client.d.ts +19 -0
  22. package/api/resources/agents/resources/messages/client/Client.js +77 -4
  23. package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -0
  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} +1 -1
  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 +2 -0
  57. package/api/resources/index.js +3 -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/sources/client/Client.js +8 -8
  70. package/api/resources/sources/resources/files/client/Client.js +3 -3
  71. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  72. package/api/resources/tools/client/Client.d.ts +3 -1
  73. package/api/resources/tools/client/Client.js +15 -13
  74. package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
  75. package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
  76. package/api/types/AgentEnvironmentVariable.d.ts +0 -2
  77. package/api/types/AgentState.d.ts +1 -3
  78. package/api/types/AgentType.d.ts +1 -2
  79. package/api/types/AgentType.js +0 -1
  80. package/api/types/Block.d.ts +0 -2
  81. package/api/types/FileMetadata.d.ts +0 -2
  82. package/api/types/Job.d.ts +0 -2
  83. package/api/types/LettaRequest.d.ts +2 -0
  84. package/api/types/LettaSchemasMessageMessage.d.ts +0 -2
  85. package/api/types/LettaSchemasToolTool.d.ts +4 -3
  86. package/api/types/Passage.d.ts +0 -2
  87. package/api/types/Provider.d.ts +13 -0
  88. package/api/types/SandboxConfig.d.ts +0 -2
  89. package/api/types/SandboxEnvironmentVariable.d.ts +0 -2
  90. package/api/types/Source.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/User.d.ts +0 -2
  94. package/api/types/UserCreate.d.ts +0 -2
  95. package/api/types/UserUpdate.d.ts +0 -2
  96. package/api/types/index.d.ts +2 -0
  97. package/api/types/index.js +2 -0
  98. package/dist/Client.d.ts +3 -0
  99. package/dist/Client.js +5 -0
  100. package/dist/api/resources/agents/client/Client.d.ts +14 -125
  101. package/dist/api/resources/agents/client/Client.js +31 -568
  102. package/{api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts → dist/api/resources/agents/client/requests/AgentsSearchRequest.d.ts} +3 -3
  103. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -1
  104. package/dist/api/resources/agents/client/requests/index.d.ts +1 -4
  105. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
  106. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  107. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
  108. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
  109. package/dist/api/resources/agents/resources/index.d.ts +6 -2
  110. package/dist/api/resources/agents/resources/index.js +7 -3
  111. package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
  112. package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
  113. package/dist/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
  114. package/dist/api/resources/agents/resources/memoryVariables/index.js +18 -0
  115. package/dist/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
  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 +19 -0
  119. package/dist/api/resources/agents/resources/messages/client/Client.js +77 -4
  120. package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -0
  121. package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
  122. package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
  123. package/dist/api/resources/agents/resources/templates/client/Client.d.ts +82 -0
  124. package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/templates}/client/Client.js +126 -45
  125. package/dist/api/resources/agents/resources/templates/client/index.d.ts +1 -0
  126. package/dist/api/resources/agents/resources/templates/client/index.js +17 -0
  127. package/dist/api/resources/agents/{client/requests/AgentsCreateTemplateFromAgentRequest.d.ts → resources/templates/client/requests/TemplatesCreateRequest.d.ts} +1 -1
  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/{client/requests/AgentsMigrateRequest.d.ts → resources/templates/client/requests/TemplatesMigrateRequest.d.ts} +1 -1
  130. package/dist/api/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  131. package/dist/api/resources/agents/resources/templates/client/requests/index.js +2 -0
  132. package/dist/api/resources/agents/resources/templates/index.d.ts +2 -0
  133. package/dist/api/resources/agents/resources/templates/index.js +18 -0
  134. package/dist/api/resources/agents/{types/AgentsMigrateResponse.d.ts → resources/templates/types/TemplatesMigrateResponse.d.ts} +1 -1
  135. package/dist/api/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +5 -0
  136. package/dist/api/resources/agents/resources/templates/types/index.d.ts +1 -0
  137. package/dist/api/resources/agents/resources/templates/types/index.js +17 -0
  138. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  139. package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +8 -0
  140. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestCombinator.js} +2 -2
  141. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +16 -0
  142. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.js +5 -0
  143. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +8 -0
  144. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.js +5 -0
  145. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +9 -0
  146. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemNameOperator.js} +2 -2
  147. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +8 -0
  148. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +5 -0
  149. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +8 -0
  150. package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  151. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +8 -0
  152. package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js} +2 -2
  153. package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts → AgentsSearchRequestSearchItemVersion.d.ts} +1 -1
  154. package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +5 -0
  155. package/dist/api/resources/agents/types/index.d.ts +8 -10
  156. package/dist/api/resources/agents/types/index.js +8 -10
  157. package/dist/api/resources/blocks/client/Client.js +7 -7
  158. package/dist/api/resources/health/client/Client.js +1 -1
  159. package/dist/api/resources/index.d.ts +2 -0
  160. package/dist/api/resources/index.js +3 -1
  161. package/dist/api/resources/jobs/client/Client.js +4 -4
  162. package/dist/api/resources/models/client/Client.js +2 -2
  163. package/dist/api/resources/providers/client/Client.d.ts +86 -0
  164. package/dist/api/resources/providers/client/Client.js +336 -0
  165. package/dist/api/resources/providers/client/index.d.ts +1 -0
  166. package/dist/api/resources/providers/client/index.js +17 -0
  167. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +15 -0
  168. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.js +5 -0
  169. package/dist/api/resources/providers/client/requests/ListProvidersRequest.d.ts +11 -0
  170. package/dist/api/resources/providers/client/requests/ListProvidersRequest.js +5 -0
  171. package/dist/api/resources/providers/client/requests/ProviderCreate.d.ts +16 -0
  172. package/dist/api/resources/providers/client/requests/ProviderCreate.js +5 -0
  173. package/dist/api/resources/providers/client/requests/ProviderUpdate.d.ts +16 -0
  174. package/dist/api/resources/providers/client/requests/ProviderUpdate.js +5 -0
  175. package/dist/api/resources/providers/client/requests/index.d.ts +4 -0
  176. package/dist/api/resources/providers/client/requests/index.js +2 -0
  177. package/dist/api/resources/sources/client/Client.js +8 -8
  178. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  179. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  180. package/dist/api/resources/tools/client/Client.d.ts +3 -1
  181. package/dist/api/resources/tools/client/Client.js +15 -13
  182. package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
  183. package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
  184. package/dist/api/types/AgentEnvironmentVariable.d.ts +0 -2
  185. package/dist/api/types/AgentState.d.ts +1 -3
  186. package/dist/api/types/AgentType.d.ts +1 -2
  187. package/dist/api/types/AgentType.js +0 -1
  188. package/dist/api/types/Block.d.ts +0 -2
  189. package/dist/api/types/FileMetadata.d.ts +0 -2
  190. package/dist/api/types/Job.d.ts +0 -2
  191. package/dist/api/types/LettaRequest.d.ts +2 -0
  192. package/dist/api/types/LettaSchemasMessageMessage.d.ts +0 -2
  193. package/dist/api/types/LettaSchemasToolTool.d.ts +4 -3
  194. package/dist/api/types/Passage.d.ts +0 -2
  195. package/dist/api/types/Provider.d.ts +13 -0
  196. package/dist/api/types/Provider.js +5 -0
  197. package/dist/api/types/SandboxConfig.d.ts +0 -2
  198. package/dist/api/types/SandboxEnvironmentVariable.d.ts +0 -2
  199. package/dist/api/types/Source.d.ts +0 -2
  200. package/dist/api/types/ToolType.d.ts +9 -0
  201. package/dist/api/types/ToolType.js +11 -0
  202. package/dist/api/types/User.d.ts +0 -2
  203. package/dist/api/types/UserCreate.d.ts +0 -2
  204. package/dist/api/types/UserUpdate.d.ts +0 -2
  205. package/dist/api/types/index.d.ts +2 -0
  206. package/dist/api/types/index.js +2 -0
  207. package/dist/serialization/resources/agents/client/index.d.ts +0 -1
  208. package/dist/serialization/resources/agents/client/index.js +1 -2
  209. package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
  210. package/{serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
  211. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  212. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -1
  213. package/dist/serialization/resources/agents/client/requests/index.d.ts +1 -4
  214. package/dist/serialization/resources/agents/client/requests/index.js +3 -9
  215. package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
  216. package/{serialization/resources/agents/client/getAgentMemoryBlocks.js → dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js} +2 -2
  217. package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
  218. package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
  219. package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
  220. package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
  221. package/dist/serialization/resources/agents/resources/index.d.ts +6 -1
  222. package/dist/serialization/resources/agents/resources/index.js +7 -2
  223. package/dist/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
  224. package/dist/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
  225. package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
  226. package/dist/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
  227. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  228. package/dist/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
  229. package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -0
  230. package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +1 -0
  231. package/dist/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
  232. package/dist/serialization/resources/agents/resources/templates/client/index.js +17 -0
  233. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
  234. package/{serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js} +3 -3
  235. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
  236. package/dist/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
  237. package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
  238. package/{serialization/resources/agents/client/requests/AgentsMigrateRequest.js → dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
  239. package/dist/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  240. package/dist/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
  241. package/dist/serialization/resources/agents/resources/templates/index.d.ts +2 -0
  242. package/dist/serialization/resources/agents/resources/templates/index.js +18 -0
  243. package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
  244. package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
  245. package/dist/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
  246. package/dist/serialization/resources/agents/resources/templates/types/index.js +17 -0
  247. package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
  248. package/dist/serialization/resources/agents/types/{AgentsMigrateResponse.js → AgentsSearchRequestCombinator.js} +2 -4
  249. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
  250. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItem.js} +13 -6
  251. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
  252. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
  253. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
  254. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
  255. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
  256. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItemOrderBy.js} +6 -5
  257. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
  258. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
  259. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
  260. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
  261. package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
  262. package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
  263. package/dist/serialization/resources/agents/types/index.d.ts +8 -10
  264. package/dist/serialization/resources/agents/types/index.js +8 -10
  265. package/dist/serialization/resources/index.d.ts +2 -0
  266. package/dist/serialization/resources/index.js +3 -1
  267. package/dist/serialization/resources/providers/client/index.d.ts +2 -0
  268. package/dist/serialization/resources/{agents/resources/memory/resources → providers/client}/index.js +6 -2
  269. package/dist/serialization/resources/{agents/client/getAgentMemoryBlocks.d.ts → providers/client/listProviders.d.ts} +3 -3
  270. package/{serialization/resources/agents/types/AgentsMigrateResponse.js → dist/serialization/resources/providers/client/listProviders.js} +3 -4
  271. package/dist/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
  272. package/dist/serialization/resources/providers/client/requests/ProviderCreate.js +34 -0
  273. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
  274. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +34 -0
  275. package/dist/serialization/resources/providers/client/requests/index.d.ts +2 -0
  276. package/dist/serialization/resources/providers/client/requests/index.js +7 -0
  277. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
  278. package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
  279. package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -0
  280. package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +1 -0
  281. package/dist/serialization/types/AgentEnvironmentVariable.d.ts +0 -1
  282. package/dist/serialization/types/AgentEnvironmentVariable.js +0 -1
  283. package/dist/serialization/types/AgentState.d.ts +1 -2
  284. package/dist/serialization/types/AgentState.js +1 -2
  285. package/dist/serialization/types/AgentType.d.ts +1 -1
  286. package/dist/serialization/types/AgentType.js +1 -7
  287. package/dist/serialization/types/Block.d.ts +0 -1
  288. package/dist/serialization/types/Block.js +0 -1
  289. package/dist/serialization/types/FileMetadata.d.ts +0 -1
  290. package/dist/serialization/types/FileMetadata.js +0 -1
  291. package/dist/serialization/types/Job.d.ts +0 -1
  292. package/dist/serialization/types/Job.js +0 -1
  293. package/dist/serialization/types/LettaRequest.d.ts +1 -0
  294. package/dist/serialization/types/LettaRequest.js +1 -0
  295. package/dist/serialization/types/LettaSchemasMessageMessage.d.ts +0 -1
  296. package/dist/serialization/types/LettaSchemasMessageMessage.js +0 -1
  297. package/dist/serialization/types/LettaSchemasToolTool.d.ts +3 -2
  298. package/dist/serialization/types/LettaSchemasToolTool.js +3 -2
  299. package/dist/serialization/types/Passage.d.ts +0 -1
  300. package/dist/serialization/types/Passage.js +0 -1
  301. package/dist/serialization/types/Provider.d.ts +15 -0
  302. package/dist/serialization/types/Provider.js +36 -0
  303. package/dist/serialization/types/SandboxConfig.d.ts +0 -1
  304. package/dist/serialization/types/SandboxConfig.js +0 -1
  305. package/dist/serialization/types/SandboxEnvironmentVariable.d.ts +0 -1
  306. package/dist/serialization/types/SandboxEnvironmentVariable.js +0 -1
  307. package/dist/serialization/types/Source.d.ts +0 -1
  308. package/dist/serialization/types/Source.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/User.d.ts +0 -1
  312. package/dist/serialization/types/User.js +0 -1
  313. package/dist/serialization/types/UserCreate.d.ts +0 -1
  314. package/dist/serialization/types/UserCreate.js +0 -1
  315. package/dist/serialization/types/UserUpdate.d.ts +0 -1
  316. package/dist/serialization/types/UserUpdate.js +0 -1
  317. package/dist/serialization/types/index.d.ts +2 -0
  318. package/dist/serialization/types/index.js +2 -0
  319. package/dist/version.d.ts +1 -1
  320. package/dist/version.js +1 -1
  321. package/package.json +1 -1
  322. package/reference.md +589 -315
  323. package/serialization/resources/agents/client/index.d.ts +0 -1
  324. package/serialization/resources/agents/client/index.js +1 -2
  325. package/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
  326. package/{dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
  327. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -1
  328. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -1
  329. package/serialization/resources/agents/client/requests/index.d.ts +1 -4
  330. package/serialization/resources/agents/client/requests/index.js +3 -9
  331. package/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
  332. package/{dist/serialization/resources/agents/client/getAgentMemoryBlocks.js → serialization/resources/agents/resources/coreMemory/client/getBlocks.js} +2 -2
  333. package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
  334. package/{dist/serialization/resources/agents/resources/memory/resources/messages → serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
  335. package/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
  336. package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
  337. package/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  338. package/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  339. package/serialization/resources/agents/resources/index.d.ts +6 -1
  340. package/serialization/resources/agents/resources/index.js +7 -2
  341. package/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
  342. package/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
  343. package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
  344. package/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
  345. package/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
  346. package/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
  347. package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -0
  348. package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +1 -0
  349. package/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
  350. package/serialization/resources/agents/resources/templates/client/index.js +17 -0
  351. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
  352. package/{dist/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js} +3 -3
  353. package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
  354. package/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
  355. package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
  356. package/{dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.js → serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
  357. package/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
  358. package/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
  359. package/serialization/resources/agents/resources/templates/index.d.ts +2 -0
  360. package/serialization/resources/agents/resources/templates/index.js +18 -0
  361. package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
  362. package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
  363. package/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
  364. package/serialization/resources/agents/resources/templates/types/index.js +17 -0
  365. package/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
  366. package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +31 -0
  367. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
  368. package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +43 -0
  369. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
  370. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
  371. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
  372. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
  373. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
  374. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +36 -0
  375. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
  376. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +31 -0
  377. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
  378. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
  379. package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
  380. package/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
  381. package/serialization/resources/agents/types/index.d.ts +8 -10
  382. package/serialization/resources/agents/types/index.js +8 -10
  383. package/serialization/resources/index.d.ts +2 -0
  384. package/serialization/resources/index.js +3 -1
  385. package/serialization/resources/providers/client/index.d.ts +2 -0
  386. package/{api/resources/agents/resources/memory/resources → serialization/resources/providers/client}/index.js +6 -2
  387. package/serialization/resources/{agents/client/getAgentMemoryBlocks.d.ts → providers/client/listProviders.d.ts} +3 -3
  388. package/serialization/resources/providers/client/listProviders.js +32 -0
  389. package/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
  390. package/serialization/resources/providers/client/requests/ProviderCreate.js +34 -0
  391. package/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
  392. package/serialization/resources/providers/client/requests/ProviderUpdate.js +34 -0
  393. package/serialization/resources/providers/client/requests/index.d.ts +2 -0
  394. package/serialization/resources/providers/client/requests/index.js +7 -0
  395. package/serialization/resources/providers/index.d.ts +1 -0
  396. package/serialization/resources/providers/index.js +17 -0
  397. package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
  398. package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
  399. package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -0
  400. package/serialization/resources/tools/client/requests/ToolUpdate.js +1 -0
  401. package/serialization/types/AgentEnvironmentVariable.d.ts +0 -1
  402. package/serialization/types/AgentEnvironmentVariable.js +0 -1
  403. package/serialization/types/AgentState.d.ts +1 -2
  404. package/serialization/types/AgentState.js +1 -2
  405. package/serialization/types/AgentType.d.ts +1 -1
  406. package/serialization/types/AgentType.js +1 -7
  407. package/serialization/types/Block.d.ts +0 -1
  408. package/serialization/types/Block.js +0 -1
  409. package/serialization/types/FileMetadata.d.ts +0 -1
  410. package/serialization/types/FileMetadata.js +0 -1
  411. package/serialization/types/Job.d.ts +0 -1
  412. package/serialization/types/Job.js +0 -1
  413. package/serialization/types/LettaRequest.d.ts +1 -0
  414. package/serialization/types/LettaRequest.js +1 -0
  415. package/serialization/types/LettaSchemasMessageMessage.d.ts +0 -1
  416. package/serialization/types/LettaSchemasMessageMessage.js +0 -1
  417. package/serialization/types/LettaSchemasToolTool.d.ts +3 -2
  418. package/serialization/types/LettaSchemasToolTool.js +3 -2
  419. package/serialization/types/Passage.d.ts +0 -1
  420. package/serialization/types/Passage.js +0 -1
  421. package/serialization/types/Provider.d.ts +15 -0
  422. package/serialization/types/Provider.js +36 -0
  423. package/serialization/types/SandboxConfig.d.ts +0 -1
  424. package/serialization/types/SandboxConfig.js +0 -1
  425. package/serialization/types/SandboxEnvironmentVariable.d.ts +0 -1
  426. package/serialization/types/SandboxEnvironmentVariable.js +0 -1
  427. package/serialization/types/Source.d.ts +0 -1
  428. package/serialization/types/Source.js +0 -1
  429. package/serialization/types/ToolType.d.ts +10 -0
  430. package/serialization/types/ToolType.js +35 -0
  431. package/serialization/types/User.d.ts +0 -1
  432. package/serialization/types/User.js +0 -1
  433. package/serialization/types/UserCreate.d.ts +0 -1
  434. package/serialization/types/UserCreate.js +0 -1
  435. package/serialization/types/UserUpdate.d.ts +0 -1
  436. package/serialization/types/UserUpdate.js +0 -1
  437. package/serialization/types/index.d.ts +2 -0
  438. package/serialization/types/index.js +2 -0
  439. package/version.d.ts +1 -1
  440. package/version.js +1 -1
  441. package/api/resources/agents/resources/memory/index.d.ts +0 -2
  442. package/api/resources/agents/resources/memory/index.js +0 -18
  443. package/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
  444. package/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
  445. package/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
  446. package/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
  447. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
  448. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
  449. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
  450. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
  451. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
  452. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
  453. package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
  454. package/dist/api/resources/agents/resources/memory/index.d.ts +0 -2
  455. package/dist/api/resources/agents/resources/memory/index.js +0 -18
  456. package/dist/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
  457. package/dist/api/resources/agents/resources/memory/resources/index.js +0 -27
  458. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
  459. package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
  460. package/dist/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +0 -1
  461. package/dist/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
  462. package/dist/api/resources/agents/resources/memoryBlocks/client/index.d.ts +0 -1
  463. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
  464. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
  465. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
  466. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
  467. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
  468. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
  469. package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
  470. package/dist/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
  471. package/dist/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
  472. package/dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
  473. package/dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
  474. package/dist/serialization/resources/agents/resources/memory/index.d.ts +0 -1
  475. package/dist/serialization/resources/agents/resources/memory/index.js +0 -17
  476. package/dist/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
  477. package/dist/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
  478. package/dist/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
  479. package/dist/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
  480. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
  481. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
  482. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
  483. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
  484. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
  485. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
  486. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
  487. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
  488. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
  489. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
  490. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
  491. package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
  492. package/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
  493. package/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
  494. package/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
  495. package/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
  496. package/serialization/resources/agents/resources/memory/index.d.ts +0 -1
  497. package/serialization/resources/agents/resources/memory/index.js +0 -17
  498. package/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
  499. package/serialization/resources/agents/resources/memory/resources/index.js +0 -27
  500. package/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
  501. package/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
  502. package/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
  503. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
  504. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js +0 -31
  505. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
  506. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
  507. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
  508. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.js +0 -35
  509. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
  510. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
  511. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
  512. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js +0 -36
  513. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
  514. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
  515. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
  516. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
  517. package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
  518. /package/api/resources/agents/client/requests/{AgentsCreateTemplateFromAgentRequest.js → AgentsSearchRequest.js} +0 -0
  519. /package/api/resources/agents/resources/{memory → coreMemory}/client/index.d.ts +0 -0
  520. /package/api/resources/agents/resources/{memory → coreMemory}/client/index.js +0 -0
  521. /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
  522. /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
  523. /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.d.ts +0 -0
  524. /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.js +0 -0
  525. /package/api/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +0 -0
  526. /package/api/resources/agents/{client/requests/AgentsMigrateRequest.js → resources/templates/client/requests/TemplatesCreateRequest.js} +0 -0
  527. /package/api/resources/agents/{client/requests/AgentsSearchDeployedAgentsRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +0 -0
  528. /package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/templates/client/requests/TemplatesMigrateRequest.js} +0 -0
  529. /package/api/resources/agents/resources/{memoryBlocks/client → templates/client/requests}/index.js +0 -0
  530. /package/api/resources/agents/{types/AgentsMigrateResponse.js → resources/templates/types/TemplatesMigrateResponse.js} +0 -0
  531. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItem.js → AgentsSearchRequestSearchItem.js} +0 -0
  532. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItemName.js} +0 -0
  533. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemOrderBy.js} +0 -0
  534. /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +0 -0
  535. /package/{dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → api/resources/providers/client/requests/DeleteProviderRequest.js} +0 -0
  536. /package/{dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.js → api/resources/providers/client/requests/ListProvidersRequest.js} +0 -0
  537. /package/{dist/api/resources/agents/client/requests/AgentsMigrateRequest.js → api/resources/providers/client/requests/ProviderCreate.js} +0 -0
  538. /package/{dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → api/resources/providers/client/requests/ProviderUpdate.js} +0 -0
  539. /package/{dist/api/resources/agents/resources/memory/client → api/resources/providers/client/requests}/index.js +0 -0
  540. /package/api/resources/{agents/resources/memoryBlocks → providers}/index.d.ts +0 -0
  541. /package/api/resources/{agents/resources/memoryBlocks → providers}/index.js +0 -0
  542. /package/{dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js → api/types/Provider.js} +0 -0
  543. /package/dist/api/resources/agents/{types/AgentsMigrateResponse.js → client/requests/AgentsSearchRequest.js} +0 -0
  544. /package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/coreMemory}/client/index.d.ts +0 -0
  545. /package/dist/api/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.js +0 -0
  546. /package/dist/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
  547. /package/dist/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
  548. /package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/index.d.ts +0 -0
  549. /package/dist/api/resources/agents/resources/{memoryBlocks → memoryVariables}/client/index.js +0 -0
  550. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItem.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +0 -0
  551. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemName.js → resources/templates/client/requests/TemplatesCreateRequest.js} +0 -0
  552. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +0 -0
  553. /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemVersion.js → resources/templates/client/requests/TemplatesMigrateRequest.js} +0 -0
  554. /package/dist/api/resources/{agents/resources/memoryBlocks → providers}/index.d.ts +0 -0
  555. /package/dist/api/resources/{agents/resources/memoryBlocks → providers}/index.js +0 -0
  556. /package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
  557. /package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
  558. /package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/providers}/index.d.ts +0 -0
  559. /package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/providers}/index.js +0 -0
@@ -34,17 +34,6 @@ 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
- };
48
37
  var __importDefault = (this && this.__importDefault) || function (mod) {
49
38
  return (mod && mod.__esModule) ? mod : { "default": mod };
50
39
  };
@@ -59,11 +48,12 @@ const errors = __importStar(require("../../../../errors/index"));
59
48
  const Client_1 = require("../resources/context/client/Client");
60
49
  const Client_2 = require("../resources/tools/client/Client");
61
50
  const Client_3 = require("../resources/sources/client/Client");
62
- const Client_4 = require("../resources/memory/client/Client");
63
- const Client_5 = require("../resources/memoryBlocks/client/Client");
64
- const Client_6 = require("../resources/recallMemory/client/Client");
65
- const Client_7 = require("../resources/archivalMemory/client/Client");
66
- const Client_8 = require("../resources/messages/client/Client");
51
+ const Client_4 = require("../resources/coreMemory/client/Client");
52
+ const Client_5 = require("../resources/recallMemory/client/Client");
53
+ const Client_6 = require("../resources/archivalMemory/client/Client");
54
+ const Client_7 = require("../resources/messages/client/Client");
55
+ const Client_8 = require("../resources/templates/client/Client");
56
+ const Client_9 = require("../resources/memoryVariables/client/Client");
67
57
  class Agents {
68
58
  constructor(_options = {}) {
69
59
  this._options = _options;
@@ -80,25 +70,29 @@ class Agents {
80
70
  var _a;
81
71
  return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new Client_3.Sources(this._options)));
82
72
  }
83
- get memory() {
84
- var _a;
85
- return ((_a = this._memory) !== null && _a !== void 0 ? _a : (this._memory = new Client_4.Memory(this._options)));
86
- }
87
- get memoryBlocks() {
73
+ get coreMemory() {
88
74
  var _a;
89
- return ((_a = this._memoryBlocks) !== null && _a !== void 0 ? _a : (this._memoryBlocks = new Client_5.MemoryBlocks(this._options)));
75
+ return ((_a = this._coreMemory) !== null && _a !== void 0 ? _a : (this._coreMemory = new Client_4.CoreMemory(this._options)));
90
76
  }
91
77
  get recallMemory() {
92
78
  var _a;
93
- return ((_a = this._recallMemory) !== null && _a !== void 0 ? _a : (this._recallMemory = new Client_6.RecallMemory(this._options)));
79
+ return ((_a = this._recallMemory) !== null && _a !== void 0 ? _a : (this._recallMemory = new Client_5.RecallMemory(this._options)));
94
80
  }
95
81
  get archivalMemory() {
96
82
  var _a;
97
- return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new Client_7.ArchivalMemory(this._options)));
83
+ return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new Client_6.ArchivalMemory(this._options)));
98
84
  }
99
85
  get messages() {
100
86
  var _a;
101
- return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_8.Messages(this._options)));
87
+ return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_7.Messages(this._options)));
88
+ }
89
+ get templates() {
90
+ var _a;
91
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_8.Templates(this._options)));
92
+ }
93
+ get memoryVariables() {
94
+ var _a;
95
+ return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new Client_9.MemoryVariables(this._options)));
102
96
  }
103
97
  /**
104
98
  * List all agents associated with a given user.
@@ -140,7 +134,7 @@ class Agents {
140
134
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
141
135
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
142
136
  method: "GET",
143
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
137
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
144
138
  contentType: "application/json",
145
139
  queryParameters: _queryParams,
146
140
  requestType: "json",
@@ -211,7 +205,7 @@ class Agents {
211
205
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
212
206
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
213
207
  method: "POST",
214
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
208
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
215
209
  contentType: "application/json",
216
210
  requestType: "json",
217
211
  body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -277,7 +271,7 @@ class Agents {
277
271
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
278
272
  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)}`),
279
273
  method: "GET",
280
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
274
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
281
275
  contentType: "application/json",
282
276
  requestType: "json",
283
277
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -342,7 +336,7 @@ class Agents {
342
336
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
337
  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)}`),
344
338
  method: "DELETE",
345
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
339
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
346
340
  contentType: "application/json",
347
341
  requestType: "json",
348
342
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -402,7 +396,7 @@ class Agents {
402
396
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
403
397
  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)}`),
404
398
  method: "PATCH",
405
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
399
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
406
400
  contentType: "application/json",
407
401
  requestType: "json",
408
402
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -452,298 +446,26 @@ class Agents {
452
446
  });
453
447
  }
454
448
  /**
455
- * Retrieve a memory block from an agent.
456
- *
457
- * @param {string} agentId
458
- * @param {string} blockLabel
459
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
460
- *
461
- * @throws {@link Letta.UnprocessableEntityError}
462
- *
463
- * @example
464
- * await client.agents.getAgentMemoryBlock("agent_id", "block_label")
465
- */
466
- getAgentMemoryBlock(agentId, blockLabel, requestOptions) {
467
- var _a, _b;
468
- return __awaiter(this, void 0, void 0, function* () {
469
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
470
- 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)}`),
471
- method: "GET",
472
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
473
- contentType: "application/json",
474
- requestType: "json",
475
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
476
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
477
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
478
- });
479
- if (_response.ok) {
480
- return serializers.Block.parseOrThrow(_response.body, {
481
- unrecognizedObjectKeys: "passthrough",
482
- allowUnrecognizedUnionMembers: true,
483
- allowUnrecognizedEnumValues: true,
484
- skipValidation: true,
485
- breadcrumbsPrefix: ["response"],
486
- });
487
- }
488
- if (_response.error.reason === "status-code") {
489
- switch (_response.error.statusCode) {
490
- case 422:
491
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
492
- unrecognizedObjectKeys: "passthrough",
493
- allowUnrecognizedUnionMembers: true,
494
- allowUnrecognizedEnumValues: true,
495
- skipValidation: true,
496
- breadcrumbsPrefix: ["response"],
497
- }));
498
- default:
499
- throw new errors.LettaError({
500
- statusCode: _response.error.statusCode,
501
- body: _response.error.body,
502
- });
503
- }
504
- }
505
- switch (_response.error.reason) {
506
- case "non-json":
507
- throw new errors.LettaError({
508
- statusCode: _response.error.statusCode,
509
- body: _response.error.rawBody,
510
- });
511
- case "timeout":
512
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/block/{block_label}.");
513
- case "unknown":
514
- throw new errors.LettaError({
515
- message: _response.error.errorMessage,
516
- });
517
- }
518
- });
519
- }
520
- /**
521
- * Removes a memory block from an agent by unlnking it. If the block is not linked to any other agent, it is deleted.
522
- *
523
- * @param {string} agentId
524
- * @param {string} blockLabel
525
- * @param {Letta.BlockUpdate} request
526
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
527
- *
528
- * @throws {@link Letta.UnprocessableEntityError}
529
- *
530
- * @example
531
- * await client.agents.updateAgentMemoryBlockByLabel("agent_id", "block_label", {})
532
- */
533
- updateAgentMemoryBlockByLabel(agentId, blockLabel, request, requestOptions) {
534
- var _a, _b;
535
- return __awaiter(this, void 0, void 0, function* () {
536
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
537
- 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)}`),
538
- method: "PATCH",
539
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
540
- contentType: "application/json",
541
- requestType: "json",
542
- body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
543
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
544
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
545
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
546
- });
547
- if (_response.ok) {
548
- return serializers.Block.parseOrThrow(_response.body, {
549
- unrecognizedObjectKeys: "passthrough",
550
- allowUnrecognizedUnionMembers: true,
551
- allowUnrecognizedEnumValues: true,
552
- skipValidation: true,
553
- breadcrumbsPrefix: ["response"],
554
- });
555
- }
556
- if (_response.error.reason === "status-code") {
557
- switch (_response.error.statusCode) {
558
- case 422:
559
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
560
- unrecognizedObjectKeys: "passthrough",
561
- allowUnrecognizedUnionMembers: true,
562
- allowUnrecognizedEnumValues: true,
563
- skipValidation: true,
564
- breadcrumbsPrefix: ["response"],
565
- }));
566
- default:
567
- throw new errors.LettaError({
568
- statusCode: _response.error.statusCode,
569
- body: _response.error.body,
570
- });
571
- }
572
- }
573
- switch (_response.error.reason) {
574
- case "non-json":
575
- throw new errors.LettaError({
576
- statusCode: _response.error.statusCode,
577
- body: _response.error.rawBody,
578
- });
579
- case "timeout":
580
- throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/memory/block/{block_label}.");
581
- case "unknown":
582
- throw new errors.LettaError({
583
- message: _response.error.errorMessage,
584
- });
585
- }
586
- });
587
- }
588
- /**
589
- * Retrieve the memory blocks of a specific agent.
449
+ * <Note>This endpoint is only available on Letta Cloud.</Note>
590
450
  *
591
- * @param {string} agentId
592
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
593
- *
594
- * @throws {@link Letta.UnprocessableEntityError}
451
+ * Search deployed agents.
595
452
  *
596
- * @example
597
- * await client.agents.getAgentMemoryBlocks("agent_id")
598
- */
599
- getAgentMemoryBlocks(agentId, requestOptions) {
600
- var _a, _b;
601
- return __awaiter(this, void 0, void 0, function* () {
602
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
603
- 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`),
604
- method: "GET",
605
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
606
- contentType: "application/json",
607
- requestType: "json",
608
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
609
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
610
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
611
- });
612
- if (_response.ok) {
613
- return serializers.agents.getAgentMemoryBlocks.Response.parseOrThrow(_response.body, {
614
- unrecognizedObjectKeys: "passthrough",
615
- allowUnrecognizedUnionMembers: true,
616
- allowUnrecognizedEnumValues: true,
617
- skipValidation: true,
618
- breadcrumbsPrefix: ["response"],
619
- });
620
- }
621
- if (_response.error.reason === "status-code") {
622
- switch (_response.error.statusCode) {
623
- case 422:
624
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
625
- unrecognizedObjectKeys: "passthrough",
626
- allowUnrecognizedUnionMembers: true,
627
- allowUnrecognizedEnumValues: true,
628
- skipValidation: true,
629
- breadcrumbsPrefix: ["response"],
630
- }));
631
- default:
632
- throw new errors.LettaError({
633
- statusCode: _response.error.statusCode,
634
- body: _response.error.body,
635
- });
636
- }
637
- }
638
- switch (_response.error.reason) {
639
- case "non-json":
640
- throw new errors.LettaError({
641
- statusCode: _response.error.statusCode,
642
- body: _response.error.rawBody,
643
- });
644
- case "timeout":
645
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/block.");
646
- case "unknown":
647
- throw new errors.LettaError({
648
- message: _response.error.errorMessage,
649
- });
650
- }
651
- });
652
- }
653
- /**
654
- * Asynchronously process a user message and return a job ID.
655
- * The actual processing happens in the background, and the status can be checked using the job ID.
656
- *
657
- * @param {string} agentId
658
- * @param {Letta.LettaRequest} request
453
+ * @param {Letta.AgentsSearchRequest} request
659
454
  * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
660
455
  *
661
- * @throws {@link Letta.UnprocessableEntityError}
662
- *
663
456
  * @example
664
- * await client.agents.createAgentMessageAsync("agent_id", {
665
- * messages: [{
666
- * role: "user",
667
- * text: "text"
668
- * }]
669
- * })
457
+ * await client.agents.search()
670
458
  */
671
- createAgentMessageAsync(agentId, request, requestOptions) {
672
- var _a, _b;
673
- return __awaiter(this, void 0, void 0, function* () {
674
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
675
- 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`),
676
- method: "POST",
677
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
678
- contentType: "application/json",
679
- requestType: "json",
680
- body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
681
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
682
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
683
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
684
- });
685
- if (_response.ok) {
686
- return serializers.Job.parseOrThrow(_response.body, {
687
- unrecognizedObjectKeys: "passthrough",
688
- allowUnrecognizedUnionMembers: true,
689
- allowUnrecognizedEnumValues: true,
690
- skipValidation: true,
691
- breadcrumbsPrefix: ["response"],
692
- });
693
- }
694
- if (_response.error.reason === "status-code") {
695
- switch (_response.error.statusCode) {
696
- case 422:
697
- throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
698
- unrecognizedObjectKeys: "passthrough",
699
- allowUnrecognizedUnionMembers: true,
700
- allowUnrecognizedEnumValues: true,
701
- skipValidation: true,
702
- breadcrumbsPrefix: ["response"],
703
- }));
704
- default:
705
- throw new errors.LettaError({
706
- statusCode: _response.error.statusCode,
707
- body: _response.error.body,
708
- });
709
- }
710
- }
711
- switch (_response.error.reason) {
712
- case "non-json":
713
- throw new errors.LettaError({
714
- statusCode: _response.error.statusCode,
715
- body: _response.error.rawBody,
716
- });
717
- case "timeout":
718
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/messages/async.");
719
- case "unknown":
720
- throw new errors.LettaError({
721
- message: _response.error.errorMessage,
722
- });
723
- }
724
- });
725
- }
726
- /**
727
- * Search deployed agents
728
- *
729
- * @param {Letta.AgentsSearchDeployedAgentsRequest} request
730
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
731
- *
732
- * @example
733
- * await client.agents.searchdeployedagents()
734
- */
735
- searchdeployedagents(request = {}, requestOptions) {
459
+ search(request = {}, requestOptions) {
736
460
  var _a, _b;
737
461
  return __awaiter(this, void 0, void 0, function* () {
738
462
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
739
463
  url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
740
464
  method: "POST",
741
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
465
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "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),
742
466
  contentType: "application/json",
743
467
  requestType: "json",
744
- body: serializers.AgentsSearchDeployedAgentsRequest.jsonOrThrow(request, {
745
- unrecognizedObjectKeys: "strip",
746
- }),
468
+ body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
747
469
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
748
470
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
749
471
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -772,265 +494,6 @@ class Agents {
772
494
  }
773
495
  });
774
496
  }
775
- /**
776
- * Creates a versioned version of an agent
777
- *
778
- * @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
779
- * @param {Letta.AgentsCreateVersionRequest} request
780
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
781
- *
782
- * @throws {@link Letta.NotFoundError}
783
- * @throws {@link Letta.InternalServerError}
784
- *
785
- * @example
786
- * await client.agents.createVersion("agent_id")
787
- */
788
- createVersion(agentId, request = {}, requestOptions) {
789
- var _a, _b;
790
- return __awaiter(this, void 0, void 0, function* () {
791
- const { returnAgentState } = request, _body = __rest(request, ["returnAgentState"]);
792
- const _queryParams = {};
793
- if (returnAgentState != null) {
794
- _queryParams["returnAgentState"] = returnAgentState.toString();
795
- }
796
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
797
- 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`),
798
- method: "POST",
799
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
800
- contentType: "application/json",
801
- queryParameters: _queryParams,
802
- requestType: "json",
803
- body: serializers.AgentsCreateVersionRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
804
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
805
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
806
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
807
- });
808
- if (_response.ok) {
809
- return;
810
- }
811
- if (_response.error.reason === "status-code") {
812
- switch (_response.error.statusCode) {
813
- case 404:
814
- throw new Letta.NotFoundError(_response.error.body);
815
- case 500:
816
- throw new Letta.InternalServerError(_response.error.body);
817
- default:
818
- throw new errors.LettaError({
819
- statusCode: _response.error.statusCode,
820
- body: _response.error.body,
821
- });
822
- }
823
- }
824
- switch (_response.error.reason) {
825
- case "non-json":
826
- throw new errors.LettaError({
827
- statusCode: _response.error.statusCode,
828
- body: _response.error.rawBody,
829
- });
830
- case "timeout":
831
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/version-template.");
832
- case "unknown":
833
- throw new errors.LettaError({
834
- message: _response.error.errorMessage,
835
- });
836
- }
837
- });
838
- }
839
- /**
840
- * Migrate an agent to a new versioned agent template
841
- *
842
- * @param {string} agentId
843
- * @param {Letta.AgentsMigrateRequest} request
844
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
845
- *
846
- * @throws {@link Letta.NotFoundError}
847
- * @throws {@link Letta.ConflictError}
848
- * @throws {@link Letta.InternalServerError}
849
- *
850
- * @example
851
- * await client.agents.migrate("agent_id", {
852
- * toTemplate: "to_template",
853
- * preserveCoreMemories: true
854
- * })
855
- */
856
- migrate(agentId, request, requestOptions) {
857
- var _a, _b;
858
- return __awaiter(this, void 0, void 0, function* () {
859
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
860
- 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`),
861
- method: "POST",
862
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
863
- contentType: "application/json",
864
- requestType: "json",
865
- body: serializers.AgentsMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
866
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
867
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
868
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
869
- });
870
- if (_response.ok) {
871
- return serializers.AgentsMigrateResponse.parseOrThrow(_response.body, {
872
- unrecognizedObjectKeys: "passthrough",
873
- allowUnrecognizedUnionMembers: true,
874
- allowUnrecognizedEnumValues: true,
875
- skipValidation: true,
876
- breadcrumbsPrefix: ["response"],
877
- });
878
- }
879
- if (_response.error.reason === "status-code") {
880
- switch (_response.error.statusCode) {
881
- case 404:
882
- throw new Letta.NotFoundError(_response.error.body);
883
- case 409:
884
- throw new Letta.ConflictError(serializers.ConflictErrorBody.parseOrThrow(_response.error.body, {
885
- unrecognizedObjectKeys: "passthrough",
886
- allowUnrecognizedUnionMembers: true,
887
- allowUnrecognizedEnumValues: true,
888
- skipValidation: true,
889
- breadcrumbsPrefix: ["response"],
890
- }));
891
- case 500:
892
- throw new Letta.InternalServerError(_response.error.body);
893
- default:
894
- throw new errors.LettaError({
895
- statusCode: _response.error.statusCode,
896
- body: _response.error.body,
897
- });
898
- }
899
- }
900
- switch (_response.error.reason) {
901
- case "non-json":
902
- throw new errors.LettaError({
903
- statusCode: _response.error.statusCode,
904
- body: _response.error.rawBody,
905
- });
906
- case "timeout":
907
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/migrate.");
908
- case "unknown":
909
- throw new errors.LettaError({
910
- message: _response.error.errorMessage,
911
- });
912
- }
913
- });
914
- }
915
- /**
916
- * Create a template from an agent
917
- *
918
- * @param {string} agentId
919
- * @param {Letta.AgentsCreateTemplateFromAgentRequest} request
920
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
921
- *
922
- * @throws {@link Letta.NotFoundError}
923
- * @throws {@link Letta.InternalServerError}
924
- *
925
- * @example
926
- * await client.agents.createtemplatefromagent("agent_id")
927
- */
928
- createtemplatefromagent(agentId, request = {}, requestOptions) {
929
- var _a, _b;
930
- return __awaiter(this, void 0, void 0, function* () {
931
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
932
- 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`),
933
- method: "POST",
934
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
935
- contentType: "application/json",
936
- requestType: "json",
937
- body: serializers.AgentsCreateTemplateFromAgentRequest.jsonOrThrow(request, {
938
- unrecognizedObjectKeys: "strip",
939
- }),
940
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
941
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
942
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
943
- });
944
- if (_response.ok) {
945
- return;
946
- }
947
- if (_response.error.reason === "status-code") {
948
- switch (_response.error.statusCode) {
949
- case 404:
950
- throw new Letta.NotFoundError(_response.error.body);
951
- case 500:
952
- throw new Letta.InternalServerError(_response.error.body);
953
- default:
954
- throw new errors.LettaError({
955
- statusCode: _response.error.statusCode,
956
- body: _response.error.body,
957
- });
958
- }
959
- }
960
- switch (_response.error.reason) {
961
- case "non-json":
962
- throw new errors.LettaError({
963
- statusCode: _response.error.statusCode,
964
- body: _response.error.rawBody,
965
- });
966
- case "timeout":
967
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/template.");
968
- case "unknown":
969
- throw new errors.LettaError({
970
- message: _response.error.errorMessage,
971
- });
972
- }
973
- });
974
- }
975
- /**
976
- * Get the variables associated with an agent
977
- *
978
- * @param {string} agentId
979
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
980
- *
981
- * @throws {@link Letta.NotFoundError}
982
- *
983
- * @example
984
- * await client.agents.getagentvariables("agent_id")
985
- */
986
- getagentvariables(agentId, requestOptions) {
987
- var _a, _b;
988
- return __awaiter(this, void 0, void 0, function* () {
989
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
990
- 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`),
991
- method: "GET",
992
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.4", "User-Agent": "@letta-ai/letta-client/0.1.4", "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),
993
- contentType: "application/json",
994
- requestType: "json",
995
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
996
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
997
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
998
- });
999
- if (_response.ok) {
1000
- return serializers.AgentsGetAgentVariablesResponse.parseOrThrow(_response.body, {
1001
- unrecognizedObjectKeys: "passthrough",
1002
- allowUnrecognizedUnionMembers: true,
1003
- allowUnrecognizedEnumValues: true,
1004
- skipValidation: true,
1005
- breadcrumbsPrefix: ["response"],
1006
- });
1007
- }
1008
- if (_response.error.reason === "status-code") {
1009
- switch (_response.error.statusCode) {
1010
- case 404:
1011
- throw new Letta.NotFoundError(_response.error.body);
1012
- default:
1013
- throw new errors.LettaError({
1014
- statusCode: _response.error.statusCode,
1015
- body: _response.error.body,
1016
- });
1017
- }
1018
- }
1019
- switch (_response.error.reason) {
1020
- case "non-json":
1021
- throw new errors.LettaError({
1022
- statusCode: _response.error.statusCode,
1023
- body: _response.error.rawBody,
1024
- });
1025
- case "timeout":
1026
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/variables.");
1027
- case "unknown":
1028
- throw new errors.LettaError({
1029
- message: _response.error.errorMessage,
1030
- });
1031
- }
1032
- });
1033
- }
1034
497
  _getCustomAuthorizationHeaders() {
1035
498
  return __awaiter(this, void 0, void 0, function* () {
1036
499
  const tokenValue = yield core.Supplier.get(this._options.token);