@letta-ai/letta-client 1.6.5 → 1.6.7
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 +39 -0
- package/client.d.mts +2 -11
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -11
- package/client.d.ts.map +1 -1
- package/client.js +0 -9
- package/client.js.map +1 -1
- package/client.mjs +0 -9
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/agents/agents.d.mts +182 -13
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +182 -13
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +0 -4
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +0 -4
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/blocks.d.mts +12 -0
- package/resources/agents/blocks.d.mts.map +1 -1
- package/resources/agents/blocks.d.ts +12 -0
- package/resources/agents/blocks.d.ts.map +1 -1
- package/resources/agents/index.d.mts +1 -2
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -2
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js +1 -3
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs +0 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +10 -7
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +10 -7
- package/resources/agents/messages.d.ts.map +1 -1
- package/resources/agents/messages.js.map +1 -1
- package/resources/agents/messages.mjs.map +1 -1
- package/resources/agents/passages.d.mts +4 -0
- package/resources/agents/passages.d.mts.map +1 -1
- package/resources/agents/passages.d.ts +4 -0
- package/resources/agents/passages.d.ts.map +1 -1
- package/resources/blocks/agents.d.mts +1 -1
- package/resources/blocks/agents.d.mts.map +1 -1
- package/resources/blocks/agents.d.ts +1 -1
- package/resources/blocks/agents.d.ts.map +1 -1
- package/resources/blocks/blocks.d.mts +25 -0
- package/resources/blocks/blocks.d.mts.map +1 -1
- package/resources/blocks/blocks.d.ts +25 -0
- package/resources/blocks/blocks.d.ts.map +1 -1
- package/resources/blocks/blocks.js.map +1 -1
- package/resources/blocks/blocks.mjs.map +1 -1
- package/resources/conversations/conversations.d.mts +19 -2
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +19 -2
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/index.d.mts +1 -1
- package/resources/conversations/index.d.mts.map +1 -1
- package/resources/conversations/index.d.ts +1 -1
- package/resources/conversations/index.d.ts.map +1 -1
- package/resources/conversations/index.js.map +1 -1
- package/resources/conversations/index.mjs.map +1 -1
- package/resources/conversations/messages.d.mts +12 -16
- package/resources/conversations/messages.d.mts.map +1 -1
- package/resources/conversations/messages.d.ts +12 -16
- package/resources/conversations/messages.d.ts.map +1 -1
- package/resources/conversations/messages.js +3 -3
- package/resources/conversations/messages.js.map +1 -1
- package/resources/conversations/messages.mjs +3 -3
- package/resources/conversations/messages.mjs.map +1 -1
- package/resources/folders/files.d.mts +1 -1
- package/resources/folders/files.d.ts +1 -1
- package/resources/index.d.mts +1 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +0 -3
- package/resources/index.mjs.map +1 -1
- package/resources/mcp-servers/tools.d.mts +1 -1
- package/resources/mcp-servers/tools.d.ts +1 -1
- package/resources/messages.d.mts +18 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +18 -1
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +7 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +7 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/runs/index.d.mts +1 -0
- package/resources/runs/index.d.mts.map +1 -1
- package/resources/runs/index.d.ts +1 -0
- package/resources/runs/index.d.ts.map +1 -1
- package/resources/runs/index.js +3 -1
- package/resources/runs/index.js.map +1 -1
- package/resources/runs/index.mjs +1 -0
- package/resources/runs/index.mjs.map +1 -1
- package/resources/runs/runs.d.mts +8 -0
- package/resources/runs/runs.d.mts.map +1 -1
- package/resources/runs/runs.d.ts +8 -0
- package/resources/runs/runs.d.ts.map +1 -1
- package/resources/runs/runs.js +4 -0
- package/resources/runs/runs.js.map +1 -1
- package/resources/runs/runs.mjs +4 -0
- package/resources/runs/runs.mjs.map +1 -1
- package/resources/runs/trace.d.mts +31 -0
- package/resources/runs/trace.d.mts.map +1 -0
- package/resources/runs/trace.d.ts +31 -0
- package/resources/runs/trace.d.ts.map +1 -0
- package/resources/runs/trace.js +25 -0
- package/resources/runs/trace.js.map +1 -0
- package/resources/runs/trace.mjs +21 -0
- package/resources/runs/trace.mjs.map +1 -0
- package/resources/tags.d.mts +1 -1
- package/resources/tags.d.ts +1 -1
- package/resources/tags.js +1 -1
- package/resources/tags.mjs +1 -1
- package/src/client.ts +2 -79
- package/src/resources/agents/agents.ts +229 -13
- package/src/resources/agents/blocks.ts +15 -0
- package/src/resources/agents/index.ts +0 -2
- package/src/resources/agents/messages.ts +12 -9
- package/src/resources/agents/passages.ts +5 -0
- package/src/resources/blocks/agents.ts +1 -0
- package/src/resources/blocks/blocks.ts +31 -0
- package/src/resources/conversations/conversations.ts +20 -2
- package/src/resources/conversations/index.ts +0 -1
- package/src/resources/conversations/messages.ts +17 -19
- package/src/resources/folders/files.ts +1 -1
- package/src/resources/index.ts +1 -35
- package/src/resources/mcp-servers/tools.ts +1 -1
- package/src/resources/messages.ts +26 -0
- package/src/resources/runs/index.ts +1 -0
- package/src/resources/runs/runs.ts +15 -0
- package/src/resources/runs/trace.ts +44 -0
- package/src/resources/tags.ts +1 -1
- 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
- package/resources/agents/groups.d.mts +0 -22
- package/resources/agents/groups.d.mts.map +0 -1
- package/resources/agents/groups.d.ts +0 -22
- package/resources/agents/groups.d.ts.map +0 -1
- package/resources/agents/groups.js +0 -20
- package/resources/agents/groups.js.map +0 -1
- package/resources/agents/groups.mjs +0 -16
- package/resources/agents/groups.mjs.map +0 -1
- package/resources/batches/batches.d.mts +0 -240
- package/resources/batches/batches.d.mts.map +0 -1
- package/resources/batches/batches.d.ts +0 -240
- package/resources/batches/batches.d.ts.map +0 -1
- package/resources/batches/batches.js +0 -46
- package/resources/batches/batches.js.map +0 -1
- package/resources/batches/batches.mjs +0 -41
- package/resources/batches/batches.mjs.map +0 -1
- package/resources/batches/index.d.mts +0 -3
- package/resources/batches/index.d.mts.map +0 -1
- package/resources/batches/index.d.ts +0 -3
- package/resources/batches/index.d.ts.map +0 -1
- package/resources/batches/index.js +0 -9
- package/resources/batches/index.js.map +0 -1
- package/resources/batches/index.mjs +0 -4
- package/resources/batches/index.mjs.map +0 -1
- package/resources/batches/messages.d.mts +0 -22
- package/resources/batches/messages.d.mts.map +0 -1
- package/resources/batches/messages.d.ts +0 -22
- package/resources/batches/messages.d.ts.map +0 -1
- package/resources/batches/messages.js +0 -17
- package/resources/batches/messages.js.map +0 -1
- package/resources/batches/messages.mjs +0 -13
- package/resources/batches/messages.mjs.map +0 -1
- package/resources/batches.d.mts +0 -2
- package/resources/batches.d.mts.map +0 -1
- package/resources/batches.d.ts +0 -2
- package/resources/batches.d.ts.map +0 -1
- package/resources/batches.js +0 -6
- package/resources/batches.js.map +0 -1
- package/resources/batches.mjs +0 -3
- package/resources/batches.mjs.map +0 -1
- package/resources/groups/groups.d.mts +0 -197
- package/resources/groups/groups.d.mts.map +0 -1
- package/resources/groups/groups.d.ts +0 -197
- package/resources/groups/groups.d.ts.map +0 -1
- package/resources/groups/groups.js +0 -49
- package/resources/groups/groups.js.map +0 -1
- package/resources/groups/groups.mjs +0 -44
- package/resources/groups/groups.mjs.map +0 -1
- package/resources/groups/index.d.mts +0 -3
- package/resources/groups/index.d.mts.map +0 -1
- package/resources/groups/index.d.ts +0 -3
- package/resources/groups/index.d.ts.map +0 -1
- package/resources/groups/index.js +0 -9
- package/resources/groups/index.js.map +0 -1
- package/resources/groups/index.mjs +0 -4
- package/resources/groups/index.mjs.map +0 -1
- package/resources/groups/messages.d.mts +0 -360
- package/resources/groups/messages.d.mts.map +0 -1
- package/resources/groups/messages.d.ts +0 -360
- package/resources/groups/messages.d.ts.map +0 -1
- package/resources/groups/messages.js +0 -54
- package/resources/groups/messages.js.map +0 -1
- package/resources/groups/messages.mjs +0 -50
- package/resources/groups/messages.mjs.map +0 -1
- package/resources/groups.d.mts +0 -2
- package/resources/groups.d.mts.map +0 -1
- package/resources/groups.d.ts +0 -2
- package/resources/groups.d.ts.map +0 -1
- package/resources/groups.js +0 -6
- package/resources/groups.js.map +0 -1
- package/resources/groups.mjs +0 -3
- package/resources/groups.mjs.map +0 -1
- package/resources/identities/agents.d.mts +0 -23
- package/resources/identities/agents.d.mts.map +0 -1
- package/resources/identities/agents.d.ts +0 -23
- package/resources/identities/agents.d.ts.map +0 -1
- package/resources/identities/agents.js +0 -17
- package/resources/identities/agents.js.map +0 -1
- package/resources/identities/agents.mjs +0 -13
- package/resources/identities/agents.mjs.map +0 -1
- package/resources/identities/blocks.d.mts +0 -18
- package/resources/identities/blocks.d.mts.map +0 -1
- package/resources/identities/blocks.d.ts +0 -18
- package/resources/identities/blocks.d.ts.map +0 -1
- package/resources/identities/blocks.js +0 -17
- package/resources/identities/blocks.js.map +0 -1
- package/resources/identities/blocks.mjs +0 -13
- package/resources/identities/blocks.mjs.map +0 -1
- package/resources/identities/identities.d.mts +0 -204
- package/resources/identities/identities.d.mts.map +0 -1
- package/resources/identities/identities.d.ts +0 -204
- package/resources/identities/identities.d.ts.map +0 -1
- package/resources/identities/identities.js +0 -63
- package/resources/identities/identities.js.map +0 -1
- package/resources/identities/identities.mjs +0 -58
- package/resources/identities/identities.mjs.map +0 -1
- package/resources/identities/index.d.mts +0 -5
- package/resources/identities/index.d.mts.map +0 -1
- package/resources/identities/index.d.ts +0 -5
- package/resources/identities/index.d.ts.map +0 -1
- package/resources/identities/index.js +0 -13
- package/resources/identities/index.js.map +0 -1
- package/resources/identities/index.mjs +0 -6
- package/resources/identities/index.mjs.map +0 -1
- package/resources/identities/properties.d.mts +0 -18
- package/resources/identities/properties.d.mts.map +0 -1
- package/resources/identities/properties.d.ts +0 -18
- package/resources/identities/properties.d.ts.map +0 -1
- package/resources/identities/properties.js +0 -17
- package/resources/identities/properties.js.map +0 -1
- package/resources/identities/properties.mjs +0 -13
- package/resources/identities/properties.mjs.map +0 -1
- package/resources/identities.d.mts +0 -2
- package/resources/identities.d.mts.map +0 -1
- package/resources/identities.d.ts +0 -2
- package/resources/identities.d.ts.map +0 -1
- package/resources/identities.js +0 -6
- package/resources/identities.js.map +0 -1
- package/resources/identities.mjs +0 -3
- package/resources/identities.mjs.map +0 -1
- package/src/resources/agents/groups.ts +0 -37
- package/src/resources/batches/batches.ts +0 -317
- package/src/resources/batches/index.ts +0 -11
- package/src/resources/batches/messages.ts +0 -38
- package/src/resources/batches.ts +0 -3
- package/src/resources/groups/groups.ts +0 -334
- package/src/resources/groups/index.ts +0 -27
- package/src/resources/groups/messages.ts +0 -505
- package/src/resources/groups.ts +0 -3
- package/src/resources/identities/agents.ts +0 -47
- package/src/resources/identities/blocks.ts +0 -33
- package/src/resources/identities/identities.ts +0 -286
- package/src/resources/identities/index.ts +0 -17
- package/src/resources/identities/properties.ts +0 -30
- package/src/resources/identities.ts +0 -3
|
@@ -76,7 +76,6 @@ export {
|
|
|
76
76
|
type FolderDetachParams,
|
|
77
77
|
type FolderListResponsesArrayPage,
|
|
78
78
|
} from './folders';
|
|
79
|
-
export { Groups, type GroupListParams } from './groups';
|
|
80
79
|
export {
|
|
81
80
|
Identities,
|
|
82
81
|
type IdentityAttachResponse,
|
|
@@ -138,7 +137,6 @@ export {
|
|
|
138
137
|
type MessageStreamParams,
|
|
139
138
|
type RunsArrayPage,
|
|
140
139
|
type MessagesArrayPage,
|
|
141
|
-
type InternalMessagesObjectPage,
|
|
142
140
|
} from './messages';
|
|
143
141
|
export {
|
|
144
142
|
Passages,
|
|
@@ -6,7 +6,7 @@ import * as ToolsAPI from '../tools';
|
|
|
6
6
|
import * as AgentsAPI from './agents';
|
|
7
7
|
import * as RunsAPI from '../runs/runs';
|
|
8
8
|
import { APIPromise } from '../../core/api-promise';
|
|
9
|
-
import { ArrayPage, type ArrayPageParams,
|
|
9
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
10
10
|
import { Stream } from '../../core/streaming';
|
|
11
11
|
import { RequestOptions } from '../../internal/request-options';
|
|
12
12
|
import { path } from '../../internal/utils/path';
|
|
@@ -146,8 +146,6 @@ export type MessagesArrayPage = ArrayPage<Message>;
|
|
|
146
146
|
|
|
147
147
|
export type RunsArrayPage = ArrayPage<Run>;
|
|
148
148
|
|
|
149
|
-
export type InternalMessagesObjectPage = ObjectPage<InternalMessage>;
|
|
150
|
-
|
|
151
149
|
/**
|
|
152
150
|
* Input to approve or deny a tool call request
|
|
153
151
|
*/
|
|
@@ -508,6 +506,7 @@ export namespace ImageContent {
|
|
|
508
506
|
* tool_returns (List[ToolReturn]): The list of tool returns requested.
|
|
509
507
|
* group_id (str): The multi-agent group that the message was sent in.
|
|
510
508
|
* sender_id (str): The id of the sender of the message, can be an identity id or agent id.
|
|
509
|
+
* conversation_id (str): The conversation this message belongs to.
|
|
511
510
|
*
|
|
512
511
|
* t
|
|
513
512
|
*/
|
|
@@ -562,6 +561,11 @@ export interface InternalMessage {
|
|
|
562
561
|
| InternalMessage.SummarizedReasoningContent
|
|
563
562
|
> | null;
|
|
564
563
|
|
|
564
|
+
/**
|
|
565
|
+
* The conversation this message belongs to
|
|
566
|
+
*/
|
|
567
|
+
conversation_id?: string | null;
|
|
568
|
+
|
|
565
569
|
/**
|
|
566
570
|
* The timestamp when the object was created.
|
|
567
571
|
*/
|
|
@@ -2050,6 +2054,11 @@ export interface MessageListParams extends ArrayPageParams {
|
|
|
2050
2054
|
*/
|
|
2051
2055
|
assistant_message_tool_name?: string;
|
|
2052
2056
|
|
|
2057
|
+
/**
|
|
2058
|
+
* Conversation ID to filter messages by.
|
|
2059
|
+
*/
|
|
2060
|
+
conversation_id?: string | null;
|
|
2061
|
+
|
|
2053
2062
|
/**
|
|
2054
2063
|
* Group ID to filter messages by.
|
|
2055
2064
|
*/
|
|
@@ -2061,12 +2070,6 @@ export interface MessageListParams extends ArrayPageParams {
|
|
|
2061
2070
|
*/
|
|
2062
2071
|
include_err?: boolean | null;
|
|
2063
2072
|
|
|
2064
|
-
/**
|
|
2065
|
-
* Filter to only return specified message types. If None (default), returns all
|
|
2066
|
-
* message types.
|
|
2067
|
-
*/
|
|
2068
|
-
message_types?: Array<MessageType> | null;
|
|
2069
|
-
|
|
2070
2073
|
/**
|
|
2071
2074
|
* @deprecated Whether to use assistant messages
|
|
2072
2075
|
*/
|
|
@@ -83,6 +83,11 @@ export interface PassageSearchResponse {
|
|
|
83
83
|
|
|
84
84
|
export namespace PassageSearchResponse {
|
|
85
85
|
export interface Result {
|
|
86
|
+
/**
|
|
87
|
+
* Unique identifier of the archival memory passage
|
|
88
|
+
*/
|
|
89
|
+
id: string;
|
|
90
|
+
|
|
86
91
|
/**
|
|
87
92
|
* Text content of the archival memory passage
|
|
88
93
|
*/
|
|
@@ -133,6 +133,11 @@ export interface BlockResponse {
|
|
|
133
133
|
*/
|
|
134
134
|
read_only?: boolean;
|
|
135
135
|
|
|
136
|
+
/**
|
|
137
|
+
* The tags associated with the block.
|
|
138
|
+
*/
|
|
139
|
+
tags?: Array<string> | null;
|
|
140
|
+
|
|
136
141
|
/**
|
|
137
142
|
* @deprecated (Deprecated) The id of the template.
|
|
138
143
|
*/
|
|
@@ -210,6 +215,11 @@ export interface CreateBlock {
|
|
|
210
215
|
*/
|
|
211
216
|
read_only?: boolean;
|
|
212
217
|
|
|
218
|
+
/**
|
|
219
|
+
* The tags to associate with the block.
|
|
220
|
+
*/
|
|
221
|
+
tags?: Array<string> | null;
|
|
222
|
+
|
|
213
223
|
/**
|
|
214
224
|
* The id of the template.
|
|
215
225
|
*/
|
|
@@ -286,6 +296,11 @@ export interface BlockCreateParams {
|
|
|
286
296
|
*/
|
|
287
297
|
read_only?: boolean;
|
|
288
298
|
|
|
299
|
+
/**
|
|
300
|
+
* The tags to associate with the block.
|
|
301
|
+
*/
|
|
302
|
+
tags?: Array<string> | null;
|
|
303
|
+
|
|
289
304
|
/**
|
|
290
305
|
* The id of the template.
|
|
291
306
|
*/
|
|
@@ -358,6 +373,11 @@ export interface BlockUpdateParams {
|
|
|
358
373
|
*/
|
|
359
374
|
read_only?: boolean;
|
|
360
375
|
|
|
376
|
+
/**
|
|
377
|
+
* The tags to associate with the block.
|
|
378
|
+
*/
|
|
379
|
+
tags?: Array<string> | null;
|
|
380
|
+
|
|
361
381
|
/**
|
|
362
382
|
* The id of the template.
|
|
363
383
|
*/
|
|
@@ -420,6 +440,12 @@ export interface BlockListParams extends ArrayPageParams {
|
|
|
420
440
|
*/
|
|
421
441
|
label_search?: string | null;
|
|
422
442
|
|
|
443
|
+
/**
|
|
444
|
+
* If True, only returns blocks that match ALL given tags. Otherwise, return blocks
|
|
445
|
+
* that have ANY of the passed-in tags.
|
|
446
|
+
*/
|
|
447
|
+
match_all_tags?: boolean;
|
|
448
|
+
|
|
423
449
|
/**
|
|
424
450
|
* Name filter (alphanumeric, spaces, hyphens, underscores)
|
|
425
451
|
*/
|
|
@@ -430,6 +456,11 @@ export interface BlockListParams extends ArrayPageParams {
|
|
|
430
456
|
*/
|
|
431
457
|
project_id?: string | null;
|
|
432
458
|
|
|
459
|
+
/**
|
|
460
|
+
* List of tags to filter blocks by
|
|
461
|
+
*/
|
|
462
|
+
tags?: Array<string> | null;
|
|
463
|
+
|
|
433
464
|
/**
|
|
434
465
|
* Whether to include only templates
|
|
435
466
|
*/
|
|
@@ -5,7 +5,6 @@ import * as MessagesAPI from './messages';
|
|
|
5
5
|
import {
|
|
6
6
|
MessageCreateParams,
|
|
7
7
|
MessageListParams,
|
|
8
|
-
MessageListResponse,
|
|
9
8
|
MessageStreamParams,
|
|
10
9
|
MessageStreamResponse,
|
|
11
10
|
Messages,
|
|
@@ -69,6 +68,12 @@ export interface Conversation {
|
|
|
69
68
|
*/
|
|
70
69
|
in_context_message_ids?: Array<string>;
|
|
71
70
|
|
|
71
|
+
/**
|
|
72
|
+
* IDs of blocks that are isolated (specific to this conversation, overriding agent
|
|
73
|
+
* defaults).
|
|
74
|
+
*/
|
|
75
|
+
isolated_block_ids?: Array<string>;
|
|
76
|
+
|
|
72
77
|
/**
|
|
73
78
|
* The id of the user that made this object.
|
|
74
79
|
*/
|
|
@@ -89,6 +94,13 @@ export interface Conversation {
|
|
|
89
94
|
* Request model for creating a new conversation.
|
|
90
95
|
*/
|
|
91
96
|
export interface CreateConversation {
|
|
97
|
+
/**
|
|
98
|
+
* List of block labels that should be isolated (conversation-specific) rather than
|
|
99
|
+
* shared across conversations. New blocks will be created as copies of the agent's
|
|
100
|
+
* blocks with these labels.
|
|
101
|
+
*/
|
|
102
|
+
isolated_block_labels?: Array<string> | null;
|
|
103
|
+
|
|
92
104
|
/**
|
|
93
105
|
* A summary of the conversation.
|
|
94
106
|
*/
|
|
@@ -103,6 +115,13 @@ export interface ConversationCreateParams {
|
|
|
103
115
|
*/
|
|
104
116
|
agent_id: string;
|
|
105
117
|
|
|
118
|
+
/**
|
|
119
|
+
* Body param: List of block labels that should be isolated (conversation-specific)
|
|
120
|
+
* rather than shared across conversations. New blocks will be created as copies of
|
|
121
|
+
* the agent's blocks with these labels.
|
|
122
|
+
*/
|
|
123
|
+
isolated_block_labels?: Array<string> | null;
|
|
124
|
+
|
|
106
125
|
/**
|
|
107
126
|
* Body param: A summary of the conversation.
|
|
108
127
|
*/
|
|
@@ -139,7 +158,6 @@ export declare namespace Conversations {
|
|
|
139
158
|
|
|
140
159
|
export {
|
|
141
160
|
Messages as Messages,
|
|
142
|
-
type MessageListResponse as MessageListResponse,
|
|
143
161
|
type MessageStreamResponse as MessageStreamResponse,
|
|
144
162
|
type MessageCreateParams as MessageCreateParams,
|
|
145
163
|
type MessageListParams as MessageListParams,
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
import { APIResource } from '../../core/resource';
|
|
4
4
|
import * as AgentsAPI from '../agents/agents';
|
|
5
5
|
import * as MessagesAPI from '../agents/messages';
|
|
6
|
+
import { MessagesArrayPage } from '../agents/messages';
|
|
6
7
|
import { APIPromise } from '../../core/api-promise';
|
|
8
|
+
import { ArrayPage, type ArrayPageParams, PagePromise } from '../../core/pagination';
|
|
7
9
|
import { Stream } from '../../core/streaming';
|
|
8
10
|
import { RequestOptions } from '../../internal/request-options';
|
|
9
11
|
import { path } from '../../internal/utils/path';
|
|
@@ -31,15 +33,18 @@ export class Messages extends APIResource {
|
|
|
31
33
|
* List all messages in a conversation.
|
|
32
34
|
*
|
|
33
35
|
* Returns LettaMessage objects (UserMessage, AssistantMessage, etc.) for all
|
|
34
|
-
* messages in the conversation,
|
|
35
|
-
* for cursor-based pagination.
|
|
36
|
+
* messages in the conversation, with support for cursor-based pagination.
|
|
36
37
|
*/
|
|
37
38
|
list(
|
|
38
39
|
conversationID: string,
|
|
39
40
|
query: MessageListParams | null | undefined = {},
|
|
40
41
|
options?: RequestOptions,
|
|
41
|
-
):
|
|
42
|
-
return this._client.
|
|
42
|
+
): PagePromise<MessagesArrayPage, MessagesAPI.Message> {
|
|
43
|
+
return this._client.getAPIList(
|
|
44
|
+
path`/v1/conversations/${conversationID}/messages`,
|
|
45
|
+
ArrayPage<MessagesAPI.Message>,
|
|
46
|
+
{ query, ...options },
|
|
47
|
+
);
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
/**
|
|
@@ -61,8 +66,6 @@ export class Messages extends APIResource {
|
|
|
61
66
|
}
|
|
62
67
|
}
|
|
63
68
|
|
|
64
|
-
export type MessageListResponse = Array<MessagesAPI.Message>;
|
|
65
|
-
|
|
66
69
|
export type MessageStreamResponse = unknown;
|
|
67
70
|
|
|
68
71
|
export interface MessageCreateParams {
|
|
@@ -223,23 +226,17 @@ export namespace MessageCreateParams {
|
|
|
223
226
|
}
|
|
224
227
|
}
|
|
225
228
|
|
|
226
|
-
export interface MessageListParams {
|
|
229
|
+
export interface MessageListParams extends ArrayPageParams {
|
|
227
230
|
/**
|
|
228
|
-
*
|
|
229
|
-
* ID in the conversation
|
|
231
|
+
* Group ID to filter messages by.
|
|
230
232
|
*/
|
|
231
|
-
|
|
233
|
+
group_id?: string | null;
|
|
232
234
|
|
|
233
235
|
/**
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
+
* Whether to include error messages and error statuses. For debugging purposes
|
|
237
|
+
* only.
|
|
236
238
|
*/
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
/**
|
|
240
|
-
* Maximum number of messages to return
|
|
241
|
-
*/
|
|
242
|
-
limit?: number | null;
|
|
239
|
+
include_err?: boolean | null;
|
|
243
240
|
}
|
|
244
241
|
|
|
245
242
|
export interface MessageStreamParams {
|
|
@@ -268,10 +265,11 @@ export interface MessageStreamParams {
|
|
|
268
265
|
|
|
269
266
|
export declare namespace Messages {
|
|
270
267
|
export {
|
|
271
|
-
type MessageListResponse as MessageListResponse,
|
|
272
268
|
type MessageStreamResponse as MessageStreamResponse,
|
|
273
269
|
type MessageCreateParams as MessageCreateParams,
|
|
274
270
|
type MessageListParams as MessageListParams,
|
|
275
271
|
type MessageStreamParams as MessageStreamParams,
|
|
276
272
|
};
|
|
277
273
|
}
|
|
274
|
+
|
|
275
|
+
export { type MessagesArrayPage };
|
package/src/resources/index.ts
CHANGED
|
@@ -58,14 +58,6 @@ export {
|
|
|
58
58
|
type ArchiveListParams,
|
|
59
59
|
type ArchivesArrayPage,
|
|
60
60
|
} from './archives/archives';
|
|
61
|
-
export {
|
|
62
|
-
Batches,
|
|
63
|
-
type BatchJob,
|
|
64
|
-
type BatchCancelResponse,
|
|
65
|
-
type BatchCreateParams,
|
|
66
|
-
type BatchListParams,
|
|
67
|
-
type BatchJobsArrayPage,
|
|
68
|
-
} from './batches/batches';
|
|
69
61
|
export {
|
|
70
62
|
Blocks,
|
|
71
63
|
type BlockResponse,
|
|
@@ -93,33 +85,6 @@ export {
|
|
|
93
85
|
type FolderListParams,
|
|
94
86
|
type FoldersArrayPage,
|
|
95
87
|
} from './folders/folders';
|
|
96
|
-
export {
|
|
97
|
-
Groups,
|
|
98
|
-
type DynamicManager,
|
|
99
|
-
type Group,
|
|
100
|
-
type ManagerType,
|
|
101
|
-
type RoundRobinManager,
|
|
102
|
-
type SleeptimeManager,
|
|
103
|
-
type SupervisorManager,
|
|
104
|
-
type VoiceSleeptimeManager,
|
|
105
|
-
type GroupDeleteResponse,
|
|
106
|
-
type GroupCreateParams,
|
|
107
|
-
type GroupUpdateParams,
|
|
108
|
-
type GroupListParams,
|
|
109
|
-
type GroupsArrayPage,
|
|
110
|
-
} from './groups/groups';
|
|
111
|
-
export {
|
|
112
|
-
Identities,
|
|
113
|
-
type Identity,
|
|
114
|
-
type IdentityProperty,
|
|
115
|
-
type IdentityType,
|
|
116
|
-
type IdentityDeleteResponse,
|
|
117
|
-
type IdentityCreateParams,
|
|
118
|
-
type IdentityUpdateParams,
|
|
119
|
-
type IdentityListParams,
|
|
120
|
-
type IdentityUpsertParams,
|
|
121
|
-
type IdentitiesArrayPage,
|
|
122
|
-
} from './identities/identities';
|
|
123
88
|
export {
|
|
124
89
|
McpServers,
|
|
125
90
|
type CreateSseMcpServer,
|
|
@@ -144,6 +109,7 @@ export {
|
|
|
144
109
|
Messages,
|
|
145
110
|
type MessageSearchRequest,
|
|
146
111
|
type MessageSearchResult,
|
|
112
|
+
type MessageRetrieveResponse,
|
|
147
113
|
type MessageListResponse,
|
|
148
114
|
type MessageSearchResponse,
|
|
149
115
|
type MessageListParams,
|
|
@@ -4,8 +4,16 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import * as AgentsMessagesAPI from './agents/messages';
|
|
5
5
|
import { APIPromise } from '../core/api-promise';
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
7
8
|
|
|
8
9
|
export class Messages extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve a message by ID.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(messageID: string, options?: RequestOptions): APIPromise<MessageRetrieveResponse> {
|
|
14
|
+
return this._client.get(path`/v1/messages/${messageID}`, options);
|
|
15
|
+
}
|
|
16
|
+
|
|
9
17
|
/**
|
|
10
18
|
* List messages across all agents for the current user.
|
|
11
19
|
*/
|
|
@@ -38,6 +46,11 @@ export interface MessageSearchRequest {
|
|
|
38
46
|
*/
|
|
39
47
|
agent_id?: string | null;
|
|
40
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Filter messages by conversation ID
|
|
51
|
+
*/
|
|
52
|
+
conversation_id?: string | null;
|
|
53
|
+
|
|
41
54
|
/**
|
|
42
55
|
* Filter messages created on or before this date
|
|
43
56
|
*/
|
|
@@ -89,6 +102,8 @@ export interface MessageSearchResult {
|
|
|
89
102
|
vector_rank?: number | null;
|
|
90
103
|
}
|
|
91
104
|
|
|
105
|
+
export type MessageRetrieveResponse = Array<AgentsMessagesAPI.Message>;
|
|
106
|
+
|
|
92
107
|
export type MessageListResponse = Array<AgentsMessagesAPI.Message>;
|
|
93
108
|
|
|
94
109
|
export type MessageSearchResponse = Array<
|
|
@@ -233,6 +248,11 @@ export interface MessageListParams {
|
|
|
233
248
|
*/
|
|
234
249
|
before?: string | null;
|
|
235
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Conversation ID to filter messages by
|
|
253
|
+
*/
|
|
254
|
+
conversation_id?: string | null;
|
|
255
|
+
|
|
236
256
|
/**
|
|
237
257
|
* Maximum number of messages to return
|
|
238
258
|
*/
|
|
@@ -256,6 +276,11 @@ export interface MessageSearchParams {
|
|
|
256
276
|
*/
|
|
257
277
|
agent_id?: string | null;
|
|
258
278
|
|
|
279
|
+
/**
|
|
280
|
+
* Filter messages by conversation ID
|
|
281
|
+
*/
|
|
282
|
+
conversation_id?: string | null;
|
|
283
|
+
|
|
259
284
|
/**
|
|
260
285
|
* Filter messages created on or before this date
|
|
261
286
|
*/
|
|
@@ -281,6 +306,7 @@ export declare namespace Messages {
|
|
|
281
306
|
export {
|
|
282
307
|
type MessageSearchRequest as MessageSearchRequest,
|
|
283
308
|
type MessageSearchResult as MessageSearchResult,
|
|
309
|
+
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
284
310
|
type MessageListResponse as MessageListResponse,
|
|
285
311
|
type MessageSearchResponse as MessageSearchResponse,
|
|
286
312
|
type MessageListParams as MessageListParams,
|
|
@@ -8,4 +8,5 @@ export {
|
|
|
8
8
|
} from './messages';
|
|
9
9
|
export { Runs, type Job, type StopReasonType, type RunListParams } from './runs';
|
|
10
10
|
export { Steps, type StepListParams } from './steps';
|
|
11
|
+
export { Trace, type TraceRetrieveResponse, type TraceRetrieveParams } from './trace';
|
|
11
12
|
export { Usage, type UsageRetrieveResponse } from './usage';
|
|
@@ -7,6 +7,8 @@ import * as RunsMessagesAPI from './messages';
|
|
|
7
7
|
import { MessageListParams, MessageStreamParams, MessageStreamResponse, Messages } from './messages';
|
|
8
8
|
import * as StepsAPI from './steps';
|
|
9
9
|
import { StepListParams, Steps } from './steps';
|
|
10
|
+
import * as TraceAPI from './trace';
|
|
11
|
+
import { Trace, TraceRetrieveParams, TraceRetrieveResponse } from './trace';
|
|
10
12
|
import * as UsageAPI from './usage';
|
|
11
13
|
import { Usage, UsageRetrieveResponse } from './usage';
|
|
12
14
|
import { APIPromise } from '../../core/api-promise';
|
|
@@ -18,6 +20,7 @@ export class Runs extends APIResource {
|
|
|
18
20
|
messages: RunsMessagesAPI.Messages = new RunsMessagesAPI.Messages(this._client);
|
|
19
21
|
usage: UsageAPI.Usage = new UsageAPI.Usage(this._client);
|
|
20
22
|
steps: StepsAPI.Steps = new StepsAPI.Steps(this._client);
|
|
23
|
+
trace: TraceAPI.Trace = new TraceAPI.Trace(this._client);
|
|
21
24
|
|
|
22
25
|
/**
|
|
23
26
|
* Get the status of a run.
|
|
@@ -175,6 +178,11 @@ export interface RunListParams extends ArrayPageParams {
|
|
|
175
178
|
*/
|
|
176
179
|
background?: boolean | null;
|
|
177
180
|
|
|
181
|
+
/**
|
|
182
|
+
* Filter runs by conversation ID.
|
|
183
|
+
*/
|
|
184
|
+
conversation_id?: string | null;
|
|
185
|
+
|
|
178
186
|
/**
|
|
179
187
|
* Filter runs by status. Can specify multiple statuses.
|
|
180
188
|
*/
|
|
@@ -189,6 +197,7 @@ export interface RunListParams extends ArrayPageParams {
|
|
|
189
197
|
Runs.Messages = Messages;
|
|
190
198
|
Runs.Usage = Usage;
|
|
191
199
|
Runs.Steps = Steps;
|
|
200
|
+
Runs.Trace = Trace;
|
|
192
201
|
|
|
193
202
|
export declare namespace Runs {
|
|
194
203
|
export { type Job as Job, type StopReasonType as StopReasonType, type RunListParams as RunListParams };
|
|
@@ -203,6 +212,12 @@ export declare namespace Runs {
|
|
|
203
212
|
export { Usage as Usage, type UsageRetrieveResponse as UsageRetrieveResponse };
|
|
204
213
|
|
|
205
214
|
export { Steps as Steps, type StepListParams as StepListParams };
|
|
215
|
+
|
|
216
|
+
export {
|
|
217
|
+
Trace as Trace,
|
|
218
|
+
type TraceRetrieveResponse as TraceRetrieveResponse,
|
|
219
|
+
type TraceRetrieveParams as TraceRetrieveParams,
|
|
220
|
+
};
|
|
206
221
|
}
|
|
207
222
|
|
|
208
223
|
export { type RunsArrayPage };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Trace extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve OTEL trace spans for a run.
|
|
11
|
+
*
|
|
12
|
+
* Returns a filtered set of spans relevant for observability:
|
|
13
|
+
*
|
|
14
|
+
* - agent_step: Individual agent reasoning steps
|
|
15
|
+
* - tool executions: Tool call spans
|
|
16
|
+
* - Root span: The top-level request span
|
|
17
|
+
* - time_to_first_token: TTFT measurement span
|
|
18
|
+
*
|
|
19
|
+
* Requires ClickHouse to be configured for trace storage.
|
|
20
|
+
*/
|
|
21
|
+
retrieve(
|
|
22
|
+
runID: string,
|
|
23
|
+
query: TraceRetrieveParams | null | undefined = {},
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): APIPromise<TraceRetrieveResponse> {
|
|
26
|
+
return this._client.get(path`/v1/runs/${runID}/trace`, { query, ...options });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type TraceRetrieveResponse = Array<{ [key: string]: unknown }>;
|
|
31
|
+
|
|
32
|
+
export interface TraceRetrieveParams {
|
|
33
|
+
/**
|
|
34
|
+
* Maximum number of spans to return
|
|
35
|
+
*/
|
|
36
|
+
limit?: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare namespace Trace {
|
|
40
|
+
export {
|
|
41
|
+
type TraceRetrieveResponse as TraceRetrieveResponse,
|
|
42
|
+
type TraceRetrieveParams as TraceRetrieveParams,
|
|
43
|
+
};
|
|
44
|
+
}
|
package/src/resources/tags.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class Tags extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Get the list of all
|
|
9
|
+
* Get the list of all tags (from agents and blocks) that have been created.
|
|
10
10
|
*/
|
|
11
11
|
list(query: TagListParams | null | undefined = {}, options?: RequestOptions): APIPromise<TagListResponse> {
|
|
12
12
|
return this._client.get('/v1/tags/', { query, ...options });
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '1.6.
|
|
1
|
+
export const VERSION = '1.6.7'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.6.
|
|
1
|
+
export declare const VERSION = "1.6.7";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "1.6.
|
|
1
|
+
export declare const VERSION = "1.6.7";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '1.6.
|
|
1
|
+
export const VERSION = '1.6.7'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as GroupsGroupsAPI from "../groups/groups.mjs";
|
|
3
|
-
import { GroupsArrayPage } from "../groups/groups.mjs";
|
|
4
|
-
import { type ArrayPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
6
|
-
export declare class Groups extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Lists the groups for an agent.
|
|
9
|
-
*/
|
|
10
|
-
list(agentID: string, query?: GroupListParams | null | undefined, options?: RequestOptions): PagePromise<GroupsArrayPage, GroupsGroupsAPI.Group>;
|
|
11
|
-
}
|
|
12
|
-
export interface GroupListParams extends ArrayPageParams {
|
|
13
|
-
/**
|
|
14
|
-
* Manager type to filter groups by
|
|
15
|
-
*/
|
|
16
|
-
manager_type?: string | null;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Groups {
|
|
19
|
-
export { type GroupListParams as GroupListParams };
|
|
20
|
-
}
|
|
21
|
-
export { type GroupsArrayPage };
|
|
22
|
-
//# sourceMappingURL=groups.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.mts","sourceRoot":"","sources":["../../src/resources/agents/groups.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAAE,eAAe,EAAE;OACnB,EAAa,KAAK,eAAe,EAAE,WAAW,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC;CAMvD;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACpD;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as GroupsGroupsAPI from "../groups/groups.js";
|
|
3
|
-
import { GroupsArrayPage } from "../groups/groups.js";
|
|
4
|
-
import { type ArrayPageParams, PagePromise } from "../../core/pagination.js";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
|
-
export declare class Groups extends APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Lists the groups for an agent.
|
|
9
|
-
*/
|
|
10
|
-
list(agentID: string, query?: GroupListParams | null | undefined, options?: RequestOptions): PagePromise<GroupsArrayPage, GroupsGroupsAPI.Group>;
|
|
11
|
-
}
|
|
12
|
-
export interface GroupListParams extends ArrayPageParams {
|
|
13
|
-
/**
|
|
14
|
-
* Manager type to filter groups by
|
|
15
|
-
*/
|
|
16
|
-
manager_type?: string | null;
|
|
17
|
-
}
|
|
18
|
-
export declare namespace Groups {
|
|
19
|
-
export { type GroupListParams as GroupListParams };
|
|
20
|
-
}
|
|
21
|
-
export { type GroupsArrayPage };
|
|
22
|
-
//# sourceMappingURL=groups.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../src/resources/agents/groups.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,eAAe;OACpB,EAAE,eAAe,EAAE;OACnB,EAAa,KAAK,eAAe,EAAE,WAAW,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;OAEG;IACH,IAAI,CACF,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,eAAe,GAAG,IAAI,GAAG,SAAc,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,eAAe,EAAE,eAAe,CAAC,KAAK,CAAC;CAMvD;AAED,MAAM,WAAW,eAAgB,SAAQ,eAAe;IACtD;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACpD;AAED,OAAO,EAAE,KAAK,eAAe,EAAE,CAAC"}
|