@letta-ai/letta-client 0.1.48 → 0.1.50
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 +27 -0
- package/api/resources/agents/client/Client.js +142 -8
- package/api/resources/agents/client/requests/BodyUploadAgentSerialized.d.ts +13 -0
- package/api/resources/agents/client/requests/BodyUploadAgentSerialized.js +5 -0
- package/api/resources/agents/client/requests/index.d.ts +1 -0
- package/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- 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/passages/client/Client.js +3 -3
- 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 +7 -7
- 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/api/resources/voice/client/Client.js +1 -1
- package/api/types/Message.d.ts +4 -0
- package/api/types/ToolReturn.d.ts +12 -0
- package/api/types/ToolReturn.js +5 -0
- package/api/types/ToolReturnStatus.d.ts +11 -0
- package/api/types/ToolReturnStatus.js +10 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/core/index.d.ts +1 -1
- package/core/index.js +1 -1
- package/dist/api/resources/agents/client/Client.d.ts +27 -0
- package/dist/api/resources/agents/client/Client.js +142 -8
- package/dist/api/resources/agents/client/requests/BodyUploadAgentSerialized.d.ts +13 -0
- package/dist/api/resources/agents/client/requests/BodyUploadAgentSerialized.js +5 -0
- package/dist/api/resources/agents/client/requests/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/blocks/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +1 -1
- 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/passages/client/Client.js +3 -3
- 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 +7 -7
- 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/api/resources/voice/client/Client.js +1 -1
- package/dist/api/types/Message.d.ts +4 -0
- package/dist/api/types/ToolReturn.d.ts +12 -0
- package/dist/api/types/ToolReturn.js +5 -0
- package/dist/api/types/ToolReturnStatus.d.ts +11 -0
- package/dist/api/types/ToolReturnStatus.js +10 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/serialization/types/Message.d.ts +3 -0
- package/dist/serialization/types/Message.js +3 -0
- package/dist/serialization/types/ToolReturn.d.ts +15 -0
- package/dist/serialization/types/ToolReturn.js +46 -0
- package/dist/serialization/types/ToolReturnStatus.d.ts +10 -0
- package/dist/serialization/types/ToolReturnStatus.js +41 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +134 -0
- package/serialization/types/Message.d.ts +3 -0
- package/serialization/types/Message.js +3 -0
- package/serialization/types/ToolReturn.d.ts +15 -0
- package/serialization/types/ToolReturn.js +46 -0
- package/serialization/types/ToolReturnStatus.d.ts +10 -0
- package/serialization/types/ToolReturnStatus.js +41 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/reference.md
CHANGED
|
@@ -1207,6 +1207,140 @@ await client.agents.create();
|
|
|
1207
1207
|
</dl>
|
|
1208
1208
|
</details>
|
|
1209
1209
|
|
|
1210
|
+
<details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">downloadAgentSerialized</a>(agentId) -> unknown</code></summary>
|
|
1211
|
+
<dl>
|
|
1212
|
+
<dd>
|
|
1213
|
+
|
|
1214
|
+
#### 📝 Description
|
|
1215
|
+
|
|
1216
|
+
<dl>
|
|
1217
|
+
<dd>
|
|
1218
|
+
|
|
1219
|
+
<dl>
|
|
1220
|
+
<dd>
|
|
1221
|
+
|
|
1222
|
+
Download the serialized JSON representation of an agent.
|
|
1223
|
+
|
|
1224
|
+
</dd>
|
|
1225
|
+
</dl>
|
|
1226
|
+
</dd>
|
|
1227
|
+
</dl>
|
|
1228
|
+
|
|
1229
|
+
#### 🔌 Usage
|
|
1230
|
+
|
|
1231
|
+
<dl>
|
|
1232
|
+
<dd>
|
|
1233
|
+
|
|
1234
|
+
<dl>
|
|
1235
|
+
<dd>
|
|
1236
|
+
|
|
1237
|
+
```typescript
|
|
1238
|
+
await client.agents.downloadAgentSerialized("agent_id");
|
|
1239
|
+
```
|
|
1240
|
+
|
|
1241
|
+
</dd>
|
|
1242
|
+
</dl>
|
|
1243
|
+
</dd>
|
|
1244
|
+
</dl>
|
|
1245
|
+
|
|
1246
|
+
#### ⚙️ Parameters
|
|
1247
|
+
|
|
1248
|
+
<dl>
|
|
1249
|
+
<dd>
|
|
1250
|
+
|
|
1251
|
+
<dl>
|
|
1252
|
+
<dd>
|
|
1253
|
+
|
|
1254
|
+
**agentId:** `string`
|
|
1255
|
+
|
|
1256
|
+
</dd>
|
|
1257
|
+
</dl>
|
|
1258
|
+
|
|
1259
|
+
<dl>
|
|
1260
|
+
<dd>
|
|
1261
|
+
|
|
1262
|
+
**requestOptions:** `Agents.RequestOptions`
|
|
1263
|
+
|
|
1264
|
+
</dd>
|
|
1265
|
+
</dl>
|
|
1266
|
+
</dd>
|
|
1267
|
+
</dl>
|
|
1268
|
+
|
|
1269
|
+
</dd>
|
|
1270
|
+
</dl>
|
|
1271
|
+
</details>
|
|
1272
|
+
|
|
1273
|
+
<details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">uploadAgentSerialized</a>(file, { ...params }) -> Letta.AgentState</code></summary>
|
|
1274
|
+
<dl>
|
|
1275
|
+
<dd>
|
|
1276
|
+
|
|
1277
|
+
#### 📝 Description
|
|
1278
|
+
|
|
1279
|
+
<dl>
|
|
1280
|
+
<dd>
|
|
1281
|
+
|
|
1282
|
+
<dl>
|
|
1283
|
+
<dd>
|
|
1284
|
+
|
|
1285
|
+
Upload a serialized agent JSON file and recreate the agent in the system.
|
|
1286
|
+
|
|
1287
|
+
</dd>
|
|
1288
|
+
</dl>
|
|
1289
|
+
</dd>
|
|
1290
|
+
</dl>
|
|
1291
|
+
|
|
1292
|
+
#### 🔌 Usage
|
|
1293
|
+
|
|
1294
|
+
<dl>
|
|
1295
|
+
<dd>
|
|
1296
|
+
|
|
1297
|
+
<dl>
|
|
1298
|
+
<dd>
|
|
1299
|
+
|
|
1300
|
+
```typescript
|
|
1301
|
+
await client.agents.uploadAgentSerialized(fs.createReadStream("/path/to/your/file"), {});
|
|
1302
|
+
```
|
|
1303
|
+
|
|
1304
|
+
</dd>
|
|
1305
|
+
</dl>
|
|
1306
|
+
</dd>
|
|
1307
|
+
</dl>
|
|
1308
|
+
|
|
1309
|
+
#### ⚙️ Parameters
|
|
1310
|
+
|
|
1311
|
+
<dl>
|
|
1312
|
+
<dd>
|
|
1313
|
+
|
|
1314
|
+
<dl>
|
|
1315
|
+
<dd>
|
|
1316
|
+
|
|
1317
|
+
**file:** `File | fs.ReadStream | Blob`
|
|
1318
|
+
|
|
1319
|
+
</dd>
|
|
1320
|
+
</dl>
|
|
1321
|
+
|
|
1322
|
+
<dl>
|
|
1323
|
+
<dd>
|
|
1324
|
+
|
|
1325
|
+
**request:** `Letta.BodyUploadAgentSerialized`
|
|
1326
|
+
|
|
1327
|
+
</dd>
|
|
1328
|
+
</dl>
|
|
1329
|
+
|
|
1330
|
+
<dl>
|
|
1331
|
+
<dd>
|
|
1332
|
+
|
|
1333
|
+
**requestOptions:** `Agents.RequestOptions`
|
|
1334
|
+
|
|
1335
|
+
</dd>
|
|
1336
|
+
</dl>
|
|
1337
|
+
</dd>
|
|
1338
|
+
</dl>
|
|
1339
|
+
|
|
1340
|
+
</dd>
|
|
1341
|
+
</dl>
|
|
1342
|
+
</details>
|
|
1343
|
+
|
|
1210
1344
|
<details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">retrieve</a>(agentId) -> Letta.AgentState</code></summary>
|
|
1211
1345
|
<dl>
|
|
1212
1346
|
<dd>
|
|
@@ -7,6 +7,7 @@ import * as core from "../../core";
|
|
|
7
7
|
import { MessageRole } from "./MessageRole";
|
|
8
8
|
import { TextContent } from "./TextContent";
|
|
9
9
|
import { ChatCompletionMessageToolCallOutput } from "./ChatCompletionMessageToolCallOutput";
|
|
10
|
+
import { ToolReturn } from "./ToolReturn";
|
|
10
11
|
export declare const Message: core.serialization.ObjectSchema<serializers.Message.Raw, Letta.Message>;
|
|
11
12
|
export declare namespace Message {
|
|
12
13
|
interface Raw {
|
|
@@ -23,5 +24,7 @@ export declare namespace Message {
|
|
|
23
24
|
tool_calls?: ChatCompletionMessageToolCallOutput.Raw[] | null;
|
|
24
25
|
tool_call_id?: string | null;
|
|
25
26
|
step_id?: string | null;
|
|
27
|
+
otid?: string | null;
|
|
28
|
+
tool_returns?: ToolReturn.Raw[] | null;
|
|
26
29
|
}
|
|
27
30
|
}
|
|
@@ -41,6 +41,7 @@ const core = __importStar(require("../../core"));
|
|
|
41
41
|
const MessageRole_1 = require("./MessageRole");
|
|
42
42
|
const TextContent_1 = require("./TextContent");
|
|
43
43
|
const ChatCompletionMessageToolCallOutput_1 = require("./ChatCompletionMessageToolCallOutput");
|
|
44
|
+
const ToolReturn_1 = require("./ToolReturn");
|
|
44
45
|
exports.Message = core.serialization.object({
|
|
45
46
|
createdById: core.serialization.property("created_by_id", core.serialization.string().optional()),
|
|
46
47
|
lastUpdatedById: core.serialization.property("last_updated_by_id", core.serialization.string().optional()),
|
|
@@ -55,4 +56,6 @@ exports.Message = core.serialization.object({
|
|
|
55
56
|
toolCalls: core.serialization.property("tool_calls", core.serialization.list(ChatCompletionMessageToolCallOutput_1.ChatCompletionMessageToolCallOutput).optional()),
|
|
56
57
|
toolCallId: core.serialization.property("tool_call_id", core.serialization.string().optional()),
|
|
57
58
|
stepId: core.serialization.property("step_id", core.serialization.string().optional()),
|
|
59
|
+
otid: core.serialization.string().optional(),
|
|
60
|
+
toolReturns: core.serialization.property("tool_returns", core.serialization.list(ToolReturn_1.ToolReturn).optional()),
|
|
58
61
|
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Letta from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
import { ToolReturnStatus } from "./ToolReturnStatus";
|
|
8
|
+
export declare const ToolReturn: core.serialization.ObjectSchema<serializers.ToolReturn.Raw, Letta.ToolReturn>;
|
|
9
|
+
export declare namespace ToolReturn {
|
|
10
|
+
interface Raw {
|
|
11
|
+
status: ToolReturnStatus.Raw;
|
|
12
|
+
stdout?: string[] | null;
|
|
13
|
+
stderr?: string[] | null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ToolReturn = void 0;
|
|
40
|
+
const core = __importStar(require("../../core"));
|
|
41
|
+
const ToolReturnStatus_1 = require("./ToolReturnStatus");
|
|
42
|
+
exports.ToolReturn = core.serialization.object({
|
|
43
|
+
status: ToolReturnStatus_1.ToolReturnStatus,
|
|
44
|
+
stdout: core.serialization.list(core.serialization.string()).optional(),
|
|
45
|
+
stderr: core.serialization.list(core.serialization.string()).optional(),
|
|
46
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as serializers from "../index";
|
|
5
|
+
import * as Letta from "../../api/index";
|
|
6
|
+
import * as core from "../../core";
|
|
7
|
+
export declare const ToolReturnStatus: core.serialization.Schema<serializers.ToolReturnStatus.Raw, Letta.ToolReturnStatus>;
|
|
8
|
+
export declare namespace ToolReturnStatus {
|
|
9
|
+
type Raw = "success" | "error";
|
|
10
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.ToolReturnStatus = void 0;
|
|
40
|
+
const core = __importStar(require("../../core"));
|
|
41
|
+
exports.ToolReturnStatus = core.serialization.enum_(["success", "error"]);
|
|
@@ -144,6 +144,8 @@ export * from "./ToolCallDelta";
|
|
|
144
144
|
export * from "./ToolCallMessageToolCall";
|
|
145
145
|
export * from "./ToolCallMessage";
|
|
146
146
|
export * from "./ToolCreate";
|
|
147
|
+
export * from "./ToolReturnStatus";
|
|
148
|
+
export * from "./ToolReturn";
|
|
147
149
|
export * from "./ToolReturnMessageStatus";
|
|
148
150
|
export * from "./ToolReturnMessage";
|
|
149
151
|
export * from "./ToolType";
|
|
@@ -160,6 +160,8 @@ __exportStar(require("./ToolCallDelta"), exports);
|
|
|
160
160
|
__exportStar(require("./ToolCallMessageToolCall"), exports);
|
|
161
161
|
__exportStar(require("./ToolCallMessage"), exports);
|
|
162
162
|
__exportStar(require("./ToolCreate"), exports);
|
|
163
|
+
__exportStar(require("./ToolReturnStatus"), exports);
|
|
164
|
+
__exportStar(require("./ToolReturn"), exports);
|
|
163
165
|
__exportStar(require("./ToolReturnMessageStatus"), exports);
|
|
164
166
|
__exportStar(require("./ToolReturnMessage"), exports);
|
|
165
167
|
__exportStar(require("./ToolType"), exports);
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.50";
|
package/version.js
CHANGED