@letta-ai/letta-client 1.0.0-alpha.7 → 1.0.0

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 (507) hide show
  1. package/CHANGELOG.md +239 -0
  2. package/README.md +20 -71
  3. package/client.d.mts +61 -36
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +61 -36
  6. package/client.d.ts.map +1 -1
  7. package/client.js +53 -23
  8. package/client.js.map +1 -1
  9. package/client.mjs +53 -23
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +96 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +96 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +199 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +191 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/core/streaming.d.mts +33 -0
  20. package/core/streaming.d.mts.map +1 -0
  21. package/core/streaming.d.ts +33 -0
  22. package/core/streaming.d.ts.map +1 -0
  23. package/core/streaming.js +276 -0
  24. package/core/streaming.js.map +1 -0
  25. package/core/streaming.mjs +271 -0
  26. package/core/streaming.mjs.map +1 -0
  27. package/index.d.mts +1 -0
  28. package/index.d.mts.map +1 -1
  29. package/index.d.ts +1 -0
  30. package/index.d.ts.map +1 -1
  31. package/index.js +3 -1
  32. package/index.js.map +1 -1
  33. package/index.mjs +1 -0
  34. package/index.mjs.map +1 -1
  35. package/internal/decoders/line.d.mts +17 -0
  36. package/internal/decoders/line.d.mts.map +1 -0
  37. package/internal/decoders/line.d.ts +17 -0
  38. package/internal/decoders/line.d.ts.map +1 -0
  39. package/internal/decoders/line.js +113 -0
  40. package/internal/decoders/line.js.map +1 -0
  41. package/internal/decoders/line.mjs +108 -0
  42. package/internal/decoders/line.mjs.map +1 -0
  43. package/internal/parse.d.mts.map +1 -1
  44. package/internal/parse.d.ts.map +1 -1
  45. package/internal/parse.js +10 -0
  46. package/internal/parse.js.map +1 -1
  47. package/internal/parse.mjs +10 -0
  48. package/internal/parse.mjs.map +1 -1
  49. package/internal/request-options.d.mts +2 -0
  50. package/internal/request-options.d.mts.map +1 -1
  51. package/internal/request-options.d.ts +2 -0
  52. package/internal/request-options.d.ts.map +1 -1
  53. package/internal/request-options.js.map +1 -1
  54. package/internal/request-options.mjs.map +1 -1
  55. package/internal/tslib.js +17 -17
  56. package/package.json +21 -1
  57. package/pagination.d.mts +2 -0
  58. package/pagination.d.mts.map +1 -0
  59. package/pagination.d.ts +2 -0
  60. package/pagination.d.ts.map +1 -0
  61. package/pagination.js +6 -0
  62. package/pagination.js.map +1 -0
  63. package/pagination.mjs +2 -0
  64. package/pagination.mjs.map +1 -0
  65. package/resources/access-tokens.d.mts +105 -0
  66. package/resources/access-tokens.d.mts.map +1 -0
  67. package/resources/access-tokens.d.ts +105 -0
  68. package/resources/access-tokens.d.ts.map +1 -0
  69. package/resources/access-tokens.js +30 -0
  70. package/resources/access-tokens.js.map +1 -0
  71. package/resources/access-tokens.mjs +26 -0
  72. package/resources/access-tokens.mjs.map +1 -0
  73. package/resources/agents/agents.d.mts +517 -160
  74. package/resources/agents/agents.d.mts.map +1 -1
  75. package/resources/agents/agents.d.ts +517 -160
  76. package/resources/agents/agents.d.ts.map +1 -1
  77. package/resources/agents/agents.js +16 -21
  78. package/resources/agents/agents.js.map +1 -1
  79. package/resources/agents/agents.mjs +17 -22
  80. package/resources/agents/agents.mjs.map +1 -1
  81. package/resources/agents/archives.d.mts +31 -0
  82. package/resources/agents/archives.d.mts.map +1 -0
  83. package/resources/agents/archives.d.ts +31 -0
  84. package/resources/agents/archives.d.ts.map +1 -0
  85. package/resources/agents/archives.js +24 -0
  86. package/resources/agents/archives.js.map +1 -0
  87. package/resources/agents/archives.mjs +20 -0
  88. package/resources/agents/archives.mjs.map +1 -0
  89. package/resources/agents/blocks.d.mts +33 -55
  90. package/resources/agents/blocks.d.mts.map +1 -1
  91. package/resources/agents/blocks.d.ts +33 -55
  92. package/resources/agents/blocks.d.ts.map +1 -1
  93. package/resources/agents/blocks.js +2 -1
  94. package/resources/agents/blocks.js.map +1 -1
  95. package/resources/agents/blocks.mjs +2 -1
  96. package/resources/agents/blocks.mjs.map +1 -1
  97. package/resources/agents/files.d.mts +39 -79
  98. package/resources/agents/files.d.mts.map +1 -1
  99. package/resources/agents/files.d.ts +39 -79
  100. package/resources/agents/files.d.ts.map +1 -1
  101. package/resources/agents/files.js +5 -1
  102. package/resources/agents/files.js.map +1 -1
  103. package/resources/agents/files.mjs +5 -1
  104. package/resources/agents/files.mjs.map +1 -1
  105. package/resources/agents/folders.d.mts +50 -79
  106. package/resources/agents/folders.d.mts.map +1 -1
  107. package/resources/agents/folders.d.ts +50 -79
  108. package/resources/agents/folders.d.ts.map +1 -1
  109. package/resources/agents/folders.js +5 -1
  110. package/resources/agents/folders.js.map +1 -1
  111. package/resources/agents/folders.mjs +5 -1
  112. package/resources/agents/folders.mjs.map +1 -1
  113. package/resources/agents/groups.d.mts +6 -28
  114. package/resources/agents/groups.d.mts.map +1 -1
  115. package/resources/agents/groups.d.ts +6 -28
  116. package/resources/agents/groups.d.ts.map +1 -1
  117. package/resources/agents/groups.js +5 -1
  118. package/resources/agents/groups.js.map +1 -1
  119. package/resources/agents/groups.mjs +5 -1
  120. package/resources/agents/groups.mjs.map +1 -1
  121. package/resources/agents/identities.d.mts +31 -0
  122. package/resources/agents/identities.d.mts.map +1 -0
  123. package/resources/agents/identities.d.ts +31 -0
  124. package/resources/agents/identities.d.ts.map +1 -0
  125. package/resources/agents/identities.js +24 -0
  126. package/resources/agents/identities.js.map +1 -0
  127. package/resources/agents/identities.mjs +20 -0
  128. package/resources/agents/identities.mjs.map +1 -0
  129. package/resources/agents/index.d.mts +9 -7
  130. package/resources/agents/index.d.mts.map +1 -1
  131. package/resources/agents/index.d.ts +9 -7
  132. package/resources/agents/index.d.ts.map +1 -1
  133. package/resources/agents/index.js +5 -1
  134. package/resources/agents/index.js.map +1 -1
  135. package/resources/agents/index.mjs +2 -0
  136. package/resources/agents/index.mjs.map +1 -1
  137. package/resources/agents/messages.d.mts +642 -422
  138. package/resources/agents/messages.d.mts.map +1 -1
  139. package/resources/agents/messages.d.ts +642 -422
  140. package/resources/agents/messages.d.ts.map +1 -1
  141. package/resources/agents/messages.js +27 -26
  142. package/resources/agents/messages.js.map +1 -1
  143. package/resources/agents/messages.mjs +27 -26
  144. package/resources/agents/messages.mjs.map +1 -1
  145. package/resources/agents/tools.d.mts +9 -30
  146. package/resources/agents/tools.d.mts.map +1 -1
  147. package/resources/agents/tools.d.ts +9 -30
  148. package/resources/agents/tools.d.ts.map +1 -1
  149. package/resources/agents/tools.js +5 -1
  150. package/resources/agents/tools.js.map +1 -1
  151. package/resources/agents/tools.mjs +5 -1
  152. package/resources/agents/tools.mjs.map +1 -1
  153. package/resources/archives/archives.d.mts +115 -0
  154. package/resources/archives/archives.d.mts.map +1 -0
  155. package/resources/archives/archives.d.ts +115 -0
  156. package/resources/archives/archives.d.ts.map +1 -0
  157. package/resources/archives/archives.js +50 -0
  158. package/resources/archives/archives.js.map +1 -0
  159. package/resources/archives/archives.mjs +45 -0
  160. package/resources/archives/archives.mjs.map +1 -0
  161. package/resources/archives/index.d.mts +3 -0
  162. package/resources/archives/index.d.mts.map +1 -0
  163. package/resources/archives/index.d.ts +3 -0
  164. package/resources/archives/index.d.ts.map +1 -0
  165. package/resources/archives/index.js +9 -0
  166. package/resources/archives/index.js.map +1 -0
  167. package/resources/archives/index.mjs +4 -0
  168. package/resources/archives/index.mjs.map +1 -0
  169. package/resources/archives/passages.d.mts +113 -0
  170. package/resources/archives/passages.d.mts.map +1 -0
  171. package/resources/archives/passages.d.ts +113 -0
  172. package/resources/archives/passages.d.ts.map +1 -0
  173. package/resources/archives/passages.js +32 -0
  174. package/resources/archives/passages.js.map +1 -0
  175. package/resources/archives/passages.mjs +28 -0
  176. package/resources/archives/passages.mjs.map +1 -0
  177. package/resources/archives.d.mts +1 -130
  178. package/resources/archives.d.mts.map +1 -1
  179. package/resources/archives.d.ts +1 -130
  180. package/resources/archives.d.ts.map +1 -1
  181. package/resources/archives.js +2 -37
  182. package/resources/archives.js.map +1 -1
  183. package/resources/archives.mjs +1 -35
  184. package/resources/archives.mjs.map +1 -1
  185. package/resources/batches/batches.d.mts +52 -34
  186. package/resources/batches/batches.d.mts.map +1 -1
  187. package/resources/batches/batches.d.ts +52 -34
  188. package/resources/batches/batches.d.ts.map +1 -1
  189. package/resources/batches/batches.js +2 -1
  190. package/resources/batches/batches.js.map +1 -1
  191. package/resources/batches/batches.mjs +2 -1
  192. package/resources/batches/batches.mjs.map +1 -1
  193. package/resources/batches/index.d.mts +2 -2
  194. package/resources/batches/index.d.mts.map +1 -1
  195. package/resources/batches/index.d.ts +2 -2
  196. package/resources/batches/index.d.ts.map +1 -1
  197. package/resources/batches/index.js.map +1 -1
  198. package/resources/batches/index.mjs.map +1 -1
  199. package/resources/batches/messages.d.mts +6 -30
  200. package/resources/batches/messages.d.mts.map +1 -1
  201. package/resources/batches/messages.d.ts +6 -30
  202. package/resources/batches/messages.d.ts.map +1 -1
  203. package/resources/batches/messages.js +2 -1
  204. package/resources/batches/messages.js.map +1 -1
  205. package/resources/batches/messages.mjs +2 -1
  206. package/resources/batches/messages.mjs.map +1 -1
  207. package/resources/blocks/agents.d.mts +6 -28
  208. package/resources/blocks/agents.d.mts.map +1 -1
  209. package/resources/blocks/agents.d.ts +6 -28
  210. package/resources/blocks/agents.d.ts.map +1 -1
  211. package/resources/blocks/agents.js +5 -1
  212. package/resources/blocks/agents.js.map +1 -1
  213. package/resources/blocks/agents.mjs +5 -1
  214. package/resources/blocks/agents.mjs.map +1 -1
  215. package/resources/blocks/blocks.d.mts +108 -48
  216. package/resources/blocks/blocks.d.mts.map +1 -1
  217. package/resources/blocks/blocks.d.ts +108 -48
  218. package/resources/blocks/blocks.d.ts.map +1 -1
  219. package/resources/blocks/blocks.js +3 -8
  220. package/resources/blocks/blocks.js.map +1 -1
  221. package/resources/blocks/blocks.mjs +3 -8
  222. package/resources/blocks/blocks.mjs.map +1 -1
  223. package/resources/blocks/index.d.mts +2 -2
  224. package/resources/blocks/index.d.mts.map +1 -1
  225. package/resources/blocks/index.d.ts +2 -2
  226. package/resources/blocks/index.d.ts.map +1 -1
  227. package/resources/blocks/index.js.map +1 -1
  228. package/resources/blocks/index.mjs.map +1 -1
  229. package/resources/folders/files.d.mts +75 -97
  230. package/resources/folders/files.d.mts.map +1 -1
  231. package/resources/folders/files.d.ts +75 -97
  232. package/resources/folders/files.d.ts.map +1 -1
  233. package/resources/folders/files.js +5 -1
  234. package/resources/folders/files.js.map +1 -1
  235. package/resources/folders/files.mjs +5 -1
  236. package/resources/folders/files.mjs.map +1 -1
  237. package/resources/folders/folders.d.mts +11 -44
  238. package/resources/folders/folders.d.mts.map +1 -1
  239. package/resources/folders/folders.d.ts +11 -44
  240. package/resources/folders/folders.d.ts.map +1 -1
  241. package/resources/folders/folders.js +2 -7
  242. package/resources/folders/folders.js.map +1 -1
  243. package/resources/folders/folders.mjs +2 -7
  244. package/resources/folders/folders.mjs.map +1 -1
  245. package/resources/folders/index.d.mts +2 -2
  246. package/resources/folders/index.d.mts.map +1 -1
  247. package/resources/folders/index.d.ts +2 -2
  248. package/resources/folders/index.d.ts.map +1 -1
  249. package/resources/folders/index.js.map +1 -1
  250. package/resources/folders/index.mjs.map +1 -1
  251. package/resources/groups/groups.d.mts +17 -67
  252. package/resources/groups/groups.d.mts.map +1 -1
  253. package/resources/groups/groups.d.ts +17 -67
  254. package/resources/groups/groups.d.ts.map +1 -1
  255. package/resources/groups/groups.js +6 -28
  256. package/resources/groups/groups.js.map +1 -1
  257. package/resources/groups/groups.mjs +6 -28
  258. package/resources/groups/groups.mjs.map +1 -1
  259. package/resources/groups/index.d.mts +2 -2
  260. package/resources/groups/index.d.mts.map +1 -1
  261. package/resources/groups/index.d.ts +2 -2
  262. package/resources/groups/index.d.ts.map +1 -1
  263. package/resources/groups/index.js.map +1 -1
  264. package/resources/groups/index.mjs.map +1 -1
  265. package/resources/groups/messages.d.mts +145 -79
  266. package/resources/groups/messages.d.mts.map +1 -1
  267. package/resources/groups/messages.d.ts +145 -79
  268. package/resources/groups/messages.d.ts.map +1 -1
  269. package/resources/groups/messages.js +18 -10
  270. package/resources/groups/messages.js.map +1 -1
  271. package/resources/groups/messages.mjs +18 -10
  272. package/resources/groups/messages.mjs.map +1 -1
  273. package/resources/identities/agents.d.mts +6 -28
  274. package/resources/identities/agents.d.mts.map +1 -1
  275. package/resources/identities/agents.d.ts +6 -28
  276. package/resources/identities/agents.d.ts.map +1 -1
  277. package/resources/identities/agents.js +2 -1
  278. package/resources/identities/agents.js.map +1 -1
  279. package/resources/identities/agents.mjs +2 -1
  280. package/resources/identities/agents.mjs.map +1 -1
  281. package/resources/identities/blocks.d.mts +7 -29
  282. package/resources/identities/blocks.d.mts.map +1 -1
  283. package/resources/identities/blocks.d.ts +7 -29
  284. package/resources/identities/blocks.d.ts.map +1 -1
  285. package/resources/identities/blocks.js +2 -1
  286. package/resources/identities/blocks.js.map +1 -1
  287. package/resources/identities/blocks.mjs +2 -1
  288. package/resources/identities/blocks.mjs.map +1 -1
  289. package/resources/identities/identities.d.mts +30 -65
  290. package/resources/identities/identities.d.mts.map +1 -1
  291. package/resources/identities/identities.d.ts +30 -65
  292. package/resources/identities/identities.d.ts.map +1 -1
  293. package/resources/identities/identities.js +7 -29
  294. package/resources/identities/identities.js.map +1 -1
  295. package/resources/identities/identities.mjs +7 -29
  296. package/resources/identities/identities.mjs.map +1 -1
  297. package/resources/identities/index.d.mts +3 -3
  298. package/resources/identities/index.d.mts.map +1 -1
  299. package/resources/identities/index.d.ts +3 -3
  300. package/resources/identities/index.d.ts.map +1 -1
  301. package/resources/identities/index.js.map +1 -1
  302. package/resources/identities/index.mjs.map +1 -1
  303. package/resources/index.d.mts +13 -11
  304. package/resources/index.d.mts.map +1 -1
  305. package/resources/index.d.ts +13 -11
  306. package/resources/index.d.ts.map +1 -1
  307. package/resources/index.js +6 -2
  308. package/resources/index.js.map +1 -1
  309. package/resources/index.mjs +3 -1
  310. package/resources/index.mjs.map +1 -1
  311. package/resources/mcp-servers/index.d.mts +3 -0
  312. package/resources/mcp-servers/index.d.mts.map +1 -0
  313. package/resources/mcp-servers/index.d.ts +3 -0
  314. package/resources/mcp-servers/index.d.ts.map +1 -0
  315. package/resources/mcp-servers/index.js +9 -0
  316. package/resources/mcp-servers/index.js.map +1 -0
  317. package/resources/mcp-servers/index.mjs +4 -0
  318. package/resources/mcp-servers/index.mjs.map +1 -0
  319. package/resources/mcp-servers/mcp-servers.d.mts +349 -0
  320. package/resources/mcp-servers/mcp-servers.d.mts.map +1 -0
  321. package/resources/mcp-servers/mcp-servers.d.ts +349 -0
  322. package/resources/mcp-servers/mcp-servers.d.ts.map +1 -0
  323. package/resources/mcp-servers/mcp-servers.js +69 -0
  324. package/resources/mcp-servers/mcp-servers.js.map +1 -0
  325. package/resources/mcp-servers/mcp-servers.mjs +64 -0
  326. package/resources/mcp-servers/mcp-servers.mjs.map +1 -0
  327. package/resources/mcp-servers/tools.d.mts +42 -0
  328. package/resources/mcp-servers/tools.d.mts.map +1 -0
  329. package/resources/mcp-servers/tools.d.ts +42 -0
  330. package/resources/mcp-servers/tools.d.ts.map +1 -0
  331. package/resources/mcp-servers/tools.js +36 -0
  332. package/resources/mcp-servers/tools.js.map +1 -0
  333. package/resources/mcp-servers/tools.mjs +32 -0
  334. package/resources/mcp-servers/tools.mjs.map +1 -0
  335. package/resources/mcp-servers.d.mts +2 -0
  336. package/resources/mcp-servers.d.mts.map +1 -0
  337. package/resources/mcp-servers.d.ts +2 -0
  338. package/resources/mcp-servers.d.ts.map +1 -0
  339. package/resources/mcp-servers.js +6 -0
  340. package/resources/mcp-servers.js.map +1 -0
  341. package/resources/mcp-servers.mjs +3 -0
  342. package/resources/mcp-servers.mjs.map +1 -0
  343. package/resources/models/embeddings.d.mts +6 -2
  344. package/resources/models/embeddings.d.mts.map +1 -1
  345. package/resources/models/embeddings.d.ts +6 -2
  346. package/resources/models/embeddings.d.ts.map +1 -1
  347. package/resources/models/embeddings.js +5 -1
  348. package/resources/models/embeddings.js.map +1 -1
  349. package/resources/models/embeddings.mjs +5 -1
  350. package/resources/models/embeddings.mjs.map +1 -1
  351. package/resources/models/index.d.mts +1 -1
  352. package/resources/models/index.d.mts.map +1 -1
  353. package/resources/models/index.d.ts +1 -1
  354. package/resources/models/index.d.ts.map +1 -1
  355. package/resources/models/index.js.map +1 -1
  356. package/resources/models/index.mjs.map +1 -1
  357. package/resources/models/models.d.mts +180 -4
  358. package/resources/models/models.d.mts.map +1 -1
  359. package/resources/models/models.d.ts +180 -4
  360. package/resources/models/models.d.ts.map +1 -1
  361. package/resources/models/models.js +5 -1
  362. package/resources/models/models.js.map +1 -1
  363. package/resources/models/models.mjs +5 -1
  364. package/resources/models/models.mjs.map +1 -1
  365. package/resources/runs/index.d.mts +3 -3
  366. package/resources/runs/index.d.mts.map +1 -1
  367. package/resources/runs/index.d.ts +3 -3
  368. package/resources/runs/index.d.ts.map +1 -1
  369. package/resources/runs/index.js.map +1 -1
  370. package/resources/runs/index.mjs.map +1 -1
  371. package/resources/runs/messages.d.mts +8 -28
  372. package/resources/runs/messages.d.mts.map +1 -1
  373. package/resources/runs/messages.d.ts +8 -28
  374. package/resources/runs/messages.d.ts.map +1 -1
  375. package/resources/runs/messages.js +10 -2
  376. package/resources/runs/messages.js.map +1 -1
  377. package/resources/runs/messages.mjs +10 -2
  378. package/resources/runs/messages.mjs.map +1 -1
  379. package/resources/runs/runs.d.mts +10 -36
  380. package/resources/runs/runs.d.mts.map +1 -1
  381. package/resources/runs/runs.d.ts +10 -36
  382. package/resources/runs/runs.d.ts.map +1 -1
  383. package/resources/runs/runs.js +2 -1
  384. package/resources/runs/runs.js.map +1 -1
  385. package/resources/runs/runs.mjs +3 -2
  386. package/resources/runs/runs.mjs.map +1 -1
  387. package/resources/runs/steps.d.mts +6 -26
  388. package/resources/runs/steps.d.mts.map +1 -1
  389. package/resources/runs/steps.d.ts +6 -26
  390. package/resources/runs/steps.d.ts.map +1 -1
  391. package/resources/runs/steps.js +5 -1
  392. package/resources/runs/steps.js.map +1 -1
  393. package/resources/runs/steps.mjs +5 -1
  394. package/resources/runs/steps.mjs.map +1 -1
  395. package/resources/steps/index.d.mts +2 -2
  396. package/resources/steps/index.d.mts.map +1 -1
  397. package/resources/steps/index.d.ts +2 -2
  398. package/resources/steps/index.d.ts.map +1 -1
  399. package/resources/steps/index.js.map +1 -1
  400. package/resources/steps/index.mjs +1 -1
  401. package/resources/steps/index.mjs.map +1 -1
  402. package/resources/steps/messages.d.mts +14 -28
  403. package/resources/steps/messages.d.mts.map +1 -1
  404. package/resources/steps/messages.d.ts +14 -28
  405. package/resources/steps/messages.d.ts.map +1 -1
  406. package/resources/steps/messages.js +5 -1
  407. package/resources/steps/messages.js.map +1 -1
  408. package/resources/steps/messages.mjs +5 -1
  409. package/resources/steps/messages.mjs.map +1 -1
  410. package/resources/steps/steps.d.mts +17 -44
  411. package/resources/steps/steps.d.mts.map +1 -1
  412. package/resources/steps/steps.d.ts +17 -44
  413. package/resources/steps/steps.d.ts.map +1 -1
  414. package/resources/steps/steps.js +3 -11
  415. package/resources/steps/steps.js.map +1 -1
  416. package/resources/steps/steps.mjs +3 -11
  417. package/resources/steps/steps.mjs.map +1 -1
  418. package/resources/templates/agents.d.mts +9 -14
  419. package/resources/templates/agents.d.mts.map +1 -1
  420. package/resources/templates/agents.d.ts +9 -14
  421. package/resources/templates/agents.d.ts.map +1 -1
  422. package/resources/templates/agents.js +2 -3
  423. package/resources/templates/agents.js.map +1 -1
  424. package/resources/templates/agents.mjs +2 -3
  425. package/resources/templates/agents.mjs.map +1 -1
  426. package/resources/tools.d.mts +6 -68
  427. package/resources/tools.d.mts.map +1 -1
  428. package/resources/tools.d.ts +6 -68
  429. package/resources/tools.d.ts.map +1 -1
  430. package/resources/tools.js +2 -7
  431. package/resources/tools.js.map +1 -1
  432. package/resources/tools.mjs +2 -7
  433. package/resources/tools.mjs.map +1 -1
  434. package/src/client.ts +274 -127
  435. package/src/core/pagination.ts +334 -0
  436. package/src/core/streaming.ts +331 -0
  437. package/src/index.ts +1 -0
  438. package/src/internal/decoders/line.ts +135 -0
  439. package/src/internal/parse.ts +14 -0
  440. package/src/internal/request-options.ts +2 -0
  441. package/src/pagination.ts +2 -0
  442. package/src/resources/access-tokens.ts +163 -0
  443. package/src/resources/agents/agents.ts +722 -242
  444. package/src/resources/agents/archives.ts +51 -0
  445. package/src/resources/agents/blocks.ts +50 -63
  446. package/src/resources/agents/files.ts +47 -90
  447. package/src/resources/agents/folders.ts +58 -88
  448. package/src/resources/agents/groups.ts +11 -35
  449. package/src/resources/agents/identities.ts +51 -0
  450. package/src/resources/agents/index.ts +40 -12
  451. package/src/resources/agents/messages.ts +911 -552
  452. package/src/resources/agents/tools.ts +13 -37
  453. package/src/resources/archives/archives.ts +170 -0
  454. package/src/resources/archives/index.ts +17 -0
  455. package/src/resources/archives/passages.ts +150 -0
  456. package/src/resources/archives.ts +1 -178
  457. package/src/resources/batches/batches.ts +74 -46
  458. package/src/resources/batches/index.ts +2 -2
  459. package/src/resources/batches/messages.ts +12 -37
  460. package/src/resources/blocks/agents.ts +11 -35
  461. package/src/resources/blocks/blocks.ts +130 -64
  462. package/src/resources/blocks/index.ts +3 -3
  463. package/src/resources/folders/files.ts +90 -113
  464. package/src/resources/folders/folders.ts +14 -55
  465. package/src/resources/folders/index.ts +2 -2
  466. package/src/resources/groups/groups.ts +21 -102
  467. package/src/resources/groups/index.ts +2 -4
  468. package/src/resources/groups/messages.ts +215 -103
  469. package/src/resources/identities/agents.ts +12 -35
  470. package/src/resources/identities/blocks.ts +13 -36
  471. package/src/resources/identities/identities.ts +35 -107
  472. package/src/resources/identities/index.ts +3 -4
  473. package/src/resources/index.ts +55 -18
  474. package/src/resources/mcp-servers/index.ts +25 -0
  475. package/src/resources/mcp-servers/mcp-servers.ts +460 -0
  476. package/src/resources/mcp-servers/tools.ts +69 -0
  477. package/src/resources/mcp-servers.ts +3 -0
  478. package/src/resources/models/embeddings.ts +6 -2
  479. package/src/resources/models/index.ts +2 -0
  480. package/src/resources/models/models.ts +260 -3
  481. package/src/resources/runs/index.ts +2 -3
  482. package/src/resources/runs/messages.ts +18 -37
  483. package/src/resources/runs/runs.ts +14 -54
  484. package/src/resources/runs/steps.ts +11 -33
  485. package/src/resources/steps/index.ts +7 -2
  486. package/src/resources/steps/messages.ts +25 -35
  487. package/src/resources/steps/steps.ts +20 -61
  488. package/src/resources/templates/agents.ts +14 -17
  489. package/src/resources/tools.ts +8 -92
  490. package/src/streaming.ts +2 -0
  491. package/src/version.ts +1 -1
  492. package/streaming.d.mts +2 -0
  493. package/streaming.d.mts.map +1 -0
  494. package/streaming.d.ts +2 -0
  495. package/streaming.d.ts.map +1 -0
  496. package/streaming.js +6 -0
  497. package/streaming.js.map +1 -0
  498. package/streaming.mjs +2 -0
  499. package/streaming.mjs.map +1 -0
  500. package/version.d.mts +1 -1
  501. package/version.d.mts.map +1 -1
  502. package/version.d.ts +1 -1
  503. package/version.d.ts.map +1 -1
  504. package/version.js +1 -1
  505. package/version.js.map +1 -1
  506. package/version.mjs +1 -1
  507. package/version.mjs.map +1 -1
@@ -4,16 +4,33 @@ import * as ToolsAPI from "../tools.js";
4
4
  import * as AgentsAPI from "./agents.js";
5
5
  import * as RunsAPI from "../runs/runs.js";
6
6
  import { APIPromise } from "../../core/api-promise.js";
7
+ import { ArrayPage, type ArrayPageParams, ObjectPage, PagePromise } from "../../core/pagination.js";
8
+ import { Stream } from "../../core/streaming.js";
7
9
  import { RequestOptions } from "../../internal/request-options.js";
8
10
  export declare class Messages extends APIResource {
9
11
  /**
10
- * Update the details of a message associated with an agent.
12
+ * Process a user message and return the agent's response. This endpoint accepts a
13
+ * message from a user and processes it through the agent.
14
+ *
15
+ * The response format is controlled by the `streaming` field in the request body:
16
+ *
17
+ * - If `streaming=false` (default): Returns a complete LettaResponse with all
18
+ * messages
19
+ * - If `streaming=true`: Returns a Server-Sent Events (SSE) stream
20
+ *
21
+ * Additional streaming options (only used when streaming=true):
22
+ *
23
+ * - `stream_tokens`: Stream individual tokens instead of complete steps
24
+ * - `include_pings`: Include keepalive pings to prevent connection timeouts
25
+ * - `background`: Process the request in the background
11
26
  */
12
- update(messageID: string, params: MessageUpdateParams, options?: RequestOptions): APIPromise<MessageUpdateResponse>;
27
+ create(agentID: string, body: MessageCreateParamsNonStreaming, options?: RequestOptions): APIPromise<LettaResponse>;
28
+ create(agentID: string, body: MessageCreateParamsStreaming, options?: RequestOptions): APIPromise<Stream<LettaStreamingResponse>>;
29
+ create(agentID: string, body: MessageCreateParamsBase, options?: RequestOptions): APIPromise<Stream<LettaStreamingResponse> | LettaResponse>;
13
30
  /**
14
31
  * Retrieve message history for an agent.
15
32
  */
16
- list(agentID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): APIPromise<MessageListResponse>;
33
+ list(agentID: string, query?: MessageListParams | null | undefined, options?: RequestOptions): PagePromise<MessagesArrayPage, Message>;
17
34
  /**
18
35
  * Cancel runs associated with an agent. If run_ids are passed in, cancel those in
19
36
  * particular.
@@ -22,14 +39,9 @@ export declare class Messages extends APIResource {
22
39
  */
23
40
  cancel(agentID: string, body?: MessageCancelParams | null | undefined, options?: RequestOptions): APIPromise<MessageCancelResponse>;
24
41
  /**
25
- * Resets the messages for an agent
26
- */
27
- reset(agentID: string, body: MessageResetParams, options?: RequestOptions): APIPromise<AgentsAPI.AgentState>;
28
- /**
29
- * Process a user message and return the agent's response. This endpoint accepts a
30
- * message from a user and processes it through the agent.
42
+ * Summarize an agent's conversation history.
31
43
  */
32
- send(agentID: string, body: MessageSendParams, options?: RequestOptions): APIPromise<LettaResponse>;
44
+ compact(agentID: string, options?: RequestOptions): APIPromise<void>;
33
45
  /**
34
46
  * Asynchronously process a user message and return a run object. The actual
35
47
  * processing happens in the background, and the status can be checked using the
@@ -38,18 +50,21 @@ export declare class Messages extends APIResource {
38
50
  * This is "asynchronous" in the sense that it's a background run and explicitly
39
51
  * must be fetched by the run ID.
40
52
  */
41
- sendAsync(agentID: string, body: MessageSendAsyncParams, options?: RequestOptions): APIPromise<Run>;
53
+ createAsync(agentID: string, body: MessageCreateAsyncParams, options?: RequestOptions): APIPromise<Run>;
54
+ /**
55
+ * Resets the messages for an agent
56
+ */
57
+ reset(agentID: string, body: MessageResetParams, options?: RequestOptions): APIPromise<AgentsAPI.AgentState | null>;
42
58
  /**
43
59
  * Process a user message and return the agent's response. This endpoint accepts a
44
60
  * message from a user and processes it through the agent. It will stream the steps
45
61
  * of the response always, and stream the tokens if 'stream_tokens' is set to True.
46
62
  */
47
- stream(agentID: string, body: MessageStreamParams, options?: RequestOptions): APIPromise<unknown>;
48
- /**
49
- * Summarize an agent's conversation history.
50
- */
51
- summarize(agentID: string, options?: RequestOptions): APIPromise<void>;
63
+ stream(agentID: string, body: MessageStreamParams, options?: RequestOptions): APIPromise<Stream<LettaStreamingResponse>>;
52
64
  }
65
+ export type MessagesArrayPage = ArrayPage<Message>;
66
+ export type RunsArrayPage = ArrayPage<Run>;
67
+ export type InternalMessagesObjectPage = ObjectPage<InternalMessage>;
53
68
  /**
54
69
  * Input to approve or deny a tool call request
55
70
  */
@@ -61,11 +76,15 @@ export interface ApprovalCreate {
61
76
  /**
62
77
  * The list of approval responses
63
78
  */
64
- approvals?: Array<ApprovalCreate.ApprovalReturn | ToolReturn> | null;
79
+ approvals?: Array<ApprovalReturn | ToolReturn> | null;
65
80
  /**
66
81
  * @deprecated Whether the tool has been approved
67
82
  */
68
83
  approve?: boolean | null;
84
+ /**
85
+ * The multi-agent group that the message was sent in
86
+ */
87
+ group_id?: string | null;
69
88
  /**
70
89
  * @deprecated An optional explanation for the provided approval status
71
90
  */
@@ -75,26 +94,6 @@ export interface ApprovalCreate {
75
94
  */
76
95
  type?: 'approval';
77
96
  }
78
- export declare namespace ApprovalCreate {
79
- interface ApprovalReturn {
80
- /**
81
- * Whether the tool has been approved
82
- */
83
- approve: boolean;
84
- /**
85
- * The ID of the tool call that corresponds to this approval
86
- */
87
- tool_call_id: string;
88
- /**
89
- * An optional explanation for the provided approval status
90
- */
91
- reason?: string | null;
92
- /**
93
- * The message type to be created.
94
- */
95
- type?: 'approval';
96
- }
97
- }
98
97
  /**
99
98
  * A message representing a request for approval to call a tool (generated by the
100
99
  * LLM to trigger tool execution).
@@ -147,7 +146,7 @@ export interface ApprovalResponseMessage {
147
146
  /**
148
147
  * The list of approval responses
149
148
  */
150
- approvals?: Array<ApprovalResponseMessage.ApprovalReturn | ToolReturn> | null;
149
+ approvals?: Array<ApprovalReturn | ToolReturn> | null;
151
150
  /**
152
151
  * @deprecated Whether the tool has been approved
153
152
  */
@@ -168,25 +167,23 @@ export interface ApprovalResponseMessage {
168
167
  seq_id?: number | null;
169
168
  step_id?: string | null;
170
169
  }
171
- export declare namespace ApprovalResponseMessage {
172
- interface ApprovalReturn {
173
- /**
174
- * Whether the tool has been approved
175
- */
176
- approve: boolean;
177
- /**
178
- * The ID of the tool call that corresponds to this approval
179
- */
180
- tool_call_id: string;
181
- /**
182
- * An optional explanation for the provided approval status
183
- */
184
- reason?: string | null;
185
- /**
186
- * The message type to be created.
187
- */
188
- type?: 'approval';
189
- }
170
+ export interface ApprovalReturn {
171
+ /**
172
+ * Whether the tool has been approved
173
+ */
174
+ approve: boolean;
175
+ /**
176
+ * The ID of the tool call that corresponds to this approval
177
+ */
178
+ tool_call_id: string;
179
+ /**
180
+ * An optional explanation for the provided approval status
181
+ */
182
+ reason?: string | null;
183
+ /**
184
+ * The message type to be created.
185
+ */
186
+ type?: 'approval';
190
187
  }
191
188
  /**
192
189
  * A message sent by the LLM in response to user input. Used in the LLM context.
@@ -216,6 +213,26 @@ export interface AssistantMessage {
216
213
  seq_id?: number | null;
217
214
  step_id?: string | null;
218
215
  }
216
+ /**
217
+ * A message for notifying the developer that an event that has occured (e.g. a
218
+ * compaction). Events are NOT part of the context window.
219
+ */
220
+ export interface EventMessage {
221
+ id: string;
222
+ date: string;
223
+ event_data: {
224
+ [key: string]: unknown;
225
+ };
226
+ event_type: 'compaction';
227
+ is_err?: boolean | null;
228
+ message_type?: 'event';
229
+ name?: string | null;
230
+ otid?: string | null;
231
+ run_id?: string | null;
232
+ sender_id?: string | null;
233
+ seq_id?: number | null;
234
+ step_id?: string | null;
235
+ }
219
236
  /**
220
237
  * Representation of an agent's internal reasoning where reasoning content has been
221
238
  * hidden from the response.
@@ -307,187 +324,6 @@ export declare namespace ImageContent {
307
324
  type?: 'letta';
308
325
  }
309
326
  }
310
- /**
311
- * Status of the job.
312
- */
313
- export type JobStatus = 'created' | 'running' | 'completed' | 'failed' | 'pending' | 'cancelled' | 'expired';
314
- export type JobType = 'job' | 'run' | 'batch';
315
- export interface LettaAssistantMessageContentUnion {
316
- /**
317
- * The text content of the message.
318
- */
319
- text: string;
320
- /**
321
- * Stores a unique identifier for any reasoning associated with this text content.
322
- */
323
- signature?: string | null;
324
- /**
325
- * The type of the message.
326
- */
327
- type?: 'text';
328
- }
329
- /**
330
- * A message generated by the system. Never streamed back on a response, only used
331
- * for cursor pagination.
332
- *
333
- * Args: id (str): The ID of the message date (datetime): The date the message was
334
- * created in ISO format name (Optional[str]): The name of the sender of the
335
- * message content (str): The message content sent by the system
336
- */
337
- export type LettaMessageUnion = SystemMessage | UserMessage | ReasoningMessage | HiddenReasoningMessage | ToolCallMessage | ToolsAPI.ToolReturnMessage | AssistantMessage | ApprovalRequestMessage | ApprovalResponseMessage;
338
- export interface LettaRequest {
339
- /**
340
- * The messages to be sent to the agent.
341
- */
342
- messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
343
- /**
344
- * @deprecated The name of the message argument in the designated message tool.
345
- * Still supported for legacy agent types, but deprecated for letta_v1_agent
346
- * onward.
347
- */
348
- assistant_message_tool_kwarg?: string;
349
- /**
350
- * @deprecated The name of the designated message tool. Still supported for legacy
351
- * agent types, but deprecated for letta_v1_agent onward.
352
- */
353
- assistant_message_tool_name?: string;
354
- /**
355
- * @deprecated If set to True, enables reasoning before responses or tool calls
356
- * from the agent.
357
- */
358
- enable_thinking?: string;
359
- /**
360
- * Only return specified message types in the response. If `None` (default) returns
361
- * all messages.
362
- */
363
- include_return_message_types?: Array<MessageType> | null;
364
- /**
365
- * Maximum number of steps the agent should take to process the request.
366
- */
367
- max_steps?: number;
368
- /**
369
- * @deprecated Whether the server should parse specific tool call arguments
370
- * (default `send_message`) as `AssistantMessage` objects. Still supported for
371
- * legacy agent types, but deprecated for letta_v1_agent onward.
372
- */
373
- use_assistant_message?: boolean;
374
- }
375
- /**
376
- * Response object from an agent interaction, consisting of the new messages
377
- * generated by the agent and usage statistics. The type of the returned messages
378
- * can be either `Message` or `LettaMessage`, depending on what was specified in
379
- * the request.
380
- *
381
- * Attributes: messages (List[Union[Message, LettaMessage]]): The messages returned
382
- * by the agent. usage (LettaUsageStatistics): The usage statistics
383
- */
384
- export interface LettaResponse {
385
- /**
386
- * The messages returned by the agent.
387
- */
388
- messages: Array<LettaMessageUnion>;
389
- /**
390
- * The stop reason from Letta indicating why agent loop stopped execution.
391
- */
392
- stop_reason: LettaResponse.StopReason;
393
- /**
394
- * The usage statistics of the agent.
395
- */
396
- usage: LettaResponse.Usage;
397
- }
398
- export declare namespace LettaResponse {
399
- /**
400
- * The stop reason from Letta indicating why agent loop stopped execution.
401
- */
402
- interface StopReason {
403
- /**
404
- * The reason why execution stopped.
405
- */
406
- stop_reason: RunsAPI.StopReasonType;
407
- /**
408
- * The type of the message.
409
- */
410
- message_type?: 'stop_reason';
411
- }
412
- /**
413
- * The usage statistics of the agent.
414
- */
415
- interface Usage {
416
- /**
417
- * The number of tokens generated by the agent.
418
- */
419
- completion_tokens?: number;
420
- message_type?: 'usage_statistics';
421
- /**
422
- * The number of tokens in the prompt.
423
- */
424
- prompt_tokens?: number;
425
- /**
426
- * The background task run IDs associated with the agent interaction
427
- */
428
- run_ids?: Array<string> | null;
429
- /**
430
- * The number of steps taken by the agent.
431
- */
432
- step_count?: number;
433
- /**
434
- * The total number of tokens processed by the agent.
435
- */
436
- total_tokens?: number;
437
- }
438
- }
439
- export interface LettaStreamingRequest {
440
- /**
441
- * The messages to be sent to the agent.
442
- */
443
- messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
444
- /**
445
- * @deprecated The name of the message argument in the designated message tool.
446
- * Still supported for legacy agent types, but deprecated for letta_v1_agent
447
- * onward.
448
- */
449
- assistant_message_tool_kwarg?: string;
450
- /**
451
- * @deprecated The name of the designated message tool. Still supported for legacy
452
- * agent types, but deprecated for letta_v1_agent onward.
453
- */
454
- assistant_message_tool_name?: string;
455
- /**
456
- * Whether to process the request in the background.
457
- */
458
- background?: boolean;
459
- /**
460
- * @deprecated If set to True, enables reasoning before responses or tool calls
461
- * from the agent.
462
- */
463
- enable_thinking?: string;
464
- /**
465
- * Whether to include periodic keepalive ping messages in the stream to prevent
466
- * connection timeouts.
467
- */
468
- include_pings?: boolean;
469
- /**
470
- * Only return specified message types in the response. If `None` (default) returns
471
- * all messages.
472
- */
473
- include_return_message_types?: Array<MessageType> | null;
474
- /**
475
- * Maximum number of steps the agent should take to process the request.
476
- */
477
- max_steps?: number;
478
- /**
479
- * Flag to determine if individual tokens should be streamed, rather than streaming
480
- * per step.
481
- */
482
- stream_tokens?: boolean;
483
- /**
484
- * @deprecated Whether the server should parse specific tool call arguments
485
- * (default `send_message`) as `AssistantMessage` objects. Still supported for
486
- * legacy agent types, but deprecated for letta_v1_agent onward.
487
- */
488
- use_assistant_message?: boolean;
489
- }
490
- export type LettaUserMessageContentUnion = TextContent | ImageContent;
491
327
  /**
492
328
  * Letta's internal representation of a message. Includes methods to convert to/from LLM provider formats.
493
329
  *
@@ -510,15 +346,15 @@ export type LettaUserMessageContentUnion = TextContent | ImageContent;
510
346
  *
511
347
  * t
512
348
  */
513
- export interface Message {
349
+ export interface InternalMessage {
514
350
  /**
515
- * The role of the participant.
351
+ * The human-friendly ID of the Message
516
352
  */
517
- role: MessageRole;
353
+ id: string;
518
354
  /**
519
- * The human-friendly ID of the Message
355
+ * The role of the participant.
520
356
  */
521
- id?: string;
357
+ role: MessageRole;
522
358
  /**
523
359
  * The unique identifier of the agent.
524
360
  */
@@ -531,7 +367,7 @@ export interface Message {
531
367
  /**
532
368
  * The list of approvals for this message.
533
369
  */
534
- approvals?: Array<Message.ApprovalReturn | Message.LettaSchemasMessageToolReturn> | null;
370
+ approvals?: Array<ApprovalReturn | InternalMessage.LettaSchemasMessageToolReturn> | null;
535
371
  /**
536
372
  * Whether tool call is approved.
537
373
  */
@@ -543,7 +379,7 @@ export interface Message {
543
379
  /**
544
380
  * The content of the message.
545
381
  */
546
- content?: Array<TextContent | ImageContent | ToolCallContent | ToolReturnContent | ReasoningContent | RedactedReasoningContent | OmittedReasoningContent | Message.SummarizedReasoningContent> | null;
382
+ content?: Array<TextContent | ImageContent | ToolCallContent | ToolReturnContent | ReasoningContent | RedactedReasoningContent | OmittedReasoningContent | InternalMessage.SummarizedReasoningContent> | null;
547
383
  /**
548
384
  * The timestamp when the object was created.
549
385
  */
@@ -600,50 +436,32 @@ export interface Message {
600
436
  /**
601
437
  * The list of tool calls requested. Only applicable for role assistant.
602
438
  */
603
- tool_calls?: Array<Message.ToolCall> | null;
439
+ tool_calls?: Array<InternalMessage.ToolCall> | null;
604
440
  /**
605
441
  * Tool execution return information for prior tool calls
606
442
  */
607
- tool_returns?: Array<Message.ToolReturn> | null;
443
+ tool_returns?: Array<InternalMessage.ToolReturn> | null;
608
444
  /**
609
445
  * The timestamp when the object was last updated.
610
446
  */
611
447
  updated_at?: string | null;
612
448
  }
613
- export declare namespace Message {
614
- interface ApprovalReturn {
449
+ export declare namespace InternalMessage {
450
+ interface LettaSchemasMessageToolReturn {
615
451
  /**
616
- * Whether the tool has been approved
452
+ * The status of the tool call
617
453
  */
618
- approve: boolean;
454
+ status: 'success' | 'error';
619
455
  /**
620
- * The ID of the tool call that corresponds to this approval
456
+ * The function response string
621
457
  */
622
- tool_call_id: string;
458
+ func_response?: string | null;
623
459
  /**
624
- * An optional explanation for the provided approval status
460
+ * Captured stderr from the tool invocation
625
461
  */
626
- reason?: string | null;
462
+ stderr?: Array<string> | null;
627
463
  /**
628
- * The message type to be created.
629
- */
630
- type?: 'approval';
631
- }
632
- interface LettaSchemasMessageToolReturn {
633
- /**
634
- * The status of the tool call
635
- */
636
- status: 'success' | 'error';
637
- /**
638
- * The function response string
639
- */
640
- func_response?: string | null;
641
- /**
642
- * Captured stderr from the tool invocation
643
- */
644
- stderr?: Array<string> | null;
645
- /**
646
- * Captured stdout (e.g. prints, logs) from the tool invocation
464
+ * Captured stdout (e.g. prints, logs) from the tool invocation
647
465
  */
648
466
  stdout?: Array<string> | null;
649
467
  /**
@@ -720,6 +538,334 @@ export declare namespace Message {
720
538
  tool_call_id?: unknown;
721
539
  }
722
540
  }
541
+ /**
542
+ * Status of the job.
543
+ */
544
+ export type JobStatus = 'created' | 'running' | 'completed' | 'failed' | 'pending' | 'cancelled' | 'expired';
545
+ export type JobType = 'job' | 'run' | 'batch';
546
+ export interface LettaAssistantMessageContentUnion {
547
+ /**
548
+ * The text content of the message.
549
+ */
550
+ text: string;
551
+ /**
552
+ * Stores a unique identifier for any reasoning associated with this text content.
553
+ */
554
+ signature?: string | null;
555
+ /**
556
+ * The type of the message.
557
+ */
558
+ type?: 'text';
559
+ }
560
+ export interface LettaRequest {
561
+ /**
562
+ * @deprecated The name of the message argument in the designated message tool.
563
+ * Still supported for legacy agent types, but deprecated for letta_v1_agent
564
+ * onward.
565
+ */
566
+ assistant_message_tool_kwarg?: string;
567
+ /**
568
+ * @deprecated The name of the designated message tool. Still supported for legacy
569
+ * agent types, but deprecated for letta_v1_agent onward.
570
+ */
571
+ assistant_message_tool_name?: string;
572
+ /**
573
+ * @deprecated If set to True, enables reasoning before responses or tool calls
574
+ * from the agent.
575
+ */
576
+ enable_thinking?: string;
577
+ /**
578
+ * Only return specified message types in the response. If `None` (default) returns
579
+ * all messages.
580
+ */
581
+ include_return_message_types?: Array<MessageType> | null;
582
+ /**
583
+ * Syntactic sugar for a single user message. Equivalent to messages=[{'role':
584
+ * 'user', 'content': input}].
585
+ */
586
+ input?: string | Array<TextContent | ImageContent | ToolCallContent | ToolReturnContent | ReasoningContent | RedactedReasoningContent | OmittedReasoningContent | LettaRequest.SummarizedReasoningContent> | null;
587
+ /**
588
+ * Maximum number of steps the agent should take to process the request.
589
+ */
590
+ max_steps?: number;
591
+ /**
592
+ * The messages to be sent to the agent.
593
+ */
594
+ messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
595
+ /**
596
+ * @deprecated Whether the server should parse specific tool call arguments
597
+ * (default `send_message`) as `AssistantMessage` objects. Still supported for
598
+ * legacy agent types, but deprecated for letta_v1_agent onward.
599
+ */
600
+ use_assistant_message?: boolean;
601
+ }
602
+ export declare namespace LettaRequest {
603
+ /**
604
+ * The style of reasoning content returned by the OpenAI Responses API
605
+ */
606
+ interface SummarizedReasoningContent {
607
+ /**
608
+ * The unique identifier for this reasoning step.
609
+ */
610
+ id: string;
611
+ /**
612
+ * Summaries of the reasoning content.
613
+ */
614
+ summary: Array<SummarizedReasoningContent.Summary>;
615
+ /**
616
+ * The encrypted reasoning content.
617
+ */
618
+ encrypted_content?: string;
619
+ /**
620
+ * Indicates this is a summarized reasoning step.
621
+ */
622
+ type?: 'summarized_reasoning';
623
+ }
624
+ namespace SummarizedReasoningContent {
625
+ interface Summary {
626
+ /**
627
+ * The index of the summary part.
628
+ */
629
+ index: number;
630
+ /**
631
+ * The text of the summary part.
632
+ */
633
+ text: string;
634
+ }
635
+ }
636
+ }
637
+ /**
638
+ * Response object from an agent interaction, consisting of the new messages
639
+ * generated by the agent and usage statistics. The type of the returned messages
640
+ * can be either `Message` or `LettaMessage`, depending on what was specified in
641
+ * the request.
642
+ *
643
+ * Attributes: messages (List[Union[Message, LettaMessage]]): The messages returned
644
+ * by the agent. usage (LettaUsageStatistics): The usage statistics
645
+ */
646
+ export interface LettaResponse {
647
+ /**
648
+ * The messages returned by the agent.
649
+ */
650
+ messages: Array<Message>;
651
+ /**
652
+ * The stop reason from Letta indicating why agent loop stopped execution.
653
+ */
654
+ stop_reason: LettaResponse.StopReason;
655
+ /**
656
+ * The usage statistics of the agent.
657
+ */
658
+ usage: LettaResponse.Usage;
659
+ }
660
+ export declare namespace LettaResponse {
661
+ /**
662
+ * The stop reason from Letta indicating why agent loop stopped execution.
663
+ */
664
+ interface StopReason {
665
+ /**
666
+ * The reason why execution stopped.
667
+ */
668
+ stop_reason: RunsAPI.StopReasonType;
669
+ /**
670
+ * The type of the message.
671
+ */
672
+ message_type?: 'stop_reason';
673
+ }
674
+ /**
675
+ * The usage statistics of the agent.
676
+ */
677
+ interface Usage {
678
+ /**
679
+ * The number of tokens generated by the agent.
680
+ */
681
+ completion_tokens?: number;
682
+ message_type?: 'usage_statistics';
683
+ /**
684
+ * The number of tokens in the prompt.
685
+ */
686
+ prompt_tokens?: number;
687
+ /**
688
+ * The background task run IDs associated with the agent interaction
689
+ */
690
+ run_ids?: Array<string> | null;
691
+ /**
692
+ * The number of steps taken by the agent.
693
+ */
694
+ step_count?: number;
695
+ /**
696
+ * The total number of tokens processed by the agent.
697
+ */
698
+ total_tokens?: number;
699
+ }
700
+ }
701
+ export interface LettaStreamingRequest {
702
+ /**
703
+ * @deprecated The name of the message argument in the designated message tool.
704
+ * Still supported for legacy agent types, but deprecated for letta_v1_agent
705
+ * onward.
706
+ */
707
+ assistant_message_tool_kwarg?: string;
708
+ /**
709
+ * @deprecated The name of the designated message tool. Still supported for legacy
710
+ * agent types, but deprecated for letta_v1_agent onward.
711
+ */
712
+ assistant_message_tool_name?: string;
713
+ /**
714
+ * Whether to process the request in the background (only used when
715
+ * streaming=true).
716
+ */
717
+ background?: boolean;
718
+ /**
719
+ * @deprecated If set to True, enables reasoning before responses or tool calls
720
+ * from the agent.
721
+ */
722
+ enable_thinking?: string;
723
+ /**
724
+ * Whether to include periodic keepalive ping messages in the stream to prevent
725
+ * connection timeouts (only used when streaming=true).
726
+ */
727
+ include_pings?: boolean;
728
+ /**
729
+ * Only return specified message types in the response. If `None` (default) returns
730
+ * all messages.
731
+ */
732
+ include_return_message_types?: Array<MessageType> | null;
733
+ /**
734
+ * Syntactic sugar for a single user message. Equivalent to messages=[{'role':
735
+ * 'user', 'content': input}].
736
+ */
737
+ input?: string | Array<TextContent | ImageContent | ToolCallContent | ToolReturnContent | ReasoningContent | RedactedReasoningContent | OmittedReasoningContent | LettaStreamingRequest.SummarizedReasoningContent> | null;
738
+ /**
739
+ * Maximum number of steps the agent should take to process the request.
740
+ */
741
+ max_steps?: number;
742
+ /**
743
+ * The messages to be sent to the agent.
744
+ */
745
+ messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
746
+ /**
747
+ * Flag to determine if individual tokens should be streamed, rather than streaming
748
+ * per step (only used when streaming=true).
749
+ */
750
+ stream_tokens?: boolean;
751
+ /**
752
+ * If True, returns a streaming response (Server-Sent Events). If False (default),
753
+ * returns a complete response.
754
+ */
755
+ streaming?: boolean;
756
+ /**
757
+ * @deprecated Whether the server should parse specific tool call arguments
758
+ * (default `send_message`) as `AssistantMessage` objects. Still supported for
759
+ * legacy agent types, but deprecated for letta_v1_agent onward.
760
+ */
761
+ use_assistant_message?: boolean;
762
+ }
763
+ export declare namespace LettaStreamingRequest {
764
+ /**
765
+ * The style of reasoning content returned by the OpenAI Responses API
766
+ */
767
+ interface SummarizedReasoningContent {
768
+ /**
769
+ * The unique identifier for this reasoning step.
770
+ */
771
+ id: string;
772
+ /**
773
+ * Summaries of the reasoning content.
774
+ */
775
+ summary: Array<SummarizedReasoningContent.Summary>;
776
+ /**
777
+ * The encrypted reasoning content.
778
+ */
779
+ encrypted_content?: string;
780
+ /**
781
+ * Indicates this is a summarized reasoning step.
782
+ */
783
+ type?: 'summarized_reasoning';
784
+ }
785
+ namespace SummarizedReasoningContent {
786
+ interface Summary {
787
+ /**
788
+ * The index of the summary part.
789
+ */
790
+ index: number;
791
+ /**
792
+ * The text of the summary part.
793
+ */
794
+ text: string;
795
+ }
796
+ }
797
+ }
798
+ /**
799
+ * Streaming response type for Server-Sent Events (SSE) endpoints. Each event in
800
+ * the stream will be one of these types.
801
+ */
802
+ export type LettaStreamingResponse = SystemMessage | UserMessage | ReasoningMessage | HiddenReasoningMessage | ToolCallMessage | ToolsAPI.ToolReturnMessage | AssistantMessage | ApprovalRequestMessage | ApprovalResponseMessage | LettaStreamingResponse.LettaPing | LettaStreamingResponse.LettaStopReason | LettaStreamingResponse.LettaUsageStatistics;
803
+ export declare namespace LettaStreamingResponse {
804
+ /**
805
+ * Ping messages are a keep-alive to prevent SSE streams from timing out during
806
+ * long running requests.
807
+ */
808
+ interface LettaPing {
809
+ /**
810
+ * The type of the message.
811
+ */
812
+ message_type: 'ping';
813
+ }
814
+ /**
815
+ * The stop reason from Letta indicating why agent loop stopped execution.
816
+ */
817
+ interface LettaStopReason {
818
+ /**
819
+ * The reason why execution stopped.
820
+ */
821
+ stop_reason: RunsAPI.StopReasonType;
822
+ /**
823
+ * The type of the message.
824
+ */
825
+ message_type?: 'stop_reason';
826
+ }
827
+ /**
828
+ * Usage statistics for the agent interaction.
829
+ *
830
+ * Attributes: completion_tokens (int): The number of tokens generated by the
831
+ * agent. prompt_tokens (int): The number of tokens in the prompt. total_tokens
832
+ * (int): The total number of tokens processed by the agent. step_count (int): The
833
+ * number of steps taken by the agent.
834
+ */
835
+ interface LettaUsageStatistics {
836
+ /**
837
+ * The number of tokens generated by the agent.
838
+ */
839
+ completion_tokens?: number;
840
+ message_type?: 'usage_statistics';
841
+ /**
842
+ * The number of tokens in the prompt.
843
+ */
844
+ prompt_tokens?: number;
845
+ /**
846
+ * The background task run IDs associated with the agent interaction
847
+ */
848
+ run_ids?: Array<string> | null;
849
+ /**
850
+ * The number of steps taken by the agent.
851
+ */
852
+ step_count?: number;
853
+ /**
854
+ * The total number of tokens processed by the agent.
855
+ */
856
+ total_tokens?: number;
857
+ }
858
+ }
859
+ export type LettaUserMessageContentUnion = TextContent | ImageContent;
860
+ /**
861
+ * A message generated by the system. Never streamed back on a response, only used
862
+ * for cursor pagination.
863
+ *
864
+ * Args: id (str): The ID of the message date (datetime): The date the message was
865
+ * created in ISO format name (Optional[str]): The name of the sender of the
866
+ * message content (str): The message content sent by the system
867
+ */
868
+ export type Message = SystemMessage | UserMessage | ReasoningMessage | HiddenReasoningMessage | ToolCallMessage | ToolsAPI.ToolReturnMessage | AssistantMessage | ApprovalRequestMessage | ApprovalResponseMessage | SummaryMessage | EventMessage;
723
869
  export type MessageRole = 'assistant' | 'user' | 'tool' | 'function' | 'system' | 'approval';
724
870
  export type MessageType = 'system_message' | 'user_message' | 'assistant_message' | 'reasoning_message' | 'hidden_reasoning_message' | 'tool_call_message' | 'tool_return_message' | 'approval_request_message' | 'approval_response_message';
725
871
  /**
@@ -803,26 +949,16 @@ export interface RedactedReasoningContent {
803
949
  * Representation of a run - a conversation or processing session for an agent.
804
950
  * Runs track when agents process messages and maintain the relationship between
805
951
  * agents, steps, and messages.
806
- *
807
- * Parameters: id (str): The unique identifier of the run (prefixed with 'run-').
808
- * status (JobStatus): The current status of the run. created_at (datetime): The
809
- * timestamp when the run was created. completed_at (datetime): The timestamp when
810
- * the run was completed. agent_id (str): The unique identifier of the agent
811
- * associated with the run. base_template_id (str): The base template ID that the
812
- * run belongs to. stop_reason (StopReasonType): The reason why the run was
813
- * stopped. background (bool): Whether the run was created in background mode.
814
- * metadata (dict): Additional metadata for the run. request_config
815
- * (LettaRequestConfig): The request configuration for the run.
816
952
  */
817
953
  export interface Run {
818
954
  /**
819
- * The unique identifier of the agent associated with the run.
955
+ * The human-friendly ID of the Run
820
956
  */
821
- agent_id: string;
957
+ id: string;
822
958
  /**
823
- * The human-friendly ID of the Run
959
+ * The unique identifier of the agent associated with the run.
824
960
  */
825
- id?: string;
961
+ agent_id: string;
826
962
  /**
827
963
  * Whether the run was created in background mode.
828
964
  */
@@ -907,6 +1043,23 @@ export declare namespace Run {
907
1043
  use_assistant_message?: boolean;
908
1044
  }
909
1045
  }
1046
+ /**
1047
+ * A message representing a summary of the conversation. Sent to the LLM as a user
1048
+ * or system message depending on the provider.
1049
+ */
1050
+ export interface SummaryMessage {
1051
+ id: string;
1052
+ date: string;
1053
+ summary: string;
1054
+ is_err?: boolean | null;
1055
+ message_type?: 'summary';
1056
+ name?: string | null;
1057
+ otid?: string | null;
1058
+ run_id?: string | null;
1059
+ sender_id?: string | null;
1060
+ seq_id?: number | null;
1061
+ step_id?: string | null;
1062
+ }
910
1063
  /**
911
1064
  * A message generated by the system. Never streamed back on a response, only used
912
1065
  * for cursor pagination.
@@ -1098,182 +1251,153 @@ export interface UserMessage {
1098
1251
  seq_id?: number | null;
1099
1252
  step_id?: string | null;
1100
1253
  }
1101
- /**
1102
- * A message generated by the system. Never streamed back on a response, only used
1103
- * for cursor pagination.
1104
- *
1105
- * Args: id (str): The ID of the message date (datetime): The date the message was
1106
- * created in ISO format name (Optional[str]): The name of the sender of the
1107
- * message content (str): The message content sent by the system
1108
- */
1109
- export type MessageUpdateResponse = SystemMessage | UserMessage | ReasoningMessage | HiddenReasoningMessage | ToolCallMessage | ToolsAPI.ToolReturnMessage | AssistantMessage | ApprovalRequestMessage | ApprovalResponseMessage;
1110
- export type MessageListResponse = Array<LettaMessageUnion>;
1111
1254
  export type MessageCancelResponse = {
1112
1255
  [key: string]: unknown;
1113
1256
  };
1114
- export type MessageStreamResponse = unknown;
1115
- export type MessageUpdateParams = MessageUpdateParams.UpdateSystemMessage | MessageUpdateParams.UpdateUserMessage | MessageUpdateParams.UpdateReasoningMessage | MessageUpdateParams.UpdateAssistantMessage;
1116
- export declare namespace MessageUpdateParams {
1117
- interface UpdateSystemMessage {
1118
- /**
1119
- * Path param: The ID of the agent in the format 'agent-<uuid4>'
1120
- */
1121
- agent_id: string;
1122
- /**
1123
- * Body param: The message content sent by the system (can be a string or an array
1124
- * of multi-modal content parts)
1125
- */
1126
- content: string;
1127
- /**
1128
- * Body param:
1129
- */
1130
- message_type?: 'system_message';
1131
- }
1132
- interface UpdateUserMessage {
1133
- /**
1134
- * Path param: The ID of the agent in the format 'agent-<uuid4>'
1135
- */
1136
- agent_id: string;
1137
- /**
1138
- * Body param: The message content sent by the user (can be a string or an array of
1139
- * multi-modal content parts)
1140
- */
1141
- content: Array<LettaUserMessageContentUnion> | string;
1142
- /**
1143
- * Body param:
1144
- */
1145
- message_type?: 'user_message';
1146
- }
1147
- interface UpdateReasoningMessage {
1148
- /**
1149
- * Path param: The ID of the agent in the format 'agent-<uuid4>'
1150
- */
1151
- agent_id: string;
1152
- /**
1153
- * Body param:
1154
- */
1155
- reasoning: string;
1156
- /**
1157
- * Body param:
1158
- */
1159
- message_type?: 'reasoning_message';
1160
- }
1161
- interface UpdateAssistantMessage {
1162
- /**
1163
- * Path param: The ID of the agent in the format 'agent-<uuid4>'
1164
- */
1165
- agent_id: string;
1166
- /**
1167
- * Body param: The message content sent by the assistant (can be a string or an
1168
- * array of content parts)
1169
- */
1170
- content: Array<LettaAssistantMessageContentUnion> | string;
1171
- /**
1172
- * Body param:
1173
- */
1174
- message_type?: 'assistant_message';
1175
- }
1176
- }
1177
- export interface MessageListParams {
1178
- /**
1179
- * Message ID cursor for pagination. Returns messages that come after this message
1180
- * ID in the specified sort order
1181
- */
1182
- after?: string | null;
1257
+ export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
1258
+ export interface MessageCreateParamsBase {
1183
1259
  /**
1184
- * @deprecated The name of the message argument.
1260
+ * @deprecated The name of the message argument in the designated message tool.
1261
+ * Still supported for legacy agent types, but deprecated for letta_v1_agent
1262
+ * onward.
1185
1263
  */
1186
1264
  assistant_message_tool_kwarg?: string;
1187
1265
  /**
1188
- * @deprecated The name of the designated message tool.
1266
+ * @deprecated The name of the designated message tool. Still supported for legacy
1267
+ * agent types, but deprecated for letta_v1_agent onward.
1189
1268
  */
1190
1269
  assistant_message_tool_name?: string;
1191
1270
  /**
1192
- * Message ID cursor for pagination. Returns messages that come before this message
1193
- * ID in the specified sort order
1271
+ * Whether to process the request in the background (only used when
1272
+ * streaming=true).
1194
1273
  */
1195
- before?: string | null;
1274
+ background?: boolean;
1196
1275
  /**
1197
- * Group ID to filter messages by.
1276
+ * @deprecated If set to True, enables reasoning before responses or tool calls
1277
+ * from the agent.
1198
1278
  */
1199
- group_id?: string | null;
1279
+ enable_thinking?: string;
1200
1280
  /**
1201
- * Whether to include error messages and error statuses. For debugging purposes
1202
- * only.
1281
+ * Whether to include periodic keepalive ping messages in the stream to prevent
1282
+ * connection timeouts (only used when streaming=true).
1203
1283
  */
1204
- include_err?: boolean | null;
1284
+ include_pings?: boolean;
1205
1285
  /**
1206
- * Maximum number of messages to return
1286
+ * Only return specified message types in the response. If `None` (default) returns
1287
+ * all messages.
1207
1288
  */
1208
- limit?: number | null;
1289
+ include_return_message_types?: Array<MessageType> | null;
1209
1290
  /**
1210
- * Sort order for messages by creation time. 'asc' for oldest first, 'desc' for
1211
- * newest first
1291
+ * Syntactic sugar for a single user message. Equivalent to messages=[{'role':
1292
+ * 'user', 'content': input}].
1212
1293
  */
1213
- order?: 'asc' | 'desc';
1294
+ input?: string | Array<TextContent | ImageContent | ToolCallContent | ToolReturnContent | ReasoningContent | RedactedReasoningContent | OmittedReasoningContent | MessageCreateParams.SummarizedReasoningContent> | null;
1214
1295
  /**
1215
- * Field to sort by
1296
+ * Maximum number of steps the agent should take to process the request.
1216
1297
  */
1217
- order_by?: 'created_at';
1298
+ max_steps?: number;
1218
1299
  /**
1219
- * @deprecated Whether to use assistant messages
1300
+ * The messages to be sent to the agent.
1301
+ */
1302
+ messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
1303
+ /**
1304
+ * Flag to determine if individual tokens should be streamed, rather than streaming
1305
+ * per step (only used when streaming=true).
1306
+ */
1307
+ stream_tokens?: boolean;
1308
+ /**
1309
+ * If True, returns a streaming response (Server-Sent Events). If False (default),
1310
+ * returns a complete response.
1311
+ */
1312
+ streaming?: boolean;
1313
+ /**
1314
+ * @deprecated Whether the server should parse specific tool call arguments
1315
+ * (default `send_message`) as `AssistantMessage` objects. Still supported for
1316
+ * legacy agent types, but deprecated for letta_v1_agent onward.
1220
1317
  */
1221
1318
  use_assistant_message?: boolean;
1222
1319
  }
1223
- export interface MessageCancelParams {
1320
+ export declare namespace MessageCreateParams {
1224
1321
  /**
1225
- * Optional list of run IDs to cancel
1322
+ * The style of reasoning content returned by the OpenAI Responses API
1226
1323
  */
1227
- run_ids?: Array<string> | null;
1324
+ interface SummarizedReasoningContent {
1325
+ /**
1326
+ * The unique identifier for this reasoning step.
1327
+ */
1328
+ id: string;
1329
+ /**
1330
+ * Summaries of the reasoning content.
1331
+ */
1332
+ summary: Array<SummarizedReasoningContent.Summary>;
1333
+ /**
1334
+ * The encrypted reasoning content.
1335
+ */
1336
+ encrypted_content?: string;
1337
+ /**
1338
+ * Indicates this is a summarized reasoning step.
1339
+ */
1340
+ type?: 'summarized_reasoning';
1341
+ }
1342
+ namespace SummarizedReasoningContent {
1343
+ interface Summary {
1344
+ /**
1345
+ * The index of the summary part.
1346
+ */
1347
+ index: number;
1348
+ /**
1349
+ * The text of the summary part.
1350
+ */
1351
+ text: string;
1352
+ }
1353
+ }
1354
+ type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
1355
+ type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
1228
1356
  }
1229
- export interface MessageResetParams {
1357
+ export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
1230
1358
  /**
1231
- * If true, adds the default initial messages after resetting.
1359
+ * If True, returns a streaming response (Server-Sent Events). If False (default),
1360
+ * returns a complete response.
1232
1361
  */
1233
- add_default_initial_messages?: boolean;
1362
+ streaming?: false;
1234
1363
  }
1235
- export interface MessageSendParams {
1364
+ export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
1236
1365
  /**
1237
- * The messages to be sent to the agent.
1366
+ * If True, returns a streaming response (Server-Sent Events). If False (default),
1367
+ * returns a complete response.
1238
1368
  */
1239
- messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
1369
+ streaming: true;
1370
+ }
1371
+ export interface MessageListParams extends ArrayPageParams {
1240
1372
  /**
1241
- * @deprecated The name of the message argument in the designated message tool.
1242
- * Still supported for legacy agent types, but deprecated for letta_v1_agent
1243
- * onward.
1373
+ * @deprecated The name of the message argument.
1244
1374
  */
1245
1375
  assistant_message_tool_kwarg?: string;
1246
1376
  /**
1247
- * @deprecated The name of the designated message tool. Still supported for legacy
1248
- * agent types, but deprecated for letta_v1_agent onward.
1377
+ * @deprecated The name of the designated message tool.
1249
1378
  */
1250
1379
  assistant_message_tool_name?: string;
1251
1380
  /**
1252
- * @deprecated If set to True, enables reasoning before responses or tool calls
1253
- * from the agent.
1254
- */
1255
- enable_thinking?: string;
1256
- /**
1257
- * Only return specified message types in the response. If `None` (default) returns
1258
- * all messages.
1381
+ * Group ID to filter messages by.
1259
1382
  */
1260
- include_return_message_types?: Array<MessageType> | null;
1383
+ group_id?: string | null;
1261
1384
  /**
1262
- * Maximum number of steps the agent should take to process the request.
1385
+ * Whether to include error messages and error statuses. For debugging purposes
1386
+ * only.
1263
1387
  */
1264
- max_steps?: number;
1388
+ include_err?: boolean | null;
1265
1389
  /**
1266
- * @deprecated Whether the server should parse specific tool call arguments
1267
- * (default `send_message`) as `AssistantMessage` objects. Still supported for
1268
- * legacy agent types, but deprecated for letta_v1_agent onward.
1390
+ * @deprecated Whether to use assistant messages
1269
1391
  */
1270
1392
  use_assistant_message?: boolean;
1271
1393
  }
1272
- export interface MessageSendAsyncParams {
1394
+ export interface MessageCancelParams {
1273
1395
  /**
1274
- * The messages to be sent to the agent.
1396
+ * Optional list of run IDs to cancel
1275
1397
  */
1276
- messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
1398
+ run_ids?: Array<string> | null;
1399
+ }
1400
+ export interface MessageCreateAsyncParams {
1277
1401
  /**
1278
1402
  * @deprecated The name of the message argument in the designated message tool.
1279
1403
  * Still supported for legacy agent types, but deprecated for letta_v1_agent
@@ -1299,10 +1423,19 @@ export interface MessageSendAsyncParams {
1299
1423
  * all messages.
1300
1424
  */
1301
1425
  include_return_message_types?: Array<MessageType> | null;
1426
+ /**
1427
+ * Syntactic sugar for a single user message. Equivalent to messages=[{'role':
1428
+ * 'user', 'content': input}].
1429
+ */
1430
+ input?: string | Array<TextContent | ImageContent | ToolCallContent | ToolReturnContent | ReasoningContent | RedactedReasoningContent | OmittedReasoningContent | MessageCreateAsyncParams.SummarizedReasoningContent> | null;
1302
1431
  /**
1303
1432
  * Maximum number of steps the agent should take to process the request.
1304
1433
  */
1305
1434
  max_steps?: number;
1435
+ /**
1436
+ * The messages to be sent to the agent.
1437
+ */
1438
+ messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
1306
1439
  /**
1307
1440
  * @deprecated Whether the server should parse specific tool call arguments
1308
1441
  * (default `send_message`) as `AssistantMessage` objects. Still supported for
@@ -1310,11 +1443,48 @@ export interface MessageSendAsyncParams {
1310
1443
  */
1311
1444
  use_assistant_message?: boolean;
1312
1445
  }
1313
- export interface MessageStreamParams {
1446
+ export declare namespace MessageCreateAsyncParams {
1314
1447
  /**
1315
- * The messages to be sent to the agent.
1448
+ * The style of reasoning content returned by the OpenAI Responses API
1449
+ */
1450
+ interface SummarizedReasoningContent {
1451
+ /**
1452
+ * The unique identifier for this reasoning step.
1453
+ */
1454
+ id: string;
1455
+ /**
1456
+ * Summaries of the reasoning content.
1457
+ */
1458
+ summary: Array<SummarizedReasoningContent.Summary>;
1459
+ /**
1460
+ * The encrypted reasoning content.
1461
+ */
1462
+ encrypted_content?: string;
1463
+ /**
1464
+ * Indicates this is a summarized reasoning step.
1465
+ */
1466
+ type?: 'summarized_reasoning';
1467
+ }
1468
+ namespace SummarizedReasoningContent {
1469
+ interface Summary {
1470
+ /**
1471
+ * The index of the summary part.
1472
+ */
1473
+ index: number;
1474
+ /**
1475
+ * The text of the summary part.
1476
+ */
1477
+ text: string;
1478
+ }
1479
+ }
1480
+ }
1481
+ export interface MessageResetParams {
1482
+ /**
1483
+ * If true, adds the default initial messages after resetting.
1316
1484
  */
1317
- messages: Array<AgentsAPI.MessageCreate | ApprovalCreate>;
1485
+ add_default_initial_messages?: boolean;
1486
+ }
1487
+ export interface MessageStreamParams {
1318
1488
  /**
1319
1489
  * @deprecated The name of the message argument in the designated message tool.
1320
1490
  * Still supported for legacy agent types, but deprecated for letta_v1_agent
@@ -1327,7 +1497,8 @@ export interface MessageStreamParams {
1327
1497
  */
1328
1498
  assistant_message_tool_name?: string;
1329
1499
  /**
1330
- * Whether to process the request in the background.
1500
+ * Whether to process the request in the background (only used when
1501
+ * streaming=true).
1331
1502
  */
1332
1503
  background?: boolean;
1333
1504
  /**
@@ -1337,7 +1508,7 @@ export interface MessageStreamParams {
1337
1508
  enable_thinking?: string;
1338
1509
  /**
1339
1510
  * Whether to include periodic keepalive ping messages in the stream to prevent
1340
- * connection timeouts.
1511
+ * connection timeouts (only used when streaming=true).
1341
1512
  */
1342
1513
  include_pings?: boolean;
1343
1514
  /**
@@ -1345,15 +1516,29 @@ export interface MessageStreamParams {
1345
1516
  * all messages.
1346
1517
  */
1347
1518
  include_return_message_types?: Array<MessageType> | null;
1519
+ /**
1520
+ * Syntactic sugar for a single user message. Equivalent to messages=[{'role':
1521
+ * 'user', 'content': input}].
1522
+ */
1523
+ input?: string | Array<TextContent | ImageContent | ToolCallContent | ToolReturnContent | ReasoningContent | RedactedReasoningContent | OmittedReasoningContent | MessageStreamParams.SummarizedReasoningContent> | null;
1348
1524
  /**
1349
1525
  * Maximum number of steps the agent should take to process the request.
1350
1526
  */
1351
1527
  max_steps?: number;
1528
+ /**
1529
+ * The messages to be sent to the agent.
1530
+ */
1531
+ messages?: Array<AgentsAPI.MessageCreate | ApprovalCreate> | null;
1352
1532
  /**
1353
1533
  * Flag to determine if individual tokens should be streamed, rather than streaming
1354
- * per step.
1534
+ * per step (only used when streaming=true).
1355
1535
  */
1356
1536
  stream_tokens?: boolean;
1537
+ /**
1538
+ * If True, returns a streaming response (Server-Sent Events). If False (default),
1539
+ * returns a complete response.
1540
+ */
1541
+ streaming?: boolean;
1357
1542
  /**
1358
1543
  * @deprecated Whether the server should parse specific tool call arguments
1359
1544
  * (default `send_message`) as `AssistantMessage` objects. Still supported for
@@ -1361,7 +1546,42 @@ export interface MessageStreamParams {
1361
1546
  */
1362
1547
  use_assistant_message?: boolean;
1363
1548
  }
1549
+ export declare namespace MessageStreamParams {
1550
+ /**
1551
+ * The style of reasoning content returned by the OpenAI Responses API
1552
+ */
1553
+ interface SummarizedReasoningContent {
1554
+ /**
1555
+ * The unique identifier for this reasoning step.
1556
+ */
1557
+ id: string;
1558
+ /**
1559
+ * Summaries of the reasoning content.
1560
+ */
1561
+ summary: Array<SummarizedReasoningContent.Summary>;
1562
+ /**
1563
+ * The encrypted reasoning content.
1564
+ */
1565
+ encrypted_content?: string;
1566
+ /**
1567
+ * Indicates this is a summarized reasoning step.
1568
+ */
1569
+ type?: 'summarized_reasoning';
1570
+ }
1571
+ namespace SummarizedReasoningContent {
1572
+ interface Summary {
1573
+ /**
1574
+ * The index of the summary part.
1575
+ */
1576
+ index: number;
1577
+ /**
1578
+ * The text of the summary part.
1579
+ */
1580
+ text: string;
1581
+ }
1582
+ }
1583
+ }
1364
1584
  export declare namespace Messages {
1365
- export { type ApprovalCreate as ApprovalCreate, type ApprovalRequestMessage as ApprovalRequestMessage, type ApprovalResponseMessage as ApprovalResponseMessage, type AssistantMessage as AssistantMessage, type HiddenReasoningMessage as HiddenReasoningMessage, type ImageContent as ImageContent, type JobStatus as JobStatus, type JobType as JobType, type LettaAssistantMessageContentUnion as LettaAssistantMessageContentUnion, type LettaMessageUnion as LettaMessageUnion, type LettaRequest as LettaRequest, type LettaResponse as LettaResponse, type LettaStreamingRequest as LettaStreamingRequest, type LettaUserMessageContentUnion as LettaUserMessageContentUnion, type Message as Message, type MessageRole as MessageRole, type MessageType as MessageType, type OmittedReasoningContent as OmittedReasoningContent, type ReasoningContent as ReasoningContent, type ReasoningMessage as ReasoningMessage, type RedactedReasoningContent as RedactedReasoningContent, type Run as Run, type SystemMessage as SystemMessage, type TextContent as TextContent, type ToolCall as ToolCall, type ToolCallContent as ToolCallContent, type ToolCallDelta as ToolCallDelta, type ToolCallMessage as ToolCallMessage, type ToolReturn as ToolReturn, type ToolReturnContent as ToolReturnContent, type UpdateAssistantMessage as UpdateAssistantMessage, type UpdateReasoningMessage as UpdateReasoningMessage, type UpdateSystemMessage as UpdateSystemMessage, type UpdateUserMessage as UpdateUserMessage, type UserMessage as UserMessage, type MessageUpdateResponse as MessageUpdateResponse, type MessageListResponse as MessageListResponse, type MessageCancelResponse as MessageCancelResponse, type MessageStreamResponse as MessageStreamResponse, type MessageUpdateParams as MessageUpdateParams, type MessageListParams as MessageListParams, type MessageCancelParams as MessageCancelParams, type MessageResetParams as MessageResetParams, type MessageSendParams as MessageSendParams, type MessageSendAsyncParams as MessageSendAsyncParams, type MessageStreamParams as MessageStreamParams, };
1585
+ export { type ApprovalCreate as ApprovalCreate, type ApprovalRequestMessage as ApprovalRequestMessage, type ApprovalResponseMessage as ApprovalResponseMessage, type ApprovalReturn as ApprovalReturn, type AssistantMessage as AssistantMessage, type EventMessage as EventMessage, type HiddenReasoningMessage as HiddenReasoningMessage, type ImageContent as ImageContent, type InternalMessage as InternalMessage, type JobStatus as JobStatus, type JobType as JobType, type LettaAssistantMessageContentUnion as LettaAssistantMessageContentUnion, type LettaRequest as LettaRequest, type LettaResponse as LettaResponse, type LettaStreamingRequest as LettaStreamingRequest, type LettaStreamingResponse as LettaStreamingResponse, type LettaUserMessageContentUnion as LettaUserMessageContentUnion, type Message as Message, type MessageRole as MessageRole, type MessageType as MessageType, type OmittedReasoningContent as OmittedReasoningContent, type ReasoningContent as ReasoningContent, type ReasoningMessage as ReasoningMessage, type RedactedReasoningContent as RedactedReasoningContent, type Run as Run, type SummaryMessage as SummaryMessage, type SystemMessage as SystemMessage, type TextContent as TextContent, type ToolCall as ToolCall, type ToolCallContent as ToolCallContent, type ToolCallDelta as ToolCallDelta, type ToolCallMessage as ToolCallMessage, type ToolReturn as ToolReturn, type ToolReturnContent as ToolReturnContent, type UpdateAssistantMessage as UpdateAssistantMessage, type UpdateReasoningMessage as UpdateReasoningMessage, type UpdateSystemMessage as UpdateSystemMessage, type UpdateUserMessage as UpdateUserMessage, type UserMessage as UserMessage, type MessageCancelResponse as MessageCancelResponse, type MessagesArrayPage as MessagesArrayPage, type MessageCreateParams as MessageCreateParams, type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming, type MessageCreateParamsStreaming as MessageCreateParamsStreaming, type MessageListParams as MessageListParams, type MessageCancelParams as MessageCancelParams, type MessageCreateAsyncParams as MessageCreateAsyncParams, type MessageResetParams as MessageResetParams, type MessageStreamParams as MessageStreamParams, };
1366
1586
  }
1367
1587
  //# sourceMappingURL=messages.d.ts.map