@letta-ai/letta-client 0.1.14 → 0.1.15

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 (248) hide show
  1. package/api/resources/agents/client/Client.d.ts +6 -125
  2. package/api/resources/agents/client/Client.js +22 -626
  3. package/api/resources/agents/client/requests/index.d.ts +0 -2
  4. package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +21 -4
  5. package/api/resources/agents/resources/archivalMemory/client/Client.js +104 -28
  6. package/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
  7. package/api/resources/agents/resources/archivalMemory/client/index.js +15 -0
  8. package/api/resources/agents/{client/requests/ListArchivalMemoryRequest.d.ts → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts} +1 -1
  9. package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
  10. package/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
  11. package/api/resources/agents/resources/context/client/Client.js +1 -1
  12. package/api/resources/agents/resources/coreMemory/client/Client.d.ts +42 -15
  13. package/api/resources/agents/resources/coreMemory/client/Client.js +195 -64
  14. package/api/resources/agents/resources/index.d.ts +1 -0
  15. package/api/resources/agents/resources/index.js +1 -0
  16. package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
  17. package/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  18. package/api/resources/agents/resources/messages/client/Client.js +7 -7
  19. package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -1
  20. package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
  21. package/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +8 -0
  22. package/api/resources/agents/resources/messages/types/index.d.ts +1 -0
  23. package/api/resources/agents/resources/messages/types/index.js +1 -0
  24. package/api/resources/agents/resources/sources/client/Client.js +3 -3
  25. package/api/resources/agents/resources/templates/client/Client.js +3 -3
  26. package/api/resources/agents/resources/tools/client/Client.js +3 -3
  27. package/api/resources/blocks/client/Client.d.ts +13 -0
  28. package/api/resources/blocks/client/Client.js +71 -5
  29. package/api/resources/health/client/Client.js +1 -1
  30. package/api/resources/jobs/client/Client.js +4 -4
  31. package/api/resources/models/client/Client.js +2 -2
  32. package/api/resources/providers/client/Client.js +4 -4
  33. package/api/resources/runs/client/Client.js +6 -6
  34. package/api/resources/sources/client/Client.js +6 -6
  35. package/api/resources/sources/resources/files/client/Client.js +3 -3
  36. package/api/resources/sources/resources/passages/client/Client.js +1 -1
  37. package/api/resources/tag/client/Client.js +1 -1
  38. package/api/resources/tools/client/Client.js +11 -11
  39. package/api/types/AssistantMessage.d.ts +2 -1
  40. package/api/types/AssistantMessageContent.d.ts +5 -0
  41. package/api/types/LlmConfig.d.ts +3 -0
  42. package/api/types/Message.d.ts +2 -2
  43. package/api/types/MessageCreate.d.ts +2 -2
  44. package/api/types/MessageCreateContent.d.ts +8 -0
  45. package/api/types/MessageCreateContent.js +5 -0
  46. package/api/types/SystemMessage.d.ts +3 -2
  47. package/api/types/SystemMessageContent.d.ts +5 -0
  48. package/api/types/SystemMessageContent.js +5 -0
  49. package/api/types/TextContent.d.ts +8 -0
  50. package/api/types/TextContent.js +5 -0
  51. package/api/types/UserMessage.d.ts +3 -2
  52. package/api/types/UserMessageContent.d.ts +5 -0
  53. package/api/types/UserMessageContent.js +5 -0
  54. package/api/types/index.d.ts +5 -0
  55. package/api/types/index.js +5 -0
  56. package/dist/api/resources/agents/client/Client.d.ts +6 -125
  57. package/dist/api/resources/agents/client/Client.js +22 -626
  58. package/dist/api/resources/agents/client/requests/index.d.ts +0 -2
  59. package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +21 -4
  60. package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +104 -28
  61. package/dist/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
  62. package/dist/api/resources/agents/resources/archivalMemory/client/index.js +15 -0
  63. package/dist/api/resources/agents/{client/requests/ListArchivalMemoryRequest.d.ts → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts} +1 -1
  64. package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +5 -0
  65. package/dist/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +5 -0
  66. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
  67. package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
  68. package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
  69. package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +42 -15
  70. package/dist/api/resources/agents/resources/coreMemory/client/Client.js +195 -64
  71. package/dist/api/resources/agents/resources/index.d.ts +1 -0
  72. package/dist/api/resources/agents/resources/index.js +1 -0
  73. package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
  74. package/dist/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
  75. package/dist/api/resources/agents/resources/messages/client/Client.js +7 -7
  76. package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -1
  77. package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
  78. package/dist/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +8 -0
  79. package/dist/api/resources/agents/resources/messages/types/MessageUpdateContent.js +5 -0
  80. package/dist/api/resources/agents/resources/messages/types/index.d.ts +1 -0
  81. package/dist/api/resources/agents/resources/messages/types/index.js +1 -0
  82. package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
  83. package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
  84. package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
  85. package/dist/api/resources/blocks/client/Client.d.ts +13 -0
  86. package/dist/api/resources/blocks/client/Client.js +71 -5
  87. package/dist/api/resources/health/client/Client.js +1 -1
  88. package/dist/api/resources/jobs/client/Client.js +4 -4
  89. package/dist/api/resources/models/client/Client.js +2 -2
  90. package/dist/api/resources/providers/client/Client.js +4 -4
  91. package/dist/api/resources/runs/client/Client.js +6 -6
  92. package/dist/api/resources/sources/client/Client.js +6 -6
  93. package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
  94. package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
  95. package/dist/api/resources/tag/client/Client.js +1 -1
  96. package/dist/api/resources/tools/client/Client.js +11 -11
  97. package/dist/api/types/AssistantMessage.d.ts +2 -1
  98. package/dist/api/types/AssistantMessageContent.d.ts +5 -0
  99. package/dist/api/types/AssistantMessageContent.js +5 -0
  100. package/dist/api/types/LlmConfig.d.ts +3 -0
  101. package/dist/api/types/Message.d.ts +2 -2
  102. package/dist/api/types/MessageCreate.d.ts +2 -2
  103. package/dist/api/types/MessageCreateContent.d.ts +8 -0
  104. package/dist/api/types/MessageCreateContent.js +5 -0
  105. package/dist/api/types/SystemMessage.d.ts +3 -2
  106. package/dist/api/types/SystemMessageContent.d.ts +5 -0
  107. package/dist/api/types/SystemMessageContent.js +5 -0
  108. package/dist/api/types/TextContent.d.ts +8 -0
  109. package/dist/api/types/TextContent.js +5 -0
  110. package/dist/api/types/UserMessage.d.ts +3 -2
  111. package/dist/api/types/UserMessageContent.d.ts +5 -0
  112. package/dist/api/types/UserMessageContent.js +5 -0
  113. package/dist/api/types/index.d.ts +5 -0
  114. package/dist/api/types/index.js +5 -0
  115. package/dist/serialization/resources/agents/client/index.d.ts +0 -3
  116. package/dist/serialization/resources/agents/client/index.js +1 -4
  117. package/dist/serialization/resources/agents/client/requests/index.d.ts +0 -1
  118. package/dist/serialization/resources/agents/client/requests/index.js +1 -3
  119. package/dist/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +11 -0
  120. package/dist/serialization/resources/agents/{client/createArchivalMemory.js → resources/archivalMemory/client/create.js} +2 -2
  121. package/dist/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +3 -0
  122. package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +42 -0
  123. package/dist/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +11 -0
  124. package/dist/serialization/resources/agents/{client/listArchivalMemory.js → resources/archivalMemory/client/list.js} +2 -2
  125. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +12 -0
  126. package/{serialization/resources/agents → dist/serialization/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +1 -1
  127. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +1 -0
  128. package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +5 -0
  129. package/dist/serialization/resources/agents/resources/archivalMemory/index.d.ts +1 -0
  130. package/dist/serialization/resources/agents/resources/archivalMemory/index.js +17 -0
  131. package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -0
  132. package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +37 -0
  133. package/dist/serialization/resources/agents/resources/coreMemory/client/listBlocks.d.ts +11 -0
  134. package/{serialization/resources/agents/client/listCoreMemoryBlocks.js → dist/serialization/resources/agents/resources/coreMemory/client/listBlocks.js} +2 -2
  135. package/dist/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  136. package/dist/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  137. package/dist/serialization/resources/agents/resources/index.d.ts +3 -0
  138. package/dist/serialization/resources/agents/resources/index.js +4 -1
  139. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -1
  140. package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -1
  141. package/dist/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +11 -0
  142. package/dist/serialization/resources/agents/resources/messages/types/MessageUpdateContent.js +42 -0
  143. package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
  144. package/dist/serialization/resources/agents/resources/messages/types/index.js +1 -0
  145. package/dist/serialization/resources/blocks/client/index.d.ts +1 -0
  146. package/dist/serialization/resources/blocks/client/index.js +2 -1
  147. package/dist/serialization/resources/{agents/client/createArchivalMemory.d.ts → blocks/client/listAgentsForBlock.d.ts} +3 -3
  148. package/dist/serialization/resources/blocks/client/listAgentsForBlock.js +42 -0
  149. package/dist/serialization/types/AssistantMessage.d.ts +2 -1
  150. package/dist/serialization/types/AssistantMessage.js +2 -1
  151. package/dist/serialization/types/AssistantMessageContent.d.ts +11 -0
  152. package/dist/serialization/types/AssistantMessageContent.js +42 -0
  153. package/dist/serialization/types/LlmConfig.d.ts +1 -0
  154. package/dist/serialization/types/LlmConfig.js +1 -0
  155. package/dist/serialization/types/Message.d.ts +2 -1
  156. package/dist/serialization/types/Message.js +2 -1
  157. package/dist/serialization/types/MessageCreate.d.ts +2 -1
  158. package/dist/serialization/types/MessageCreate.js +2 -1
  159. package/dist/serialization/types/MessageCreateContent.d.ts +11 -0
  160. package/dist/serialization/types/MessageCreateContent.js +42 -0
  161. package/dist/serialization/types/SystemMessage.d.ts +2 -1
  162. package/dist/serialization/types/SystemMessage.js +2 -1
  163. package/dist/serialization/types/SystemMessageContent.d.ts +11 -0
  164. package/dist/serialization/types/SystemMessageContent.js +42 -0
  165. package/dist/serialization/types/TextContent.d.ts +13 -0
  166. package/dist/serialization/types/TextContent.js +44 -0
  167. package/dist/serialization/types/UserMessage.d.ts +2 -1
  168. package/dist/serialization/types/UserMessage.js +2 -1
  169. package/dist/serialization/types/UserMessageContent.d.ts +11 -0
  170. package/dist/serialization/types/UserMessageContent.js +42 -0
  171. package/dist/serialization/types/index.d.ts +5 -0
  172. package/dist/serialization/types/index.js +5 -0
  173. package/dist/version.d.ts +1 -1
  174. package/dist/version.js +1 -1
  175. package/package.json +1 -1
  176. package/reference.md +487 -895
  177. package/serialization/resources/agents/client/index.d.ts +0 -3
  178. package/serialization/resources/agents/client/index.js +1 -4
  179. package/serialization/resources/agents/client/requests/index.d.ts +0 -1
  180. package/serialization/resources/agents/client/requests/index.js +1 -3
  181. package/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +11 -0
  182. package/serialization/resources/agents/{client/listArchivalMemory.js → resources/archivalMemory/client/create.js} +2 -2
  183. package/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +3 -0
  184. package/serialization/resources/agents/resources/archivalMemory/client/index.js +42 -0
  185. package/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +11 -0
  186. package/serialization/resources/agents/{client/createArchivalMemory.js → resources/archivalMemory/client/list.js} +2 -2
  187. package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +12 -0
  188. package/{dist/serialization/resources/agents → serialization/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +1 -1
  189. package/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +1 -0
  190. package/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +5 -0
  191. package/serialization/resources/agents/resources/archivalMemory/index.d.ts +1 -0
  192. package/serialization/resources/agents/resources/archivalMemory/index.js +17 -0
  193. package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -0
  194. package/serialization/resources/agents/resources/coreMemory/client/index.js +37 -0
  195. package/serialization/resources/agents/resources/coreMemory/client/listBlocks.d.ts +11 -0
  196. package/{dist/serialization/resources/agents/client/listCoreMemoryBlocks.js → serialization/resources/agents/resources/coreMemory/client/listBlocks.js} +2 -2
  197. package/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
  198. package/serialization/resources/agents/resources/coreMemory/index.js +17 -0
  199. package/serialization/resources/agents/resources/index.d.ts +3 -0
  200. package/serialization/resources/agents/resources/index.js +4 -1
  201. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -1
  202. package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -1
  203. package/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +11 -0
  204. package/serialization/resources/agents/resources/messages/types/MessageUpdateContent.js +42 -0
  205. package/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
  206. package/serialization/resources/agents/resources/messages/types/index.js +1 -0
  207. package/serialization/resources/blocks/client/index.d.ts +1 -0
  208. package/serialization/resources/blocks/client/index.js +2 -1
  209. package/{dist/serialization/resources/agents/client/listArchivalMemory.d.ts → serialization/resources/blocks/client/listAgentsForBlock.d.ts} +3 -3
  210. package/serialization/resources/blocks/client/listAgentsForBlock.js +42 -0
  211. package/serialization/types/AssistantMessage.d.ts +2 -1
  212. package/serialization/types/AssistantMessage.js +2 -1
  213. package/serialization/types/AssistantMessageContent.d.ts +11 -0
  214. package/serialization/types/AssistantMessageContent.js +42 -0
  215. package/serialization/types/LlmConfig.d.ts +1 -0
  216. package/serialization/types/LlmConfig.js +1 -0
  217. package/serialization/types/Message.d.ts +2 -1
  218. package/serialization/types/Message.js +2 -1
  219. package/serialization/types/MessageCreate.d.ts +2 -1
  220. package/serialization/types/MessageCreate.js +2 -1
  221. package/serialization/types/MessageCreateContent.d.ts +11 -0
  222. package/serialization/types/MessageCreateContent.js +42 -0
  223. package/serialization/types/SystemMessage.d.ts +2 -1
  224. package/serialization/types/SystemMessage.js +2 -1
  225. package/serialization/types/SystemMessageContent.d.ts +11 -0
  226. package/serialization/types/SystemMessageContent.js +42 -0
  227. package/serialization/types/TextContent.d.ts +13 -0
  228. package/serialization/types/TextContent.js +44 -0
  229. package/serialization/types/UserMessage.d.ts +2 -1
  230. package/serialization/types/UserMessage.js +2 -1
  231. package/serialization/types/UserMessageContent.d.ts +11 -0
  232. package/serialization/types/UserMessageContent.js +42 -0
  233. package/serialization/types/index.d.ts +5 -0
  234. package/serialization/types/index.js +5 -0
  235. package/version.d.ts +1 -1
  236. package/version.js +1 -1
  237. package/dist/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +0 -11
  238. package/dist/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +0 -12
  239. package/serialization/resources/agents/client/createArchivalMemory.d.ts +0 -11
  240. package/serialization/resources/agents/client/listArchivalMemory.d.ts +0 -11
  241. package/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +0 -11
  242. package/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +0 -12
  243. /package/api/resources/agents/{client/requests/CreateArchivalMemory.js → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js} +0 -0
  244. /package/api/resources/agents/{client → resources/archivalMemory/client}/requests/CreateArchivalMemory.d.ts +0 -0
  245. /package/{dist/api/resources/agents → api/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +0 -0
  246. /package/api/resources/agents/{client/requests/ListArchivalMemoryRequest.js → resources/messages/types/MessageUpdateContent.js} +0 -0
  247. /package/{dist/api/resources/agents/client/requests/ListArchivalMemoryRequest.js → api/types/AssistantMessageContent.js} +0 -0
  248. /package/dist/api/resources/agents/{client → resources/archivalMemory/client}/requests/CreateArchivalMemory.d.ts +0 -0
@@ -1,7 +1,5 @@
1
1
  export { type AgentsListRequest } from "./AgentsListRequest";
2
2
  export { type CreateAgentRequest } from "./CreateAgentRequest";
3
3
  export { type UpdateAgent } from "./UpdateAgent";
4
- export { type ListArchivalMemoryRequest } from "./ListArchivalMemoryRequest";
5
- export { type CreateArchivalMemory } from "./CreateArchivalMemory";
6
4
  export { type ResetMessagesRequest } from "./ResetMessagesRequest";
7
5
  export { type AgentsSearchRequest } from "./AgentsSearchRequest";
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments";
5
5
  import * as core from "../../../../../../core";
6
+ import * as Letta from "../../../../../index";
6
7
  export declare namespace ArchivalMemory {
7
8
  interface Options {
8
9
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -26,30 +27,46 @@ export declare class ArchivalMemory {
26
27
  protected readonly _options: ArchivalMemory.Options;
27
28
  constructor(_options?: ArchivalMemory.Options);
28
29
  /**
30
+ * Retrieve the memories in an agent's archival memory store (paginated query).
31
+ *
29
32
  * @param {string} agentId
33
+ * @param {Letta.agents.ArchivalMemoryListRequest} request
30
34
  * @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
31
35
  *
36
+ * @throws {@link Letta.UnprocessableEntityError}
37
+ *
32
38
  * @example
33
39
  * await client.agents.archivalMemory.list("agent_id")
34
40
  */
35
- list(agentId: string, requestOptions?: ArchivalMemory.RequestOptions): Promise<void>;
41
+ list(agentId: string, request?: Letta.agents.ArchivalMemoryListRequest, requestOptions?: ArchivalMemory.RequestOptions): Promise<Letta.Passage[]>;
36
42
  /**
43
+ * Insert a memory into an agent's archival memory store.
44
+ *
37
45
  * @param {string} agentId
46
+ * @param {Letta.agents.CreateArchivalMemory} request
38
47
  * @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
39
48
  *
49
+ * @throws {@link Letta.UnprocessableEntityError}
50
+ *
40
51
  * @example
41
- * await client.agents.archivalMemory.create("agent_id")
52
+ * await client.agents.archivalMemory.create("agent_id", {
53
+ * text: "text"
54
+ * })
42
55
  */
43
- create(agentId: string, requestOptions?: ArchivalMemory.RequestOptions): Promise<void>;
56
+ create(agentId: string, request: Letta.agents.CreateArchivalMemory, requestOptions?: ArchivalMemory.RequestOptions): Promise<Letta.Passage[]>;
44
57
  /**
58
+ * Delete a memory from an agent's archival memory store.
59
+ *
45
60
  * @param {string} agentId
46
61
  * @param {string} memoryId
47
62
  * @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
48
63
  *
64
+ * @throws {@link Letta.UnprocessableEntityError}
65
+ *
49
66
  * @example
50
67
  * await client.agents.archivalMemory.delete("agent_id", "memory_id")
51
68
  */
52
- delete(agentId: string, memoryId: string, requestOptions?: ArchivalMemory.RequestOptions): Promise<void>;
69
+ delete(agentId: string, memoryId: string, requestOptions?: ArchivalMemory.RequestOptions): Promise<unknown>;
53
70
  protected _getCustomAuthorizationHeaders(): Promise<{
54
71
  Authorization: string;
55
72
  }>;
@@ -51,40 +51,76 @@ Object.defineProperty(exports, "__esModule", { value: true });
51
51
  exports.ArchivalMemory = void 0;
52
52
  const environments = __importStar(require("../../../../../../environments"));
53
53
  const core = __importStar(require("../../../../../../core"));
54
+ const Letta = __importStar(require("../../../../../index"));
54
55
  const url_join_1 = __importDefault(require("url-join"));
56
+ const serializers = __importStar(require("../../../../../../serialization/index"));
55
57
  const errors = __importStar(require("../../../../../../errors/index"));
56
58
  class ArchivalMemory {
57
59
  constructor(_options = {}) {
58
60
  this._options = _options;
59
61
  }
60
62
  /**
63
+ * Retrieve the memories in an agent's archival memory store (paginated query).
64
+ *
61
65
  * @param {string} agentId
66
+ * @param {Letta.agents.ArchivalMemoryListRequest} request
62
67
  * @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
63
68
  *
69
+ * @throws {@link Letta.UnprocessableEntityError}
70
+ *
64
71
  * @example
65
72
  * await client.agents.archivalMemory.list("agent_id")
66
73
  */
67
- list(agentId, requestOptions) {
68
- return __awaiter(this, void 0, void 0, function* () {
74
+ list(agentId_1) {
75
+ return __awaiter(this, arguments, void 0, function* (agentId, request = {}, requestOptions) {
69
76
  var _a, _b, _c;
77
+ const { after, before, limit } = request;
78
+ const _queryParams = {};
79
+ if (after != null) {
80
+ _queryParams["after"] = after.toString();
81
+ }
82
+ if (before != null) {
83
+ _queryParams["before"] = before.toString();
84
+ }
85
+ if (limit != null) {
86
+ _queryParams["limit"] = limit.toString();
87
+ }
70
88
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
71
- 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`),
89
+ 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`),
72
90
  method: "GET",
73
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
91
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
74
92
  contentType: "application/json",
93
+ queryParameters: _queryParams,
75
94
  requestType: "json",
76
95
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
77
96
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
78
97
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
79
98
  });
80
99
  if (_response.ok) {
81
- return;
100
+ return serializers.agents.archivalMemory.list.Response.parseOrThrow(_response.body, {
101
+ unrecognizedObjectKeys: "passthrough",
102
+ allowUnrecognizedUnionMembers: true,
103
+ allowUnrecognizedEnumValues: true,
104
+ skipValidation: true,
105
+ breadcrumbsPrefix: ["response"],
106
+ });
82
107
  }
83
108
  if (_response.error.reason === "status-code") {
84
- throw new errors.LettaError({
85
- statusCode: _response.error.statusCode,
86
- body: _response.error.body,
87
- });
109
+ switch (_response.error.statusCode) {
110
+ case 422:
111
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
112
+ unrecognizedObjectKeys: "passthrough",
113
+ allowUnrecognizedUnionMembers: true,
114
+ allowUnrecognizedEnumValues: true,
115
+ skipValidation: true,
116
+ breadcrumbsPrefix: ["response"],
117
+ }));
118
+ default:
119
+ throw new errors.LettaError({
120
+ statusCode: _response.error.statusCode,
121
+ body: _response.error.body,
122
+ });
123
+ }
88
124
  }
89
125
  switch (_response.error.reason) {
90
126
  case "non-json":
@@ -93,7 +129,7 @@ class ArchivalMemory {
93
129
  body: _response.error.rawBody,
94
130
  });
95
131
  case "timeout":
96
- throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/archival_memory.");
132
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/archival-memory.");
97
133
  case "unknown":
98
134
  throw new errors.LettaError({
99
135
  message: _response.error.errorMessage,
@@ -102,33 +138,58 @@ class ArchivalMemory {
102
138
  });
103
139
  }
104
140
  /**
141
+ * Insert a memory into an agent's archival memory store.
142
+ *
105
143
  * @param {string} agentId
144
+ * @param {Letta.agents.CreateArchivalMemory} request
106
145
  * @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
107
146
  *
147
+ * @throws {@link Letta.UnprocessableEntityError}
148
+ *
108
149
  * @example
109
- * await client.agents.archivalMemory.create("agent_id")
150
+ * await client.agents.archivalMemory.create("agent_id", {
151
+ * text: "text"
152
+ * })
110
153
  */
111
- create(agentId, requestOptions) {
154
+ create(agentId, request, requestOptions) {
112
155
  return __awaiter(this, void 0, void 0, function* () {
113
156
  var _a, _b, _c;
114
157
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
115
- 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`),
158
+ 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`),
116
159
  method: "POST",
117
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
160
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
118
161
  contentType: "application/json",
119
162
  requestType: "json",
163
+ body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
120
164
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
121
165
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
122
166
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
123
167
  });
124
168
  if (_response.ok) {
125
- return;
169
+ return serializers.agents.archivalMemory.create.Response.parseOrThrow(_response.body, {
170
+ unrecognizedObjectKeys: "passthrough",
171
+ allowUnrecognizedUnionMembers: true,
172
+ allowUnrecognizedEnumValues: true,
173
+ skipValidation: true,
174
+ breadcrumbsPrefix: ["response"],
175
+ });
126
176
  }
127
177
  if (_response.error.reason === "status-code") {
128
- throw new errors.LettaError({
129
- statusCode: _response.error.statusCode,
130
- body: _response.error.body,
131
- });
178
+ switch (_response.error.statusCode) {
179
+ case 422:
180
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
181
+ unrecognizedObjectKeys: "passthrough",
182
+ allowUnrecognizedUnionMembers: true,
183
+ allowUnrecognizedEnumValues: true,
184
+ skipValidation: true,
185
+ breadcrumbsPrefix: ["response"],
186
+ }));
187
+ default:
188
+ throw new errors.LettaError({
189
+ statusCode: _response.error.statusCode,
190
+ body: _response.error.body,
191
+ });
192
+ }
132
193
  }
133
194
  switch (_response.error.reason) {
134
195
  case "non-json":
@@ -137,7 +198,7 @@ class ArchivalMemory {
137
198
  body: _response.error.rawBody,
138
199
  });
139
200
  case "timeout":
140
- throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/archival_memory.");
201
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/archival-memory.");
141
202
  case "unknown":
142
203
  throw new errors.LettaError({
143
204
  message: _response.error.errorMessage,
@@ -146,10 +207,14 @@ class ArchivalMemory {
146
207
  });
147
208
  }
148
209
  /**
210
+ * Delete a memory from an agent's archival memory store.
211
+ *
149
212
  * @param {string} agentId
150
213
  * @param {string} memoryId
151
214
  * @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
152
215
  *
216
+ * @throws {@link Letta.UnprocessableEntityError}
217
+ *
153
218
  * @example
154
219
  * await client.agents.archivalMemory.delete("agent_id", "memory_id")
155
220
  */
@@ -157,9 +222,9 @@ class ArchivalMemory {
157
222
  return __awaiter(this, void 0, void 0, function* () {
158
223
  var _a, _b, _c;
159
224
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
160
- 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)}`),
225
+ 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)}`),
161
226
  method: "DELETE",
162
- headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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),
227
+ headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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),
163
228
  contentType: "application/json",
164
229
  requestType: "json",
165
230
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
@@ -167,13 +232,24 @@ class ArchivalMemory {
167
232
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
168
233
  });
169
234
  if (_response.ok) {
170
- return;
235
+ return _response.body;
171
236
  }
172
237
  if (_response.error.reason === "status-code") {
173
- throw new errors.LettaError({
174
- statusCode: _response.error.statusCode,
175
- body: _response.error.body,
176
- });
238
+ switch (_response.error.statusCode) {
239
+ case 422:
240
+ throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
241
+ unrecognizedObjectKeys: "passthrough",
242
+ allowUnrecognizedUnionMembers: true,
243
+ allowUnrecognizedEnumValues: true,
244
+ skipValidation: true,
245
+ breadcrumbsPrefix: ["response"],
246
+ }));
247
+ default:
248
+ throw new errors.LettaError({
249
+ statusCode: _response.error.statusCode,
250
+ body: _response.error.body,
251
+ });
252
+ }
177
253
  }
178
254
  switch (_response.error.reason) {
179
255
  case "non-json":
@@ -182,7 +258,7 @@ class ArchivalMemory {
182
258
  body: _response.error.rawBody,
183
259
  });
184
260
  case "timeout":
185
- throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/agents/{agent_id}/archival_memory/{memory_id}.");
261
+ throw new errors.LettaTimeoutError("Timeout exceeded when calling DELETE /v1/agents/{agent_id}/archival-memory/{memory_id}.");
186
262
  case "unknown":
187
263
  throw new errors.LettaError({
188
264
  message: _response.error.errorMessage,
@@ -1 +1 @@
1
- export {};
1
+ export * from "./requests";
@@ -1,2 +1,17 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -5,7 +5,7 @@
5
5
  * @example
6
6
  * {}
7
7
  */
8
- export interface ListArchivalMemoryRequest {
8
+ export interface ArchivalMemoryListRequest {
9
9
  /**
10
10
  * Unique ID of the memory to start the query range at.
11
11
  */
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { type ArchivalMemoryListRequest } from "./ArchivalMemoryListRequest";
2
+ export { type CreateArchivalMemory } from "./CreateArchivalMemory";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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.14", "User-Agent": "@letta-ai/letta-client/0.1.14", "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.15", "User-Agent": "@letta-ai/letta-client/0.1.15", "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,
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import * as environments from "../../../../../../environments";
5
5
  import * as core from "../../../../../../core";
6
+ import * as Letta from "../../../../../index";
6
7
  export declare namespace CoreMemory {
7
8
  interface Options {
8
9
  environment?: core.Supplier<environments.LettaEnvironment | string>;
@@ -26,57 +27,83 @@ export declare class CoreMemory {
26
27
  protected readonly _options: CoreMemory.Options;
27
28
  constructor(_options?: CoreMemory.Options);
28
29
  /**
30
+ * Retrieve the memory state of a specific agent.
31
+ * This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
32
+ *
29
33
  * @param {string} agentId
30
34
  * @param {CoreMemory.RequestOptions} requestOptions - Request-specific configuration.
31
35
  *
36
+ * @throws {@link Letta.UnprocessableEntityError}
37
+ *
32
38
  * @example
33
39
  * await client.agents.coreMemory.retrieve("agent_id")
34
40
  */
35
- retrieve(agentId: string, requestOptions?: CoreMemory.RequestOptions): Promise<void>;
41
+ retrieve(agentId: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.Memory>;
36
42
  /**
43
+ * Retrieve a memory block from an agent.
44
+ *
37
45
  * @param {string} agentId
46
+ * @param {string} blockLabel
38
47
  * @param {CoreMemory.RequestOptions} requestOptions - Request-specific configuration.
39
48
  *
49
+ * @throws {@link Letta.UnprocessableEntityError}
50
+ *
40
51
  * @example
41
- * await client.agents.coreMemory.listBlocks("agent_id")
52
+ * await client.agents.coreMemory.retrieveBlock("agent_id", "block_label")
42
53
  */
43
- listBlocks(agentId: string, requestOptions?: CoreMemory.RequestOptions): Promise<void>;
54
+ retrieveBlock(agentId: string, blockLabel: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.Block>;
44
55
  /**
56
+ * Updates a memory block of an agent.
57
+ *
45
58
  * @param {string} agentId
46
- * @param {string} blockId
59
+ * @param {string} blockLabel
60
+ * @param {Letta.BlockUpdate} request
47
61
  * @param {CoreMemory.RequestOptions} requestOptions - Request-specific configuration.
48
62
  *
63
+ * @throws {@link Letta.UnprocessableEntityError}
64
+ *
49
65
  * @example
50
- * await client.agents.coreMemory.attachBlock("agent_id", "block_id")
66
+ * await client.agents.coreMemory.modifyBlock("agent_id", "block_label", {})
51
67
  */
52
- attachBlock(agentId: string, blockId: string, requestOptions?: CoreMemory.RequestOptions): Promise<void>;
68
+ modifyBlock(agentId: string, blockLabel: string, request: Letta.BlockUpdate, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.Block>;
53
69
  /**
70
+ * Retrieve the memory blocks of a specific agent.
71
+ *
54
72
  * @param {string} agentId
55
- * @param {string} blockId
56
73
  * @param {CoreMemory.RequestOptions} requestOptions - Request-specific configuration.
57
74
  *
75
+ * @throws {@link Letta.UnprocessableEntityError}
76
+ *
58
77
  * @example
59
- * await client.agents.coreMemory.detachBlock("agent_id", "block_id")
78
+ * await client.agents.coreMemory.listBlocks("agent_id")
60
79
  */
61
- detachBlock(agentId: string, blockId: string, requestOptions?: CoreMemory.RequestOptions): Promise<void>;
80
+ listBlocks(agentId: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.Block[]>;
62
81
  /**
82
+ * Attach a block to an agent.
83
+ *
63
84
  * @param {string} agentId
64
- * @param {string} blockLabel
85
+ * @param {string} blockId
65
86
  * @param {CoreMemory.RequestOptions} requestOptions - Request-specific configuration.
66
87
  *
88
+ * @throws {@link Letta.UnprocessableEntityError}
89
+ *
67
90
  * @example
68
- * await client.agents.coreMemory.retrieveBlock("agent_id", "block_label")
91
+ * await client.agents.coreMemory.attachBlock("agent_id", "block_id")
69
92
  */
70
- retrieveBlock(agentId: string, blockLabel: string, requestOptions?: CoreMemory.RequestOptions): Promise<void>;
93
+ attachBlock(agentId: string, blockId: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.AgentState>;
71
94
  /**
95
+ * Detach a block from an agent.
96
+ *
72
97
  * @param {string} agentId
73
- * @param {string} blockLabel
98
+ * @param {string} blockId
74
99
  * @param {CoreMemory.RequestOptions} requestOptions - Request-specific configuration.
75
100
  *
101
+ * @throws {@link Letta.UnprocessableEntityError}
102
+ *
76
103
  * @example
77
- * await client.agents.coreMemory.modifyBlock("agent_id", "block_label")
104
+ * await client.agents.coreMemory.detachBlock("agent_id", "block_id")
78
105
  */
79
- modifyBlock(agentId: string, blockLabel: string, requestOptions?: CoreMemory.RequestOptions): Promise<void>;
106
+ detachBlock(agentId: string, blockId: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.AgentState>;
80
107
  protected _getCustomAuthorizationHeaders(): Promise<{
81
108
  Authorization: string;
82
109
  }>;