@letta-ai/letta-client 0.1.11 → 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 +16 -21
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
- 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 +5 -5
- package/api/resources/agents/resources/messages/client/Client.js +10 -10
- 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/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.js +6 -6
- 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/LettaSchemasMessageMessage.d.ts +2 -0
- package/api/types/index.d.ts +0 -2
- package/api/types/index.js +0 -2
- package/dist/api/resources/agents/client/Client.d.ts +1 -4
- package/dist/api/resources/agents/client/Client.js +16 -21
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
- 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 +5 -5
- package/dist/api/resources/agents/resources/messages/client/Client.js +10 -10
- 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/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.js +6 -6
- 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/LettaSchemasMessageMessage.d.ts +2 -0
- package/dist/api/types/index.d.ts +0 -2
- package/dist/api/types/index.js +0 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
- package/dist/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -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/tools/client/index.d.ts +0 -1
- package/dist/serialization/resources/tools/client/index.js +1 -2
- package/dist/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/dist/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/dist/serialization/types/index.d.ts +0 -2
- package/dist/serialization/types/index.js +0 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +20 -274
- package/serialization/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -2
- package/serialization/resources/agents/client/requests/CreateAgentRequest.js +2 -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/tools/client/index.d.ts +0 -1
- package/serialization/resources/tools/client/index.js +1 -2
- package/serialization/types/LettaSchemasMessageMessage.d.ts +1 -0
- package/serialization/types/LettaSchemasMessageMessage.js +1 -0
- package/serialization/types/index.d.ts +0 -2
- package/serialization/types/index.js +0 -2
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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/ArchivalMemorySummary.js +0 -5
- package/api/types/RecallMemorySummary.d.ts +0 -7
- package/api/types/RecallMemorySummary.js +0 -5
- 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/ArchivalMemorySummary.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/tools/client/getByName.d.ts +0 -9
- package/dist/serialization/resources/tools/client/getByName.js +0 -41
- 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/dist/serialization/types/RecallMemorySummary.js +0 -43
- 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/tools/client/getByName.d.ts +0 -9
- package/serialization/resources/tools/client/getByName.js +0 -41
- package/serialization/types/ArchivalMemorySummary.d.ts +0 -12
- package/serialization/types/ArchivalMemorySummary.js +0 -43
- package/serialization/types/RecallMemorySummary.d.ts +0 -12
- package/serialization/types/RecallMemorySummary.js +0 -43
- /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
package/api/types/index.js
CHANGED
|
@@ -28,7 +28,6 @@ __exportStar(require("./AgentType"), exports);
|
|
|
28
28
|
__exportStar(require("./AppAuthSchemeAuthMode"), exports);
|
|
29
29
|
__exportStar(require("./AppAuthScheme"), exports);
|
|
30
30
|
__exportStar(require("./AppModel"), exports);
|
|
31
|
-
__exportStar(require("./ArchivalMemorySummary"), exports);
|
|
32
31
|
__exportStar(require("./AssistantFile"), exports);
|
|
33
32
|
__exportStar(require("./AssistantMessageInput"), exports);
|
|
34
33
|
__exportStar(require("./AssistantMessageOutput"), exports);
|
|
@@ -84,7 +83,6 @@ __exportStar(require("./OrganizationCreate"), exports);
|
|
|
84
83
|
__exportStar(require("./Passage"), exports);
|
|
85
84
|
__exportStar(require("./Provider"), exports);
|
|
86
85
|
__exportStar(require("./ReasoningMessage"), exports);
|
|
87
|
-
__exportStar(require("./RecallMemorySummary"), exports);
|
|
88
86
|
__exportStar(require("./ResponseFormat"), exports);
|
|
89
87
|
__exportStar(require("./Run"), exports);
|
|
90
88
|
__exportStar(require("./SandboxConfig"), exports);
|
|
@@ -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.
|
|
@@ -147,7 +142,7 @@ class Agents {
|
|
|
147
142
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
148
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/"),
|
|
149
144
|
method: "GET",
|
|
150
|
-
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),
|
|
151
146
|
contentType: "application/json",
|
|
152
147
|
queryParameters: _queryParams,
|
|
153
148
|
requestType: "json",
|
|
@@ -213,7 +208,7 @@ class Agents {
|
|
|
213
208
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
214
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/"),
|
|
215
210
|
method: "POST",
|
|
216
|
-
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),
|
|
217
212
|
contentType: "application/json",
|
|
218
213
|
requestType: "json",
|
|
219
214
|
body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -279,7 +274,7 @@ class Agents {
|
|
|
279
274
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
280
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)}`),
|
|
281
276
|
method: "GET",
|
|
282
|
-
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),
|
|
283
278
|
contentType: "application/json",
|
|
284
279
|
requestType: "json",
|
|
285
280
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -344,7 +339,7 @@ class Agents {
|
|
|
344
339
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
345
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)}`),
|
|
346
341
|
method: "DELETE",
|
|
347
|
-
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),
|
|
348
343
|
contentType: "application/json",
|
|
349
344
|
requestType: "json",
|
|
350
345
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -387,7 +382,7 @@ class Agents {
|
|
|
387
382
|
});
|
|
388
383
|
}
|
|
389
384
|
/**
|
|
390
|
-
* Update an
|
|
385
|
+
* Update an existing agent
|
|
391
386
|
*
|
|
392
387
|
* @param {string} agentId
|
|
393
388
|
* @param {Letta.UpdateAgent} request
|
|
@@ -404,7 +399,7 @@ class Agents {
|
|
|
404
399
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
405
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)}`),
|
|
406
401
|
method: "PATCH",
|
|
407
|
-
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),
|
|
408
403
|
contentType: "application/json",
|
|
409
404
|
requestType: "json",
|
|
410
405
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -476,7 +471,7 @@ class Agents {
|
|
|
476
471
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
477
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`),
|
|
478
473
|
method: "PATCH",
|
|
479
|
-
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),
|
|
480
475
|
contentType: "application/json",
|
|
481
476
|
queryParameters: _queryParams,
|
|
482
477
|
requestType: "json",
|
|
@@ -542,7 +537,7 @@ class Agents {
|
|
|
542
537
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
543
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"),
|
|
544
539
|
method: "POST",
|
|
545
|
-
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),
|
|
546
541
|
contentType: "application/json",
|
|
547
542
|
requestType: "json",
|
|
548
543
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -42,7 +42,7 @@ export interface CreateAgentRequest {
|
|
|
42
42
|
/** The metadata of the agent. */
|
|
43
43
|
metadata?: Record<string, unknown>;
|
|
44
44
|
/** The LLM configuration handle used by the agent, specified in the format provider/model-name, as an alternative to specifying llm_config. */
|
|
45
|
-
|
|
45
|
+
model?: string;
|
|
46
46
|
/** The embedding configuration handle used by the agent, specified in the format provider/model-name. */
|
|
47
47
|
embedding?: string;
|
|
48
48
|
/** The context window limit used by the agent. */
|
|
@@ -58,5 +58,5 @@ export interface CreateAgentRequest {
|
|
|
58
58
|
/** The environment variables for tool execution specific to this agent. */
|
|
59
59
|
toolExecEnvironmentVariables?: Record<string, string | undefined>;
|
|
60
60
|
/** The variables that should be set for the agent. */
|
|
61
|
-
|
|
61
|
+
memoryVariables?: Record<string, string | undefined>;
|
|
62
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.11", "User-Agent": "@letta-ai/letta-client/0.1.11", "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
|
*
|