@letta-ai/letta-client 0.1.38 → 0.1.40
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 -3
- package/api/resources/agents/client/Client.js +25 -17
- package/api/resources/agents/client/requests/AgentsListRequest.d.ts +4 -0
- package/api/resources/agents/resources/blocks/client/Client.d.ts +97 -0
- package/api/resources/agents/resources/blocks/client/Client.js +400 -0
- package/api/resources/agents/resources/blocks/client/index.d.ts +1 -0
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +0 -65
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -332
- package/api/resources/agents/resources/index.d.ts +3 -2
- package/api/resources/agents/resources/index.js +4 -3
- package/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/api/resources/agents/resources/{archivalMemory → passages}/client/Client.d.ts +14 -14
- package/{dist/api/resources/agents/resources/archivalMemory → api/resources/agents/resources/passages}/client/Client.js +15 -15
- package/api/resources/agents/resources/{archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts → passages/client/requests/PassagesListRequest.d.ts} +1 -1
- package/api/resources/agents/resources/passages/client/requests/index.d.ts +2 -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.js +6 -6
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/identities/client/Client.js +6 -6
- 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/steps/client/Client.js +2 -2
- package/api/resources/tag/client/Client.js +1 -1
- package/api/resources/templates/client/Client.js +1 -1
- package/api/resources/tools/client/Client.js +11 -11
- package/dist/api/resources/agents/client/Client.d.ts +6 -3
- package/dist/api/resources/agents/client/Client.js +25 -17
- package/dist/api/resources/agents/client/requests/AgentsListRequest.d.ts +4 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.d.ts +97 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.js +400 -0
- package/dist/api/resources/agents/resources/blocks/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/blocks/client/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 +0 -65
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -332
- package/dist/api/resources/agents/resources/index.d.ts +3 -2
- package/dist/api/resources/agents/resources/index.js +4 -3
- package/dist/api/resources/agents/resources/memoryVariables/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/{archivalMemory → passages}/client/Client.d.ts +14 -14
- package/{api/resources/agents/resources/archivalMemory → dist/api/resources/agents/resources/passages}/client/Client.js +15 -15
- package/dist/api/resources/agents/resources/{archivalMemory/client/requests/ArchivalMemoryListRequest.d.ts → passages/client/requests/PassagesListRequest.d.ts} +1 -1
- package/dist/api/resources/agents/resources/passages/client/requests/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/passages/client/requests/index.js +2 -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.js +6 -6
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/identities/client/Client.js +6 -6
- 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/steps/client/Client.js +2 -2
- package/dist/api/resources/tag/client/Client.js +1 -1
- package/dist/api/resources/templates/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.js +11 -11
- package/dist/serialization/resources/agents/resources/blocks/client/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/{coreMemory → blocks}/client/index.js +2 -2
- package/dist/serialization/resources/agents/resources/{coreMemory/client/listBlocks.d.ts → blocks/client/list.d.ts} +1 -1
- package/dist/serialization/resources/agents/resources/index.d.ts +3 -3
- package/dist/serialization/resources/agents/resources/index.js +4 -4
- package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/create.d.ts +1 -1
- package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/list.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +28 -26
- package/serialization/resources/agents/resources/blocks/client/index.d.ts +1 -0
- package/serialization/resources/agents/resources/{coreMemory → blocks}/client/index.js +2 -2
- package/serialization/resources/agents/resources/{coreMemory/client/listBlocks.d.ts → blocks/client/list.d.ts} +1 -1
- package/serialization/resources/agents/resources/blocks/index.d.ts +1 -0
- package/serialization/resources/agents/resources/blocks/index.js +17 -0
- package/serialization/resources/agents/resources/index.d.ts +3 -3
- package/serialization/resources/agents/resources/index.js +4 -4
- package/serialization/resources/agents/resources/{archivalMemory → passages}/client/create.d.ts +1 -1
- package/serialization/resources/agents/resources/{archivalMemory → passages}/client/list.d.ts +1 -1
- package/serialization/resources/agents/resources/passages/index.d.ts +1 -0
- package/serialization/resources/agents/resources/passages/index.js +17 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -2
- package/dist/api/resources/agents/resources/archivalMemory/client/requests/index.d.ts +0 -2
- package/dist/serialization/resources/agents/resources/coreMemory/client/index.d.ts +0 -1
- package/serialization/resources/agents/resources/coreMemory/client/index.d.ts +0 -1
- /package/api/resources/agents/resources/{archivalMemory/client/requests → blocks/client}/index.js +0 -0
- /package/api/resources/agents/resources/{archivalMemory → blocks}/index.d.ts +0 -0
- /package/api/resources/agents/resources/{archivalMemory → blocks}/index.js +0 -0
- /package/api/resources/agents/resources/{archivalMemory → passages}/client/index.d.ts +0 -0
- /package/api/resources/agents/resources/{archivalMemory → passages}/client/index.js +0 -0
- /package/api/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.d.ts +0 -0
- /package/api/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.js +0 -0
- /package/api/resources/agents/resources/{archivalMemory/client/requests/ArchivalMemoryListRequest.js → passages/client/requests/PassagesListRequest.js} +0 -0
- /package/{dist/api/resources/agents/resources/archivalMemory → api/resources/agents/resources/passages}/client/requests/index.js +0 -0
- /package/{dist/api/resources/agents/resources/archivalMemory → api/resources/agents/resources/passages}/index.d.ts +0 -0
- /package/{dist/api/resources/agents/resources/archivalMemory → api/resources/agents/resources/passages}/index.js +0 -0
- /package/dist/{serialization/resources/agents/resources/archivalMemory → api/resources/agents/resources/blocks}/index.d.ts +0 -0
- /package/dist/{serialization/resources/agents/resources/archivalMemory → api/resources/agents/resources/blocks}/index.js +0 -0
- /package/dist/api/resources/agents/resources/{archivalMemory → passages}/client/index.d.ts +0 -0
- /package/dist/api/resources/agents/resources/{archivalMemory → passages}/client/index.js +0 -0
- /package/dist/api/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.d.ts +0 -0
- /package/dist/api/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.js +0 -0
- /package/dist/api/resources/agents/resources/{archivalMemory/client/requests/ArchivalMemoryListRequest.js → passages/client/requests/PassagesListRequest.js} +0 -0
- /package/dist/{serialization/resources/agents/resources/coreMemory → api/resources/agents/resources/passages}/index.d.ts +0 -0
- /package/dist/{serialization/resources/agents/resources/coreMemory → api/resources/agents/resources/passages}/index.js +0 -0
- /package/dist/serialization/resources/agents/resources/{coreMemory/client/listBlocks.js → blocks/client/list.js} +0 -0
- /package/{serialization/resources/agents/resources/archivalMemory → dist/serialization/resources/agents/resources/blocks}/index.d.ts +0 -0
- /package/{serialization/resources/agents/resources/archivalMemory → dist/serialization/resources/agents/resources/blocks}/index.js +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/create.js +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/index.d.ts +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/index.js +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/list.js +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.d.ts +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.js +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/index.d.ts +0 -0
- /package/dist/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/index.js +0 -0
- /package/{serialization/resources/agents/resources/coreMemory → dist/serialization/resources/agents/resources/passages}/index.d.ts +0 -0
- /package/{serialization/resources/agents/resources/coreMemory → dist/serialization/resources/agents/resources/passages}/index.js +0 -0
- /package/serialization/resources/agents/resources/{coreMemory/client/listBlocks.js → blocks/client/list.js} +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/create.js +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/index.d.ts +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/index.js +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/list.js +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.d.ts +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/CreateArchivalMemory.js +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/index.d.ts +0 -0
- /package/serialization/resources/agents/resources/{archivalMemory → passages}/client/requests/index.js +0 -0
|
@@ -87,7 +87,7 @@ class Tag {
|
|
|
87
87
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
88
88
|
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/tags/"),
|
|
89
89
|
method: "GET",
|
|
90
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
90
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
91
91
|
contentType: "application/json",
|
|
92
92
|
queryParameters: _queryParams,
|
|
93
93
|
requestType: "json",
|
|
@@ -75,7 +75,7 @@ class Templates {
|
|
|
75
75
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
76
76
|
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/templates/${encodeURIComponent(project)}/${encodeURIComponent(templateVersion)}/agents`),
|
|
77
77
|
method: "POST",
|
|
78
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
78
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
79
79
|
contentType: "application/json",
|
|
80
80
|
requestType: "json",
|
|
81
81
|
body: serializers.TemplatesCreateAgentsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -76,7 +76,7 @@ class Tools {
|
|
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
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.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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,
|
|
@@ -141,7 +141,7 @@ class Tools {
|
|
|
141
141
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
142
142
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
143
143
|
method: "DELETE",
|
|
144
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
144
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
145
145
|
contentType: "application/json",
|
|
146
146
|
requestType: "json",
|
|
147
147
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -201,7 +201,7 @@ class Tools {
|
|
|
201
201
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
202
202
|
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/tools/${encodeURIComponent(toolId)}`),
|
|
203
203
|
method: "PATCH",
|
|
204
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
204
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
205
205
|
contentType: "application/json",
|
|
206
206
|
requestType: "json",
|
|
207
207
|
body: serializers.ToolUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -278,7 +278,7 @@ class Tools {
|
|
|
278
278
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
279
279
|
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/tools/"),
|
|
280
280
|
method: "GET",
|
|
281
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
281
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
282
282
|
contentType: "application/json",
|
|
283
283
|
queryParameters: _queryParams,
|
|
284
284
|
requestType: "json",
|
|
@@ -346,7 +346,7 @@ class Tools {
|
|
|
346
346
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
347
347
|
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/tools/"),
|
|
348
348
|
method: "POST",
|
|
349
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
349
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
350
350
|
contentType: "application/json",
|
|
351
351
|
requestType: "json",
|
|
352
352
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -414,7 +414,7 @@ class Tools {
|
|
|
414
414
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
415
415
|
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/tools/"),
|
|
416
416
|
method: "PUT",
|
|
417
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
417
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
418
418
|
contentType: "application/json",
|
|
419
419
|
requestType: "json",
|
|
420
420
|
body: serializers.ToolCreate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -479,7 +479,7 @@ class Tools {
|
|
|
479
479
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
480
480
|
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/tools/add-base-tools"),
|
|
481
481
|
method: "POST",
|
|
482
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
482
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
483
483
|
contentType: "application/json",
|
|
484
484
|
requestType: "json",
|
|
485
485
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -549,7 +549,7 @@ class Tools {
|
|
|
549
549
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
550
550
|
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/tools/run"),
|
|
551
551
|
method: "POST",
|
|
552
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
552
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
553
553
|
contentType: "application/json",
|
|
554
554
|
requestType: "json",
|
|
555
555
|
body: serializers.ToolRunFromSource.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -614,7 +614,7 @@ class Tools {
|
|
|
614
614
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
615
615
|
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/tools/composio/apps"),
|
|
616
616
|
method: "GET",
|
|
617
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
617
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
618
618
|
contentType: "application/json",
|
|
619
619
|
requestType: "json",
|
|
620
620
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -679,7 +679,7 @@ class Tools {
|
|
|
679
679
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
680
680
|
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/tools/composio/apps/${encodeURIComponent(composioAppName)}/actions`),
|
|
681
681
|
method: "GET",
|
|
682
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
682
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
683
683
|
contentType: "application/json",
|
|
684
684
|
requestType: "json",
|
|
685
685
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -744,7 +744,7 @@ class Tools {
|
|
|
744
744
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
745
745
|
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/tools/composio/${encodeURIComponent(composioActionName)}`),
|
|
746
746
|
method: "POST",
|
|
747
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
747
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
748
748
|
contentType: "application/json",
|
|
749
749
|
requestType: "json",
|
|
750
750
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -8,7 +8,8 @@ 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 {
|
|
11
|
+
import { Blocks } from "../resources/blocks/client/Client";
|
|
12
|
+
import { Passages } from "../resources/passages/client/Client";
|
|
12
13
|
import { Messages } from "../resources/messages/client/Client";
|
|
13
14
|
import { Templates } from "../resources/templates/client/Client";
|
|
14
15
|
import { MemoryVariables } from "../resources/memoryVariables/client/Client";
|
|
@@ -37,7 +38,8 @@ export declare class Agents {
|
|
|
37
38
|
protected _tools: Tools | undefined;
|
|
38
39
|
protected _sources: Sources | undefined;
|
|
39
40
|
protected _coreMemory: CoreMemory | undefined;
|
|
40
|
-
protected
|
|
41
|
+
protected _blocks: Blocks | undefined;
|
|
42
|
+
protected _passages: Passages | undefined;
|
|
41
43
|
protected _messages: Messages | undefined;
|
|
42
44
|
protected _templates: Templates | undefined;
|
|
43
45
|
protected _memoryVariables: MemoryVariables | undefined;
|
|
@@ -46,7 +48,8 @@ export declare class Agents {
|
|
|
46
48
|
get tools(): Tools;
|
|
47
49
|
get sources(): Sources;
|
|
48
50
|
get coreMemory(): CoreMemory;
|
|
49
|
-
get
|
|
51
|
+
get blocks(): Blocks;
|
|
52
|
+
get passages(): Passages;
|
|
50
53
|
get messages(): Messages;
|
|
51
54
|
get templates(): Templates;
|
|
52
55
|
get memoryVariables(): MemoryVariables;
|
|
@@ -70,10 +70,11 @@ const Client_1 = require("../resources/context/client/Client");
|
|
|
70
70
|
const Client_2 = require("../resources/tools/client/Client");
|
|
71
71
|
const Client_3 = require("../resources/sources/client/Client");
|
|
72
72
|
const Client_4 = require("../resources/coreMemory/client/Client");
|
|
73
|
-
const Client_5 = require("../resources/
|
|
74
|
-
const Client_6 = require("../resources/
|
|
75
|
-
const Client_7 = require("../resources/
|
|
76
|
-
const Client_8 = require("../resources/
|
|
73
|
+
const Client_5 = require("../resources/blocks/client/Client");
|
|
74
|
+
const Client_6 = require("../resources/passages/client/Client");
|
|
75
|
+
const Client_7 = require("../resources/messages/client/Client");
|
|
76
|
+
const Client_8 = require("../resources/templates/client/Client");
|
|
77
|
+
const Client_9 = require("../resources/memoryVariables/client/Client");
|
|
77
78
|
class Agents {
|
|
78
79
|
constructor(_options = {}) {
|
|
79
80
|
this._options = _options;
|
|
@@ -94,21 +95,25 @@ class Agents {
|
|
|
94
95
|
var _a;
|
|
95
96
|
return ((_a = this._coreMemory) !== null && _a !== void 0 ? _a : (this._coreMemory = new Client_4.CoreMemory(this._options)));
|
|
96
97
|
}
|
|
97
|
-
get
|
|
98
|
+
get blocks() {
|
|
98
99
|
var _a;
|
|
99
|
-
return ((_a = this.
|
|
100
|
+
return ((_a = this._blocks) !== null && _a !== void 0 ? _a : (this._blocks = new Client_5.Blocks(this._options)));
|
|
101
|
+
}
|
|
102
|
+
get passages() {
|
|
103
|
+
var _a;
|
|
104
|
+
return ((_a = this._passages) !== null && _a !== void 0 ? _a : (this._passages = new Client_6.Passages(this._options)));
|
|
100
105
|
}
|
|
101
106
|
get messages() {
|
|
102
107
|
var _a;
|
|
103
|
-
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new
|
|
108
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_7.Messages(this._options)));
|
|
104
109
|
}
|
|
105
110
|
get templates() {
|
|
106
111
|
var _a;
|
|
107
|
-
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new
|
|
112
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_8.Templates(this._options)));
|
|
108
113
|
}
|
|
109
114
|
get memoryVariables() {
|
|
110
115
|
var _a;
|
|
111
|
-
return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new
|
|
116
|
+
return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new Client_9.MemoryVariables(this._options)));
|
|
112
117
|
}
|
|
113
118
|
/**
|
|
114
119
|
* List all agents associated with a given user.
|
|
@@ -125,7 +130,7 @@ class Agents {
|
|
|
125
130
|
list() {
|
|
126
131
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
127
132
|
var _a, _b, _c;
|
|
128
|
-
const { name, tags, matchAllTags, before, after, limit, queryText, projectId, templateId, baseTemplateId, identifierKeys, } = request;
|
|
133
|
+
const { name, tags, matchAllTags, before, after, limit, queryText, projectId, templateId, baseTemplateId, identifierId, identifierKeys, } = request;
|
|
129
134
|
const _queryParams = {};
|
|
130
135
|
if (name != null) {
|
|
131
136
|
_queryParams["name"] = name;
|
|
@@ -162,6 +167,9 @@ class Agents {
|
|
|
162
167
|
if (baseTemplateId != null) {
|
|
163
168
|
_queryParams["base_template_id"] = baseTemplateId;
|
|
164
169
|
}
|
|
170
|
+
if (identifierId != null) {
|
|
171
|
+
_queryParams["identifier_id"] = identifierId;
|
|
172
|
+
}
|
|
165
173
|
if (identifierKeys != null) {
|
|
166
174
|
if (Array.isArray(identifierKeys)) {
|
|
167
175
|
_queryParams["identifier_keys"] = identifierKeys.map((item) => item);
|
|
@@ -173,7 +181,7 @@ class Agents {
|
|
|
173
181
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
174
182
|
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/"),
|
|
175
183
|
method: "GET",
|
|
176
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
184
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
177
185
|
contentType: "application/json",
|
|
178
186
|
queryParameters: _queryParams,
|
|
179
187
|
requestType: "json",
|
|
@@ -240,7 +248,7 @@ class Agents {
|
|
|
240
248
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
241
249
|
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/"),
|
|
242
250
|
method: "POST",
|
|
243
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
251
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "X-Project": project != null ? project : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
244
252
|
contentType: "application/json",
|
|
245
253
|
requestType: "json",
|
|
246
254
|
body: serializers.CreateAgentRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -306,7 +314,7 @@ class Agents {
|
|
|
306
314
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
315
|
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)}`),
|
|
308
316
|
method: "GET",
|
|
309
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
317
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
310
318
|
contentType: "application/json",
|
|
311
319
|
requestType: "json",
|
|
312
320
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -371,7 +379,7 @@ class Agents {
|
|
|
371
379
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
372
380
|
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)}`),
|
|
373
381
|
method: "DELETE",
|
|
374
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
382
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
375
383
|
contentType: "application/json",
|
|
376
384
|
requestType: "json",
|
|
377
385
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -431,7 +439,7 @@ class Agents {
|
|
|
431
439
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
432
440
|
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)}`),
|
|
433
441
|
method: "PATCH",
|
|
434
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
442
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
435
443
|
contentType: "application/json",
|
|
436
444
|
requestType: "json",
|
|
437
445
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -503,7 +511,7 @@ class Agents {
|
|
|
503
511
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
504
512
|
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`),
|
|
505
513
|
method: "PATCH",
|
|
506
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
514
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
507
515
|
contentType: "application/json",
|
|
508
516
|
queryParameters: _queryParams,
|
|
509
517
|
requestType: "json",
|
|
@@ -569,7 +577,7 @@ class Agents {
|
|
|
569
577
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
570
578
|
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"),
|
|
571
579
|
method: "POST",
|
|
572
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
580
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.40", "User-Agent": "@letta-ai/letta-client/0.1.40", "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),
|
|
573
581
|
contentType: "application/json",
|
|
574
582
|
requestType: "json",
|
|
575
583
|
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../../../environments";
|
|
5
|
+
import * as core from "../../../../../../core";
|
|
6
|
+
import * as Letta from "../../../../../index";
|
|
7
|
+
export declare namespace Blocks {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.LettaEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
token?: core.Supplier<string | undefined>;
|
|
13
|
+
fetcher?: core.FetchFunction;
|
|
14
|
+
}
|
|
15
|
+
interface RequestOptions {
|
|
16
|
+
/** The maximum time to wait for a response in seconds. */
|
|
17
|
+
timeoutInSeconds?: number;
|
|
18
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
19
|
+
maxRetries?: number;
|
|
20
|
+
/** A hook to abort the request. */
|
|
21
|
+
abortSignal?: AbortSignal;
|
|
22
|
+
/** Additional headers to include in the request. */
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export declare class Blocks {
|
|
27
|
+
protected readonly _options: Blocks.Options;
|
|
28
|
+
constructor(_options?: Blocks.Options);
|
|
29
|
+
/**
|
|
30
|
+
* Retrieve a memory block from an agent.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} agentId
|
|
33
|
+
* @param {string} blockLabel
|
|
34
|
+
* @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
36
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.agents.blocks.retrieve("agent_id", "block_label")
|
|
40
|
+
*/
|
|
41
|
+
retrieve(agentId: string, blockLabel: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
|
|
42
|
+
/**
|
|
43
|
+
* Updates a memory block of an agent.
|
|
44
|
+
*
|
|
45
|
+
* @param {string} agentId
|
|
46
|
+
* @param {string} blockLabel
|
|
47
|
+
* @param {Letta.BlockUpdate} request
|
|
48
|
+
* @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
|
+
*
|
|
50
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* await client.agents.blocks.modify("agent_id", "block_label", {})
|
|
54
|
+
*/
|
|
55
|
+
modify(agentId: string, blockLabel: string, request: Letta.BlockUpdate, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block>;
|
|
56
|
+
/**
|
|
57
|
+
* Retrieve the memory blocks of a specific agent.
|
|
58
|
+
*
|
|
59
|
+
* @param {string} agentId
|
|
60
|
+
* @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.agents.blocks.list("agent_id")
|
|
66
|
+
*/
|
|
67
|
+
list(agentId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.Block[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Attach a block to an agent.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} agentId
|
|
72
|
+
* @param {string} blockId
|
|
73
|
+
* @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* await client.agents.blocks.attach("agent_id", "block_id")
|
|
79
|
+
*/
|
|
80
|
+
attach(agentId: string, blockId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.AgentState>;
|
|
81
|
+
/**
|
|
82
|
+
* Detach a block from an agent.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} agentId
|
|
85
|
+
* @param {string} blockId
|
|
86
|
+
* @param {Blocks.RequestOptions} requestOptions - Request-specific configuration.
|
|
87
|
+
*
|
|
88
|
+
* @throws {@link Letta.UnprocessableEntityError}
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* await client.agents.blocks.detach("agent_id", "block_id")
|
|
92
|
+
*/
|
|
93
|
+
detach(agentId: string, blockId: string, requestOptions?: Blocks.RequestOptions): Promise<Letta.AgentState>;
|
|
94
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
95
|
+
Authorization: string;
|
|
96
|
+
}>;
|
|
97
|
+
}
|