@letta-ai/letta-client 1.0.0-alpha.10 → 1.0.0-alpha.11
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/CHANGELOG.md +20 -0
- package/client.d.mts +7 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +7 -1
- package/client.d.ts.map +1 -1
- package/client.js +9 -1
- package/client.js.map +1 -1
- package/client.mjs +9 -1
- package/client.mjs.map +1 -1
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +0 -5
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +0 -5
- package/core/streaming.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +59 -69
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +59 -69
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +2 -10
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +2 -10
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/groups/groups.d.mts +7 -33
- package/resources/groups/groups.d.mts.map +1 -1
- package/resources/groups/groups.d.ts +7 -33
- package/resources/groups/groups.d.ts.map +1 -1
- package/resources/groups/groups.js +4 -21
- package/resources/groups/groups.js.map +1 -1
- package/resources/groups/groups.mjs +4 -21
- package/resources/groups/groups.mjs.map +1 -1
- package/resources/identities/identities.d.mts +16 -24
- package/resources/identities/identities.d.mts.map +1 -1
- package/resources/identities/identities.d.ts +16 -24
- package/resources/identities/identities.d.ts.map +1 -1
- package/resources/identities/identities.js +4 -21
- package/resources/identities/identities.js.map +1 -1
- package/resources/identities/identities.mjs +4 -21
- package/resources/identities/identities.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-servers/index.d.mts +4 -0
- package/resources/mcp-servers/index.d.mts.map +1 -0
- package/resources/mcp-servers/index.d.ts +4 -0
- package/resources/mcp-servers/index.d.ts.map +1 -0
- package/resources/mcp-servers/index.js +11 -0
- package/resources/mcp-servers/index.js.map +1 -0
- package/resources/mcp-servers/index.mjs +5 -0
- package/resources/mcp-servers/index.mjs.map +1 -0
- package/resources/mcp-servers/mcp-servers.d.mts +603 -0
- package/resources/mcp-servers/mcp-servers.d.mts.map +1 -0
- package/resources/mcp-servers/mcp-servers.d.ts +603 -0
- package/resources/mcp-servers/mcp-servers.d.ts.map +1 -0
- package/resources/mcp-servers/mcp-servers.js +63 -0
- package/resources/mcp-servers/mcp-servers.js.map +1 -0
- package/resources/mcp-servers/mcp-servers.mjs +58 -0
- package/resources/mcp-servers/mcp-servers.mjs.map +1 -0
- package/resources/mcp-servers/refresh.d.mts +24 -0
- package/resources/mcp-servers/refresh.d.mts.map +1 -0
- package/resources/mcp-servers/refresh.d.ts +24 -0
- package/resources/mcp-servers/refresh.d.ts.map +1 -0
- package/resources/mcp-servers/refresh.js +27 -0
- package/resources/mcp-servers/refresh.js.map +1 -0
- package/resources/mcp-servers/refresh.mjs +23 -0
- package/resources/mcp-servers/refresh.mjs.map +1 -0
- package/resources/mcp-servers/tools.d.mts +80 -0
- package/resources/mcp-servers/tools.d.mts.map +1 -0
- package/resources/mcp-servers/tools.d.ts +80 -0
- package/resources/mcp-servers/tools.d.ts.map +1 -0
- package/resources/mcp-servers/tools.js +36 -0
- package/resources/mcp-servers/tools.js.map +1 -0
- package/resources/mcp-servers/tools.mjs +32 -0
- package/resources/mcp-servers/tools.mjs.map +1 -0
- package/resources/mcp-servers.d.mts +2 -0
- package/resources/mcp-servers.d.mts.map +1 -0
- package/resources/mcp-servers.d.ts +2 -0
- package/resources/mcp-servers.d.ts.map +1 -0
- package/resources/mcp-servers.js +6 -0
- package/resources/mcp-servers.js.map +1 -0
- package/resources/mcp-servers.mjs +3 -0
- package/resources/mcp-servers.mjs.map +1 -0
- package/resources/steps/steps.d.mts +10 -17
- package/resources/steps/steps.d.mts.map +1 -1
- package/resources/steps/steps.d.ts +10 -17
- package/resources/steps/steps.d.ts.map +1 -1
- package/resources/steps/steps.js +2 -11
- package/resources/steps/steps.js.map +1 -1
- package/resources/steps/steps.mjs +2 -11
- package/resources/steps/steps.mjs.map +1 -1
- package/src/client.ts +34 -0
- package/src/core/streaming.ts +0 -7
- package/src/resources/agents/agents.ts +60 -79
- package/src/resources/groups/groups.ts +9 -54
- package/src/resources/identities/identities.ts +18 -45
- package/src/resources/index.ts +11 -0
- package/src/resources/mcp-servers/index.ts +21 -0
- package/src/resources/mcp-servers/mcp-servers.ts +762 -0
- package/src/resources/mcp-servers/refresh.ts +43 -0
- package/src/resources/mcp-servers/tools.ts +110 -0
- package/src/resources/mcp-servers.ts +3 -0
- package/src/resources/steps/steps.ts +11 -28
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/resources/steps/steps.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,OAAO;OACZ,KAAK,WAAW;OAChB,EAAE,QAAQ,EAAE,oBAAoB,EAAE;OAClC,KAAK,gBAAgB;OACrB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,QAAQ,EAAE;OACnF,KAAK,UAAU;OACf,EAAE,sBAAsB,EAAE,OAAO,EAAE;OACnC,KAAK,QAAQ;OACb,EAAE,KAAK,EAAE;OACT,EAAE,UAAU,EAAE;OACd,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../src/resources/steps/steps.ts"],"names":[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G;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAClC;AAOD,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,IAAI,IAAI,IAAI,EACjB,KAAK,cAAc,IAAI,cAAc,EACrC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,KAAK,sBAAsB,IAAI,sBAAsB,EAAE,CAAC;IAErF,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,CAAC;IAE1B,OAAO,EAAE,QAAQ,IAAI,QAAQ,EAAE,KAAK,oBAAoB,IAAI,oBAAoB,EAAE,CAAC;IAEnF,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,iBAAiB,IAAI,iBAAiB,GAC5C,CAAC;CACH"}
|
package/resources/steps/steps.js
CHANGED
|
@@ -13,7 +13,6 @@ const metrics_1 = require("./metrics.js");
|
|
|
13
13
|
const TraceAPI = tslib_1.__importStar(require("./trace.js"));
|
|
14
14
|
const trace_1 = require("./trace.js");
|
|
15
15
|
const pagination_1 = require("../../core/pagination.js");
|
|
16
|
-
const headers_1 = require("../../internal/headers.js");
|
|
17
16
|
const path_1 = require("../../internal/utils/path.js");
|
|
18
17
|
class Steps extends resource_1.APIResource {
|
|
19
18
|
constructor() {
|
|
@@ -32,16 +31,8 @@ class Steps extends resource_1.APIResource {
|
|
|
32
31
|
/**
|
|
33
32
|
* List steps with optional pagination and date filters.
|
|
34
33
|
*/
|
|
35
|
-
list(
|
|
36
|
-
|
|
37
|
-
return this._client.getAPIList('/v1/steps/', (pagination_1.ArrayPage), {
|
|
38
|
-
query,
|
|
39
|
-
...options,
|
|
40
|
-
headers: (0, headers_1.buildHeaders)([
|
|
41
|
-
{ ...(xProject != null ? { 'X-Project': xProject } : undefined) },
|
|
42
|
-
options?.headers,
|
|
43
|
-
]),
|
|
44
|
-
});
|
|
34
|
+
list(query = {}, options) {
|
|
35
|
+
return this._client.getAPIList('/v1/steps/', (pagination_1.ArrayPage), { query, ...options });
|
|
45
36
|
}
|
|
46
37
|
}
|
|
47
38
|
exports.Steps = Steps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/resources/steps/steps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,mEAA0C;AAC1C,4CAA4D;AAC5D,wEAA+C;AAC/C,4CAA6G;AAC7G,iEAAwC;AACxC,0CAA4D;AAC5D,6DAAoC;AACpC,sCAAgC;AAEhC,yDAAqF;
|
|
1
|
+
{"version":3,"file":"steps.js","sourceRoot":"","sources":["../../src/resources/steps/steps.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAGlD,mEAA0C;AAC1C,4CAA4D;AAC5D,wEAA+C;AAC/C,4CAA6G;AAC7G,iEAAwC;AACxC,0CAA4D;AAC5D,6DAAoC;AACpC,sCAAgC;AAEhC,yDAAqF;AAErF,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,aAAQ,GAA8B,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkBpF,CAAC;IAhBC;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,sBAAe,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF;AAtBD,sBAsBC;AAmOD,KAAK,CAAC,OAAO,GAAG,iBAAO,CAAC;AACxB,KAAK,CAAC,KAAK,GAAG,aAAK,CAAC;AACpB,KAAK,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AAC1B,KAAK,CAAC,QAAQ,GAAG,mBAAQ,CAAC"}
|
|
@@ -9,7 +9,6 @@ import { Metrics } from "./metrics.mjs";
|
|
|
9
9
|
import * as TraceAPI from "./trace.mjs";
|
|
10
10
|
import { Trace } from "./trace.mjs";
|
|
11
11
|
import { ArrayPage } from "../../core/pagination.mjs";
|
|
12
|
-
import { buildHeaders } from "../../internal/headers.mjs";
|
|
13
12
|
import { path } from "../../internal/utils/path.mjs";
|
|
14
13
|
export class Steps extends APIResource {
|
|
15
14
|
constructor() {
|
|
@@ -28,16 +27,8 @@ export class Steps extends APIResource {
|
|
|
28
27
|
/**
|
|
29
28
|
* List steps with optional pagination and date filters.
|
|
30
29
|
*/
|
|
31
|
-
list(
|
|
32
|
-
|
|
33
|
-
return this._client.getAPIList('/v1/steps/', (ArrayPage), {
|
|
34
|
-
query,
|
|
35
|
-
...options,
|
|
36
|
-
headers: buildHeaders([
|
|
37
|
-
{ ...(xProject != null ? { 'X-Project': xProject } : undefined) },
|
|
38
|
-
options?.headers,
|
|
39
|
-
]),
|
|
40
|
-
});
|
|
30
|
+
list(query = {}, options) {
|
|
31
|
+
return this._client.getAPIList('/v1/steps/', (ArrayPage), { query, ...options });
|
|
41
32
|
}
|
|
42
33
|
}
|
|
43
34
|
Steps.Metrics = Metrics;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps.mjs","sourceRoot":"","sources":["../../src/resources/steps/steps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,KAAK,WAAW;OAChB,EAAE,QAAQ,EAAwB;OAClC,KAAK,gBAAgB;OACrB,EAAyE,QAAQ,EAAE;OACnF,KAAK,UAAU;OACf,EAA0B,OAAO,EAAE;OACnC,KAAK,QAAQ;OACb,EAAE,KAAK,EAAE;OAET,EAAE,SAAS,EAAqC;
|
|
1
|
+
{"version":3,"file":"steps.mjs","sourceRoot":"","sources":["../../src/resources/steps/steps.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,KAAK,WAAW;OAChB,EAAE,QAAQ,EAAwB;OAClC,KAAK,gBAAgB;OACrB,EAAyE,QAAQ,EAAE;OACnF,KAAK,UAAU;OACf,EAA0B,OAAO,EAAE;OACnC,KAAK,QAAQ;OACb,EAAE,KAAK,EAAE;OAET,EAAE,SAAS,EAAqC;OAEhD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzD,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,aAAQ,GAA8B,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAkBpF,CAAC;IAhBC;;OAEG;IACH,QAAQ,CAAC,MAAc,EAAE,OAAwB;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE,CAAA,SAAe,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF;AAmOD,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC;AACxB,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;AACpB,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAC1B,KAAK,CAAC,QAAQ,GAAG,QAAQ,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -146,6 +146,17 @@ import {
|
|
|
146
146
|
IdentityType,
|
|
147
147
|
IdentityUpsertParams,
|
|
148
148
|
} from './resources/identities/identities';
|
|
149
|
+
import {
|
|
150
|
+
McpServerConnectResponse,
|
|
151
|
+
McpServerCreateParams,
|
|
152
|
+
McpServerCreateResponse,
|
|
153
|
+
McpServerListResponse,
|
|
154
|
+
McpServerModifyParams,
|
|
155
|
+
McpServerModifyResponse,
|
|
156
|
+
McpServerRetrieveResponse,
|
|
157
|
+
McpServerSchema,
|
|
158
|
+
McpServers,
|
|
159
|
+
} from './resources/mcp-servers/mcp-servers';
|
|
149
160
|
import {
|
|
150
161
|
EmbeddingConfig,
|
|
151
162
|
LlmConfig,
|
|
@@ -183,6 +194,8 @@ export interface ClientOptions {
|
|
|
183
194
|
*/
|
|
184
195
|
apiKey?: string | undefined;
|
|
185
196
|
|
|
197
|
+
projectID?: string | null | undefined;
|
|
198
|
+
|
|
186
199
|
/**
|
|
187
200
|
* Specifies the environment to use for the API.
|
|
188
201
|
*
|
|
@@ -266,6 +279,7 @@ export interface ClientOptions {
|
|
|
266
279
|
*/
|
|
267
280
|
export class Letta {
|
|
268
281
|
apiKey: string;
|
|
282
|
+
projectID: string | null;
|
|
269
283
|
|
|
270
284
|
baseURL: string;
|
|
271
285
|
maxRetries: number;
|
|
@@ -283,6 +297,7 @@ export class Letta {
|
|
|
283
297
|
* API Client for interfacing with the Letta API.
|
|
284
298
|
*
|
|
285
299
|
* @param {string | undefined} [opts.apiKey=process.env['LETTA_API_KEY'] ?? undefined]
|
|
300
|
+
* @param {string | null | undefined} [opts.projectID]
|
|
286
301
|
* @param {Environment} [opts.environment=cloud] - Specifies the environment URL to use for the API.
|
|
287
302
|
* @param {string} [opts.baseURL=process.env['LETTA_BASE_URL'] ?? https://api.letta.com] - Override the default base URL for the API.
|
|
288
303
|
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
|
|
@@ -295,6 +310,7 @@ export class Letta {
|
|
|
295
310
|
constructor({
|
|
296
311
|
baseURL = readEnv('LETTA_BASE_URL'),
|
|
297
312
|
apiKey = readEnv('LETTA_API_KEY'),
|
|
313
|
+
projectID = null,
|
|
298
314
|
...opts
|
|
299
315
|
}: ClientOptions = {}) {
|
|
300
316
|
if (apiKey === undefined) {
|
|
@@ -305,6 +321,7 @@ export class Letta {
|
|
|
305
321
|
|
|
306
322
|
const options: ClientOptions = {
|
|
307
323
|
apiKey,
|
|
324
|
+
projectID,
|
|
308
325
|
...opts,
|
|
309
326
|
baseURL,
|
|
310
327
|
environment: opts.environment ?? 'cloud',
|
|
@@ -334,6 +351,7 @@ export class Letta {
|
|
|
334
351
|
this._options = options;
|
|
335
352
|
|
|
336
353
|
this.apiKey = apiKey;
|
|
354
|
+
this.projectID = projectID;
|
|
337
355
|
}
|
|
338
356
|
|
|
339
357
|
/**
|
|
@@ -351,6 +369,7 @@ export class Letta {
|
|
|
351
369
|
fetch: this.fetch,
|
|
352
370
|
fetchOptions: this.fetchOptions,
|
|
353
371
|
apiKey: this.apiKey,
|
|
372
|
+
projectID: this.projectID,
|
|
354
373
|
...options,
|
|
355
374
|
});
|
|
356
375
|
return client;
|
|
@@ -821,6 +840,7 @@ export class Letta {
|
|
|
821
840
|
'X-Stainless-Retry-Count': String(retryCount),
|
|
822
841
|
...(options.timeout ? { 'X-Stainless-Timeout': String(Math.trunc(options.timeout / 1000)) } : {}),
|
|
823
842
|
...getPlatformHeaders(),
|
|
843
|
+
'X-Project': this.projectID,
|
|
824
844
|
},
|
|
825
845
|
await this.authHeaders(options),
|
|
826
846
|
this._options.defaultHeaders,
|
|
@@ -902,6 +922,7 @@ export class Letta {
|
|
|
902
922
|
tags: API.Tags = new API.Tags(this);
|
|
903
923
|
batches: API.Batches = new API.Batches(this);
|
|
904
924
|
templates: API.Templates = new API.Templates(this);
|
|
925
|
+
mcpServers: API.McpServers = new API.McpServers(this);
|
|
905
926
|
}
|
|
906
927
|
|
|
907
928
|
Letta.Archives = Archives;
|
|
@@ -917,6 +938,7 @@ Letta.Steps = Steps;
|
|
|
917
938
|
Letta.Tags = Tags;
|
|
918
939
|
Letta.Batches = Batches;
|
|
919
940
|
Letta.Templates = Templates;
|
|
941
|
+
Letta.McpServers = McpServers;
|
|
920
942
|
|
|
921
943
|
export declare namespace Letta {
|
|
922
944
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1088,4 +1110,16 @@ export declare namespace Letta {
|
|
|
1088
1110
|
};
|
|
1089
1111
|
|
|
1090
1112
|
export { Templates as Templates };
|
|
1113
|
+
|
|
1114
|
+
export {
|
|
1115
|
+
McpServers as McpServers,
|
|
1116
|
+
type McpServerSchema as McpServerSchema,
|
|
1117
|
+
type McpServerCreateResponse as McpServerCreateResponse,
|
|
1118
|
+
type McpServerRetrieveResponse as McpServerRetrieveResponse,
|
|
1119
|
+
type McpServerListResponse as McpServerListResponse,
|
|
1120
|
+
type McpServerConnectResponse as McpServerConnectResponse,
|
|
1121
|
+
type McpServerModifyResponse as McpServerModifyResponse,
|
|
1122
|
+
type McpServerCreateParams as McpServerCreateParams,
|
|
1123
|
+
type McpServerModifyParams as McpServerModifyParams,
|
|
1124
|
+
};
|
|
1091
1125
|
}
|
package/src/core/streaming.ts
CHANGED
|
@@ -4,13 +4,10 @@ import { makeReadableStream } from '../internal/shims';
|
|
|
4
4
|
import { findDoubleNewlineIndex, LineDecoder } from '../internal/decoders/line';
|
|
5
5
|
import { ReadableStreamToAsyncIterable } from '../internal/shims';
|
|
6
6
|
import { isAbortError } from '../internal/errors';
|
|
7
|
-
import { safeJSON } from '../internal/utils/values';
|
|
8
7
|
import { encodeUTF8 } from '../internal/utils/bytes';
|
|
9
8
|
import { loggerFor } from '../internal/utils/log';
|
|
10
9
|
import type { Letta } from '../client';
|
|
11
10
|
|
|
12
|
-
import { APIError } from './error';
|
|
13
|
-
|
|
14
11
|
type Bytes = string | ArrayBuffer | Uint8Array | null | undefined;
|
|
15
12
|
|
|
16
13
|
export type ServerSentEvent = {
|
|
@@ -55,10 +52,6 @@ export class Stream<Item> implements AsyncIterable<Item> {
|
|
|
55
52
|
continue;
|
|
56
53
|
}
|
|
57
54
|
|
|
58
|
-
if (sse.event === 'error') {
|
|
59
|
-
throw new APIError(undefined, safeJSON(sse.data) ?? sse.data, undefined, response.headers);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
55
|
if (sse.event === null) {
|
|
63
56
|
try {
|
|
64
57
|
yield JSON.parse(sse.data);
|
|
@@ -118,16 +118,8 @@ export class Agents extends APIResource {
|
|
|
118
118
|
/**
|
|
119
119
|
* Create an agent.
|
|
120
120
|
*/
|
|
121
|
-
create(
|
|
122
|
-
|
|
123
|
-
return this._client.post('/v1/agents/', {
|
|
124
|
-
body,
|
|
125
|
-
...options,
|
|
126
|
-
headers: buildHeaders([
|
|
127
|
-
{ ...(xProject != null ? { 'X-Project': xProject } : undefined) },
|
|
128
|
-
options?.headers,
|
|
129
|
-
]),
|
|
130
|
-
});
|
|
121
|
+
create(body: AgentCreateParams, options?: RequestOptions): APIPromise<AgentState> {
|
|
122
|
+
return this._client.post('/v1/agents/', { body, ...options });
|
|
131
123
|
}
|
|
132
124
|
|
|
133
125
|
/**
|
|
@@ -1052,241 +1044,235 @@ export interface AgentImportFileResponse {
|
|
|
1052
1044
|
|
|
1053
1045
|
export interface AgentCreateParams {
|
|
1054
1046
|
/**
|
|
1055
|
-
*
|
|
1047
|
+
* The type of agent.
|
|
1056
1048
|
*/
|
|
1057
1049
|
agent_type?: AgentType;
|
|
1058
1050
|
|
|
1059
1051
|
/**
|
|
1060
|
-
*
|
|
1052
|
+
* The base template id of the agent.
|
|
1061
1053
|
*/
|
|
1062
1054
|
base_template_id?: string | null;
|
|
1063
1055
|
|
|
1064
1056
|
/**
|
|
1065
|
-
*
|
|
1057
|
+
* The ids of the blocks used by the agent.
|
|
1066
1058
|
*/
|
|
1067
1059
|
block_ids?: Array<string> | null;
|
|
1068
1060
|
|
|
1069
1061
|
/**
|
|
1070
|
-
*
|
|
1062
|
+
* The context window limit used by the agent.
|
|
1071
1063
|
*/
|
|
1072
1064
|
context_window_limit?: number | null;
|
|
1073
1065
|
|
|
1074
1066
|
/**
|
|
1075
|
-
*
|
|
1067
|
+
* The description of the agent.
|
|
1076
1068
|
*/
|
|
1077
1069
|
description?: string | null;
|
|
1078
1070
|
|
|
1079
1071
|
/**
|
|
1080
|
-
*
|
|
1081
|
-
*
|
|
1072
|
+
* The embedding configuration handle used by the agent, specified in the format
|
|
1073
|
+
* provider/model-name.
|
|
1082
1074
|
*/
|
|
1083
1075
|
embedding?: string | null;
|
|
1084
1076
|
|
|
1085
1077
|
/**
|
|
1086
|
-
*
|
|
1078
|
+
* The embedding chunk size used by the agent.
|
|
1087
1079
|
*/
|
|
1088
1080
|
embedding_chunk_size?: number | null;
|
|
1089
1081
|
|
|
1090
1082
|
/**
|
|
1091
|
-
*
|
|
1092
|
-
* parameters.
|
|
1083
|
+
* Configuration for embedding model connection and processing parameters.
|
|
1093
1084
|
*/
|
|
1094
1085
|
embedding_config?: ModelsAPI.EmbeddingConfig | null;
|
|
1095
1086
|
|
|
1096
1087
|
/**
|
|
1097
|
-
*
|
|
1098
|
-
* model.
|
|
1088
|
+
* Whether to enable internal extended thinking step for a reasoner model.
|
|
1099
1089
|
*/
|
|
1100
1090
|
enable_reasoner?: boolean | null;
|
|
1101
1091
|
|
|
1102
1092
|
/**
|
|
1103
|
-
*
|
|
1104
|
-
* thread.
|
|
1093
|
+
* If set to True, memory management will move to a background agent thread.
|
|
1105
1094
|
*/
|
|
1106
1095
|
enable_sleeptime?: boolean | null;
|
|
1107
1096
|
|
|
1108
1097
|
/**
|
|
1109
|
-
*
|
|
1110
|
-
* instead.
|
|
1098
|
+
* Deprecated: please use the 'create agents from a template' endpoint instead.
|
|
1111
1099
|
*/
|
|
1112
1100
|
from_template?: string | null;
|
|
1113
1101
|
|
|
1114
1102
|
/**
|
|
1115
|
-
*
|
|
1103
|
+
* If set to True, the agent will be hidden.
|
|
1116
1104
|
*/
|
|
1117
1105
|
hidden?: boolean | null;
|
|
1118
1106
|
|
|
1119
1107
|
/**
|
|
1120
|
-
*
|
|
1108
|
+
* The ids of the identities associated with this agent.
|
|
1121
1109
|
*/
|
|
1122
1110
|
identity_ids?: Array<string> | null;
|
|
1123
1111
|
|
|
1124
1112
|
/**
|
|
1125
|
-
*
|
|
1126
|
-
*
|
|
1113
|
+
* If true, attaches the Letta base tool rules (e.g. deny all tools not explicitly
|
|
1114
|
+
* allowed).
|
|
1127
1115
|
*/
|
|
1128
1116
|
include_base_tool_rules?: boolean | null;
|
|
1129
1117
|
|
|
1130
1118
|
/**
|
|
1131
|
-
*
|
|
1132
|
-
* functions).
|
|
1119
|
+
* If true, attaches the Letta core tools (e.g. core_memory related functions).
|
|
1133
1120
|
*/
|
|
1134
1121
|
include_base_tools?: boolean;
|
|
1135
1122
|
|
|
1136
1123
|
/**
|
|
1137
|
-
*
|
|
1138
|
-
*
|
|
1124
|
+
* If true, automatically creates and attaches a default data source for this
|
|
1125
|
+
* agent.
|
|
1139
1126
|
*/
|
|
1140
1127
|
include_default_source?: boolean;
|
|
1141
1128
|
|
|
1142
1129
|
/**
|
|
1143
|
-
*
|
|
1144
|
-
*
|
|
1130
|
+
* If true, attaches the Letta multi-agent tools (e.g. sending a message to another
|
|
1131
|
+
* agent).
|
|
1145
1132
|
*/
|
|
1146
1133
|
include_multi_agent_tools?: boolean;
|
|
1147
1134
|
|
|
1148
1135
|
/**
|
|
1149
|
-
*
|
|
1136
|
+
* The initial set of messages to put in the agent's in-context memory.
|
|
1150
1137
|
*/
|
|
1151
1138
|
initial_message_sequence?: Array<MessageCreate> | null;
|
|
1152
1139
|
|
|
1153
1140
|
/**
|
|
1154
|
-
*
|
|
1155
|
-
* parameters.
|
|
1141
|
+
* Configuration for Language Model (LLM) connection and generation parameters.
|
|
1156
1142
|
*/
|
|
1157
1143
|
llm_config?: ModelsAPI.LlmConfig | null;
|
|
1158
1144
|
|
|
1159
1145
|
/**
|
|
1160
|
-
*
|
|
1161
|
-
*
|
|
1146
|
+
* Maximum number of files that can be open at once for this agent. Setting this
|
|
1147
|
+
* too high may exceed the context window, which will break the agent.
|
|
1162
1148
|
*/
|
|
1163
1149
|
max_files_open?: number | null;
|
|
1164
1150
|
|
|
1165
1151
|
/**
|
|
1166
|
-
*
|
|
1167
|
-
*
|
|
1152
|
+
* The maximum number of tokens to generate for reasoning step. If not set, the
|
|
1153
|
+
* model will use its default value.
|
|
1168
1154
|
*/
|
|
1169
1155
|
max_reasoning_tokens?: number | null;
|
|
1170
1156
|
|
|
1171
1157
|
/**
|
|
1172
|
-
*
|
|
1173
|
-
*
|
|
1158
|
+
* The maximum number of tokens to generate, including reasoning step. If not set,
|
|
1159
|
+
* the model will use its default value.
|
|
1174
1160
|
*/
|
|
1175
1161
|
max_tokens?: number | null;
|
|
1176
1162
|
|
|
1177
1163
|
/**
|
|
1178
|
-
*
|
|
1164
|
+
* The blocks to create in the agent's in-context memory.
|
|
1179
1165
|
*/
|
|
1180
1166
|
memory_blocks?: Array<BlocksBlocksAPI.CreateBlock> | null;
|
|
1181
1167
|
|
|
1182
1168
|
/**
|
|
1183
|
-
*
|
|
1169
|
+
* The variables that should be set for the agent.
|
|
1184
1170
|
*/
|
|
1185
1171
|
memory_variables?: { [key: string]: string } | null;
|
|
1186
1172
|
|
|
1187
1173
|
/**
|
|
1188
|
-
*
|
|
1189
|
-
*
|
|
1190
|
-
*
|
|
1174
|
+
* If set to True, the agent will not remember previous messages (though the agent
|
|
1175
|
+
* will still retain state via core memory blocks and archival/recall memory). Not
|
|
1176
|
+
* recommended unless you have an advanced use case.
|
|
1191
1177
|
*/
|
|
1192
1178
|
message_buffer_autoclear?: boolean;
|
|
1193
1179
|
|
|
1194
1180
|
/**
|
|
1195
|
-
*
|
|
1181
|
+
* The metadata of the agent.
|
|
1196
1182
|
*/
|
|
1197
1183
|
metadata?: { [key: string]: unknown } | null;
|
|
1198
1184
|
|
|
1199
1185
|
/**
|
|
1200
|
-
*
|
|
1201
|
-
*
|
|
1186
|
+
* The LLM configuration handle used by the agent, specified in the format
|
|
1187
|
+
* provider/model-name, as an alternative to specifying llm_config.
|
|
1202
1188
|
*/
|
|
1203
1189
|
model?: string | null;
|
|
1204
1190
|
|
|
1205
1191
|
/**
|
|
1206
|
-
*
|
|
1192
|
+
* The name of the agent.
|
|
1207
1193
|
*/
|
|
1208
1194
|
name?: string;
|
|
1209
1195
|
|
|
1210
1196
|
/**
|
|
1211
|
-
*
|
|
1197
|
+
* If set to True, enables parallel tool calling. Defaults to False.
|
|
1212
1198
|
*/
|
|
1213
1199
|
parallel_tool_calls?: boolean | null;
|
|
1214
1200
|
|
|
1215
1201
|
/**
|
|
1216
|
-
*
|
|
1217
|
-
*
|
|
1202
|
+
* The per-file view window character limit for this agent. Setting this too high
|
|
1203
|
+
* may exceed the context window, which will break the agent.
|
|
1218
1204
|
*/
|
|
1219
1205
|
per_file_view_window_char_limit?: number | null;
|
|
1220
1206
|
|
|
1221
1207
|
/**
|
|
1222
|
-
* @deprecated
|
|
1223
|
-
*
|
|
1224
|
-
*
|
|
1208
|
+
* @deprecated Deprecated: Project should now be passed via the X-Project header
|
|
1209
|
+
* instead of in the request body. If using the sdk, this can be done via the new
|
|
1210
|
+
* x_project field below.
|
|
1225
1211
|
*/
|
|
1226
1212
|
project?: string | null;
|
|
1227
1213
|
|
|
1228
1214
|
/**
|
|
1229
|
-
*
|
|
1215
|
+
* The id of the project the agent belongs to.
|
|
1230
1216
|
*/
|
|
1231
1217
|
project_id?: string | null;
|
|
1232
1218
|
|
|
1233
1219
|
/**
|
|
1234
|
-
*
|
|
1220
|
+
* Whether to enable reasoning for this agent.
|
|
1235
1221
|
*/
|
|
1236
1222
|
reasoning?: boolean | null;
|
|
1237
1223
|
|
|
1238
1224
|
/**
|
|
1239
|
-
*
|
|
1225
|
+
* The response format for the agent.
|
|
1240
1226
|
*/
|
|
1241
1227
|
response_format?: TextResponseFormat | JsonSchemaResponseFormat | JsonObjectResponseFormat | null;
|
|
1242
1228
|
|
|
1243
1229
|
/**
|
|
1244
|
-
*
|
|
1230
|
+
* The environment variables for tool execution specific to this agent.
|
|
1245
1231
|
*/
|
|
1246
1232
|
secrets?: { [key: string]: string } | null;
|
|
1247
1233
|
|
|
1248
1234
|
/**
|
|
1249
|
-
*
|
|
1235
|
+
* The ids of the sources used by the agent.
|
|
1250
1236
|
*/
|
|
1251
1237
|
source_ids?: Array<string> | null;
|
|
1252
1238
|
|
|
1253
1239
|
/**
|
|
1254
|
-
*
|
|
1240
|
+
* The system prompt used by the agent.
|
|
1255
1241
|
*/
|
|
1256
1242
|
system?: string | null;
|
|
1257
1243
|
|
|
1258
1244
|
/**
|
|
1259
|
-
*
|
|
1245
|
+
* The tags associated with the agent.
|
|
1260
1246
|
*/
|
|
1261
1247
|
tags?: Array<string> | null;
|
|
1262
1248
|
|
|
1263
1249
|
/**
|
|
1264
|
-
*
|
|
1250
|
+
* Deprecated: No longer used
|
|
1265
1251
|
*/
|
|
1266
1252
|
template?: boolean;
|
|
1267
1253
|
|
|
1268
1254
|
/**
|
|
1269
|
-
*
|
|
1255
|
+
* The id of the template the agent belongs to.
|
|
1270
1256
|
*/
|
|
1271
1257
|
template_id?: string | null;
|
|
1272
1258
|
|
|
1273
1259
|
/**
|
|
1274
|
-
*
|
|
1260
|
+
* The timezone of the agent (IANA format).
|
|
1275
1261
|
*/
|
|
1276
1262
|
timezone?: string | null;
|
|
1277
1263
|
|
|
1278
1264
|
/**
|
|
1279
|
-
*
|
|
1265
|
+
* Deprecated: use `secrets` field instead.
|
|
1280
1266
|
*/
|
|
1281
1267
|
tool_exec_environment_variables?: { [key: string]: string } | null;
|
|
1282
1268
|
|
|
1283
1269
|
/**
|
|
1284
|
-
*
|
|
1270
|
+
* The ids of the tools used by the agent.
|
|
1285
1271
|
*/
|
|
1286
1272
|
tool_ids?: Array<string> | null;
|
|
1287
1273
|
|
|
1288
1274
|
/**
|
|
1289
|
-
*
|
|
1275
|
+
* The tool rules governing the agent.
|
|
1290
1276
|
*/
|
|
1291
1277
|
tool_rules?: Array<
|
|
1292
1278
|
| ChildToolRule
|
|
@@ -1301,14 +1287,9 @@ export interface AgentCreateParams {
|
|
|
1301
1287
|
> | null;
|
|
1302
1288
|
|
|
1303
1289
|
/**
|
|
1304
|
-
*
|
|
1290
|
+
* The tools used by the agent.
|
|
1305
1291
|
*/
|
|
1306
1292
|
tools?: Array<string> | null;
|
|
1307
|
-
|
|
1308
|
-
/**
|
|
1309
|
-
* Header param: The project slug to associate with the agent (cloud only).
|
|
1310
|
-
*/
|
|
1311
|
-
'X-Project'?: string;
|
|
1312
1293
|
}
|
|
1313
1294
|
|
|
1314
1295
|
export interface AgentRetrieveParams {
|