@letta-ai/letta-client 1.6.6 → 1.6.8
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 +23 -0
- package/client.d.mts +4 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -13
- 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 +165 -13
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +165 -13
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +0 -8
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +0 -8
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -3
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -3
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js +1 -5
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs +0 -2
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/messages.d.mts +1 -2
- package/resources/agents/messages.d.mts.map +1 -1
- package/resources/agents/messages.d.ts +1 -2
- 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/conversations/conversations.d.mts +12 -3
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +12 -3
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js +8 -0
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs +8 -0
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/index.d.mts +2 -2
- package/resources/conversations/index.d.mts.map +1 -1
- package/resources/conversations/index.d.ts +2 -2
- 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/index.d.mts +2 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -5
- 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/messages.d.mts +6 -1
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +6 -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/src/client.ts +4 -79
- package/src/resources/agents/agents.ts +210 -37
- package/src/resources/agents/index.ts +0 -13
- package/src/resources/agents/messages.ts +1 -3
- package/src/resources/conversations/conversations.ts +12 -2
- package/src/resources/conversations/index.ts +1 -1
- package/src/resources/conversations/messages.ts +17 -19
- package/src/resources/index.ts +2 -35
- package/src/resources/messages.ts +11 -0
- 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/agents/schedule.d.mts +0 -197
- package/resources/agents/schedule.d.mts.map +0 -1
- package/resources/agents/schedule.d.ts +0 -197
- package/resources/agents/schedule.d.ts.map +0 -1
- package/resources/agents/schedule.js +0 -40
- package/resources/agents/schedule.js.map +0 -1
- package/resources/agents/schedule.mjs +0 -36
- package/resources/agents/schedule.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/agents/schedule.ts +0 -361
- 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 -48
- 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
package/src/client.ts
CHANGED
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
MessageListParams,
|
|
43
43
|
MessageListResponse,
|
|
44
|
+
MessageRetrieveResponse,
|
|
44
45
|
MessageSearchParams,
|
|
45
46
|
MessageSearchRequest,
|
|
46
47
|
MessageSearchResponse,
|
|
@@ -117,14 +118,6 @@ import {
|
|
|
117
118
|
ArchivesArrayPage,
|
|
118
119
|
VectorDBProvider,
|
|
119
120
|
} from './resources/archives/archives';
|
|
120
|
-
import {
|
|
121
|
-
BatchCancelResponse,
|
|
122
|
-
BatchCreateParams,
|
|
123
|
-
BatchJob,
|
|
124
|
-
BatchJobsArrayPage,
|
|
125
|
-
BatchListParams,
|
|
126
|
-
Batches,
|
|
127
|
-
} from './resources/batches/batches';
|
|
128
121
|
import {
|
|
129
122
|
BlockCreateParams,
|
|
130
123
|
BlockDeleteResponse,
|
|
@@ -137,6 +130,7 @@ import {
|
|
|
137
130
|
} from './resources/blocks/blocks';
|
|
138
131
|
import {
|
|
139
132
|
Conversation,
|
|
133
|
+
ConversationCancelResponse,
|
|
140
134
|
ConversationCreateParams,
|
|
141
135
|
ConversationListParams,
|
|
142
136
|
ConversationListResponse,
|
|
@@ -152,33 +146,6 @@ import {
|
|
|
152
146
|
Folders,
|
|
153
147
|
FoldersArrayPage,
|
|
154
148
|
} from './resources/folders/folders';
|
|
155
|
-
import {
|
|
156
|
-
DynamicManager,
|
|
157
|
-
Group,
|
|
158
|
-
GroupCreateParams,
|
|
159
|
-
GroupDeleteResponse,
|
|
160
|
-
GroupListParams,
|
|
161
|
-
GroupUpdateParams,
|
|
162
|
-
Groups,
|
|
163
|
-
GroupsArrayPage,
|
|
164
|
-
ManagerType,
|
|
165
|
-
RoundRobinManager,
|
|
166
|
-
SleeptimeManager,
|
|
167
|
-
SupervisorManager,
|
|
168
|
-
VoiceSleeptimeManager,
|
|
169
|
-
} from './resources/groups/groups';
|
|
170
|
-
import {
|
|
171
|
-
Identities,
|
|
172
|
-
IdentitiesArrayPage,
|
|
173
|
-
Identity,
|
|
174
|
-
IdentityCreateParams,
|
|
175
|
-
IdentityDeleteResponse,
|
|
176
|
-
IdentityListParams,
|
|
177
|
-
IdentityProperty,
|
|
178
|
-
IdentityType,
|
|
179
|
-
IdentityUpdateParams,
|
|
180
|
-
IdentityUpsertParams,
|
|
181
|
-
} from './resources/identities/identities';
|
|
182
149
|
import {
|
|
183
150
|
CreateSseMcpServer,
|
|
184
151
|
CreateStdioMcpServer,
|
|
@@ -981,11 +948,8 @@ export class Letta {
|
|
|
981
948
|
steps: API.Steps = new API.Steps(this);
|
|
982
949
|
templates: API.Templates = new API.Templates(this);
|
|
983
950
|
tags: API.Tags = new API.Tags(this);
|
|
984
|
-
identities: API.Identities = new API.Identities(this);
|
|
985
|
-
groups: API.Groups = new API.Groups(this);
|
|
986
951
|
messages: API.Messages = new API.Messages(this);
|
|
987
952
|
passages: API.Passages = new API.Passages(this);
|
|
988
|
-
batches: API.Batches = new API.Batches(this);
|
|
989
953
|
conversations: API.Conversations = new API.Conversations(this);
|
|
990
954
|
accessTokens: API.AccessTokens = new API.AccessTokens(this);
|
|
991
955
|
}
|
|
@@ -1001,11 +965,8 @@ Letta.Runs = Runs;
|
|
|
1001
965
|
Letta.Steps = Steps;
|
|
1002
966
|
Letta.Templates = Templates;
|
|
1003
967
|
Letta.Tags = Tags;
|
|
1004
|
-
Letta.Identities = Identities;
|
|
1005
|
-
Letta.Groups = Groups;
|
|
1006
968
|
Letta.Messages = Messages;
|
|
1007
969
|
Letta.Passages = Passages;
|
|
1008
|
-
Letta.Batches = Batches;
|
|
1009
970
|
Letta.Conversations = Conversations;
|
|
1010
971
|
Letta.AccessTokens = AccessTokens;
|
|
1011
972
|
|
|
@@ -1178,39 +1139,11 @@ export declare namespace Letta {
|
|
|
1178
1139
|
|
|
1179
1140
|
export { Tags as Tags, type TagListResponse as TagListResponse, type TagListParams as TagListParams };
|
|
1180
1141
|
|
|
1181
|
-
export {
|
|
1182
|
-
Identities as Identities,
|
|
1183
|
-
type Identity as Identity,
|
|
1184
|
-
type IdentityProperty as IdentityProperty,
|
|
1185
|
-
type IdentityType as IdentityType,
|
|
1186
|
-
type IdentityDeleteResponse as IdentityDeleteResponse,
|
|
1187
|
-
type IdentitiesArrayPage as IdentitiesArrayPage,
|
|
1188
|
-
type IdentityCreateParams as IdentityCreateParams,
|
|
1189
|
-
type IdentityUpdateParams as IdentityUpdateParams,
|
|
1190
|
-
type IdentityListParams as IdentityListParams,
|
|
1191
|
-
type IdentityUpsertParams as IdentityUpsertParams,
|
|
1192
|
-
};
|
|
1193
|
-
|
|
1194
|
-
export {
|
|
1195
|
-
Groups as Groups,
|
|
1196
|
-
type DynamicManager as DynamicManager,
|
|
1197
|
-
type Group as Group,
|
|
1198
|
-
type ManagerType as ManagerType,
|
|
1199
|
-
type RoundRobinManager as RoundRobinManager,
|
|
1200
|
-
type SleeptimeManager as SleeptimeManager,
|
|
1201
|
-
type SupervisorManager as SupervisorManager,
|
|
1202
|
-
type VoiceSleeptimeManager as VoiceSleeptimeManager,
|
|
1203
|
-
type GroupDeleteResponse as GroupDeleteResponse,
|
|
1204
|
-
type GroupsArrayPage as GroupsArrayPage,
|
|
1205
|
-
type GroupCreateParams as GroupCreateParams,
|
|
1206
|
-
type GroupUpdateParams as GroupUpdateParams,
|
|
1207
|
-
type GroupListParams as GroupListParams,
|
|
1208
|
-
};
|
|
1209
|
-
|
|
1210
1142
|
export {
|
|
1211
1143
|
Messages as Messages,
|
|
1212
1144
|
type MessageSearchRequest as MessageSearchRequest,
|
|
1213
1145
|
type MessageSearchResult as MessageSearchResult,
|
|
1146
|
+
type MessageRetrieveResponse as MessageRetrieveResponse,
|
|
1214
1147
|
type MessageListResponse as MessageListResponse,
|
|
1215
1148
|
type MessageSearchResponse as MessageSearchResponse,
|
|
1216
1149
|
type MessageListParams as MessageListParams,
|
|
@@ -1224,20 +1157,12 @@ export declare namespace Letta {
|
|
|
1224
1157
|
type PassageSearchParams as PassageSearchParams,
|
|
1225
1158
|
};
|
|
1226
1159
|
|
|
1227
|
-
export {
|
|
1228
|
-
Batches as Batches,
|
|
1229
|
-
type BatchJob as BatchJob,
|
|
1230
|
-
type BatchCancelResponse as BatchCancelResponse,
|
|
1231
|
-
type BatchJobsArrayPage as BatchJobsArrayPage,
|
|
1232
|
-
type BatchCreateParams as BatchCreateParams,
|
|
1233
|
-
type BatchListParams as BatchListParams,
|
|
1234
|
-
};
|
|
1235
|
-
|
|
1236
1160
|
export {
|
|
1237
1161
|
Conversations as Conversations,
|
|
1238
1162
|
type Conversation as Conversation,
|
|
1239
1163
|
type CreateConversation as CreateConversation,
|
|
1240
1164
|
type ConversationListResponse as ConversationListResponse,
|
|
1165
|
+
type ConversationCancelResponse as ConversationCancelResponse,
|
|
1241
1166
|
type ConversationCreateParams as ConversationCreateParams,
|
|
1242
1167
|
type ConversationListParams as ConversationListParams,
|
|
1243
1168
|
};
|
|
@@ -43,8 +43,6 @@ import {
|
|
|
43
43
|
FolderListResponsesArrayPage,
|
|
44
44
|
Folders,
|
|
45
45
|
} from './folders';
|
|
46
|
-
import * as GroupsAPI from './groups';
|
|
47
|
-
import { GroupListParams, Groups } from './groups';
|
|
48
46
|
import * as IdentitiesAPI from './identities';
|
|
49
47
|
import {
|
|
50
48
|
Identities,
|
|
@@ -120,18 +118,6 @@ import {
|
|
|
120
118
|
PassageSearchResponse,
|
|
121
119
|
Passages,
|
|
122
120
|
} from './passages';
|
|
123
|
-
import * as ScheduleAPI from './schedule';
|
|
124
|
-
import {
|
|
125
|
-
Schedule,
|
|
126
|
-
ScheduleCreateParams,
|
|
127
|
-
ScheduleCreateResponse,
|
|
128
|
-
ScheduleDeleteParams,
|
|
129
|
-
ScheduleDeleteResponse,
|
|
130
|
-
ScheduleListParams,
|
|
131
|
-
ScheduleListResponse,
|
|
132
|
-
ScheduleRetrieveParams,
|
|
133
|
-
ScheduleRetrieveResponse,
|
|
134
|
-
} from './schedule';
|
|
135
121
|
import * as AgentsToolsAPI from './tools';
|
|
136
122
|
import {
|
|
137
123
|
ToolAttachParams,
|
|
@@ -145,8 +131,6 @@ import {
|
|
|
145
131
|
} from './tools';
|
|
146
132
|
import * as ArchivesArchivesAPI from '../archives/archives';
|
|
147
133
|
import * as BlocksBlocksAPI from '../blocks/blocks';
|
|
148
|
-
import * as GroupsGroupsAPI from '../groups/groups';
|
|
149
|
-
import * as IdentitiesIdentitiesAPI from '../identities/identities';
|
|
150
134
|
import * as ModelsAPI from '../models/models';
|
|
151
135
|
import * as RunsAPI from '../runs/runs';
|
|
152
136
|
import { APIPromise } from '../../core/api-promise';
|
|
@@ -159,12 +143,10 @@ import { path } from '../../internal/utils/path';
|
|
|
159
143
|
|
|
160
144
|
export class Agents extends APIResource {
|
|
161
145
|
messages: MessagesAPI.Messages = new MessagesAPI.Messages(this._client);
|
|
162
|
-
schedule: ScheduleAPI.Schedule = new ScheduleAPI.Schedule(this._client);
|
|
163
146
|
blocks: BlocksAPI.Blocks = new BlocksAPI.Blocks(this._client);
|
|
164
147
|
tools: AgentsToolsAPI.Tools = new AgentsToolsAPI.Tools(this._client);
|
|
165
148
|
folders: FoldersAPI.Folders = new FoldersAPI.Folders(this._client);
|
|
166
149
|
files: FilesAPI.Files = new FilesAPI.Files(this._client);
|
|
167
|
-
groups: GroupsAPI.Groups = new GroupsAPI.Groups(this._client);
|
|
168
150
|
archives: ArchivesAPI.Archives = new ArchivesAPI.Archives(this._client);
|
|
169
151
|
passages: PassagesAPI.Passages = new PassagesAPI.Passages(this._client);
|
|
170
152
|
identities: IdentitiesAPI.Identities = new IdentitiesAPI.Identities(this._client);
|
|
@@ -426,7 +408,7 @@ export interface AgentState {
|
|
|
426
408
|
/**
|
|
427
409
|
* The identities associated with this agent.
|
|
428
410
|
*/
|
|
429
|
-
identities?: Array<
|
|
411
|
+
identities?: Array<AgentState.Identity>;
|
|
430
412
|
|
|
431
413
|
/**
|
|
432
414
|
* @deprecated Deprecated: Use `identities` field instead. The ids of the
|
|
@@ -457,7 +439,7 @@ export interface AgentState {
|
|
|
457
439
|
/**
|
|
458
440
|
* The multi-agent group that this agent manages
|
|
459
441
|
*/
|
|
460
|
-
managed_group?:
|
|
442
|
+
managed_group?: AgentState.ManagedGroup | null;
|
|
461
443
|
|
|
462
444
|
/**
|
|
463
445
|
* Maximum number of files that can be open at once for this agent. Setting this
|
|
@@ -508,7 +490,7 @@ export interface AgentState {
|
|
|
508
490
|
* @deprecated Deprecated: Use `managed_group` field instead. The multi-agent group
|
|
509
491
|
* that this agent manages.
|
|
510
492
|
*/
|
|
511
|
-
multi_agent_group?:
|
|
493
|
+
multi_agent_group?: AgentState.MultiAgentGroup | null;
|
|
512
494
|
|
|
513
495
|
/**
|
|
514
496
|
* A message representing a request for approval to call a tool (generated by the
|
|
@@ -881,6 +863,141 @@ export namespace AgentState {
|
|
|
881
863
|
}
|
|
882
864
|
}
|
|
883
865
|
|
|
866
|
+
export interface Identity {
|
|
867
|
+
/**
|
|
868
|
+
* The human-friendly ID of the Identity
|
|
869
|
+
*/
|
|
870
|
+
id: string;
|
|
871
|
+
|
|
872
|
+
/**
|
|
873
|
+
* @deprecated The IDs of the agents associated with the identity.
|
|
874
|
+
*/
|
|
875
|
+
agent_ids: Array<string>;
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* @deprecated The IDs of the blocks associated with the identity.
|
|
879
|
+
*/
|
|
880
|
+
block_ids: Array<string>;
|
|
881
|
+
|
|
882
|
+
/**
|
|
883
|
+
* External, user-generated identifier key of the identity.
|
|
884
|
+
*/
|
|
885
|
+
identifier_key: string;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* The type of the identity.
|
|
889
|
+
*/
|
|
890
|
+
identity_type: 'org' | 'user' | 'other';
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* The name of the identity.
|
|
894
|
+
*/
|
|
895
|
+
name: string;
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* The project id of the identity, if applicable.
|
|
899
|
+
*/
|
|
900
|
+
project_id?: string | null;
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* List of properties associated with the identity
|
|
904
|
+
*/
|
|
905
|
+
properties?: Array<Identity.Property>;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export namespace Identity {
|
|
909
|
+
/**
|
|
910
|
+
* A property of an identity
|
|
911
|
+
*/
|
|
912
|
+
export interface Property {
|
|
913
|
+
/**
|
|
914
|
+
* The key of the property
|
|
915
|
+
*/
|
|
916
|
+
key: string;
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* The type of the property
|
|
920
|
+
*/
|
|
921
|
+
type: 'string' | 'number' | 'boolean' | 'json';
|
|
922
|
+
|
|
923
|
+
/**
|
|
924
|
+
* The value of the property
|
|
925
|
+
*/
|
|
926
|
+
value: string | number | boolean | { [key: string]: unknown };
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* The multi-agent group that this agent manages
|
|
932
|
+
*/
|
|
933
|
+
export interface ManagedGroup {
|
|
934
|
+
/**
|
|
935
|
+
* The id of the group. Assigned by the database.
|
|
936
|
+
*/
|
|
937
|
+
id: string;
|
|
938
|
+
|
|
939
|
+
agent_ids: Array<string>;
|
|
940
|
+
|
|
941
|
+
description: string;
|
|
942
|
+
|
|
943
|
+
manager_type: 'round_robin' | 'supervisor' | 'dynamic' | 'sleeptime' | 'voice_sleeptime' | 'swarm';
|
|
944
|
+
|
|
945
|
+
/**
|
|
946
|
+
* The base template id.
|
|
947
|
+
*/
|
|
948
|
+
base_template_id?: string | null;
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* The id of the deployment.
|
|
952
|
+
*/
|
|
953
|
+
deployment_id?: string | null;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* If set to True, the group will be hidden.
|
|
957
|
+
*/
|
|
958
|
+
hidden?: boolean | null;
|
|
959
|
+
|
|
960
|
+
last_processed_message_id?: string | null;
|
|
961
|
+
|
|
962
|
+
manager_agent_id?: string | null;
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* The desired maximum length of messages in the context window of the convo agent.
|
|
966
|
+
* This is a best effort, and may be off slightly due to user/assistant
|
|
967
|
+
* interleaving.
|
|
968
|
+
*/
|
|
969
|
+
max_message_buffer_length?: number | null;
|
|
970
|
+
|
|
971
|
+
max_turns?: number | null;
|
|
972
|
+
|
|
973
|
+
/**
|
|
974
|
+
* The desired minimum length of messages in the context window of the convo agent.
|
|
975
|
+
* This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
976
|
+
*/
|
|
977
|
+
min_message_buffer_length?: number | null;
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* The associated project id.
|
|
981
|
+
*/
|
|
982
|
+
project_id?: string | null;
|
|
983
|
+
|
|
984
|
+
/**
|
|
985
|
+
* @deprecated
|
|
986
|
+
*/
|
|
987
|
+
shared_block_ids?: Array<string>;
|
|
988
|
+
|
|
989
|
+
sleeptime_agent_frequency?: number | null;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* The id of the template.
|
|
993
|
+
*/
|
|
994
|
+
template_id?: string | null;
|
|
995
|
+
|
|
996
|
+
termination_token?: string | null;
|
|
997
|
+
|
|
998
|
+
turns_counter?: number | null;
|
|
999
|
+
}
|
|
1000
|
+
|
|
884
1001
|
/**
|
|
885
1002
|
* Z.ai (ZhipuAI) model configuration (OpenAI-compatible).
|
|
886
1003
|
*/
|
|
@@ -914,6 +1031,78 @@ export namespace AgentState {
|
|
|
914
1031
|
*/
|
|
915
1032
|
temperature?: number;
|
|
916
1033
|
}
|
|
1034
|
+
|
|
1035
|
+
/**
|
|
1036
|
+
* @deprecated Deprecated: Use `managed_group` field instead. The multi-agent group
|
|
1037
|
+
* that this agent manages.
|
|
1038
|
+
*/
|
|
1039
|
+
export interface MultiAgentGroup {
|
|
1040
|
+
/**
|
|
1041
|
+
* The id of the group. Assigned by the database.
|
|
1042
|
+
*/
|
|
1043
|
+
id: string;
|
|
1044
|
+
|
|
1045
|
+
agent_ids: Array<string>;
|
|
1046
|
+
|
|
1047
|
+
description: string;
|
|
1048
|
+
|
|
1049
|
+
manager_type: 'round_robin' | 'supervisor' | 'dynamic' | 'sleeptime' | 'voice_sleeptime' | 'swarm';
|
|
1050
|
+
|
|
1051
|
+
/**
|
|
1052
|
+
* The base template id.
|
|
1053
|
+
*/
|
|
1054
|
+
base_template_id?: string | null;
|
|
1055
|
+
|
|
1056
|
+
/**
|
|
1057
|
+
* The id of the deployment.
|
|
1058
|
+
*/
|
|
1059
|
+
deployment_id?: string | null;
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* If set to True, the group will be hidden.
|
|
1063
|
+
*/
|
|
1064
|
+
hidden?: boolean | null;
|
|
1065
|
+
|
|
1066
|
+
last_processed_message_id?: string | null;
|
|
1067
|
+
|
|
1068
|
+
manager_agent_id?: string | null;
|
|
1069
|
+
|
|
1070
|
+
/**
|
|
1071
|
+
* The desired maximum length of messages in the context window of the convo agent.
|
|
1072
|
+
* This is a best effort, and may be off slightly due to user/assistant
|
|
1073
|
+
* interleaving.
|
|
1074
|
+
*/
|
|
1075
|
+
max_message_buffer_length?: number | null;
|
|
1076
|
+
|
|
1077
|
+
max_turns?: number | null;
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* The desired minimum length of messages in the context window of the convo agent.
|
|
1081
|
+
* This is a best effort, and may be off-by-one due to user/assistant interleaving.
|
|
1082
|
+
*/
|
|
1083
|
+
min_message_buffer_length?: number | null;
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* The associated project id.
|
|
1087
|
+
*/
|
|
1088
|
+
project_id?: string | null;
|
|
1089
|
+
|
|
1090
|
+
/**
|
|
1091
|
+
* @deprecated
|
|
1092
|
+
*/
|
|
1093
|
+
shared_block_ids?: Array<string>;
|
|
1094
|
+
|
|
1095
|
+
sleeptime_agent_frequency?: number | null;
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* The id of the template.
|
|
1099
|
+
*/
|
|
1100
|
+
template_id?: string | null;
|
|
1101
|
+
|
|
1102
|
+
termination_token?: string | null;
|
|
1103
|
+
|
|
1104
|
+
turns_counter?: number | null;
|
|
1105
|
+
}
|
|
917
1106
|
}
|
|
918
1107
|
|
|
919
1108
|
/**
|
|
@@ -2629,12 +2818,10 @@ export interface AgentImportFileParams {
|
|
|
2629
2818
|
}
|
|
2630
2819
|
|
|
2631
2820
|
Agents.Messages = Messages;
|
|
2632
|
-
Agents.Schedule = Schedule;
|
|
2633
2821
|
Agents.Blocks = Blocks;
|
|
2634
2822
|
Agents.Tools = Tools;
|
|
2635
2823
|
Agents.Folders = Folders;
|
|
2636
2824
|
Agents.Files = Files;
|
|
2637
|
-
Agents.Groups = Groups;
|
|
2638
2825
|
Agents.Archives = Archives;
|
|
2639
2826
|
Agents.Passages = Passages;
|
|
2640
2827
|
Agents.Identities = Identities;
|
|
@@ -2735,18 +2922,6 @@ export declare namespace Agents {
|
|
|
2735
2922
|
type MessageStreamParams as MessageStreamParams,
|
|
2736
2923
|
};
|
|
2737
2924
|
|
|
2738
|
-
export {
|
|
2739
|
-
Schedule as Schedule,
|
|
2740
|
-
type ScheduleCreateResponse as ScheduleCreateResponse,
|
|
2741
|
-
type ScheduleRetrieveResponse as ScheduleRetrieveResponse,
|
|
2742
|
-
type ScheduleListResponse as ScheduleListResponse,
|
|
2743
|
-
type ScheduleDeleteResponse as ScheduleDeleteResponse,
|
|
2744
|
-
type ScheduleCreateParams as ScheduleCreateParams,
|
|
2745
|
-
type ScheduleRetrieveParams as ScheduleRetrieveParams,
|
|
2746
|
-
type ScheduleListParams as ScheduleListParams,
|
|
2747
|
-
type ScheduleDeleteParams as ScheduleDeleteParams,
|
|
2748
|
-
};
|
|
2749
|
-
|
|
2750
2925
|
export {
|
|
2751
2926
|
Blocks as Blocks,
|
|
2752
2927
|
type Block as Block,
|
|
@@ -2790,8 +2965,6 @@ export declare namespace Agents {
|
|
|
2790
2965
|
type FileOpenParams as FileOpenParams,
|
|
2791
2966
|
};
|
|
2792
2967
|
|
|
2793
|
-
export { Groups as Groups, type GroupListParams as GroupListParams };
|
|
2794
|
-
|
|
2795
2968
|
export {
|
|
2796
2969
|
Archives as Archives,
|
|
2797
2970
|
type ArchiveAttachResponse as ArchiveAttachResponse,
|
|
@@ -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,
|
|
@@ -151,17 +149,6 @@ export {
|
|
|
151
149
|
type PassageDeleteParams,
|
|
152
150
|
type PassageSearchParams,
|
|
153
151
|
} from './passages';
|
|
154
|
-
export {
|
|
155
|
-
Schedule,
|
|
156
|
-
type ScheduleCreateResponse,
|
|
157
|
-
type ScheduleRetrieveResponse,
|
|
158
|
-
type ScheduleListResponse,
|
|
159
|
-
type ScheduleDeleteResponse,
|
|
160
|
-
type ScheduleCreateParams,
|
|
161
|
-
type ScheduleRetrieveParams,
|
|
162
|
-
type ScheduleListParams,
|
|
163
|
-
type ScheduleDeleteParams,
|
|
164
|
-
} from './schedule';
|
|
165
152
|
export {
|
|
166
153
|
Tools,
|
|
167
154
|
type ToolExecuteRequest,
|
|
@@ -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
|
*/
|
|
@@ -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,
|
|
@@ -38,6 +37,15 @@ export class Conversations extends APIResource {
|
|
|
38
37
|
list(query: ConversationListParams, options?: RequestOptions): APIPromise<ConversationListResponse> {
|
|
39
38
|
return this._client.get('/v1/conversations/', { query, ...options });
|
|
40
39
|
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Cancel runs associated with a conversation.
|
|
43
|
+
*
|
|
44
|
+
* Note: To cancel active runs, Redis is required.
|
|
45
|
+
*/
|
|
46
|
+
cancel(conversationID: string, options?: RequestOptions): APIPromise<ConversationCancelResponse> {
|
|
47
|
+
return this._client.post(path`/v1/conversations/${conversationID}/cancel`, options);
|
|
48
|
+
}
|
|
41
49
|
}
|
|
42
50
|
|
|
43
51
|
/**
|
|
@@ -110,6 +118,8 @@ export interface CreateConversation {
|
|
|
110
118
|
|
|
111
119
|
export type ConversationListResponse = Array<Conversation>;
|
|
112
120
|
|
|
121
|
+
export type ConversationCancelResponse = { [key: string]: unknown };
|
|
122
|
+
|
|
113
123
|
export interface ConversationCreateParams {
|
|
114
124
|
/**
|
|
115
125
|
* Query param: The agent ID to create a conversation for
|
|
@@ -153,13 +163,13 @@ export declare namespace Conversations {
|
|
|
153
163
|
type Conversation as Conversation,
|
|
154
164
|
type CreateConversation as CreateConversation,
|
|
155
165
|
type ConversationListResponse as ConversationListResponse,
|
|
166
|
+
type ConversationCancelResponse as ConversationCancelResponse,
|
|
156
167
|
type ConversationCreateParams as ConversationCreateParams,
|
|
157
168
|
type ConversationListParams as ConversationListParams,
|
|
158
169
|
};
|
|
159
170
|
|
|
160
171
|
export {
|
|
161
172
|
Messages as Messages,
|
|
162
|
-
type MessageListResponse as MessageListResponse,
|
|
163
173
|
type MessageStreamResponse as MessageStreamResponse,
|
|
164
174
|
type MessageCreateParams as MessageCreateParams,
|
|
165
175
|
type MessageListParams as MessageListParams,
|
|
@@ -5,12 +5,12 @@ export {
|
|
|
5
5
|
type Conversation,
|
|
6
6
|
type CreateConversation,
|
|
7
7
|
type ConversationListResponse,
|
|
8
|
+
type ConversationCancelResponse,
|
|
8
9
|
type ConversationCreateParams,
|
|
9
10
|
type ConversationListParams,
|
|
10
11
|
} from './conversations';
|
|
11
12
|
export {
|
|
12
13
|
Messages,
|
|
13
|
-
type MessageListResponse,
|
|
14
14
|
type MessageStreamResponse,
|
|
15
15
|
type MessageCreateParams,
|
|
16
16
|
type 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 };
|