@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.
- package/api/resources/agents/client/Client.d.ts +6 -125
- package/api/resources/agents/client/Client.js +22 -626
- package/api/resources/agents/client/requests/index.d.ts +0 -2
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +21 -4
- package/api/resources/agents/resources/archivalMemory/client/Client.js +104 -28
- package/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
- package/api/resources/agents/resources/archivalMemory/client/index.js +15 -0
- package/api/resources/agents/{client/requests/ListArchivalMemoryRequest.d.ts → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts} +1 -1
- package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +42 -15
- package/api/resources/agents/resources/coreMemory/client/Client.js +195 -64
- package/api/resources/agents/resources/index.d.ts +1 -0
- package/api/resources/agents/resources/index.js +1 -0
- package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
- package/api/resources/agents/resources/messages/client/Client.js +7 -7
- package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -1
- package/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
- package/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +8 -0
- package/api/resources/agents/resources/messages/types/index.d.ts +1 -0
- package/api/resources/agents/resources/messages/types/index.js +1 -0
- package/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/blocks/client/Client.d.ts +13 -0
- package/api/resources/blocks/client/Client.js +71 -5
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/providers/client/Client.js +4 -4
- package/api/resources/runs/client/Client.js +6 -6
- package/api/resources/sources/client/Client.js +6 -6
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/tag/client/Client.js +1 -1
- package/api/resources/tools/client/Client.js +11 -11
- package/api/types/AssistantMessage.d.ts +2 -1
- package/api/types/AssistantMessageContent.d.ts +5 -0
- package/api/types/LlmConfig.d.ts +3 -0
- package/api/types/Message.d.ts +2 -2
- package/api/types/MessageCreate.d.ts +2 -2
- package/api/types/MessageCreateContent.d.ts +8 -0
- package/api/types/MessageCreateContent.js +5 -0
- package/api/types/SystemMessage.d.ts +3 -2
- package/api/types/SystemMessageContent.d.ts +5 -0
- package/api/types/SystemMessageContent.js +5 -0
- package/api/types/TextContent.d.ts +8 -0
- package/api/types/TextContent.js +5 -0
- package/api/types/UserMessage.d.ts +3 -2
- package/api/types/UserMessageContent.d.ts +5 -0
- package/api/types/UserMessageContent.js +5 -0
- package/api/types/index.d.ts +5 -0
- package/api/types/index.js +5 -0
- package/dist/api/resources/agents/client/Client.d.ts +6 -125
- package/dist/api/resources/agents/client/Client.js +22 -626
- package/dist/api/resources/agents/client/requests/index.d.ts +0 -2
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +21 -4
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +104 -28
- package/dist/api/resources/agents/resources/archivalMemory/client/index.d.ts +1 -1
- package/dist/api/resources/agents/resources/archivalMemory/client/index.js +15 -0
- package/dist/api/resources/agents/{client/requests/ListArchivalMemoryRequest.d.ts → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts} +1 -1
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js +5 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.js +5 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.js +2 -0
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +42 -15
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +195 -64
- package/dist/api/resources/agents/resources/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/index.js +1 -0
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +2 -2
- package/dist/api/resources/agents/resources/messages/client/Client.js +7 -7
- package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -2
- package/dist/api/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +8 -0
- package/dist/api/resources/agents/resources/messages/types/MessageUpdateContent.js +5 -0
- package/dist/api/resources/agents/resources/messages/types/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/messages/types/index.js +1 -0
- package/dist/api/resources/agents/resources/sources/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/templates/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/blocks/client/Client.d.ts +13 -0
- package/dist/api/resources/blocks/client/Client.js +71 -5
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.js +4 -4
- package/dist/api/resources/runs/client/Client.js +6 -6
- package/dist/api/resources/sources/client/Client.js +6 -6
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/tag/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.js +11 -11
- package/dist/api/types/AssistantMessage.d.ts +2 -1
- package/dist/api/types/AssistantMessageContent.d.ts +5 -0
- package/dist/api/types/AssistantMessageContent.js +5 -0
- package/dist/api/types/LlmConfig.d.ts +3 -0
- package/dist/api/types/Message.d.ts +2 -2
- package/dist/api/types/MessageCreate.d.ts +2 -2
- package/dist/api/types/MessageCreateContent.d.ts +8 -0
- package/dist/api/types/MessageCreateContent.js +5 -0
- package/dist/api/types/SystemMessage.d.ts +3 -2
- package/dist/api/types/SystemMessageContent.d.ts +5 -0
- package/dist/api/types/SystemMessageContent.js +5 -0
- package/dist/api/types/TextContent.d.ts +8 -0
- package/dist/api/types/TextContent.js +5 -0
- package/dist/api/types/UserMessage.d.ts +3 -2
- package/dist/api/types/UserMessageContent.d.ts +5 -0
- package/dist/api/types/UserMessageContent.js +5 -0
- package/dist/api/types/index.d.ts +5 -0
- package/dist/api/types/index.js +5 -0
- package/dist/serialization/resources/agents/client/index.d.ts +0 -3
- package/dist/serialization/resources/agents/client/index.js +1 -4
- package/dist/serialization/resources/agents/client/requests/index.d.ts +0 -1
- package/dist/serialization/resources/agents/client/requests/index.js +1 -3
- package/dist/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +11 -0
- package/dist/serialization/resources/agents/{client/createArchivalMemory.js → resources/archivalMemory/client/create.js} +2 -2
- package/dist/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +3 -0
- package/dist/serialization/resources/agents/resources/archivalMemory/client/index.js +42 -0
- package/dist/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +11 -0
- package/dist/serialization/resources/agents/{client/listArchivalMemory.js → resources/archivalMemory/client/list.js} +2 -2
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +12 -0
- package/{serialization/resources/agents → dist/serialization/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +1 -1
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +5 -0
- package/dist/serialization/resources/agents/resources/archivalMemory/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/archivalMemory/index.js +17 -0
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +37 -0
- package/dist/serialization/resources/agents/resources/coreMemory/client/listBlocks.d.ts +11 -0
- package/{serialization/resources/agents/client/listCoreMemoryBlocks.js → dist/serialization/resources/agents/resources/coreMemory/client/listBlocks.js} +2 -2
- package/dist/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/coreMemory/index.js +17 -0
- package/dist/serialization/resources/agents/resources/index.d.ts +3 -0
- package/dist/serialization/resources/agents/resources/index.js +4 -1
- package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -1
- package/dist/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -1
- package/dist/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +11 -0
- package/dist/serialization/resources/agents/resources/messages/types/MessageUpdateContent.js +42 -0
- package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/messages/types/index.js +1 -0
- package/dist/serialization/resources/blocks/client/index.d.ts +1 -0
- package/dist/serialization/resources/blocks/client/index.js +2 -1
- package/dist/serialization/resources/{agents/client/createArchivalMemory.d.ts → blocks/client/listAgentsForBlock.d.ts} +3 -3
- package/dist/serialization/resources/blocks/client/listAgentsForBlock.js +42 -0
- package/dist/serialization/types/AssistantMessage.d.ts +2 -1
- package/dist/serialization/types/AssistantMessage.js +2 -1
- package/dist/serialization/types/AssistantMessageContent.d.ts +11 -0
- package/dist/serialization/types/AssistantMessageContent.js +42 -0
- package/dist/serialization/types/LlmConfig.d.ts +1 -0
- package/dist/serialization/types/LlmConfig.js +1 -0
- package/dist/serialization/types/Message.d.ts +2 -1
- package/dist/serialization/types/Message.js +2 -1
- package/dist/serialization/types/MessageCreate.d.ts +2 -1
- package/dist/serialization/types/MessageCreate.js +2 -1
- package/dist/serialization/types/MessageCreateContent.d.ts +11 -0
- package/dist/serialization/types/MessageCreateContent.js +42 -0
- package/dist/serialization/types/SystemMessage.d.ts +2 -1
- package/dist/serialization/types/SystemMessage.js +2 -1
- package/dist/serialization/types/SystemMessageContent.d.ts +11 -0
- package/dist/serialization/types/SystemMessageContent.js +42 -0
- package/dist/serialization/types/TextContent.d.ts +13 -0
- package/dist/serialization/types/TextContent.js +44 -0
- package/dist/serialization/types/UserMessage.d.ts +2 -1
- package/dist/serialization/types/UserMessage.js +2 -1
- package/dist/serialization/types/UserMessageContent.d.ts +11 -0
- package/dist/serialization/types/UserMessageContent.js +42 -0
- package/dist/serialization/types/index.d.ts +5 -0
- package/dist/serialization/types/index.js +5 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +487 -895
- package/serialization/resources/agents/client/index.d.ts +0 -3
- package/serialization/resources/agents/client/index.js +1 -4
- package/serialization/resources/agents/client/requests/index.d.ts +0 -1
- package/serialization/resources/agents/client/requests/index.js +1 -3
- package/serialization/resources/agents/resources/archivalMemory/client/create.d.ts +11 -0
- package/serialization/resources/agents/{client/listArchivalMemory.js → resources/archivalMemory/client/create.js} +2 -2
- package/serialization/resources/agents/resources/archivalMemory/client/index.d.ts +3 -0
- package/serialization/resources/agents/resources/archivalMemory/client/index.js +42 -0
- package/serialization/resources/agents/resources/archivalMemory/client/list.d.ts +11 -0
- package/serialization/resources/agents/{client/createArchivalMemory.js → resources/archivalMemory/client/list.js} +2 -2
- package/serialization/resources/agents/resources/archivalMemory/client/requests/CreateArchivalMemory.d.ts +12 -0
- package/{dist/serialization/resources/agents → serialization/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +1 -1
- package/serialization/resources/agents/resources/archivalMemory/client/requests/index.d.ts +1 -0
- package/serialization/resources/agents/resources/archivalMemory/client/requests/index.js +5 -0
- package/serialization/resources/agents/resources/archivalMemory/index.d.ts +1 -0
- package/serialization/resources/agents/resources/archivalMemory/index.js +17 -0
- package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -0
- package/serialization/resources/agents/resources/coreMemory/client/index.js +37 -0
- package/serialization/resources/agents/resources/coreMemory/client/listBlocks.d.ts +11 -0
- package/{dist/serialization/resources/agents/client/listCoreMemoryBlocks.js → serialization/resources/agents/resources/coreMemory/client/listBlocks.js} +2 -2
- package/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
- package/serialization/resources/agents/resources/coreMemory/index.js +17 -0
- package/serialization/resources/agents/resources/index.d.ts +3 -0
- package/serialization/resources/agents/resources/index.js +4 -1
- package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.d.ts +2 -1
- package/serialization/resources/agents/resources/messages/client/requests/MessageUpdate.js +2 -1
- package/serialization/resources/agents/resources/messages/types/MessageUpdateContent.d.ts +11 -0
- package/serialization/resources/agents/resources/messages/types/MessageUpdateContent.js +42 -0
- package/serialization/resources/agents/resources/messages/types/index.d.ts +1 -0
- package/serialization/resources/agents/resources/messages/types/index.js +1 -0
- package/serialization/resources/blocks/client/index.d.ts +1 -0
- package/serialization/resources/blocks/client/index.js +2 -1
- package/{dist/serialization/resources/agents/client/listArchivalMemory.d.ts → serialization/resources/blocks/client/listAgentsForBlock.d.ts} +3 -3
- package/serialization/resources/blocks/client/listAgentsForBlock.js +42 -0
- package/serialization/types/AssistantMessage.d.ts +2 -1
- package/serialization/types/AssistantMessage.js +2 -1
- package/serialization/types/AssistantMessageContent.d.ts +11 -0
- package/serialization/types/AssistantMessageContent.js +42 -0
- package/serialization/types/LlmConfig.d.ts +1 -0
- package/serialization/types/LlmConfig.js +1 -0
- package/serialization/types/Message.d.ts +2 -1
- package/serialization/types/Message.js +2 -1
- package/serialization/types/MessageCreate.d.ts +2 -1
- package/serialization/types/MessageCreate.js +2 -1
- package/serialization/types/MessageCreateContent.d.ts +11 -0
- package/serialization/types/MessageCreateContent.js +42 -0
- package/serialization/types/SystemMessage.d.ts +2 -1
- package/serialization/types/SystemMessage.js +2 -1
- package/serialization/types/SystemMessageContent.d.ts +11 -0
- package/serialization/types/SystemMessageContent.js +42 -0
- package/serialization/types/TextContent.d.ts +13 -0
- package/serialization/types/TextContent.js +44 -0
- package/serialization/types/UserMessage.d.ts +2 -1
- package/serialization/types/UserMessage.js +2 -1
- package/serialization/types/UserMessageContent.d.ts +11 -0
- package/serialization/types/UserMessageContent.js +42 -0
- package/serialization/types/index.d.ts +5 -0
- package/serialization/types/index.js +5 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/dist/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +0 -11
- package/dist/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +0 -12
- package/serialization/resources/agents/client/createArchivalMemory.d.ts +0 -11
- package/serialization/resources/agents/client/listArchivalMemory.d.ts +0 -11
- package/serialization/resources/agents/client/listCoreMemoryBlocks.d.ts +0 -11
- package/serialization/resources/agents/client/requests/CreateArchivalMemory.d.ts +0 -12
- /package/api/resources/agents/{client/requests/CreateArchivalMemory.js → resources/archivalMemory/client/requests/ArchivalMemoryListRequest.js} +0 -0
- /package/api/resources/agents/{client → resources/archivalMemory/client}/requests/CreateArchivalMemory.d.ts +0 -0
- /package/{dist/api/resources/agents → api/resources/agents/resources/archivalMemory}/client/requests/CreateArchivalMemory.js +0 -0
- /package/api/resources/agents/{client/requests/ListArchivalMemoryRequest.js → resources/messages/types/MessageUpdateContent.js} +0 -0
- /package/{dist/api/resources/agents/client/requests/ListArchivalMemoryRequest.js → api/types/AssistantMessageContent.js} +0 -0
- /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<
|
|
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<
|
|
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<
|
|
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(
|
|
68
|
-
return __awaiter(this,
|
|
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)}/
|
|
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.
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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}/
|
|
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)}/
|
|
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.
|
|
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
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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}/
|
|
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)}/
|
|
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.
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
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}/
|
|
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);
|
|
@@ -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.
|
|
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<
|
|
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.
|
|
52
|
+
* await client.agents.coreMemory.retrieveBlock("agent_id", "block_label")
|
|
42
53
|
*/
|
|
43
|
-
|
|
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}
|
|
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.
|
|
66
|
+
* await client.agents.coreMemory.modifyBlock("agent_id", "block_label", {})
|
|
51
67
|
*/
|
|
52
|
-
|
|
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.
|
|
78
|
+
* await client.agents.coreMemory.listBlocks("agent_id")
|
|
60
79
|
*/
|
|
61
|
-
|
|
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}
|
|
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.
|
|
91
|
+
* await client.agents.coreMemory.attachBlock("agent_id", "block_id")
|
|
69
92
|
*/
|
|
70
|
-
|
|
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}
|
|
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.
|
|
104
|
+
* await client.agents.coreMemory.detachBlock("agent_id", "block_id")
|
|
78
105
|
*/
|
|
79
|
-
|
|
106
|
+
detachBlock(agentId: string, blockId: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.AgentState>;
|
|
80
107
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
81
108
|
Authorization: string;
|
|
82
109
|
}>;
|