@letta-ai/letta-client 0.1.0-alpha2 → 0.1.1
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 +25 -1
- package/api/resources/agents/client/Client.js +120 -15
- package/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +10 -0
- package/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +1 -1
- package/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +15 -0
- package/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/api/resources/agents/client/requests/index.d.ts +2 -0
- package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/memory/client/Client.js +1 -1
- package/api/resources/agents/resources/memory/resources/messages/client/Client.js +1 -1
- package/api/resources/agents/resources/memoryBlocks/client/Client.js +2 -2
- package/api/resources/agents/resources/messages/client/Client.js +4 -4
- package/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +0 -3
- package/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/sources/client/Client.js +1 -1
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +8 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js +10 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +5 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +5 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.d.ts +9 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.js +5 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.d.ts +8 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.js +10 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.d.ts +8 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.js +10 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.d.ts +9 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.js +5 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.d.ts +9 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.js +11 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.d.ts +7 -0
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.js +5 -0
- package/api/resources/agents/types/index.d.ts +8 -1
- package/api/resources/agents/types/index.js +8 -1
- 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/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/tools/client/Client.js +12 -12
- package/api/types/InternalServerErrorBody.d.ts +1 -1
- package/api/types/LettaResponseLettaUsageStatistics.d.ts +1 -0
- package/api/types/LettaUsageStatistics.d.ts +1 -0
- package/api/types/NotFoundErrorBody.d.ts +1 -2
- package/dist/api/resources/agents/client/Client.d.ts +25 -1
- package/dist/api/resources/agents/client/Client.js +120 -15
- package/dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +10 -0
- package/dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +1 -1
- package/dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +15 -0
- package/dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js +5 -0
- package/dist/api/resources/agents/client/requests/CreateAgentRequest.d.ts +2 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/memoryBlocks/client/Client.js +2 -2
- package/dist/api/resources/agents/resources/messages/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/messages/types/LettaStreamingResponse.d.ts +0 -3
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js +10 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +5 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +5 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.d.ts +9 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirection.js +5 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionDirection.js +10 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemDirectionValue.js +10 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.d.ts +9 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperator.js +5 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.d.ts +9 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOperatorOperator.js +11 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.d.ts +7 -0
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemZero.js +5 -0
- package/dist/api/resources/agents/types/index.d.ts +8 -1
- package/dist/api/resources/agents/types/index.js +8 -1
- 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/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/tools/client/Client.js +12 -12
- package/dist/api/types/InternalServerErrorBody.d.ts +1 -1
- package/dist/api/types/LettaResponseLettaUsageStatistics.d.ts +1 -0
- package/dist/api/types/LettaUsageStatistics.d.ts +1 -0
- package/dist/api/types/NotFoundErrorBody.d.ts +1 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +135 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +0 -7
- package/dist/api/resources/agents/types/AgentsCreateVersionResponse.d.ts +0 -7
- /package/api/resources/agents/{types/AgentsCreateVersionResponse.js → client/requests/AgentsCreateTemplateFromAgentRequest.js} +0 -0
- /package/{dist/api/resources/agents/types/AgentsCreateVersionResponse.js → api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js} +0 -0
|
@@ -173,6 +173,16 @@ export declare class Agents {
|
|
|
173
173
|
* })
|
|
174
174
|
*/
|
|
175
175
|
createAgentMessageAsync(agentId: string, request: Letta.LettaRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.Job>;
|
|
176
|
+
/**
|
|
177
|
+
* Search deployed agents
|
|
178
|
+
*
|
|
179
|
+
* @param {Letta.AgentsSearchDeployedAgentsRequest} request
|
|
180
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* await client.agents.searchdeployedagents()
|
|
184
|
+
*/
|
|
185
|
+
searchdeployedagents(request?: Letta.AgentsSearchDeployedAgentsRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
|
|
176
186
|
/**
|
|
177
187
|
* Creates a versioned version of an agent
|
|
178
188
|
*
|
|
@@ -186,7 +196,7 @@ export declare class Agents {
|
|
|
186
196
|
* @example
|
|
187
197
|
* await client.agents.createVersion("agent_id")
|
|
188
198
|
*/
|
|
189
|
-
createVersion(agentId: string, request?: Letta.AgentsCreateVersionRequest, requestOptions?: Agents.RequestOptions): Promise<
|
|
199
|
+
createVersion(agentId: string, request?: Letta.AgentsCreateVersionRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
|
|
190
200
|
/**
|
|
191
201
|
* Migrate an agent to a new versioned agent template
|
|
192
202
|
*
|
|
@@ -205,5 +215,19 @@ export declare class Agents {
|
|
|
205
215
|
* })
|
|
206
216
|
*/
|
|
207
217
|
migrate(agentId: string, request: Letta.AgentsMigrateRequest, requestOptions?: Agents.RequestOptions): Promise<Letta.AgentsMigrateResponse>;
|
|
218
|
+
/**
|
|
219
|
+
* Create a template from an agent
|
|
220
|
+
*
|
|
221
|
+
* @param {string} agentId
|
|
222
|
+
* @param {Letta.AgentsCreateTemplateFromAgentRequest} request
|
|
223
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
224
|
+
*
|
|
225
|
+
* @throws {@link Letta.NotFoundError}
|
|
226
|
+
* @throws {@link Letta.InternalServerError}
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* await client.agents.createtemplatefromagent("agent_id")
|
|
230
|
+
*/
|
|
231
|
+
createtemplatefromagent(agentId: string, request?: Letta.AgentsCreateTemplateFromAgentRequest, requestOptions?: Agents.RequestOptions): Promise<void>;
|
|
208
232
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
209
233
|
}
|
|
@@ -133,7 +133,7 @@ class Agents {
|
|
|
133
133
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
134
134
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/agents/"),
|
|
135
135
|
method: "GET",
|
|
136
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
136
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
137
137
|
contentType: "application/json",
|
|
138
138
|
queryParameters: _queryParams,
|
|
139
139
|
requestType: "json",
|
|
@@ -192,7 +192,7 @@ class Agents {
|
|
|
192
192
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
193
193
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/agents/"),
|
|
194
194
|
method: "POST",
|
|
195
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
195
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
196
196
|
contentType: "application/json",
|
|
197
197
|
requestType: "json",
|
|
198
198
|
body: request,
|
|
@@ -246,7 +246,7 @@ class Agents {
|
|
|
246
246
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
247
247
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
248
248
|
method: "GET",
|
|
249
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
249
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
250
250
|
contentType: "application/json",
|
|
251
251
|
requestType: "json",
|
|
252
252
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -299,7 +299,7 @@ class Agents {
|
|
|
299
299
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
300
300
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
301
301
|
method: "DELETE",
|
|
302
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
302
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
303
303
|
contentType: "application/json",
|
|
304
304
|
requestType: "json",
|
|
305
305
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -353,7 +353,7 @@ class Agents {
|
|
|
353
353
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
354
354
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
355
355
|
method: "PATCH",
|
|
356
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
356
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
357
357
|
contentType: "application/json",
|
|
358
358
|
requestType: "json",
|
|
359
359
|
body: request,
|
|
@@ -408,7 +408,7 @@ class Agents {
|
|
|
408
408
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
409
409
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
|
|
410
410
|
method: "GET",
|
|
411
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
411
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
412
412
|
contentType: "application/json",
|
|
413
413
|
requestType: "json",
|
|
414
414
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -463,7 +463,7 @@ class Agents {
|
|
|
463
463
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
464
464
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
|
|
465
465
|
method: "PATCH",
|
|
466
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
466
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
467
467
|
contentType: "application/json",
|
|
468
468
|
requestType: "json",
|
|
469
469
|
body: request,
|
|
@@ -517,7 +517,7 @@ class Agents {
|
|
|
517
517
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
518
518
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
|
|
519
519
|
method: "GET",
|
|
520
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
520
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
521
521
|
contentType: "application/json",
|
|
522
522
|
requestType: "json",
|
|
523
523
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -577,7 +577,7 @@ class Agents {
|
|
|
577
577
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
578
578
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/async`),
|
|
579
579
|
method: "POST",
|
|
580
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
580
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
581
581
|
contentType: "application/json",
|
|
582
582
|
requestType: "json",
|
|
583
583
|
body: request,
|
|
@@ -614,6 +614,53 @@ class Agents {
|
|
|
614
614
|
}
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
|
+
/**
|
|
618
|
+
* Search deployed agents
|
|
619
|
+
*
|
|
620
|
+
* @param {Letta.AgentsSearchDeployedAgentsRequest} request
|
|
621
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
622
|
+
*
|
|
623
|
+
* @example
|
|
624
|
+
* await client.agents.searchdeployedagents()
|
|
625
|
+
*/
|
|
626
|
+
searchdeployedagents(request = {}, requestOptions) {
|
|
627
|
+
var _a, _b;
|
|
628
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
629
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
630
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, "v1/agents/search"),
|
|
631
|
+
method: "POST",
|
|
632
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
633
|
+
contentType: "application/json",
|
|
634
|
+
requestType: "json",
|
|
635
|
+
body: request,
|
|
636
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
637
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
638
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
639
|
+
});
|
|
640
|
+
if (_response.ok) {
|
|
641
|
+
return;
|
|
642
|
+
}
|
|
643
|
+
if (_response.error.reason === "status-code") {
|
|
644
|
+
throw new errors.LettaError({
|
|
645
|
+
statusCode: _response.error.statusCode,
|
|
646
|
+
body: _response.error.body,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
switch (_response.error.reason) {
|
|
650
|
+
case "non-json":
|
|
651
|
+
throw new errors.LettaError({
|
|
652
|
+
statusCode: _response.error.statusCode,
|
|
653
|
+
body: _response.error.rawBody,
|
|
654
|
+
});
|
|
655
|
+
case "timeout":
|
|
656
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/search.");
|
|
657
|
+
case "unknown":
|
|
658
|
+
throw new errors.LettaError({
|
|
659
|
+
message: _response.error.errorMessage,
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
}
|
|
617
664
|
/**
|
|
618
665
|
* Creates a versioned version of an agent
|
|
619
666
|
*
|
|
@@ -630,15 +677,15 @@ class Agents {
|
|
|
630
677
|
createVersion(agentId, request = {}, requestOptions) {
|
|
631
678
|
var _a, _b;
|
|
632
679
|
return __awaiter(this, void 0, void 0, function* () {
|
|
633
|
-
const {
|
|
680
|
+
const { returnAgentState } = request, _body = __rest(request, ["returnAgentState"]);
|
|
634
681
|
const _queryParams = {};
|
|
635
|
-
if (
|
|
636
|
-
_queryParams["
|
|
682
|
+
if (returnAgentState != null) {
|
|
683
|
+
_queryParams["returnAgentState"] = returnAgentState.toString();
|
|
637
684
|
}
|
|
638
685
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
639
686
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
|
|
640
687
|
method: "POST",
|
|
641
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
688
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
642
689
|
contentType: "application/json",
|
|
643
690
|
queryParameters: _queryParams,
|
|
644
691
|
requestType: "json",
|
|
@@ -648,7 +695,7 @@ class Agents {
|
|
|
648
695
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
649
696
|
});
|
|
650
697
|
if (_response.ok) {
|
|
651
|
-
return
|
|
698
|
+
return;
|
|
652
699
|
}
|
|
653
700
|
if (_response.error.reason === "status-code") {
|
|
654
701
|
switch (_response.error.statusCode) {
|
|
@@ -701,7 +748,7 @@ class Agents {
|
|
|
701
748
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
702
749
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
|
|
703
750
|
method: "POST",
|
|
704
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
751
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
705
752
|
contentType: "application/json",
|
|
706
753
|
requestType: "json",
|
|
707
754
|
body: request,
|
|
@@ -742,6 +789,64 @@ class Agents {
|
|
|
742
789
|
}
|
|
743
790
|
});
|
|
744
791
|
}
|
|
792
|
+
/**
|
|
793
|
+
* Create a template from an agent
|
|
794
|
+
*
|
|
795
|
+
* @param {string} agentId
|
|
796
|
+
* @param {Letta.AgentsCreateTemplateFromAgentRequest} request
|
|
797
|
+
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
798
|
+
*
|
|
799
|
+
* @throws {@link Letta.NotFoundError}
|
|
800
|
+
* @throws {@link Letta.InternalServerError}
|
|
801
|
+
*
|
|
802
|
+
* @example
|
|
803
|
+
* await client.agents.createtemplatefromagent("agent_id")
|
|
804
|
+
*/
|
|
805
|
+
createtemplatefromagent(agentId, request = {}, requestOptions) {
|
|
806
|
+
var _a, _b;
|
|
807
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
808
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
809
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/template`),
|
|
810
|
+
method: "POST",
|
|
811
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
812
|
+
contentType: "application/json",
|
|
813
|
+
requestType: "json",
|
|
814
|
+
body: request,
|
|
815
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
816
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
817
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
818
|
+
});
|
|
819
|
+
if (_response.ok) {
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
if (_response.error.reason === "status-code") {
|
|
823
|
+
switch (_response.error.statusCode) {
|
|
824
|
+
case 404:
|
|
825
|
+
throw new Letta.NotFoundError(_response.error.body);
|
|
826
|
+
case 500:
|
|
827
|
+
throw new Letta.InternalServerError(_response.error.body);
|
|
828
|
+
default:
|
|
829
|
+
throw new errors.LettaError({
|
|
830
|
+
statusCode: _response.error.statusCode,
|
|
831
|
+
body: _response.error.body,
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
switch (_response.error.reason) {
|
|
836
|
+
case "non-json":
|
|
837
|
+
throw new errors.LettaError({
|
|
838
|
+
statusCode: _response.error.statusCode,
|
|
839
|
+
body: _response.error.rawBody,
|
|
840
|
+
});
|
|
841
|
+
case "timeout":
|
|
842
|
+
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/template.");
|
|
843
|
+
case "unknown":
|
|
844
|
+
throw new errors.LettaError({
|
|
845
|
+
message: _response.error.errorMessage,
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
});
|
|
849
|
+
}
|
|
745
850
|
_getAuthorizationHeader() {
|
|
746
851
|
return __awaiter(this, void 0, void 0, function* () {
|
|
747
852
|
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Letta from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {}
|
|
8
|
+
*/
|
|
9
|
+
export interface AgentsSearchDeployedAgentsRequest {
|
|
10
|
+
search?: Letta.AgentsSearchDeployedAgentsRequestSearchItem[];
|
|
11
|
+
project_id?: string;
|
|
12
|
+
combinator?: Letta.AgentsSearchDeployedAgentsRequestCombinator;
|
|
13
|
+
limit?: number;
|
|
14
|
+
offset?: number;
|
|
15
|
+
}
|
|
@@ -52,5 +52,7 @@ export interface CreateAgentRequest {
|
|
|
52
52
|
context_window_limit?: number;
|
|
53
53
|
/** The embedding chunk size used by the agent. */
|
|
54
54
|
embedding_chunk_size?: number;
|
|
55
|
+
/** The template id used to configure the agent */
|
|
56
|
+
from_template?: string;
|
|
55
57
|
user_id?: string;
|
|
56
58
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { type AgentsListRequest } from "./AgentsListRequest";
|
|
2
2
|
export { type CreateAgentRequest } from "./CreateAgentRequest";
|
|
3
3
|
export { type UpdateAgent } from "./UpdateAgent";
|
|
4
|
+
export { type AgentsSearchDeployedAgentsRequest } from "./AgentsSearchDeployedAgentsRequest";
|
|
4
5
|
export { type AgentsCreateVersionRequest } from "./AgentsCreateVersionRequest";
|
|
5
6
|
export { type AgentsMigrateRequest } from "./AgentsMigrateRequest";
|
|
7
|
+
export { type AgentsCreateTemplateFromAgentRequest } from "./AgentsCreateTemplateFromAgentRequest";
|
|
@@ -65,7 +65,7 @@ class ArchivalMemory {
|
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
66
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/archival`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -130,7 +130,7 @@ class ArchivalMemory {
|
|
|
130
130
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
131
131
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/archival`),
|
|
132
132
|
method: "GET",
|
|
133
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
133
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
134
134
|
contentType: "application/json",
|
|
135
135
|
queryParameters: _queryParams,
|
|
136
136
|
requestType: "json",
|
|
@@ -187,7 +187,7 @@ class ArchivalMemory {
|
|
|
187
187
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
188
188
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/archival`),
|
|
189
189
|
method: "POST",
|
|
190
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
190
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
191
191
|
contentType: "application/json",
|
|
192
192
|
requestType: "json",
|
|
193
193
|
body: request,
|
|
@@ -242,7 +242,7 @@ class ArchivalMemory {
|
|
|
242
242
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
243
243
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/archival/${encodeURIComponent(memoryId)}`),
|
|
244
244
|
method: "DELETE",
|
|
245
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
245
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
246
246
|
contentType: "application/json",
|
|
247
247
|
requestType: "json",
|
|
248
248
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -65,7 +65,7 @@ class Context {
|
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
66
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/context`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -71,7 +71,7 @@ class Memory {
|
|
|
71
71
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
72
72
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory`),
|
|
73
73
|
method: "GET",
|
|
74
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
74
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
75
75
|
contentType: "application/json",
|
|
76
76
|
requestType: "json",
|
|
77
77
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -65,7 +65,7 @@ class Messages {
|
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
66
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/messages`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -66,7 +66,7 @@ class MemoryBlocks {
|
|
|
66
66
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
67
67
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
|
|
68
68
|
method: "DELETE",
|
|
69
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
69
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
70
70
|
contentType: "application/json",
|
|
71
71
|
requestType: "json",
|
|
72
72
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -123,7 +123,7 @@ class MemoryBlocks {
|
|
|
123
123
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
124
124
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
|
|
125
125
|
method: "POST",
|
|
126
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
126
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
127
127
|
contentType: "application/json",
|
|
128
128
|
requestType: "json",
|
|
129
129
|
body: request,
|
|
@@ -83,7 +83,7 @@ class Messages {
|
|
|
83
83
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
84
84
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
85
85
|
method: "GET",
|
|
86
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
86
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
87
87
|
contentType: "application/json",
|
|
88
88
|
queryParameters: _queryParams,
|
|
89
89
|
requestType: "json",
|
|
@@ -144,7 +144,7 @@ class Messages {
|
|
|
144
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
145
145
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages`),
|
|
146
146
|
method: "POST",
|
|
147
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
147
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
requestType: "json",
|
|
150
150
|
body: request,
|
|
@@ -200,7 +200,7 @@ class Messages {
|
|
|
200
200
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
201
201
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/${encodeURIComponent(messageId)}`),
|
|
202
202
|
method: "PATCH",
|
|
203
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
203
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
204
204
|
contentType: "application/json",
|
|
205
205
|
requestType: "json",
|
|
206
206
|
body: request,
|
|
@@ -248,7 +248,7 @@ class Messages {
|
|
|
248
248
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
249
249
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/messages/stream`),
|
|
250
250
|
method: "POST",
|
|
251
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
251
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
252
252
|
contentType: "application/json",
|
|
253
253
|
requestType: "json",
|
|
254
254
|
body: request,
|
|
@@ -2,7 +2,4 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Letta from "../../../../../index";
|
|
5
|
-
/**
|
|
6
|
-
* Server-Sent Events stream
|
|
7
|
-
*/
|
|
8
5
|
export declare type LettaStreamingResponse = Letta.SystemMessageOutput | Letta.UserMessageOutput | Letta.ReasoningMessage | Letta.ToolCallMessage | Letta.ToolReturnMessage | Letta.AssistantMessageOutput | Letta.LettaUsageStatistics;
|
|
@@ -65,7 +65,7 @@ class RecallMemory {
|
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
66
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/memory/recall`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -65,7 +65,7 @@ class Sources {
|
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
66
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/sources`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -65,7 +65,7 @@ class Tools {
|
|
|
65
65
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
66
66
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/tools`),
|
|
67
67
|
method: "GET",
|
|
68
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
68
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
69
69
|
contentType: "application/json",
|
|
70
70
|
requestType: "json",
|
|
71
71
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -119,7 +119,7 @@ class Tools {
|
|
|
119
119
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
120
120
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/add-tool/${encodeURIComponent(toolId)}`),
|
|
121
121
|
method: "PATCH",
|
|
122
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
122
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
123
123
|
contentType: "application/json",
|
|
124
124
|
requestType: "json",
|
|
125
125
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -173,7 +173,7 @@ class Tools {
|
|
|
173
173
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
174
174
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaHosted, `v1/agents/${encodeURIComponent(agentId)}/remove-tool/${encodeURIComponent(toolId)}`),
|
|
175
175
|
method: "PATCH",
|
|
176
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
176
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.1", "User-Agent": "@letta-ai/letta-client/0.1.1", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
177
177
|
contentType: "application/json",
|
|
178
178
|
requestType: "json",
|
|
179
179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type AgentsSearchDeployedAgentsRequestCombinator = "AND" | "OR";
|
|
5
|
+
export declare const AgentsSearchDeployedAgentsRequestCombinator: {
|
|
6
|
+
readonly And: "AND";
|
|
7
|
+
readonly Or: "OR";
|
|
8
|
+
};
|