@letta-ai/letta-client 0.1.100 → 0.1.102

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 (270) hide show
  1. package/Client.d.ts +3 -9
  2. package/Client.js +11 -21
  3. package/api/resources/agents/client/Client.d.ts +1 -9
  4. package/api/resources/agents/client/Client.js +11 -55
  5. package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  6. package/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  7. package/api/resources/agents/resources/blocks/client/Client.js +5 -5
  8. package/api/resources/agents/resources/context/client/Client.js +1 -1
  9. package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  10. package/api/resources/agents/resources/groups/client/Client.js +1 -1
  11. package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  12. package/api/resources/agents/resources/messages/client/Client.js +6 -6
  13. package/api/resources/agents/resources/passages/client/Client.js +4 -4
  14. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  15. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  16. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  17. package/api/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +5 -0
  18. package/api/resources/agents/types/UpdateAgentResponseFormat.d.ts +5 -0
  19. package/api/resources/agents/types/index.d.ts +2 -0
  20. package/api/resources/agents/types/index.js +2 -0
  21. package/api/resources/batches/client/Client.d.ts +5 -1
  22. package/api/resources/batches/client/Client.js +26 -11
  23. package/api/resources/blocks/client/Client.js +5 -5
  24. package/api/resources/blocks/resources/agents/client/Client.js +1 -1
  25. package/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  26. package/api/resources/embeddings/client/Client.js +1 -1
  27. package/api/resources/groups/client/Client.js +5 -5
  28. package/api/resources/groups/resources/messages/client/Client.js +5 -5
  29. package/api/resources/health/client/Client.js +1 -1
  30. package/api/resources/identities/client/Client.js +6 -6
  31. package/api/resources/identities/resources/properties/client/Client.js +1 -1
  32. package/api/resources/index.d.ts +2 -4
  33. package/api/resources/index.js +3 -5
  34. package/api/resources/jobs/client/Client.js +4 -4
  35. package/api/resources/models/client/Client.js +1 -1
  36. package/api/resources/projects/client/Client.js +1 -1
  37. package/api/resources/providers/client/Client.d.ts +6 -24
  38. package/api/resources/providers/client/Client.js +13 -107
  39. package/api/resources/providers/client/requests/ProviderUpdate.d.ts +0 -3
  40. package/api/resources/providers/client/requests/index.d.ts +0 -1
  41. package/api/resources/runs/client/Client.d.ts +3 -10
  42. package/api/resources/runs/client/Client.js +8 -51
  43. package/{dist/api/resources/runs/client/requests/ListRunsRequest.d.ts → api/resources/runs/client/requests/RunsListRequest.d.ts} +1 -1
  44. package/api/resources/runs/client/requests/index.d.ts +1 -1
  45. package/api/resources/runs/resources/messages/client/Client.js +1 -1
  46. package/api/resources/runs/resources/steps/client/Client.js +1 -1
  47. package/api/resources/runs/resources/usage/client/Client.js +1 -1
  48. package/api/resources/sources/client/Client.js +6 -6
  49. package/api/resources/sources/resources/files/client/Client.js +3 -3
  50. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  51. package/api/resources/steps/client/Client.js +3 -3
  52. package/api/resources/tags/client/Client.d.ts +7 -1
  53. package/api/resources/tags/client/Client.js +46 -10
  54. package/api/resources/tags/client/index.d.ts +1 -1
  55. package/api/resources/tags/client/index.js +15 -0
  56. package/api/resources/{tag/client/requests/ListTagsRequest.d.ts → tags/client/requests/TagsListRequest.d.ts} +1 -1
  57. package/api/resources/tags/client/requests/index.d.ts +1 -0
  58. package/api/resources/templates/client/Client.js +1 -1
  59. package/api/resources/templates/resources/agents/client/Client.js +1 -1
  60. package/api/resources/tools/client/Client.js +16 -16
  61. package/api/resources/voice/client/Client.js +1 -1
  62. package/api/types/AgentState.d.ts +2 -0
  63. package/api/types/AgentStateResponseFormat.d.ts +5 -0
  64. package/api/types/JsonObjectResponseFormat.d.ts +9 -0
  65. package/api/types/JsonSchemaResponseFormat.d.ts +11 -0
  66. package/api/types/JsonSchemaResponseFormat.js +5 -0
  67. package/api/types/TextResponseFormat.d.ts +9 -0
  68. package/api/types/TextResponseFormat.js +5 -0
  69. package/api/types/index.d.ts +4 -0
  70. package/api/types/index.js +4 -0
  71. package/dist/Client.d.ts +3 -9
  72. package/dist/Client.js +11 -21
  73. package/dist/api/resources/agents/client/Client.d.ts +1 -9
  74. package/dist/api/resources/agents/client/Client.js +11 -55
  75. package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  76. package/dist/api/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  77. package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
  78. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  79. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
  80. package/dist/api/resources/agents/resources/groups/client/Client.js +1 -1
  81. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
  82. package/dist/api/resources/agents/resources/messages/client/Client.js +6 -6
  83. package/dist/api/resources/agents/resources/passages/client/Client.js +4 -4
  84. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  85. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  86. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  87. package/dist/api/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +5 -0
  88. package/dist/api/resources/agents/types/CreateAgentRequestResponseFormat.js +5 -0
  89. package/dist/api/resources/agents/types/UpdateAgentResponseFormat.d.ts +5 -0
  90. package/dist/api/resources/agents/types/UpdateAgentResponseFormat.js +5 -0
  91. package/dist/api/resources/agents/types/index.d.ts +2 -0
  92. package/dist/api/resources/agents/types/index.js +2 -0
  93. package/dist/api/resources/batches/client/Client.d.ts +5 -1
  94. package/dist/api/resources/batches/client/Client.js +26 -11
  95. package/dist/api/resources/blocks/client/Client.js +5 -5
  96. package/dist/api/resources/blocks/resources/agents/client/Client.js +1 -1
  97. package/dist/api/resources/clientSideAccessTokens/client/Client.js +2 -2
  98. package/dist/api/resources/embeddings/client/Client.js +1 -1
  99. package/dist/api/resources/groups/client/Client.js +5 -5
  100. package/dist/api/resources/groups/resources/messages/client/Client.js +5 -5
  101. package/dist/api/resources/health/client/Client.js +1 -1
  102. package/dist/api/resources/identities/client/Client.js +6 -6
  103. package/dist/api/resources/identities/resources/properties/client/Client.js +1 -1
  104. package/dist/api/resources/index.d.ts +2 -4
  105. package/dist/api/resources/index.js +3 -5
  106. package/dist/api/resources/jobs/client/Client.js +4 -4
  107. package/dist/api/resources/models/client/Client.js +1 -1
  108. package/dist/api/resources/projects/client/Client.js +1 -1
  109. package/dist/api/resources/providers/client/Client.d.ts +6 -24
  110. package/dist/api/resources/providers/client/Client.js +13 -107
  111. package/dist/api/resources/providers/client/requests/ProviderUpdate.d.ts +0 -3
  112. package/dist/api/resources/providers/client/requests/index.d.ts +0 -1
  113. package/dist/api/resources/runs/client/Client.d.ts +3 -10
  114. package/dist/api/resources/runs/client/Client.js +8 -51
  115. package/{api/resources/runs/client/requests/ListRunsRequest.d.ts → dist/api/resources/runs/client/requests/RunsListRequest.d.ts} +1 -1
  116. package/dist/api/resources/runs/client/requests/RunsListRequest.js +5 -0
  117. package/dist/api/resources/runs/client/requests/index.d.ts +1 -1
  118. package/dist/api/resources/runs/resources/messages/client/Client.js +1 -1
  119. package/dist/api/resources/runs/resources/steps/client/Client.js +1 -1
  120. package/dist/api/resources/runs/resources/usage/client/Client.js +1 -1
  121. package/dist/api/resources/sources/client/Client.js +6 -6
  122. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  123. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  124. package/dist/api/resources/steps/client/Client.js +3 -3
  125. package/dist/api/resources/tags/client/Client.d.ts +7 -1
  126. package/dist/api/resources/tags/client/Client.js +46 -10
  127. package/dist/api/resources/tags/client/index.d.ts +1 -1
  128. package/dist/api/resources/tags/client/index.js +15 -0
  129. package/dist/api/resources/{tag/client/requests/ListTagsRequest.d.ts → tags/client/requests/TagsListRequest.d.ts} +1 -1
  130. package/dist/api/resources/tags/client/requests/TagsListRequest.js +5 -0
  131. package/dist/api/resources/tags/client/requests/index.d.ts +1 -0
  132. package/dist/api/resources/templates/client/Client.js +1 -1
  133. package/dist/api/resources/templates/resources/agents/client/Client.js +1 -1
  134. package/dist/api/resources/tools/client/Client.js +16 -16
  135. package/dist/api/resources/voice/client/Client.js +1 -1
  136. package/dist/api/types/AgentState.d.ts +2 -0
  137. package/dist/api/types/AgentStateResponseFormat.d.ts +5 -0
  138. package/dist/api/types/AgentStateResponseFormat.js +5 -0
  139. package/dist/api/types/JsonObjectResponseFormat.d.ts +9 -0
  140. package/dist/api/types/JsonObjectResponseFormat.js +5 -0
  141. package/dist/api/types/JsonSchemaResponseFormat.d.ts +11 -0
  142. package/dist/api/types/JsonSchemaResponseFormat.js +5 -0
  143. package/dist/api/types/TextResponseFormat.d.ts +9 -0
  144. package/dist/api/types/TextResponseFormat.js +5 -0
  145. package/dist/api/types/index.d.ts +4 -0
  146. package/dist/api/types/index.js +4 -0
  147. package/dist/serialization/resources/agents/client/{exportAgentSerialized.d.ts → export.d.ts} +1 -1
  148. package/dist/serialization/resources/agents/client/index.d.ts +1 -1
  149. package/dist/serialization/resources/agents/client/index.js +2 -2
  150. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  151. package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -0
  152. package/dist/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  153. package/dist/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
  154. package/dist/serialization/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +13 -0
  155. package/dist/serialization/resources/agents/types/CreateAgentRequestResponseFormat.js +44 -0
  156. package/dist/serialization/resources/agents/types/UpdateAgentResponseFormat.d.ts +13 -0
  157. package/dist/serialization/resources/agents/types/UpdateAgentResponseFormat.js +44 -0
  158. package/dist/serialization/resources/agents/types/index.d.ts +2 -0
  159. package/dist/serialization/resources/agents/types/index.js +2 -0
  160. package/dist/serialization/resources/index.d.ts +1 -1
  161. package/dist/serialization/resources/index.js +2 -2
  162. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +0 -1
  163. package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +0 -1
  164. package/dist/serialization/resources/runs/client/index.d.ts +1 -1
  165. package/dist/serialization/resources/runs/client/index.js +2 -2
  166. package/{serialization/resources/runs/client/listRuns.d.ts → dist/serialization/resources/runs/client/list.d.ts} +1 -1
  167. package/dist/serialization/resources/tags/client/index.d.ts +1 -0
  168. package/dist/serialization/resources/{tag → tags}/client/index.js +2 -2
  169. package/{serialization/resources/tag/client/listTags.d.ts → dist/serialization/resources/tags/client/list.d.ts} +1 -1
  170. package/dist/serialization/types/AgentState.d.ts +2 -0
  171. package/dist/serialization/types/AgentState.js +2 -0
  172. package/dist/serialization/types/AgentStateResponseFormat.d.ts +13 -0
  173. package/dist/serialization/types/AgentStateResponseFormat.js +44 -0
  174. package/dist/serialization/types/JsonObjectResponseFormat.d.ts +12 -0
  175. package/dist/serialization/types/JsonObjectResponseFormat.js +43 -0
  176. package/dist/serialization/types/JsonSchemaResponseFormat.d.ts +13 -0
  177. package/dist/serialization/types/JsonSchemaResponseFormat.js +44 -0
  178. package/dist/serialization/types/TextResponseFormat.d.ts +12 -0
  179. package/dist/serialization/types/TextResponseFormat.js +43 -0
  180. package/dist/serialization/types/index.d.ts +4 -0
  181. package/dist/serialization/types/index.js +4 -0
  182. package/dist/version.d.ts +1 -1
  183. package/dist/version.js +1 -1
  184. package/package.json +1 -1
  185. package/reference.md +18 -289
  186. package/serialization/resources/agents/client/{exportAgentSerialized.d.ts → export.d.ts} +1 -1
  187. package/serialization/resources/agents/client/index.d.ts +1 -1
  188. package/serialization/resources/agents/client/index.js +2 -2
  189. package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
  190. package/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -0
  191. package/serialization/resources/agents/client/requests/UpdateAgent.d.ts +2 -0
  192. package/serialization/resources/agents/client/requests/UpdateAgent.js +2 -0
  193. package/serialization/resources/agents/types/CreateAgentRequestResponseFormat.d.ts +13 -0
  194. package/serialization/resources/agents/types/CreateAgentRequestResponseFormat.js +44 -0
  195. package/serialization/resources/agents/types/UpdateAgentResponseFormat.d.ts +13 -0
  196. package/serialization/resources/agents/types/UpdateAgentResponseFormat.js +44 -0
  197. package/serialization/resources/agents/types/index.d.ts +2 -0
  198. package/serialization/resources/agents/types/index.js +2 -0
  199. package/serialization/resources/index.d.ts +1 -1
  200. package/serialization/resources/index.js +2 -2
  201. package/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +0 -1
  202. package/serialization/resources/providers/client/requests/ProviderUpdate.js +0 -1
  203. package/serialization/resources/runs/client/index.d.ts +1 -1
  204. package/serialization/resources/runs/client/index.js +2 -2
  205. package/{dist/serialization/resources/runs/client/listRuns.d.ts → serialization/resources/runs/client/list.d.ts} +1 -1
  206. package/serialization/resources/tags/client/index.d.ts +1 -0
  207. package/serialization/resources/{tag → tags}/client/index.js +2 -2
  208. package/{dist/serialization/resources/tag/client/listTags.d.ts → serialization/resources/tags/client/list.d.ts} +1 -1
  209. package/serialization/types/AgentState.d.ts +2 -0
  210. package/serialization/types/AgentState.js +2 -0
  211. package/serialization/types/AgentStateResponseFormat.d.ts +13 -0
  212. package/serialization/types/AgentStateResponseFormat.js +44 -0
  213. package/serialization/types/JsonObjectResponseFormat.d.ts +12 -0
  214. package/serialization/types/JsonObjectResponseFormat.js +43 -0
  215. package/serialization/types/JsonSchemaResponseFormat.d.ts +13 -0
  216. package/serialization/types/JsonSchemaResponseFormat.js +44 -0
  217. package/serialization/types/TextResponseFormat.d.ts +12 -0
  218. package/serialization/types/TextResponseFormat.js +43 -0
  219. package/serialization/types/index.d.ts +4 -0
  220. package/serialization/types/index.js +4 -0
  221. package/version.d.ts +1 -1
  222. package/version.js +1 -1
  223. package/api/resources/messages/client/Client.d.ts +0 -43
  224. package/api/resources/messages/client/Client.js +0 -128
  225. package/api/resources/messages/client/index.d.ts +0 -1
  226. package/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +0 -15
  227. package/api/resources/tag/client/Client.d.ts +0 -44
  228. package/api/resources/tag/client/Client.js +0 -146
  229. package/api/resources/tag/client/index.d.ts +0 -1
  230. package/api/resources/tag/client/index.js +0 -17
  231. package/api/resources/tag/client/requests/index.d.ts +0 -1
  232. package/dist/api/resources/messages/client/Client.d.ts +0 -43
  233. package/dist/api/resources/messages/client/Client.js +0 -128
  234. package/dist/api/resources/messages/client/index.d.ts +0 -1
  235. package/dist/api/resources/messages/client/index.js +0 -2
  236. package/dist/api/resources/messages/index.d.ts +0 -1
  237. package/dist/api/resources/messages/index.js +0 -17
  238. package/dist/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +0 -15
  239. package/dist/api/resources/tag/client/Client.d.ts +0 -44
  240. package/dist/api/resources/tag/client/Client.js +0 -146
  241. package/dist/api/resources/tag/client/index.d.ts +0 -1
  242. package/dist/api/resources/tag/client/index.js +0 -17
  243. package/dist/api/resources/tag/client/requests/index.d.ts +0 -1
  244. package/dist/api/resources/tag/client/requests/index.js +0 -2
  245. package/dist/api/resources/tag/index.d.ts +0 -1
  246. package/dist/api/resources/tag/index.js +0 -17
  247. package/dist/serialization/resources/tag/client/index.d.ts +0 -1
  248. package/dist/serialization/resources/tag/index.d.ts +0 -1
  249. package/dist/serialization/resources/tag/index.js +0 -17
  250. package/serialization/resources/tag/client/index.d.ts +0 -1
  251. package/serialization/resources/tag/index.d.ts +0 -1
  252. package/serialization/resources/tag/index.js +0 -17
  253. /package/api/resources/{providers/client/requests/DeleteProviderRequest.js → agents/types/CreateAgentRequestResponseFormat.js} +0 -0
  254. /package/api/resources/{runs/client/requests/ListRunsRequest.js → agents/types/UpdateAgentResponseFormat.js} +0 -0
  255. /package/api/resources/{tag/client/requests/ListTagsRequest.js → runs/client/requests/RunsListRequest.js} +0 -0
  256. /package/{dist/api/resources/providers/client/requests/DeleteProviderRequest.js → api/resources/tags/client/requests/TagsListRequest.js} +0 -0
  257. /package/api/resources/{messages/client → tags/client/requests}/index.js +0 -0
  258. /package/{dist/api/resources/runs/client/requests/ListRunsRequest.js → api/types/AgentStateResponseFormat.js} +0 -0
  259. /package/{dist/api/resources/tag/client/requests/ListTagsRequest.js → api/types/JsonObjectResponseFormat.js} +0 -0
  260. /package/{api/resources/tag → dist/api/resources/tags}/client/requests/index.js +0 -0
  261. /package/dist/serialization/resources/agents/client/{exportAgentSerialized.js → export.js} +0 -0
  262. /package/dist/serialization/resources/runs/client/{listRuns.js → list.js} +0 -0
  263. /package/dist/serialization/resources/{tag/client/listTags.js → tags/client/list.js} +0 -0
  264. /package/{api/resources/messages → dist/serialization/resources/tags}/index.d.ts +0 -0
  265. /package/{api/resources/messages → dist/serialization/resources/tags}/index.js +0 -0
  266. /package/serialization/resources/agents/client/{exportAgentSerialized.js → export.js} +0 -0
  267. /package/serialization/resources/runs/client/{listRuns.js → list.js} +0 -0
  268. /package/serialization/resources/{tag/client/listTags.js → tags/client/list.js} +0 -0
  269. /package/{api/resources/tag → serialization/resources/tags}/index.d.ts +0 -0
  270. /package/{api/resources/tag → serialization/resources/tags}/index.js +0 -0
package/Client.d.ts CHANGED
@@ -16,14 +16,12 @@ import { Health } from "./api/resources/health/client/Client";
16
16
  import { Providers } from "./api/resources/providers/client/Client";
17
17
  import { Runs } from "./api/resources/runs/client/Client";
18
18
  import { Steps } from "./api/resources/steps/client/Client";
19
- import { Tag } from "./api/resources/tag/client/Client";
19
+ import { Tags } from "./api/resources/tags/client/Client";
20
20
  import { Batches } from "./api/resources/batches/client/Client";
21
- import { Messages } from "./api/resources/messages/client/Client";
22
21
  import { Voice } from "./api/resources/voice/client/Client";
23
22
  import { Templates } from "./api/resources/templates/client/Client";
24
23
  import { ClientSideAccessTokens } from "./api/resources/clientSideAccessTokens/client/Client";
25
24
  import { Projects } from "./api/resources/projects/client/Client";
26
- import { Tags } from "./api/resources/tags/client/Client";
27
25
  export declare namespace LettaClient {
28
26
  interface Options {
29
27
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -58,14 +56,12 @@ export declare class LettaClient {
58
56
  protected _providers: Providers | undefined;
59
57
  protected _runs: Runs | undefined;
60
58
  protected _steps: Steps | undefined;
61
- protected _tag: Tag | undefined;
59
+ protected _tags: Tags | undefined;
62
60
  protected _batches: Batches | undefined;
63
- protected _messages: Messages | undefined;
64
61
  protected _voice: Voice | undefined;
65
62
  protected _templates: Templates | undefined;
66
63
  protected _clientSideAccessTokens: ClientSideAccessTokens | undefined;
67
64
  protected _projects: Projects | undefined;
68
- protected _tags: Tags | undefined;
69
65
  constructor(_options?: LettaClient.Options);
70
66
  get tools(): Tools;
71
67
  get sources(): Sources;
@@ -80,12 +76,10 @@ export declare class LettaClient {
80
76
  get providers(): Providers;
81
77
  get runs(): Runs;
82
78
  get steps(): Steps;
83
- get tag(): Tag;
79
+ get tags(): Tags;
84
80
  get batches(): Batches;
85
- get messages(): Messages;
86
81
  get voice(): Voice;
87
82
  get templates(): Templates;
88
83
  get clientSideAccessTokens(): ClientSideAccessTokens;
89
84
  get projects(): Projects;
90
- get tags(): Tags;
91
85
  }
package/Client.js CHANGED
@@ -17,14 +17,12 @@ const Client_10 = require("./api/resources/health/client/Client");
17
17
  const Client_11 = require("./api/resources/providers/client/Client");
18
18
  const Client_12 = require("./api/resources/runs/client/Client");
19
19
  const Client_13 = require("./api/resources/steps/client/Client");
20
- const Client_14 = require("./api/resources/tag/client/Client");
20
+ const Client_14 = require("./api/resources/tags/client/Client");
21
21
  const Client_15 = require("./api/resources/batches/client/Client");
22
- const Client_16 = require("./api/resources/messages/client/Client");
23
- const Client_17 = require("./api/resources/voice/client/Client");
24
- const Client_18 = require("./api/resources/templates/client/Client");
25
- const Client_19 = require("./api/resources/clientSideAccessTokens/client/Client");
26
- const Client_20 = require("./api/resources/projects/client/Client");
27
- const Client_21 = require("./api/resources/tags/client/Client");
22
+ const Client_16 = require("./api/resources/voice/client/Client");
23
+ const Client_17 = require("./api/resources/templates/client/Client");
24
+ const Client_18 = require("./api/resources/clientSideAccessTokens/client/Client");
25
+ const Client_19 = require("./api/resources/projects/client/Client");
28
26
  class LettaClient {
29
27
  constructor(_options = {}) {
30
28
  this._options = _options;
@@ -81,37 +79,29 @@ class LettaClient {
81
79
  var _a;
82
80
  return ((_a = this._steps) !== null && _a !== void 0 ? _a : (this._steps = new Client_13.Steps(this._options)));
83
81
  }
84
- get tag() {
82
+ get tags() {
85
83
  var _a;
86
- return ((_a = this._tag) !== null && _a !== void 0 ? _a : (this._tag = new Client_14.Tag(this._options)));
84
+ return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_14.Tags(this._options)));
87
85
  }
88
86
  get batches() {
89
87
  var _a;
90
88
  return ((_a = this._batches) !== null && _a !== void 0 ? _a : (this._batches = new Client_15.Batches(this._options)));
91
89
  }
92
- get messages() {
93
- var _a;
94
- return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_16.Messages(this._options)));
95
- }
96
90
  get voice() {
97
91
  var _a;
98
- return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_17.Voice(this._options)));
92
+ return ((_a = this._voice) !== null && _a !== void 0 ? _a : (this._voice = new Client_16.Voice(this._options)));
99
93
  }
100
94
  get templates() {
101
95
  var _a;
102
- return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_18.Templates(this._options)));
96
+ return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_17.Templates(this._options)));
103
97
  }
104
98
  get clientSideAccessTokens() {
105
99
  var _a;
106
- return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new Client_19.ClientSideAccessTokens(this._options)));
100
+ return ((_a = this._clientSideAccessTokens) !== null && _a !== void 0 ? _a : (this._clientSideAccessTokens = new Client_18.ClientSideAccessTokens(this._options)));
107
101
  }
108
102
  get projects() {
109
103
  var _a;
110
- return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_20.Projects(this._options)));
111
- }
112
- get tags() {
113
- var _a;
114
- return ((_a = this._tags) !== null && _a !== void 0 ? _a : (this._tags = new Client_21.Tags(this._options)));
104
+ return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_19.Projects(this._options)));
115
105
  }
116
106
  }
117
107
  exports.LettaClient = LettaClient;
@@ -94,17 +94,9 @@ export declare class Agents {
94
94
  * @throws {@link Letta.UnprocessableEntityError}
95
95
  *
96
96
  * @example
97
- * await client.agents.exportAgentSerialized("agent_id")
98
- */
99
- exportAgentSerialized(agentId: string, requestOptions?: Agents.RequestOptions): Promise<string>;
100
- /**
101
- * @param {string} agentId
102
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
103
- *
104
- * @example
105
97
  * await client.agents.export("agent_id")
106
98
  */
107
- export(agentId: string, requestOptions?: Agents.RequestOptions): Promise<void>;
99
+ export(agentId: string, requestOptions?: Agents.RequestOptions): Promise<string>;
108
100
  /**
109
101
  * Import a serialized agent file and recreate the agent in the system.
110
102
  *
@@ -199,7 +199,7 @@ class Agents {
199
199
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
200
200
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
201
201
  method: "GET",
202
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
202
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
203
203
  contentType: "application/json",
204
204
  queryParameters: _queryParams,
205
205
  requestType: "json",
@@ -266,7 +266,7 @@ class Agents {
266
266
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
267
267
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
268
268
  method: "POST",
269
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
269
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
270
270
  contentType: "application/json",
271
271
  requestType: "json",
272
272
  body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
@@ -324,15 +324,15 @@ class Agents {
324
324
  * @throws {@link Letta.UnprocessableEntityError}
325
325
  *
326
326
  * @example
327
- * await client.agents.exportAgentSerialized("agent_id")
327
+ * await client.agents.export("agent_id")
328
328
  */
329
- exportAgentSerialized(agentId, requestOptions) {
329
+ export(agentId, requestOptions) {
330
330
  return __awaiter(this, void 0, void 0, function* () {
331
331
  var _a, _b, _c;
332
332
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
333
333
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/export`),
334
334
  method: "GET",
335
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
336
336
  contentType: "application/json",
337
337
  requestType: "json",
338
338
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -340,7 +340,7 @@ class Agents {
340
340
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
341
341
  });
342
342
  if (_response.ok) {
343
- return serializers.agents.exportAgentSerialized.Response.parseOrThrow(_response.body, {
343
+ return serializers.agents.export.Response.parseOrThrow(_response.body, {
344
344
  unrecognizedObjectKeys: "passthrough",
345
345
  allowUnrecognizedUnionMembers: true,
346
346
  allowUnrecognizedEnumValues: true,
@@ -380,50 +380,6 @@ class Agents {
380
380
  }
381
381
  });
382
382
  }
383
- /**
384
- * @param {string} agentId
385
- * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
386
- *
387
- * @example
388
- * await client.agents.export("agent_id")
389
- */
390
- export(agentId, requestOptions) {
391
- return __awaiter(this, void 0, void 0, function* () {
392
- var _a, _b, _c;
393
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/export`),
395
- method: "POST",
396
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
397
- contentType: "application/json",
398
- requestType: "json",
399
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
400
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
401
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
402
- });
403
- if (_response.ok) {
404
- return;
405
- }
406
- if (_response.error.reason === "status-code") {
407
- throw new errors.LettaError({
408
- statusCode: _response.error.statusCode,
409
- body: _response.error.body,
410
- });
411
- }
412
- switch (_response.error.reason) {
413
- case "non-json":
414
- throw new errors.LettaError({
415
- statusCode: _response.error.statusCode,
416
- body: _response.error.rawBody,
417
- });
418
- case "timeout":
419
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/export.");
420
- case "unknown":
421
- throw new errors.LettaError({
422
- message: _response.error.errorMessage,
423
- });
424
- }
425
- });
426
- }
427
383
  /**
428
384
  * Import a serialized agent file and recreate the agent in the system.
429
385
  *
@@ -458,7 +414,7 @@ class Agents {
458
414
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
459
415
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/import"),
460
416
  method: "POST",
461
- headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
417
+ headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
462
418
  queryParameters: _queryParams,
463
419
  requestType: "file",
464
420
  duplex: _maybeEncodedRequest.duplex,
@@ -525,7 +481,7 @@ class Agents {
525
481
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
526
482
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
527
483
  method: "GET",
528
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
484
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
529
485
  contentType: "application/json",
530
486
  requestType: "json",
531
487
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -590,7 +546,7 @@ class Agents {
590
546
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
591
547
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
592
548
  method: "DELETE",
593
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
549
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
594
550
  contentType: "application/json",
595
551
  requestType: "json",
596
552
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -650,7 +606,7 @@ class Agents {
650
606
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
651
607
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
652
608
  method: "PATCH",
653
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
609
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
654
610
  contentType: "application/json",
655
611
  requestType: "json",
656
612
  body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -716,7 +672,7 @@ class Agents {
716
672
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
717
673
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
718
674
  method: "POST",
719
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "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),
675
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "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),
720
676
  contentType: "application/json",
721
677
  requestType: "json",
722
678
  body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -80,4 +80,6 @@ export interface CreateAgentRequest {
80
80
  messageBufferAutoclear?: boolean;
81
81
  /** If set to True, memory management will move to a background agent thread. */
82
82
  enableSleeptime?: boolean;
83
+ /** The response format for the agent. */
84
+ responseFormat?: Letta.CreateAgentRequestResponseFormat;
83
85
  }
@@ -49,4 +49,6 @@ export interface UpdateAgent {
49
49
  embedding?: string;
50
50
  /** If set to True, memory management will move to a background agent thread. */
51
51
  enableSleeptime?: boolean;
52
+ /** The response format for the agent. */
53
+ responseFormat?: Letta.UpdateAgentResponseFormat;
52
54
  }
@@ -77,7 +77,7 @@ class Blocks {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
79
79
  method: "GET",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -144,7 +144,7 @@ class Blocks {
144
144
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
145
145
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/${encodeURIComponent(blockLabel)}`),
146
146
  method: "PATCH",
147
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
148
148
  contentType: "application/json",
149
149
  requestType: "json",
150
150
  body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -210,7 +210,7 @@ class Blocks {
210
210
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
211
211
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks`),
212
212
  method: "GET",
213
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
213
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
214
214
  contentType: "application/json",
215
215
  requestType: "json",
216
216
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -276,7 +276,7 @@ class Blocks {
276
276
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
277
277
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/attach/${encodeURIComponent(blockId)}`),
278
278
  method: "PATCH",
279
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
279
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
280
  contentType: "application/json",
281
281
  requestType: "json",
282
282
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -342,7 +342,7 @@ class Blocks {
342
342
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
343
343
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/blocks/detach/${encodeURIComponent(blockId)}`),
344
344
  method: "PATCH",
345
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
345
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
346
346
  contentType: "application/json",
347
347
  requestType: "json",
348
348
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -76,7 +76,7 @@ class Context {
76
76
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
77
77
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/context`),
78
78
  method: "GET",
79
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
79
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
80
  contentType: "application/json",
81
81
  requestType: "json",
82
82
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -77,7 +77,7 @@ class CoreMemory {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory`),
79
79
  method: "GET",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -82,7 +82,7 @@ class Groups {
82
82
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
83
83
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/groups`),
84
84
  method: "GET",
85
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
85
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
86
86
  contentType: "application/json",
87
87
  queryParameters: _queryParams,
88
88
  requestType: "json",
@@ -78,7 +78,7 @@ class MemoryVariables {
78
78
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
79
79
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/core-memory/variables`),
80
80
  method: "GET",
81
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
82
82
  contentType: "application/json",
83
83
  requestType: "json",
84
84
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -100,7 +100,7 @@ class Messages {
100
100
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
101
101
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
102
102
  method: "GET",
103
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
103
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
104
104
  contentType: "application/json",
105
105
  queryParameters: _queryParams,
106
106
  requestType: "json",
@@ -176,7 +176,7 @@ class Messages {
176
176
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
177
177
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages`),
178
178
  method: "POST",
179
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
179
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
180
180
  contentType: "application/json",
181
181
  requestType: "json",
182
182
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -246,7 +246,7 @@ class Messages {
246
246
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
247
247
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
248
248
  method: "PATCH",
249
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
249
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
250
250
  contentType: "application/json",
251
251
  requestType: "json",
252
252
  body: serializers.agents.MessagesModifyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -306,7 +306,7 @@ class Messages {
306
306
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
307
307
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
308
308
  method: "POST",
309
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
309
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
310
310
  contentType: "application/json",
311
311
  requestType: "json",
312
312
  body: serializers.LettaStreamingRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -393,7 +393,7 @@ class Messages {
393
393
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
394
394
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
395
395
  method: "POST",
396
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
396
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
397
397
  contentType: "application/json",
398
398
  requestType: "json",
399
399
  body: serializers.LettaRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -465,7 +465,7 @@ class Messages {
465
465
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
466
466
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
467
467
  method: "PATCH",
468
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
468
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
469
469
  contentType: "application/json",
470
470
  queryParameters: _queryParams,
471
471
  requestType: "json",
@@ -94,7 +94,7 @@ class Passages {
94
94
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
95
95
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
96
96
  method: "GET",
97
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
97
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
98
98
  contentType: "application/json",
99
99
  queryParameters: _queryParams,
100
100
  requestType: "json",
@@ -163,7 +163,7 @@ class Passages {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory`),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -230,7 +230,7 @@ class Passages {
230
230
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
231
231
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
232
232
  method: "DELETE",
233
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
233
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
234
234
  contentType: "application/json",
235
235
  requestType: "json",
236
236
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -293,7 +293,7 @@ class Passages {
293
293
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
294
294
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/archival-memory/${encodeURIComponent(memoryId)}`),
295
295
  method: "PATCH",
296
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
296
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
297
297
  contentType: "application/json",
298
298
  requestType: "json",
299
299
  body: serializers.agents.PassageUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -77,7 +77,7 @@ class Sources {
77
77
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
78
78
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/attach/${encodeURIComponent(sourceId)}`),
79
79
  method: "PATCH",
80
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
80
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
81
81
  contentType: "application/json",
82
82
  requestType: "json",
83
83
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -143,7 +143,7 @@ class Sources {
143
143
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
144
144
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources/detach/${encodeURIComponent(sourceId)}`),
145
145
  method: "PATCH",
146
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
146
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
147
147
  contentType: "application/json",
148
148
  requestType: "json",
149
149
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -208,7 +208,7 @@ class Sources {
208
208
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
209
209
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/sources`),
210
210
  method: "GET",
211
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
211
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
212
212
  contentType: "application/json",
213
213
  requestType: "json",
214
214
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -96,7 +96,7 @@ class Templates {
96
96
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
97
97
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
98
98
  method: "POST",
99
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
99
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
100
100
  contentType: "application/json",
101
101
  queryParameters: _queryParams,
102
102
  requestType: "json",
@@ -163,7 +163,7 @@ class Templates {
163
163
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
164
164
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
165
165
  method: "POST",
166
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
166
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
167
167
  contentType: "application/json",
168
168
  requestType: "json",
169
169
  body: serializers.agents.TemplatesMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -236,7 +236,7 @@ class Templates {
236
236
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
237
237
  url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
238
238
  method: "POST",
239
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.100", "User-Agent": "@letta-ai/letta-client/0.1.100", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.102", "User-Agent": "@letta-ai/letta-client/0.1.102", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
240
240
  contentType: "application/json",
241
241
  requestType: "json",
242
242
  body: serializers.agents.TemplatesCreateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),