@letta-ai/letta-client 1.0.0-alpha.19 → 1.0.0-alpha.20
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 +14 -0
- package/README.md +15 -56
- package/client.d.mts +16 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -16
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +139 -129
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +139 -129
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +6 -6
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +6 -6
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/blocks.d.mts +21 -21
- package/resources/agents/blocks.d.mts.map +1 -1
- package/resources/agents/blocks.d.ts +21 -21
- package/resources/agents/blocks.d.ts.map +1 -1
- package/resources/agents/blocks.js +10 -10
- package/resources/agents/blocks.js.map +1 -1
- package/resources/agents/blocks.mjs +10 -10
- package/resources/agents/blocks.mjs.map +1 -1
- package/resources/agents/index.d.mts +3 -3
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +3 -3
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/messages.d.mts +136 -136
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +136 -136
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js +21 -21
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs +21 -21
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/archives/archives.d.mts +16 -12
- package/resources/archives/archives.d.mts.map +1 -1
- package/resources/archives/archives.d.ts +16 -12
- package/resources/archives/archives.d.ts.map +1 -1
- package/resources/archives/archives.js +6 -6
- package/resources/archives/archives.js.map +1 -1
- package/resources/archives/archives.mjs +6 -6
- package/resources/archives/archives.mjs.map +1 -1
- package/resources/archives/index.d.mts +1 -1
- package/resources/archives/index.d.mts.map +1 -1
- package/resources/archives/index.d.ts +1 -1
- package/resources/archives/index.d.ts.map +1 -1
- package/resources/blocks/blocks.d.mts +61 -61
- package/resources/blocks/blocks.d.mts.map +1 -1
- package/resources/blocks/blocks.d.ts +61 -61
- package/resources/blocks/blocks.d.ts.map +1 -1
- package/resources/blocks/blocks.js +6 -6
- package/resources/blocks/blocks.js.map +1 -1
- package/resources/blocks/blocks.mjs +6 -6
- package/resources/blocks/blocks.mjs.map +1 -1
- package/resources/blocks/index.d.mts +1 -1
- package/resources/blocks/index.d.mts.map +1 -1
- package/resources/blocks/index.d.ts +1 -1
- package/resources/blocks/index.d.ts.map +1 -1
- package/resources/folders/folders.d.mts +12 -12
- package/resources/folders/folders.d.mts.map +1 -1
- package/resources/folders/folders.d.ts +12 -12
- package/resources/folders/folders.d.ts.map +1 -1
- package/resources/folders/folders.js +6 -6
- package/resources/folders/folders.js.map +1 -1
- package/resources/folders/folders.mjs +6 -6
- package/resources/folders/folders.mjs.map +1 -1
- package/resources/folders/index.d.mts +1 -1
- package/resources/folders/index.d.mts.map +1 -1
- package/resources/folders/index.d.ts +1 -1
- package/resources/folders/index.d.ts.map +1 -1
- package/resources/groups/groups.d.mts +20 -20
- package/resources/groups/groups.d.mts.map +1 -1
- package/resources/groups/groups.d.ts +20 -20
- package/resources/groups/groups.d.ts.map +1 -1
- package/resources/groups/groups.js +6 -6
- package/resources/groups/groups.js.map +1 -1
- package/resources/groups/groups.mjs +6 -6
- package/resources/groups/groups.mjs.map +1 -1
- package/resources/groups/index.d.mts +2 -2
- package/resources/groups/index.d.mts.map +1 -1
- package/resources/groups/index.d.ts +2 -2
- package/resources/groups/index.d.ts.map +1 -1
- package/resources/groups/messages.d.mts +84 -84
- package/resources/groups/messages.d.mts.map +1 -1
- package/resources/groups/messages.d.ts +84 -84
- package/resources/groups/messages.d.ts.map +1 -1
- package/resources/groups/messages.js +15 -15
- package/resources/groups/messages.js.map +1 -1
- package/resources/groups/messages.mjs +15 -15
- package/resources/groups/messages.mjs.map +1 -1
- package/resources/identities/identities.d.mts +15 -15
- package/resources/identities/identities.d.mts.map +1 -1
- package/resources/identities/identities.d.ts +15 -15
- package/resources/identities/identities.d.ts.map +1 -1
- package/resources/identities/identities.js +6 -6
- package/resources/identities/identities.js.map +1 -1
- package/resources/identities/identities.mjs +6 -6
- package/resources/identities/identities.mjs.map +1 -1
- package/resources/identities/index.d.mts +1 -1
- package/resources/identities/index.d.mts.map +1 -1
- package/resources/identities/index.d.ts +1 -1
- package/resources/identities/index.d.ts.map +1 -1
- package/resources/index.d.mts +8 -8
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -8
- package/resources/index.d.ts.map +1 -1
- package/resources/mcp-servers/index.d.mts +1 -1
- package/resources/mcp-servers/index.d.mts.map +1 -1
- package/resources/mcp-servers/index.d.ts +1 -1
- package/resources/mcp-servers/index.d.ts.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.mts +10 -10
- package/resources/mcp-servers/mcp-servers.d.mts.map +1 -1
- package/resources/mcp-servers/mcp-servers.d.ts +10 -10
- package/resources/mcp-servers/mcp-servers.d.ts.map +1 -1
- package/resources/mcp-servers/mcp-servers.js +6 -6
- package/resources/mcp-servers/mcp-servers.js.map +1 -1
- package/resources/mcp-servers/mcp-servers.mjs +6 -6
- package/resources/mcp-servers/mcp-servers.mjs.map +1 -1
- package/resources/models/models.d.mts +5 -0
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +5 -0
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/tools.d.mts +36 -36
- package/resources/tools.d.mts.map +1 -1
- package/resources/tools.d.ts +36 -36
- package/resources/tools.d.ts.map +1 -1
- package/resources/tools.js +6 -6
- package/resources/tools.js.map +1 -1
- package/resources/tools.mjs +6 -6
- package/resources/tools.mjs.map +1 -1
- package/src/client.ts +18 -18
- package/src/resources/agents/agents.ts +187 -177
- package/src/resources/agents/blocks.ts +35 -35
- package/src/resources/agents/index.ts +9 -9
- package/src/resources/agents/messages.ts +200 -200
- package/src/resources/archives/archives.ts +22 -17
- package/src/resources/archives/index.ts +1 -1
- package/src/resources/blocks/blocks.ts +69 -69
- package/src/resources/blocks/index.ts +1 -1
- package/src/resources/folders/folders.ts +16 -16
- package/src/resources/folders/index.ts +1 -1
- package/src/resources/groups/groups.ts +33 -33
- package/src/resources/groups/index.ts +4 -4
- package/src/resources/groups/messages.ts +126 -126
- package/src/resources/identities/identities.ts +22 -22
- package/src/resources/identities/index.ts +1 -1
- package/src/resources/index.ts +9 -9
- package/src/resources/mcp-servers/index.ts +2 -2
- package/src/resources/mcp-servers/mcp-servers.ts +23 -23
- package/src/resources/models/models.ts +5 -0
- package/src/resources/tools.ts +46 -46
- 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
|
@@ -22,6 +22,21 @@ export class Blocks extends APIResource {
|
|
|
22
22
|
return this._client.get(path`/v1/agents/${agent_id}/core-memory/blocks/${blockLabel}`, options);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Updates a core memory block of an agent.
|
|
27
|
+
*/
|
|
28
|
+
update(
|
|
29
|
+
blockLabel: string,
|
|
30
|
+
params: BlockUpdateParams,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<BlocksBlocksAPI.BlockResponse> {
|
|
33
|
+
const { agent_id, ...body } = params;
|
|
34
|
+
return this._client.patch(path`/v1/agents/${agent_id}/core-memory/blocks/${blockLabel}`, {
|
|
35
|
+
body,
|
|
36
|
+
...options,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
25
40
|
/**
|
|
26
41
|
* Retrieve the core memory blocks of a specific agent.
|
|
27
42
|
*/
|
|
@@ -60,21 +75,6 @@ export class Blocks extends APIResource {
|
|
|
60
75
|
const { agent_id } = params;
|
|
61
76
|
return this._client.patch(path`/v1/agents/${agent_id}/core-memory/blocks/detach/${blockID}`, options);
|
|
62
77
|
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Updates a core memory block of an agent.
|
|
66
|
-
*/
|
|
67
|
-
modify(
|
|
68
|
-
blockLabel: string,
|
|
69
|
-
params: BlockModifyParams,
|
|
70
|
-
options?: RequestOptions,
|
|
71
|
-
): APIPromise<BlocksBlocksAPI.BlockResponse> {
|
|
72
|
-
const { agent_id, ...body } = params;
|
|
73
|
-
return this._client.patch(path`/v1/agents/${agent_id}/core-memory/blocks/${blockLabel}`, {
|
|
74
|
-
body,
|
|
75
|
-
...options,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
/**
|
|
@@ -175,7 +175,7 @@ export interface Block {
|
|
|
175
175
|
/**
|
|
176
176
|
* Update a block
|
|
177
177
|
*/
|
|
178
|
-
export interface
|
|
178
|
+
export interface BlockUpdate {
|
|
179
179
|
/**
|
|
180
180
|
* The base template id of the block.
|
|
181
181
|
*/
|
|
@@ -259,23 +259,7 @@ export interface BlockRetrieveParams {
|
|
|
259
259
|
agent_id: string;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
export interface
|
|
263
|
-
|
|
264
|
-
export interface BlockAttachParams {
|
|
265
|
-
/**
|
|
266
|
-
* The ID of the agent in the format 'agent-<uuid4>'
|
|
267
|
-
*/
|
|
268
|
-
agent_id: string;
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export interface BlockDetachParams {
|
|
272
|
-
/**
|
|
273
|
-
* The ID of the agent in the format 'agent-<uuid4>'
|
|
274
|
-
*/
|
|
275
|
-
agent_id: string;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
export interface BlockModifyParams {
|
|
262
|
+
export interface BlockUpdateParams {
|
|
279
263
|
/**
|
|
280
264
|
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
281
265
|
*/
|
|
@@ -357,15 +341,31 @@ export interface BlockModifyParams {
|
|
|
357
341
|
value?: string | null;
|
|
358
342
|
}
|
|
359
343
|
|
|
344
|
+
export interface BlockListParams extends ArrayPageParams {}
|
|
345
|
+
|
|
346
|
+
export interface BlockAttachParams {
|
|
347
|
+
/**
|
|
348
|
+
* The ID of the agent in the format 'agent-<uuid4>'
|
|
349
|
+
*/
|
|
350
|
+
agent_id: string;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
export interface BlockDetachParams {
|
|
354
|
+
/**
|
|
355
|
+
* The ID of the agent in the format 'agent-<uuid4>'
|
|
356
|
+
*/
|
|
357
|
+
agent_id: string;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
360
|
export declare namespace Blocks {
|
|
361
361
|
export {
|
|
362
362
|
type Block as Block,
|
|
363
|
-
type
|
|
363
|
+
type BlockUpdate as BlockUpdate,
|
|
364
364
|
type BlockRetrieveParams as BlockRetrieveParams,
|
|
365
|
+
type BlockUpdateParams as BlockUpdateParams,
|
|
365
366
|
type BlockListParams as BlockListParams,
|
|
366
367
|
type BlockAttachParams as BlockAttachParams,
|
|
367
368
|
type BlockDetachParams as BlockDetachParams,
|
|
368
|
-
type BlockModifyParams as BlockModifyParams,
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
371
|
|
|
@@ -34,10 +34,10 @@ export {
|
|
|
34
34
|
type AgentImportFileResponse,
|
|
35
35
|
type AgentCreateParams,
|
|
36
36
|
type AgentRetrieveParams,
|
|
37
|
+
type AgentUpdateParams,
|
|
37
38
|
type AgentListParams,
|
|
38
39
|
type AgentExportFileParams,
|
|
39
40
|
type AgentImportFileParams,
|
|
40
|
-
type AgentModifyParams,
|
|
41
41
|
type AgentStatesArrayPage,
|
|
42
42
|
} from './agents';
|
|
43
43
|
export {
|
|
@@ -50,12 +50,12 @@ export {
|
|
|
50
50
|
export {
|
|
51
51
|
Blocks,
|
|
52
52
|
type Block,
|
|
53
|
-
type
|
|
53
|
+
type BlockUpdate,
|
|
54
54
|
type BlockRetrieveParams,
|
|
55
|
+
type BlockUpdateParams,
|
|
55
56
|
type BlockListParams,
|
|
56
57
|
type BlockAttachParams,
|
|
57
58
|
type BlockDetachParams,
|
|
58
|
-
type BlockModifyParams,
|
|
59
59
|
} from './blocks';
|
|
60
60
|
export {
|
|
61
61
|
Files,
|
|
@@ -125,16 +125,16 @@ export {
|
|
|
125
125
|
type UpdateSystemMessage,
|
|
126
126
|
type UpdateUserMessage,
|
|
127
127
|
type UserMessage,
|
|
128
|
+
type MessageUpdateResponse,
|
|
128
129
|
type MessageCancelResponse,
|
|
129
|
-
type
|
|
130
|
+
type MessageCreateParams,
|
|
131
|
+
type MessageCreateParamsNonStreaming,
|
|
132
|
+
type MessageCreateParamsStreaming,
|
|
133
|
+
type MessageUpdateParams,
|
|
130
134
|
type MessageListParams,
|
|
131
135
|
type MessageCancelParams,
|
|
132
|
-
type
|
|
136
|
+
type MessageCreateAsyncParams,
|
|
133
137
|
type MessageResetParams,
|
|
134
|
-
type MessageSendParams,
|
|
135
|
-
type MessageSendParamsNonStreaming,
|
|
136
|
-
type MessageSendParamsStreaming,
|
|
137
|
-
type MessageSendAsyncParams,
|
|
138
138
|
type MessageStreamParams,
|
|
139
139
|
type RunsArrayPage,
|
|
140
140
|
type MessagesArrayPage,
|
|
@@ -13,57 +13,6 @@ import { RequestOptions } from '../../internal/request-options';
|
|
|
13
13
|
import { path } from '../../internal/utils/path';
|
|
14
14
|
|
|
15
15
|
export class Messages extends APIResource {
|
|
16
|
-
/**
|
|
17
|
-
* Retrieve message history for an agent.
|
|
18
|
-
*/
|
|
19
|
-
list(
|
|
20
|
-
agentID: string,
|
|
21
|
-
query: MessageListParams | null | undefined = {},
|
|
22
|
-
options?: RequestOptions,
|
|
23
|
-
): PagePromise<MessagesArrayPage, Message> {
|
|
24
|
-
return this._client.getAPIList(path`/v1/agents/${agentID}/messages`, ArrayPage<Message>, {
|
|
25
|
-
query,
|
|
26
|
-
...options,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Cancel runs associated with an agent. If run_ids are passed in, cancel those in
|
|
32
|
-
* particular.
|
|
33
|
-
*
|
|
34
|
-
* Note to cancel active runs associated with an agent, redis is required.
|
|
35
|
-
*/
|
|
36
|
-
cancel(
|
|
37
|
-
agentID: string,
|
|
38
|
-
body: MessageCancelParams | null | undefined = {},
|
|
39
|
-
options?: RequestOptions,
|
|
40
|
-
): APIPromise<MessageCancelResponse> {
|
|
41
|
-
return this._client.post(path`/v1/agents/${agentID}/messages/cancel`, { body, ...options });
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Update the details of a message associated with an agent.
|
|
46
|
-
*/
|
|
47
|
-
modify(
|
|
48
|
-
messageID: string,
|
|
49
|
-
params: MessageModifyParams,
|
|
50
|
-
options?: RequestOptions,
|
|
51
|
-
): APIPromise<MessageModifyResponse> {
|
|
52
|
-
const { agent_id, ...body } = params;
|
|
53
|
-
return this._client.patch(path`/v1/agents/${agent_id}/messages/${messageID}`, { body, ...options });
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Resets the messages for an agent
|
|
58
|
-
*/
|
|
59
|
-
reset(
|
|
60
|
-
agentID: string,
|
|
61
|
-
body: MessageResetParams,
|
|
62
|
-
options?: RequestOptions,
|
|
63
|
-
): APIPromise<AgentsAPI.AgentState> {
|
|
64
|
-
return this._client.patch(path`/v1/agents/${agentID}/reset-messages`, { body, ...options });
|
|
65
|
-
}
|
|
66
|
-
|
|
67
16
|
/**
|
|
68
17
|
* Process a user message and return the agent's response. This endpoint accepts a
|
|
69
18
|
* message from a user and processes it through the agent.
|
|
@@ -80,24 +29,24 @@ export class Messages extends APIResource {
|
|
|
80
29
|
* - `include_pings`: Include keepalive pings to prevent connection timeouts
|
|
81
30
|
* - `background`: Process the request in the background
|
|
82
31
|
*/
|
|
83
|
-
|
|
32
|
+
create(
|
|
84
33
|
agentID: string,
|
|
85
|
-
body:
|
|
34
|
+
body: MessageCreateParamsNonStreaming,
|
|
86
35
|
options?: RequestOptions,
|
|
87
36
|
): APIPromise<LettaResponse>;
|
|
88
|
-
|
|
37
|
+
create(
|
|
89
38
|
agentID: string,
|
|
90
|
-
body:
|
|
39
|
+
body: MessageCreateParamsStreaming,
|
|
91
40
|
options?: RequestOptions,
|
|
92
41
|
): APIPromise<Stream<LettaStreamingResponse>>;
|
|
93
|
-
|
|
42
|
+
create(
|
|
94
43
|
agentID: string,
|
|
95
|
-
body:
|
|
44
|
+
body: MessageCreateParamsBase,
|
|
96
45
|
options?: RequestOptions,
|
|
97
46
|
): APIPromise<Stream<LettaStreamingResponse> | LettaResponse>;
|
|
98
|
-
|
|
47
|
+
create(
|
|
99
48
|
agentID: string,
|
|
100
|
-
body:
|
|
49
|
+
body: MessageCreateParams,
|
|
101
50
|
options?: RequestOptions,
|
|
102
51
|
): APIPromise<LettaResponse> | APIPromise<Stream<LettaStreamingResponse>> {
|
|
103
52
|
return this._client.post(path`/v1/agents/${agentID}/messages`, {
|
|
@@ -107,6 +56,46 @@ export class Messages extends APIResource {
|
|
|
107
56
|
}) as APIPromise<LettaResponse> | APIPromise<Stream<LettaStreamingResponse>>;
|
|
108
57
|
}
|
|
109
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Update the details of a message associated with an agent.
|
|
61
|
+
*/
|
|
62
|
+
update(
|
|
63
|
+
messageID: string,
|
|
64
|
+
params: MessageUpdateParams,
|
|
65
|
+
options?: RequestOptions,
|
|
66
|
+
): APIPromise<MessageUpdateResponse> {
|
|
67
|
+
const { agent_id, ...body } = params;
|
|
68
|
+
return this._client.patch(path`/v1/agents/${agent_id}/messages/${messageID}`, { body, ...options });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Retrieve message history for an agent.
|
|
73
|
+
*/
|
|
74
|
+
list(
|
|
75
|
+
agentID: string,
|
|
76
|
+
query: MessageListParams | null | undefined = {},
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): PagePromise<MessagesArrayPage, Message> {
|
|
79
|
+
return this._client.getAPIList(path`/v1/agents/${agentID}/messages`, ArrayPage<Message>, {
|
|
80
|
+
query,
|
|
81
|
+
...options,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Cancel runs associated with an agent. If run_ids are passed in, cancel those in
|
|
87
|
+
* particular.
|
|
88
|
+
*
|
|
89
|
+
* Note to cancel active runs associated with an agent, redis is required.
|
|
90
|
+
*/
|
|
91
|
+
cancel(
|
|
92
|
+
agentID: string,
|
|
93
|
+
body: MessageCancelParams | null | undefined = {},
|
|
94
|
+
options?: RequestOptions,
|
|
95
|
+
): APIPromise<MessageCancelResponse> {
|
|
96
|
+
return this._client.post(path`/v1/agents/${agentID}/messages/cancel`, { body, ...options });
|
|
97
|
+
}
|
|
98
|
+
|
|
110
99
|
/**
|
|
111
100
|
* Asynchronously process a user message and return a run object. The actual
|
|
112
101
|
* processing happens in the background, and the status can be checked using the
|
|
@@ -115,10 +104,21 @@ export class Messages extends APIResource {
|
|
|
115
104
|
* This is "asynchronous" in the sense that it's a background run and explicitly
|
|
116
105
|
* must be fetched by the run ID.
|
|
117
106
|
*/
|
|
118
|
-
|
|
107
|
+
createAsync(agentID: string, body: MessageCreateAsyncParams, options?: RequestOptions): APIPromise<Run> {
|
|
119
108
|
return this._client.post(path`/v1/agents/${agentID}/messages/async`, { body, ...options });
|
|
120
109
|
}
|
|
121
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Resets the messages for an agent
|
|
113
|
+
*/
|
|
114
|
+
reset(
|
|
115
|
+
agentID: string,
|
|
116
|
+
body: MessageResetParams,
|
|
117
|
+
options?: RequestOptions,
|
|
118
|
+
): APIPromise<AgentsAPI.AgentState> {
|
|
119
|
+
return this._client.patch(path`/v1/agents/${agentID}/reset-messages`, { body, ...options });
|
|
120
|
+
}
|
|
121
|
+
|
|
122
122
|
/**
|
|
123
123
|
* Process a user message and return the agent's response. This endpoint accepts a
|
|
124
124
|
* message from a user and processes it through the agent. It will stream the steps
|
|
@@ -1709,8 +1709,6 @@ export interface UserMessage {
|
|
|
1709
1709
|
step_id?: string | null;
|
|
1710
1710
|
}
|
|
1711
1711
|
|
|
1712
|
-
export type MessageCancelResponse = { [key: string]: unknown };
|
|
1713
|
-
|
|
1714
1712
|
/**
|
|
1715
1713
|
* A message generated by the system. Never streamed back on a response, only used
|
|
1716
1714
|
* for cursor pagination.
|
|
@@ -1719,7 +1717,7 @@ export type MessageCancelResponse = { [key: string]: unknown };
|
|
|
1719
1717
|
* created in ISO format name (Optional[str]): The name of the sender of the
|
|
1720
1718
|
* message content (str): The message content sent by the system
|
|
1721
1719
|
*/
|
|
1722
|
-
export type
|
|
1720
|
+
export type MessageUpdateResponse =
|
|
1723
1721
|
| SystemMessage
|
|
1724
1722
|
| UserMessage
|
|
1725
1723
|
| ReasoningMessage
|
|
@@ -1732,130 +1730,11 @@ export type MessageModifyResponse =
|
|
|
1732
1730
|
| SummaryMessage
|
|
1733
1731
|
| EventMessage;
|
|
1734
1732
|
|
|
1735
|
-
export
|
|
1736
|
-
/**
|
|
1737
|
-
* @deprecated The name of the message argument.
|
|
1738
|
-
*/
|
|
1739
|
-
assistant_message_tool_kwarg?: string;
|
|
1740
|
-
|
|
1741
|
-
/**
|
|
1742
|
-
* @deprecated The name of the designated message tool.
|
|
1743
|
-
*/
|
|
1744
|
-
assistant_message_tool_name?: string;
|
|
1745
|
-
|
|
1746
|
-
/**
|
|
1747
|
-
* Group ID to filter messages by.
|
|
1748
|
-
*/
|
|
1749
|
-
group_id?: string | null;
|
|
1750
|
-
|
|
1751
|
-
/**
|
|
1752
|
-
* Whether to include error messages and error statuses. For debugging purposes
|
|
1753
|
-
* only.
|
|
1754
|
-
*/
|
|
1755
|
-
include_err?: boolean | null;
|
|
1756
|
-
|
|
1757
|
-
/**
|
|
1758
|
-
* @deprecated Whether to use assistant messages
|
|
1759
|
-
*/
|
|
1760
|
-
use_assistant_message?: boolean;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
export interface MessageCancelParams {
|
|
1764
|
-
/**
|
|
1765
|
-
* Optional list of run IDs to cancel
|
|
1766
|
-
*/
|
|
1767
|
-
run_ids?: Array<string> | null;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
|
-
export type MessageModifyParams =
|
|
1771
|
-
| MessageModifyParams.UpdateSystemMessage
|
|
1772
|
-
| MessageModifyParams.UpdateUserMessage
|
|
1773
|
-
| MessageModifyParams.UpdateReasoningMessage
|
|
1774
|
-
| MessageModifyParams.UpdateAssistantMessage;
|
|
1775
|
-
|
|
1776
|
-
export declare namespace MessageModifyParams {
|
|
1777
|
-
export interface UpdateSystemMessage {
|
|
1778
|
-
/**
|
|
1779
|
-
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1780
|
-
*/
|
|
1781
|
-
agent_id: string;
|
|
1782
|
-
|
|
1783
|
-
/**
|
|
1784
|
-
* Body param: The message content sent by the system (can be a string or an array
|
|
1785
|
-
* of multi-modal content parts)
|
|
1786
|
-
*/
|
|
1787
|
-
content: string;
|
|
1788
|
-
|
|
1789
|
-
/**
|
|
1790
|
-
* Body param:
|
|
1791
|
-
*/
|
|
1792
|
-
message_type?: 'system_message';
|
|
1793
|
-
}
|
|
1794
|
-
|
|
1795
|
-
export interface UpdateUserMessage {
|
|
1796
|
-
/**
|
|
1797
|
-
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1798
|
-
*/
|
|
1799
|
-
agent_id: string;
|
|
1800
|
-
|
|
1801
|
-
/**
|
|
1802
|
-
* Body param: The message content sent by the user (can be a string or an array of
|
|
1803
|
-
* multi-modal content parts)
|
|
1804
|
-
*/
|
|
1805
|
-
content: Array<LettaUserMessageContentUnion> | string;
|
|
1806
|
-
|
|
1807
|
-
/**
|
|
1808
|
-
* Body param:
|
|
1809
|
-
*/
|
|
1810
|
-
message_type?: 'user_message';
|
|
1811
|
-
}
|
|
1812
|
-
|
|
1813
|
-
export interface UpdateReasoningMessage {
|
|
1814
|
-
/**
|
|
1815
|
-
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1816
|
-
*/
|
|
1817
|
-
agent_id: string;
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* Body param:
|
|
1821
|
-
*/
|
|
1822
|
-
reasoning: string;
|
|
1823
|
-
|
|
1824
|
-
/**
|
|
1825
|
-
* Body param:
|
|
1826
|
-
*/
|
|
1827
|
-
message_type?: 'reasoning_message';
|
|
1828
|
-
}
|
|
1829
|
-
|
|
1830
|
-
export interface UpdateAssistantMessage {
|
|
1831
|
-
/**
|
|
1832
|
-
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1833
|
-
*/
|
|
1834
|
-
agent_id: string;
|
|
1835
|
-
|
|
1836
|
-
/**
|
|
1837
|
-
* Body param: The message content sent by the assistant (can be a string or an
|
|
1838
|
-
* array of content parts)
|
|
1839
|
-
*/
|
|
1840
|
-
content: Array<LettaAssistantMessageContentUnion> | string;
|
|
1841
|
-
|
|
1842
|
-
/**
|
|
1843
|
-
* Body param:
|
|
1844
|
-
*/
|
|
1845
|
-
message_type?: 'assistant_message';
|
|
1846
|
-
}
|
|
1847
|
-
}
|
|
1848
|
-
|
|
1849
|
-
export interface MessageResetParams {
|
|
1850
|
-
/**
|
|
1851
|
-
* If true, adds the default initial messages after resetting.
|
|
1852
|
-
*/
|
|
1853
|
-
add_default_initial_messages?: boolean;
|
|
1854
|
-
}
|
|
1733
|
+
export type MessageCancelResponse = { [key: string]: unknown };
|
|
1855
1734
|
|
|
1856
|
-
export type
|
|
1735
|
+
export type MessageCreateParams = MessageCreateParamsNonStreaming | MessageCreateParamsStreaming;
|
|
1857
1736
|
|
|
1858
|
-
export interface
|
|
1737
|
+
export interface MessageCreateParamsBase {
|
|
1859
1738
|
/**
|
|
1860
1739
|
* @deprecated The name of the message argument in the designated message tool.
|
|
1861
1740
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -1907,7 +1786,7 @@ export interface MessageSendParamsBase {
|
|
|
1907
1786
|
| ReasoningContent
|
|
1908
1787
|
| RedactedReasoningContent
|
|
1909
1788
|
| OmittedReasoningContent
|
|
1910
|
-
|
|
|
1789
|
+
| MessageCreateParams.SummarizedReasoningContent
|
|
1911
1790
|
>
|
|
1912
1791
|
| null;
|
|
1913
1792
|
|
|
@@ -1941,7 +1820,7 @@ export interface MessageSendParamsBase {
|
|
|
1941
1820
|
use_assistant_message?: boolean;
|
|
1942
1821
|
}
|
|
1943
1822
|
|
|
1944
|
-
export namespace
|
|
1823
|
+
export namespace MessageCreateParams {
|
|
1945
1824
|
/**
|
|
1946
1825
|
* The style of reasoning content returned by the OpenAI Responses API
|
|
1947
1826
|
*/
|
|
@@ -1981,11 +1860,11 @@ export namespace MessageSendParams {
|
|
|
1981
1860
|
}
|
|
1982
1861
|
}
|
|
1983
1862
|
|
|
1984
|
-
export type
|
|
1985
|
-
export type
|
|
1863
|
+
export type MessageCreateParamsNonStreaming = MessagesAPI.MessageCreateParamsNonStreaming;
|
|
1864
|
+
export type MessageCreateParamsStreaming = MessagesAPI.MessageCreateParamsStreaming;
|
|
1986
1865
|
}
|
|
1987
1866
|
|
|
1988
|
-
export interface
|
|
1867
|
+
export interface MessageCreateParamsNonStreaming extends MessageCreateParamsBase {
|
|
1989
1868
|
/**
|
|
1990
1869
|
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
1991
1870
|
* returns a complete response.
|
|
@@ -1993,7 +1872,7 @@ export interface MessageSendParamsNonStreaming extends MessageSendParamsBase {
|
|
|
1993
1872
|
streaming?: false;
|
|
1994
1873
|
}
|
|
1995
1874
|
|
|
1996
|
-
export interface
|
|
1875
|
+
export interface MessageCreateParamsStreaming extends MessageCreateParamsBase {
|
|
1997
1876
|
/**
|
|
1998
1877
|
* If True, returns a streaming response (Server-Sent Events). If False (default),
|
|
1999
1878
|
* returns a complete response.
|
|
@@ -2001,7 +1880,121 @@ export interface MessageSendParamsStreaming extends MessageSendParamsBase {
|
|
|
2001
1880
|
streaming: true;
|
|
2002
1881
|
}
|
|
2003
1882
|
|
|
2004
|
-
export
|
|
1883
|
+
export type MessageUpdateParams =
|
|
1884
|
+
| MessageUpdateParams.UpdateSystemMessage
|
|
1885
|
+
| MessageUpdateParams.UpdateUserMessage
|
|
1886
|
+
| MessageUpdateParams.UpdateReasoningMessage
|
|
1887
|
+
| MessageUpdateParams.UpdateAssistantMessage;
|
|
1888
|
+
|
|
1889
|
+
export declare namespace MessageUpdateParams {
|
|
1890
|
+
export interface UpdateSystemMessage {
|
|
1891
|
+
/**
|
|
1892
|
+
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1893
|
+
*/
|
|
1894
|
+
agent_id: string;
|
|
1895
|
+
|
|
1896
|
+
/**
|
|
1897
|
+
* Body param: The message content sent by the system (can be a string or an array
|
|
1898
|
+
* of multi-modal content parts)
|
|
1899
|
+
*/
|
|
1900
|
+
content: string;
|
|
1901
|
+
|
|
1902
|
+
/**
|
|
1903
|
+
* Body param:
|
|
1904
|
+
*/
|
|
1905
|
+
message_type?: 'system_message';
|
|
1906
|
+
}
|
|
1907
|
+
|
|
1908
|
+
export interface UpdateUserMessage {
|
|
1909
|
+
/**
|
|
1910
|
+
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1911
|
+
*/
|
|
1912
|
+
agent_id: string;
|
|
1913
|
+
|
|
1914
|
+
/**
|
|
1915
|
+
* Body param: The message content sent by the user (can be a string or an array of
|
|
1916
|
+
* multi-modal content parts)
|
|
1917
|
+
*/
|
|
1918
|
+
content: Array<LettaUserMessageContentUnion> | string;
|
|
1919
|
+
|
|
1920
|
+
/**
|
|
1921
|
+
* Body param:
|
|
1922
|
+
*/
|
|
1923
|
+
message_type?: 'user_message';
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
export interface UpdateReasoningMessage {
|
|
1927
|
+
/**
|
|
1928
|
+
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1929
|
+
*/
|
|
1930
|
+
agent_id: string;
|
|
1931
|
+
|
|
1932
|
+
/**
|
|
1933
|
+
* Body param:
|
|
1934
|
+
*/
|
|
1935
|
+
reasoning: string;
|
|
1936
|
+
|
|
1937
|
+
/**
|
|
1938
|
+
* Body param:
|
|
1939
|
+
*/
|
|
1940
|
+
message_type?: 'reasoning_message';
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
export interface UpdateAssistantMessage {
|
|
1944
|
+
/**
|
|
1945
|
+
* Path param: The ID of the agent in the format 'agent-<uuid4>'
|
|
1946
|
+
*/
|
|
1947
|
+
agent_id: string;
|
|
1948
|
+
|
|
1949
|
+
/**
|
|
1950
|
+
* Body param: The message content sent by the assistant (can be a string or an
|
|
1951
|
+
* array of content parts)
|
|
1952
|
+
*/
|
|
1953
|
+
content: Array<LettaAssistantMessageContentUnion> | string;
|
|
1954
|
+
|
|
1955
|
+
/**
|
|
1956
|
+
* Body param:
|
|
1957
|
+
*/
|
|
1958
|
+
message_type?: 'assistant_message';
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
export interface MessageListParams extends ArrayPageParams {
|
|
1963
|
+
/**
|
|
1964
|
+
* @deprecated The name of the message argument.
|
|
1965
|
+
*/
|
|
1966
|
+
assistant_message_tool_kwarg?: string;
|
|
1967
|
+
|
|
1968
|
+
/**
|
|
1969
|
+
* @deprecated The name of the designated message tool.
|
|
1970
|
+
*/
|
|
1971
|
+
assistant_message_tool_name?: string;
|
|
1972
|
+
|
|
1973
|
+
/**
|
|
1974
|
+
* Group ID to filter messages by.
|
|
1975
|
+
*/
|
|
1976
|
+
group_id?: string | null;
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
* Whether to include error messages and error statuses. For debugging purposes
|
|
1980
|
+
* only.
|
|
1981
|
+
*/
|
|
1982
|
+
include_err?: boolean | null;
|
|
1983
|
+
|
|
1984
|
+
/**
|
|
1985
|
+
* @deprecated Whether to use assistant messages
|
|
1986
|
+
*/
|
|
1987
|
+
use_assistant_message?: boolean;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
export interface MessageCancelParams {
|
|
1991
|
+
/**
|
|
1992
|
+
* Optional list of run IDs to cancel
|
|
1993
|
+
*/
|
|
1994
|
+
run_ids?: Array<string> | null;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
export interface MessageCreateAsyncParams {
|
|
2005
1998
|
/**
|
|
2006
1999
|
* @deprecated The name of the message argument in the designated message tool.
|
|
2007
2000
|
* Still supported for legacy agent types, but deprecated for letta_v1_agent
|
|
@@ -2046,7 +2039,7 @@ export interface MessageSendAsyncParams {
|
|
|
2046
2039
|
| ReasoningContent
|
|
2047
2040
|
| RedactedReasoningContent
|
|
2048
2041
|
| OmittedReasoningContent
|
|
2049
|
-
|
|
|
2042
|
+
| MessageCreateAsyncParams.SummarizedReasoningContent
|
|
2050
2043
|
>
|
|
2051
2044
|
| null;
|
|
2052
2045
|
|
|
@@ -2068,7 +2061,7 @@ export interface MessageSendAsyncParams {
|
|
|
2068
2061
|
use_assistant_message?: boolean;
|
|
2069
2062
|
}
|
|
2070
2063
|
|
|
2071
|
-
export namespace
|
|
2064
|
+
export namespace MessageCreateAsyncParams {
|
|
2072
2065
|
/**
|
|
2073
2066
|
* The style of reasoning content returned by the OpenAI Responses API
|
|
2074
2067
|
*/
|
|
@@ -2109,6 +2102,13 @@ export namespace MessageSendAsyncParams {
|
|
|
2109
2102
|
}
|
|
2110
2103
|
}
|
|
2111
2104
|
|
|
2105
|
+
export interface MessageResetParams {
|
|
2106
|
+
/**
|
|
2107
|
+
* If true, adds the default initial messages after resetting.
|
|
2108
|
+
*/
|
|
2109
|
+
add_default_initial_messages?: boolean;
|
|
2110
|
+
}
|
|
2111
|
+
|
|
2112
2112
|
export interface MessageStreamParams {
|
|
2113
2113
|
/**
|
|
2114
2114
|
* @deprecated The name of the message argument in the designated message tool.
|
|
@@ -2277,17 +2277,17 @@ export declare namespace Messages {
|
|
|
2277
2277
|
type UpdateSystemMessage as UpdateSystemMessage,
|
|
2278
2278
|
type UpdateUserMessage as UpdateUserMessage,
|
|
2279
2279
|
type UserMessage as UserMessage,
|
|
2280
|
+
type MessageUpdateResponse as MessageUpdateResponse,
|
|
2280
2281
|
type MessageCancelResponse as MessageCancelResponse,
|
|
2281
|
-
type MessageModifyResponse as MessageModifyResponse,
|
|
2282
2282
|
type MessagesArrayPage as MessagesArrayPage,
|
|
2283
|
+
type MessageCreateParams as MessageCreateParams,
|
|
2284
|
+
type MessageCreateParamsNonStreaming as MessageCreateParamsNonStreaming,
|
|
2285
|
+
type MessageCreateParamsStreaming as MessageCreateParamsStreaming,
|
|
2286
|
+
type MessageUpdateParams as MessageUpdateParams,
|
|
2283
2287
|
type MessageListParams as MessageListParams,
|
|
2284
2288
|
type MessageCancelParams as MessageCancelParams,
|
|
2285
|
-
type
|
|
2289
|
+
type MessageCreateAsyncParams as MessageCreateAsyncParams,
|
|
2286
2290
|
type MessageResetParams as MessageResetParams,
|
|
2287
|
-
type MessageSendParams as MessageSendParams,
|
|
2288
|
-
type MessageSendParamsNonStreaming as MessageSendParamsNonStreaming,
|
|
2289
|
-
type MessageSendParamsStreaming as MessageSendParamsStreaming,
|
|
2290
|
-
type MessageSendAsyncParams as MessageSendAsyncParams,
|
|
2291
2291
|
type MessageStreamParams as MessageStreamParams,
|
|
2292
2292
|
};
|
|
2293
2293
|
}
|