@letta-ai/letta-client 0.1.9 → 0.1.12
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 +1 -4
- package/api/resources/agents/client/Client.js +21 -23
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +5 -3
- package/api/resources/agents/resources/archivalMemory/client/Client.d.ts +0 -12
- package/api/resources/agents/resources/archivalMemory/client/Client.js +9 -74
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -14
- package/api/resources/agents/resources/coreMemory/client/Client.js +21 -86
- package/api/resources/agents/resources/index.d.ts +0 -1
- package/api/resources/agents/resources/index.js +1 -2
- package/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/api/resources/agents/resources/messages/client/Client.d.ts +3 -3
- package/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/api/resources/agents/resources/messages/types/index.js +0 -1
- package/api/resources/agents/resources/sources/client/Client.js +1 -1
- 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/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/api/resources/agents/types/index.d.ts +1 -0
- package/api/resources/agents/types/index.js +1 -0
- package/api/resources/blocks/client/Client.js +7 -7
- 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.d.ts +11 -11
- package/api/resources/providers/client/Client.js +32 -32
- package/api/resources/providers/client/requests/index.d.ts +1 -1
- package/api/resources/runs/client/Client.d.ts +6 -8
- package/api/resources/runs/client/Client.js +12 -37
- package/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/api/resources/sources/client/Client.js +8 -8
- 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.d.ts +0 -12
- package/api/resources/tools/client/Client.js +11 -76
- package/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/{dist/api/types/LettaResponseMessagesItem.d.ts → api/types/LettaMessageUnion.d.ts} +2 -2
- package/api/types/LettaRequest.d.ts +2 -6
- package/api/types/LettaRequestConfig.d.ts +11 -0
- package/api/types/LettaResponse.d.ts +1 -1
- package/api/types/LettaSchemasMessageMessage.d.ts +2 -0
- package/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/api/types/LlmConfigModelEndpointType.js +1 -0
- package/api/types/Run.d.ts +2 -0
- package/api/types/ToolType.d.ts +2 -1
- package/api/types/ToolType.js +1 -0
- package/api/types/index.d.ts +2 -3
- package/api/types/index.js +2 -3
- package/dist/api/resources/agents/client/Client.d.ts +1 -4
- package/dist/api/resources/agents/client/Client.js +21 -23
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +5 -1
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +5 -3
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.d.ts +0 -12
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +9 -74
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +2 -14
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +21 -86
- package/dist/api/resources/agents/resources/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/index.js +1 -2
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +3 -3
- package/dist/api/resources/agents/resources/messages/client/Client.d.ts +3 -3
- package/dist/api/resources/agents/resources/messages/client/Client.js +8 -8
- package/dist/api/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -6
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponse.d.ts +1 -1
- package/dist/api/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
- 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/agents/types/AgentsSearchRequestSearchItem.d.ts +4 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +7 -0
- package/dist/api/resources/agents/types/index.d.ts +1 -0
- package/dist/api/resources/agents/types/index.js +1 -0
- package/dist/api/resources/blocks/client/Client.js +7 -7
- 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.d.ts +11 -11
- package/dist/api/resources/providers/client/Client.js +32 -32
- package/dist/api/resources/providers/client/requests/index.d.ts +1 -1
- package/dist/api/resources/runs/client/Client.d.ts +6 -8
- package/dist/api/resources/runs/client/Client.js +12 -37
- package/dist/api/resources/runs/client/requests/GetRunMessagesRequest.d.ts +1 -25
- package/dist/api/resources/sources/client/Client.js +8 -8
- 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.d.ts +0 -12
- package/dist/api/resources/tools/client/Client.js +11 -76
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.d.ts +2 -1
- package/dist/api/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/{api/types/LettaResponseMessagesItem.d.ts → dist/api/types/LettaMessageUnion.d.ts} +2 -2
- package/dist/api/types/LettaRequest.d.ts +2 -6
- package/dist/api/types/LettaRequestConfig.d.ts +11 -0
- package/dist/api/types/LettaResponse.d.ts +1 -1
- package/dist/api/types/LettaSchemasMessageMessage.d.ts +2 -0
- package/dist/api/types/LlmConfigModelEndpointType.d.ts +2 -1
- package/dist/api/types/LlmConfigModelEndpointType.js +1 -0
- package/dist/api/types/Run.d.ts +2 -0
- package/dist/api/types/ToolType.d.ts +2 -1
- package/dist/api/types/ToolType.js +1 -0
- package/dist/api/types/index.d.ts +2 -3
- package/dist/api/types/index.js +2 -3
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -4
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -2
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.js +2 -3
- package/dist/serialization/resources/agents/resources/coreMemory/client/{getBlocks.d.ts → list.d.ts} +1 -1
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/dist/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +2 -3
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
- package/dist/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +2 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/{serialization/resources/tools/client/getByName.js → dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +5 -2
- package/dist/serialization/resources/agents/types/index.d.ts +1 -0
- package/dist/serialization/resources/agents/types/index.js +1 -0
- package/dist/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/dist/serialization/resources/runs/client/getRunMessages.js +2 -2
- package/dist/serialization/resources/tools/client/index.d.ts +0 -1
- package/dist/serialization/resources/tools/client/index.js +1 -2
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/dist/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/dist/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/dist/serialization/types/{LettaResponseMessagesItem.js → LettaMessageUnion.js} +2 -2
- package/dist/serialization/types/LettaRequest.d.ts +2 -3
- package/dist/serialization/types/LettaRequest.js +2 -3
- package/dist/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/dist/serialization/types/{RecallMemorySummary.js → LettaRequestConfig.js} +5 -3
- package/dist/serialization/types/LettaResponse.d.ts +2 -2
- package/dist/serialization/types/LettaResponse.js +2 -2
- package/dist/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/dist/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/dist/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/dist/serialization/types/LlmConfigModelEndpointType.js +1 -0
- package/dist/serialization/types/Run.d.ts +2 -0
- package/dist/serialization/types/Run.js +2 -0
- package/dist/serialization/types/ToolType.d.ts +1 -1
- package/dist/serialization/types/ToolType.js +1 -0
- package/dist/serialization/types/index.d.ts +2 -3
- package/dist/serialization/types/index.js +2 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +24 -280
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +3 -2
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +3 -4
- package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +1 -2
- package/serialization/resources/agents/resources/coreMemory/client/index.js +2 -3
- package/serialization/resources/agents/resources/coreMemory/client/{getBlocks.d.ts → list.d.ts} +1 -1
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.d.ts +2 -3
- package/serialization/resources/agents/resources/messages/client/requests/LettaStreamingRequest.js +2 -3
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.d.ts +2 -2
- package/serialization/resources/agents/resources/messages/types/MessagesListResponse.js +2 -2
- package/serialization/resources/agents/resources/messages/types/index.d.ts +0 -1
- package/serialization/resources/agents/resources/messages/types/index.js +0 -1
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +5 -1
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +2 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.d.ts +13 -0
- package/{dist/serialization/resources/tools/client/getByName.js → serialization/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +5 -2
- package/serialization/resources/agents/types/index.d.ts +1 -0
- package/serialization/resources/agents/types/index.js +1 -0
- package/serialization/resources/runs/client/getRunMessages.d.ts +3 -3
- package/serialization/resources/runs/client/getRunMessages.js +2 -2
- package/serialization/resources/tools/client/index.d.ts +0 -1
- package/serialization/resources/tools/client/index.js +1 -2
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.d.ts +1 -1
- package/serialization/types/EmbeddingConfigEmbeddingEndpointType.js +1 -0
- package/serialization/types/{LettaResponseMessagesItem.d.ts → LettaMessageUnion.d.ts} +3 -3
- package/serialization/types/{LettaResponseMessagesItem.js → LettaMessageUnion.js} +2 -2
- package/serialization/types/LettaRequest.d.ts +2 -3
- package/serialization/types/LettaRequest.js +2 -3
- package/serialization/types/LettaRequestConfig.d.ts +14 -0
- package/serialization/types/{ArchivalMemorySummary.js → LettaRequestConfig.js} +5 -3
- package/serialization/types/LettaResponse.d.ts +2 -2
- package/serialization/types/LettaResponse.js +2 -2
- package/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/serialization/types/LlmConfigModelEndpointType.d.ts +1 -1
- package/serialization/types/LlmConfigModelEndpointType.js +1 -0
- package/serialization/types/Run.d.ts +2 -0
- package/serialization/types/Run.js +2 -0
- package/serialization/types/ToolType.d.ts +1 -1
- package/serialization/types/ToolType.js +1 -0
- package/serialization/types/index.d.ts +2 -3
- package/serialization/types/index.js +2 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/api/resources/agents/resources/recallMemory/client/Client.d.ts +0 -44
- package/api/resources/agents/resources/recallMemory/client/Client.js +0 -134
- package/api/resources/agents/resources/recallMemory/client/index.d.ts +0 -1
- package/api/resources/agents/resources/recallMemory/client/index.js +0 -2
- package/api/resources/agents/resources/recallMemory/index.d.ts +0 -1
- package/api/resources/agents/resources/recallMemory/index.js +0 -17
- package/api/types/ArchivalMemorySummary.d.ts +0 -7
- package/api/types/RecallMemorySummary.d.ts +0 -7
- package/dist/api/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -25
- package/dist/api/resources/agents/resources/recallMemory/client/Client.d.ts +0 -44
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +0 -134
- package/dist/api/resources/agents/resources/recallMemory/client/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/recallMemory/client/index.js +0 -2
- package/dist/api/resources/agents/resources/recallMemory/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/recallMemory/index.js +0 -17
- package/dist/api/types/ArchivalMemorySummary.d.ts +0 -7
- package/dist/api/types/LettaResponseMessagesItem.js +0 -5
- package/dist/api/types/RecallMemorySummary.d.ts +0 -7
- package/dist/api/types/RecallMemorySummary.js +0 -5
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +0 -11
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.js +0 -42
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/dist/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -59
- package/dist/serialization/resources/tools/client/getByName.d.ts +0 -9
- package/dist/serialization/types/ArchivalMemorySummary.d.ts +0 -12
- package/dist/serialization/types/ArchivalMemorySummary.js +0 -43
- package/dist/serialization/types/RecallMemorySummary.d.ts +0 -12
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +0 -11
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.js +0 -42
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.d.ts +0 -34
- package/serialization/resources/agents/resources/messages/types/MessagesListResponseItem.js +0 -59
- package/serialization/resources/tools/client/getByName.d.ts +0 -9
- package/serialization/types/ArchivalMemorySummary.d.ts +0 -12
- package/serialization/types/RecallMemorySummary.d.ts +0 -12
- package/serialization/types/RecallMemorySummary.js +0 -43
- /package/api/resources/agents/{resources/messages/types/MessagesListResponseItem.js → types/AgentsSearchRequestSearchItemTags.js} +0 -0
- /package/api/types/{ArchivalMemorySummary.js → LettaMessageUnion.js} +0 -0
- /package/api/types/{LettaResponseMessagesItem.js → LettaRequestConfig.js} +0 -0
- /package/{api/types/RecallMemorySummary.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemTags.js} +0 -0
- /package/dist/api/{resources/agents/resources/messages/types/MessagesListResponseItem.js → types/LettaMessageUnion.js} +0 -0
- /package/dist/api/types/{ArchivalMemorySummary.js → LettaRequestConfig.js} +0 -0
- /package/dist/serialization/resources/agents/resources/coreMemory/client/{getBlocks.js → list.js} +0 -0
- /package/serialization/resources/agents/resources/coreMemory/client/{getBlocks.js → list.js} +0 -0
|
@@ -8,7 +8,6 @@ import { Context } from "../resources/context/client/Client";
|
|
|
8
8
|
import { Tools } from "../resources/tools/client/Client";
|
|
9
9
|
import { Sources } from "../resources/sources/client/Client";
|
|
10
10
|
import { CoreMemory } from "../resources/coreMemory/client/Client";
|
|
11
|
-
import { RecallMemory } from "../resources/recallMemory/client/Client";
|
|
12
11
|
import { ArchivalMemory } from "../resources/archivalMemory/client/Client";
|
|
13
12
|
import { Messages } from "../resources/messages/client/Client";
|
|
14
13
|
import { Templates } from "../resources/templates/client/Client";
|
|
@@ -38,7 +37,6 @@ export declare class Agents {
|
|
|
38
37
|
protected _tools: Tools | undefined;
|
|
39
38
|
protected _sources: Sources | undefined;
|
|
40
39
|
protected _coreMemory: CoreMemory | undefined;
|
|
41
|
-
protected _recallMemory: RecallMemory | undefined;
|
|
42
40
|
protected _archivalMemory: ArchivalMemory | undefined;
|
|
43
41
|
protected _messages: Messages | undefined;
|
|
44
42
|
protected _templates: Templates | undefined;
|
|
@@ -48,7 +46,6 @@ export declare class Agents {
|
|
|
48
46
|
get tools(): Tools;
|
|
49
47
|
get sources(): Sources;
|
|
50
48
|
get coreMemory(): CoreMemory;
|
|
51
|
-
get recallMemory(): RecallMemory;
|
|
52
49
|
get archivalMemory(): ArchivalMemory;
|
|
53
50
|
get messages(): Messages;
|
|
54
51
|
get templates(): Templates;
|
|
@@ -103,7 +100,7 @@ export declare class Agents {
|
|
|
103
100
|
*/
|
|
104
101
|
delete(agentId: string, requestOptions?: Agents.RequestOptions): Promise<unknown>;
|
|
105
102
|
/**
|
|
106
|
-
* Update an
|
|
103
|
+
* Update an existing agent
|
|
107
104
|
*
|
|
108
105
|
* @param {string} agentId
|
|
109
106
|
* @param {Letta.UpdateAgent} request
|
|
@@ -59,11 +59,10 @@ const Client_1 = require("../resources/context/client/Client");
|
|
|
59
59
|
const Client_2 = require("../resources/tools/client/Client");
|
|
60
60
|
const Client_3 = require("../resources/sources/client/Client");
|
|
61
61
|
const Client_4 = require("../resources/coreMemory/client/Client");
|
|
62
|
-
const Client_5 = require("../resources/
|
|
63
|
-
const Client_6 = require("../resources/
|
|
64
|
-
const Client_7 = require("../resources/
|
|
65
|
-
const Client_8 = require("../resources/
|
|
66
|
-
const Client_9 = require("../resources/memoryVariables/client/Client");
|
|
62
|
+
const Client_5 = require("../resources/archivalMemory/client/Client");
|
|
63
|
+
const Client_6 = require("../resources/messages/client/Client");
|
|
64
|
+
const Client_7 = require("../resources/templates/client/Client");
|
|
65
|
+
const Client_8 = require("../resources/memoryVariables/client/Client");
|
|
67
66
|
class Agents {
|
|
68
67
|
constructor(_options = {}) {
|
|
69
68
|
this._options = _options;
|
|
@@ -84,25 +83,21 @@ class Agents {
|
|
|
84
83
|
var _a;
|
|
85
84
|
return ((_a = this._coreMemory) !== null && _a !== void 0 ? _a : (this._coreMemory = new Client_4.CoreMemory(this._options)));
|
|
86
85
|
}
|
|
87
|
-
get recallMemory() {
|
|
88
|
-
var _a;
|
|
89
|
-
return ((_a = this._recallMemory) !== null && _a !== void 0 ? _a : (this._recallMemory = new Client_5.RecallMemory(this._options)));
|
|
90
|
-
}
|
|
91
86
|
get archivalMemory() {
|
|
92
87
|
var _a;
|
|
93
|
-
return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new
|
|
88
|
+
return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new Client_5.ArchivalMemory(this._options)));
|
|
94
89
|
}
|
|
95
90
|
get messages() {
|
|
96
91
|
var _a;
|
|
97
|
-
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new
|
|
92
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_6.Messages(this._options)));
|
|
98
93
|
}
|
|
99
94
|
get templates() {
|
|
100
95
|
var _a;
|
|
101
|
-
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new
|
|
96
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_7.Templates(this._options)));
|
|
102
97
|
}
|
|
103
98
|
get memoryVariables() {
|
|
104
99
|
var _a;
|
|
105
|
-
return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new
|
|
100
|
+
return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new Client_8.MemoryVariables(this._options)));
|
|
106
101
|
}
|
|
107
102
|
/**
|
|
108
103
|
* List all agents associated with a given user.
|
|
@@ -119,7 +114,7 @@ class Agents {
|
|
|
119
114
|
list() {
|
|
120
115
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
121
116
|
var _a, _b, _c;
|
|
122
|
-
const { name, tags, matchAllTags, cursor, limit } = request;
|
|
117
|
+
const { name, tags, matchAllTags, cursor, limit, queryText } = request;
|
|
123
118
|
const _queryParams = {};
|
|
124
119
|
if (name != null) {
|
|
125
120
|
_queryParams["name"] = name;
|
|
@@ -136,15 +131,18 @@ class Agents {
|
|
|
136
131
|
_queryParams["match_all_tags"] = matchAllTags.toString();
|
|
137
132
|
}
|
|
138
133
|
if (cursor != null) {
|
|
139
|
-
_queryParams["cursor"] = cursor
|
|
134
|
+
_queryParams["cursor"] = cursor;
|
|
140
135
|
}
|
|
141
136
|
if (limit != null) {
|
|
142
137
|
_queryParams["limit"] = limit.toString();
|
|
143
138
|
}
|
|
139
|
+
if (queryText != null) {
|
|
140
|
+
_queryParams["query_text"] = queryText;
|
|
141
|
+
}
|
|
144
142
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
145
143
|
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/"),
|
|
146
144
|
method: "GET",
|
|
147
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
145
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
148
146
|
contentType: "application/json",
|
|
149
147
|
queryParameters: _queryParams,
|
|
150
148
|
requestType: "json",
|
|
@@ -210,7 +208,7 @@ class Agents {
|
|
|
210
208
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
211
209
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
|
|
212
210
|
method: "POST",
|
|
213
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
211
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
214
212
|
contentType: "application/json",
|
|
215
213
|
requestType: "json",
|
|
216
214
|
body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -276,7 +274,7 @@ class Agents {
|
|
|
276
274
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
277
275
|
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)}`),
|
|
278
276
|
method: "GET",
|
|
279
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
277
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
280
278
|
contentType: "application/json",
|
|
281
279
|
requestType: "json",
|
|
282
280
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -341,7 +339,7 @@ class Agents {
|
|
|
341
339
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
342
340
|
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)}`),
|
|
343
341
|
method: "DELETE",
|
|
344
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
342
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
345
343
|
contentType: "application/json",
|
|
346
344
|
requestType: "json",
|
|
347
345
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -384,7 +382,7 @@ class Agents {
|
|
|
384
382
|
});
|
|
385
383
|
}
|
|
386
384
|
/**
|
|
387
|
-
* Update an
|
|
385
|
+
* Update an existing agent
|
|
388
386
|
*
|
|
389
387
|
* @param {string} agentId
|
|
390
388
|
* @param {Letta.UpdateAgent} request
|
|
@@ -401,7 +399,7 @@ class Agents {
|
|
|
401
399
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
402
400
|
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)}`),
|
|
403
401
|
method: "PATCH",
|
|
404
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
402
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
405
403
|
contentType: "application/json",
|
|
406
404
|
requestType: "json",
|
|
407
405
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -473,7 +471,7 @@ class Agents {
|
|
|
473
471
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
474
472
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/reset-messages`),
|
|
475
473
|
method: "PATCH",
|
|
476
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
474
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
477
475
|
contentType: "application/json",
|
|
478
476
|
queryParameters: _queryParams,
|
|
479
477
|
requestType: "json",
|
|
@@ -539,7 +537,7 @@ class Agents {
|
|
|
539
537
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
540
538
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
|
|
541
539
|
method: "POST",
|
|
542
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
540
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
543
541
|
contentType: "application/json",
|
|
544
542
|
requestType: "json",
|
|
545
543
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -33,14 +33,16 @@ export interface CreateAgentRequest {
|
|
|
33
33
|
embeddingConfig?: Letta.EmbeddingConfig;
|
|
34
34
|
/** The initial set of messages to put in the agent's in-context memory. */
|
|
35
35
|
initialMessageSequence?: Letta.MessageCreate[];
|
|
36
|
-
/**
|
|
36
|
+
/** If true, attaches the Letta core tools (e.g. archival_memory and core_memory related functions). */
|
|
37
37
|
includeBaseTools?: boolean;
|
|
38
|
+
/** If true, attaches the Letta multi-agent tools (e.g. sending a message to another agent). */
|
|
39
|
+
includeMultiAgentTools?: boolean;
|
|
38
40
|
/** The description of the agent. */
|
|
39
41
|
description?: string;
|
|
40
42
|
/** The metadata of the agent. */
|
|
41
43
|
metadata?: Record<string, unknown>;
|
|
42
44
|
/** The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config. */
|
|
43
|
-
|
|
45
|
+
model?: string;
|
|
44
46
|
/** The embedding configuration handle used by the agent, specified in the format provider/model-name. */
|
|
45
47
|
embedding?: string;
|
|
46
48
|
/** The context window limit used by the agent. */
|
|
@@ -56,5 +58,5 @@ export interface CreateAgentRequest {
|
|
|
56
58
|
/** The environment variables for tool execution specific to this agent. */
|
|
57
59
|
toolExecEnvironmentVariables?: Record<string, string | undefined>;
|
|
58
60
|
/** The variables that should be set for the agent. */
|
|
59
|
-
|
|
61
|
+
memoryVariables?: Record<string, string | undefined>;
|
|
60
62
|
}
|
|
@@ -26,18 +26,6 @@ export declare namespace ArchivalMemory {
|
|
|
26
26
|
export declare class ArchivalMemory {
|
|
27
27
|
protected readonly _options: ArchivalMemory.Options;
|
|
28
28
|
constructor(_options?: ArchivalMemory.Options);
|
|
29
|
-
/**
|
|
30
|
-
* Retrieve the summary of the archival memory of a specific agent.
|
|
31
|
-
*
|
|
32
|
-
* @param {string} agentId
|
|
33
|
-
* @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
-
*
|
|
35
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* await client.agents.archivalMemory.getSummary("agent_id")
|
|
39
|
-
*/
|
|
40
|
-
getSummary(agentId: string, requestOptions?: ArchivalMemory.RequestOptions): Promise<Letta.ArchivalMemorySummary>;
|
|
41
29
|
/**
|
|
42
30
|
* Retrieve the memories in an agent's archival memory store (paginated query).
|
|
43
31
|
*
|
|
@@ -59,71 +59,6 @@ class ArchivalMemory {
|
|
|
59
59
|
constructor(_options = {}) {
|
|
60
60
|
this._options = _options;
|
|
61
61
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Retrieve the summary of the archival memory of a specific agent.
|
|
64
|
-
*
|
|
65
|
-
* @param {string} agentId
|
|
66
|
-
* @param {ArchivalMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
-
*
|
|
68
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* await client.agents.archivalMemory.getSummary("agent_id")
|
|
72
|
-
*/
|
|
73
|
-
getSummary(agentId, requestOptions) {
|
|
74
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
-
var _a, _b, _c;
|
|
76
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
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)}/memory/archival`),
|
|
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.9", "User-Agent": "@letta-ai/letta-client/0.1.9", "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
|
-
contentType: "application/json",
|
|
81
|
-
requestType: "json",
|
|
82
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
83
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
84
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
85
|
-
});
|
|
86
|
-
if (_response.ok) {
|
|
87
|
-
return serializers.ArchivalMemorySummary.parseOrThrow(_response.body, {
|
|
88
|
-
unrecognizedObjectKeys: "passthrough",
|
|
89
|
-
allowUnrecognizedUnionMembers: true,
|
|
90
|
-
allowUnrecognizedEnumValues: true,
|
|
91
|
-
skipValidation: true,
|
|
92
|
-
breadcrumbsPrefix: ["response"],
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
if (_response.error.reason === "status-code") {
|
|
96
|
-
switch (_response.error.statusCode) {
|
|
97
|
-
case 422:
|
|
98
|
-
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
99
|
-
unrecognizedObjectKeys: "passthrough",
|
|
100
|
-
allowUnrecognizedUnionMembers: true,
|
|
101
|
-
allowUnrecognizedEnumValues: true,
|
|
102
|
-
skipValidation: true,
|
|
103
|
-
breadcrumbsPrefix: ["response"],
|
|
104
|
-
}));
|
|
105
|
-
default:
|
|
106
|
-
throw new errors.LettaError({
|
|
107
|
-
statusCode: _response.error.statusCode,
|
|
108
|
-
body: _response.error.body,
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
switch (_response.error.reason) {
|
|
113
|
-
case "non-json":
|
|
114
|
-
throw new errors.LettaError({
|
|
115
|
-
statusCode: _response.error.statusCode,
|
|
116
|
-
body: _response.error.rawBody,
|
|
117
|
-
});
|
|
118
|
-
case "timeout":
|
|
119
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/archival.");
|
|
120
|
-
case "unknown":
|
|
121
|
-
throw new errors.LettaError({
|
|
122
|
-
message: _response.error.errorMessage,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
62
|
/**
|
|
128
63
|
* Retrieve the memories in an agent's archival memory store (paginated query).
|
|
129
64
|
*
|
|
@@ -151,9 +86,9 @@ class ArchivalMemory {
|
|
|
151
86
|
_queryParams["limit"] = limit.toString();
|
|
152
87
|
}
|
|
153
88
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
154
|
-
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`),
|
|
155
90
|
method: "GET",
|
|
156
|
-
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.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
157
92
|
contentType: "application/json",
|
|
158
93
|
queryParameters: _queryParams,
|
|
159
94
|
requestType: "json",
|
|
@@ -194,7 +129,7 @@ class ArchivalMemory {
|
|
|
194
129
|
body: _response.error.rawBody,
|
|
195
130
|
});
|
|
196
131
|
case "timeout":
|
|
197
|
-
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.");
|
|
198
133
|
case "unknown":
|
|
199
134
|
throw new errors.LettaError({
|
|
200
135
|
message: _response.error.errorMessage,
|
|
@@ -220,9 +155,9 @@ class ArchivalMemory {
|
|
|
220
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
221
156
|
var _a, _b, _c;
|
|
222
157
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
223
|
-
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`),
|
|
224
159
|
method: "POST",
|
|
225
|
-
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.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
226
161
|
contentType: "application/json",
|
|
227
162
|
requestType: "json",
|
|
228
163
|
body: serializers.agents.CreateArchivalMemory.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -263,7 +198,7 @@ class ArchivalMemory {
|
|
|
263
198
|
body: _response.error.rawBody,
|
|
264
199
|
});
|
|
265
200
|
case "timeout":
|
|
266
|
-
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.");
|
|
267
202
|
case "unknown":
|
|
268
203
|
throw new errors.LettaError({
|
|
269
204
|
message: _response.error.errorMessage,
|
|
@@ -287,9 +222,9 @@ class ArchivalMemory {
|
|
|
287
222
|
return __awaiter(this, void 0, void 0, function* () {
|
|
288
223
|
var _a, _b, _c;
|
|
289
224
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
290
|
-
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)}`),
|
|
291
226
|
method: "DELETE",
|
|
292
|
-
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.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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),
|
|
293
228
|
contentType: "application/json",
|
|
294
229
|
requestType: "json",
|
|
295
230
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -323,7 +258,7 @@ class ArchivalMemory {
|
|
|
323
258
|
body: _response.error.rawBody,
|
|
324
259
|
});
|
|
325
260
|
case "timeout":
|
|
326
|
-
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}.");
|
|
327
262
|
case "unknown":
|
|
328
263
|
throw new errors.LettaError({
|
|
329
264
|
message: _response.error.errorMessage,
|
|
@@ -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.12", "User-Agent": "@letta-ai/letta-client/0.1.12", "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,
|
|
@@ -26,18 +26,6 @@ export declare namespace CoreMemory {
|
|
|
26
26
|
export declare class CoreMemory {
|
|
27
27
|
protected readonly _options: CoreMemory.Options;
|
|
28
28
|
constructor(_options?: CoreMemory.Options);
|
|
29
|
-
/**
|
|
30
|
-
* Retrieve the messages in the context of a specific agent.
|
|
31
|
-
*
|
|
32
|
-
* @param {string} agentId
|
|
33
|
-
* @param {CoreMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
-
*
|
|
35
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* await client.agents.coreMemory.listInContext("agent_id")
|
|
39
|
-
*/
|
|
40
|
-
listInContext(agentId: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.LettaSchemasMessageMessage[]>;
|
|
41
29
|
/**
|
|
42
30
|
* Retrieve the memory state of a specific agent.
|
|
43
31
|
* This endpoint fetches the current memory state of the agent identified by the user ID and agent ID.
|
|
@@ -100,9 +88,9 @@ export declare class CoreMemory {
|
|
|
100
88
|
* @throws {@link Letta.UnprocessableEntityError}
|
|
101
89
|
*
|
|
102
90
|
* @example
|
|
103
|
-
* await client.agents.coreMemory.
|
|
91
|
+
* await client.agents.coreMemory.list("agent_id")
|
|
104
92
|
*/
|
|
105
|
-
|
|
93
|
+
list(agentId: string, requestOptions?: CoreMemory.RequestOptions): Promise<Letta.Block[]>;
|
|
106
94
|
/**
|
|
107
95
|
* Creates a memory block and links it to the agent.
|
|
108
96
|
*
|