agentbase-web-sdk 2.6.0-fix1 → 2.7.0
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/README.md +5 -5
- package/dist/cjs/sdk.js +564 -21
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +564 -22
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +564 -21
- package/package.json +1 -1
- package/types/client.d.ts +2 -2
- package/types/index.d.ts +3 -2
- package/types/models.d.ts +20 -16
- package/types/services/account.d.ts +10 -10
- package/types/services/agent-runtime.d.ts +370 -0
- package/types/services/ai-gateway.d.ts +4 -1
- package/types/services/memory.d.ts +10 -7
- package/types/services/self-hosted-organizations.d.ts +4 -4
- package/types/services/storage.d.ts +6 -6
- package/types/services/teams.d.ts +6 -6
package/package.json
CHANGED
package/types/client.d.ts
CHANGED
|
@@ -89,7 +89,7 @@ declare class AgentbaseException extends Error {
|
|
|
89
89
|
*/
|
|
90
90
|
type: string;
|
|
91
91
|
/**
|
|
92
|
-
* Initializes a
|
|
92
|
+
* Initializes a Agentbase Exception.
|
|
93
93
|
*
|
|
94
94
|
* @param {string} message - The error message.
|
|
95
95
|
* @param {number} code - The error code. Default is 0.
|
|
@@ -237,7 +237,7 @@ declare class Client {
|
|
|
237
237
|
setImpersonateUserPhone(value: string): this;
|
|
238
238
|
private realtime;
|
|
239
239
|
/**
|
|
240
|
-
* Subscribes to
|
|
240
|
+
* Subscribes to Agentbase events and passes you the payload in realtime.
|
|
241
241
|
*
|
|
242
242
|
* @deprecated Use the Realtime service instead.
|
|
243
243
|
* @see Realtime
|
package/types/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Agentbase Agentbase SDK
|
|
3
3
|
*
|
|
4
|
-
* This SDK is compatible with Appwrite server version 2.
|
|
4
|
+
* This SDK is compatible with Appwrite server version 2.7.x.
|
|
5
5
|
* For older versions, please check
|
|
6
6
|
* [previous releases](https://github.com/agentbase/agentbase-web-sdk/releases).
|
|
7
7
|
*/
|
|
8
8
|
export { Client, Query, AgentbaseException } from './client';
|
|
9
9
|
export { Account } from './services/account';
|
|
10
|
+
export { AgentRuntime } from './services/agent-runtime';
|
|
10
11
|
export { AiGateway } from './services/ai-gateway';
|
|
11
12
|
export { Avatars } from './services/avatars';
|
|
12
13
|
export { Databases } from './services/databases';
|
package/types/models.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { MemoryBulkDeleteItemStatus } from "./enums/memory-bulk-delete-item-stat
|
|
|
17
17
|
import { MemoryBulkDeleteResponseStatus } from "./enums/memory-bulk-delete-response-status";
|
|
18
18
|
import { KnowledgeBaseDataSourceDocumentImportResultStatus } from "./enums/knowledge-base-data-source-document-import-result-status";
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Agentbase Models
|
|
21
21
|
*/
|
|
22
22
|
export declare namespace Models {
|
|
23
23
|
const __default: unique symbol;
|
|
@@ -2117,7 +2117,7 @@ export declare namespace Models {
|
|
|
2117
2117
|
/**
|
|
2118
2118
|
* Safe projections of the available model sources.
|
|
2119
2119
|
*/
|
|
2120
|
-
sources?: object;
|
|
2120
|
+
sources?: object[];
|
|
2121
2121
|
/**
|
|
2122
2122
|
* Current account-model trial quota when a platform trial source is available.
|
|
2123
2123
|
*/
|
|
@@ -2151,7 +2151,7 @@ export declare namespace Models {
|
|
|
2151
2151
|
/**
|
|
2152
2152
|
* List of embedding objects.
|
|
2153
2153
|
*/
|
|
2154
|
-
data: object;
|
|
2154
|
+
data: object[];
|
|
2155
2155
|
/**
|
|
2156
2156
|
* Token usage information.
|
|
2157
2157
|
*/
|
|
@@ -2168,7 +2168,7 @@ export declare namespace Models {
|
|
|
2168
2168
|
/**
|
|
2169
2169
|
* Reranked results with relevance scores.
|
|
2170
2170
|
*/
|
|
2171
|
-
results: object;
|
|
2171
|
+
results: object[];
|
|
2172
2172
|
/**
|
|
2173
2173
|
* Token usage information.
|
|
2174
2174
|
*/
|
|
@@ -2217,15 +2217,15 @@ export declare namespace Models {
|
|
|
2217
2217
|
/**
|
|
2218
2218
|
* External system item ID for datasource sync deduplication.
|
|
2219
2219
|
*/
|
|
2220
|
-
externalItemId
|
|
2220
|
+
externalItemId?: string;
|
|
2221
2221
|
/**
|
|
2222
|
-
* Optional document-level chunking strategy override.
|
|
2222
|
+
* Optional document-level chunking strategy override. sheet is only for Excel .xls/.xlsx documents and creates one chunk per non-empty worksheet.
|
|
2223
2223
|
*/
|
|
2224
|
-
parserId
|
|
2224
|
+
parserId?: string;
|
|
2225
2225
|
/**
|
|
2226
2226
|
* Optional document-level parser/chunker configuration override.
|
|
2227
2227
|
*/
|
|
2228
|
-
parserConfig
|
|
2228
|
+
parserConfig?: object;
|
|
2229
2229
|
/**
|
|
2230
2230
|
* Optional business metadata.
|
|
2231
2231
|
*/
|
|
@@ -2241,23 +2241,23 @@ export declare namespace Models {
|
|
|
2241
2241
|
/**
|
|
2242
2242
|
* Mirrored stage from the active ingestion task.
|
|
2243
2243
|
*/
|
|
2244
|
-
stage
|
|
2244
|
+
stage?: string;
|
|
2245
2245
|
/**
|
|
2246
2246
|
* Current or most recent ingestion ID.
|
|
2247
2247
|
*/
|
|
2248
|
-
activeIngestionId
|
|
2248
|
+
activeIngestionId?: string;
|
|
2249
2249
|
/**
|
|
2250
2250
|
* Search-visible generation. Only valid when status is ready.
|
|
2251
2251
|
*/
|
|
2252
|
-
activeGeneration
|
|
2252
|
+
activeGeneration?: string;
|
|
2253
2253
|
/**
|
|
2254
2254
|
* Timestamp when processing was last triggered.
|
|
2255
2255
|
*/
|
|
2256
|
-
processingStartedAt
|
|
2256
|
+
processingStartedAt?: string;
|
|
2257
2257
|
/**
|
|
2258
2258
|
* Total number of chunks expected, once known.
|
|
2259
2259
|
*/
|
|
2260
|
-
chunksTotal
|
|
2260
|
+
chunksTotal?: number;
|
|
2261
2261
|
/**
|
|
2262
2262
|
* Number of chunks in the active generation.
|
|
2263
2263
|
*/
|
|
@@ -2265,11 +2265,11 @@ export declare namespace Models {
|
|
|
2265
2265
|
/**
|
|
2266
2266
|
* Last processing error message, if any.
|
|
2267
2267
|
*/
|
|
2268
|
-
error
|
|
2268
|
+
error?: string;
|
|
2269
2269
|
/**
|
|
2270
2270
|
* Deprecated. Legacy Function execution ID.
|
|
2271
2271
|
*/
|
|
2272
|
-
lastExecutionId
|
|
2272
|
+
lastExecutionId?: string;
|
|
2273
2273
|
};
|
|
2274
2274
|
/**
|
|
2275
2275
|
* KnowledgeBaseDataSourceDocumentImportResult
|
|
@@ -2292,7 +2292,7 @@ export declare namespace Models {
|
|
|
2292
2292
|
*/
|
|
2293
2293
|
error?: string;
|
|
2294
2294
|
/**
|
|
2295
|
-
* Machine-readable
|
|
2295
|
+
* Machine-readable Agentbase exception type when status is failed.
|
|
2296
2296
|
*/
|
|
2297
2297
|
errorType?: string;
|
|
2298
2298
|
};
|
|
@@ -2466,6 +2466,10 @@ export declare namespace Models {
|
|
|
2466
2466
|
* Optional run ID.
|
|
2467
2467
|
*/
|
|
2468
2468
|
runId?: string;
|
|
2469
|
+
/**
|
|
2470
|
+
* Optional source session ID.
|
|
2471
|
+
*/
|
|
2472
|
+
sessionId?: string;
|
|
2469
2473
|
/**
|
|
2470
2474
|
* Content classification.
|
|
2471
2475
|
*/
|
|
@@ -109,7 +109,7 @@ export declare class Account {
|
|
|
109
109
|
*/
|
|
110
110
|
deleteIdentity(identityId: string): Promise<{}>;
|
|
111
111
|
/**
|
|
112
|
-
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the
|
|
112
|
+
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Agentbase server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
|
|
113
113
|
*
|
|
114
114
|
* @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
115
115
|
* @throws {AgentbaseException}
|
|
@@ -119,7 +119,7 @@ export declare class Account {
|
|
|
119
119
|
duration?: number;
|
|
120
120
|
}): Promise<Models.Jwt>;
|
|
121
121
|
/**
|
|
122
|
-
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the
|
|
122
|
+
* Use this endpoint to create a JSON Web Token. You can use the resulting JWT to authenticate on behalf of the current user when working with the Agentbase server-side API and SDKs. The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
|
|
123
123
|
*
|
|
124
124
|
* @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
125
125
|
* @throws {AgentbaseException}
|
|
@@ -622,11 +622,11 @@ export declare class Account {
|
|
|
622
622
|
*/
|
|
623
623
|
getQuotaLimits(): Promise<{}>;
|
|
624
624
|
/**
|
|
625
|
-
* Update the current account quota limits. Supported fields are database storage capacity,
|
|
625
|
+
* Update the current account quota limits. Supported fields are database storage capacity, Agentbase Storage capacity, database count, and table/collection count. Storage quota defaults to 200MB per project. Values must be non-negative integers and cannot exceed the global quota ceilings.
|
|
626
626
|
*
|
|
627
627
|
*
|
|
628
628
|
* @param {number} params.databaseStorageLimit - Maximum database storage in bytes allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
629
|
-
* @param {number} params.storageLimit - Maximum
|
|
629
|
+
* @param {number} params.storageLimit - Maximum Agentbase Storage capacity in bytes allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
630
630
|
* @param {number} params.databasesPerProject - Maximum databases allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
631
631
|
* @param {number} params.tablesPerProject - Maximum tables/collections allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
632
632
|
* @throws {AgentbaseException}
|
|
@@ -639,11 +639,11 @@ export declare class Account {
|
|
|
639
639
|
tablesPerProject?: number;
|
|
640
640
|
}): Promise<{}>;
|
|
641
641
|
/**
|
|
642
|
-
* Update the current account quota limits. Supported fields are database storage capacity,
|
|
642
|
+
* Update the current account quota limits. Supported fields are database storage capacity, Agentbase Storage capacity, database count, and table/collection count. Storage quota defaults to 200MB per project. Values must be non-negative integers and cannot exceed the global quota ceilings.
|
|
643
643
|
*
|
|
644
644
|
*
|
|
645
645
|
* @param {number} databaseStorageLimit - Maximum database storage in bytes allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
646
|
-
* @param {number} storageLimit - Maximum
|
|
646
|
+
* @param {number} storageLimit - Maximum Agentbase Storage capacity in bytes allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
647
647
|
* @param {number} databasesPerProject - Maximum databases allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
648
648
|
* @param {number} tablesPerProject - Maximum tables/collections allowed per project for this account. Use 0 for unlimited when the global ceiling also allows unlimited. Omit to leave unchanged.
|
|
649
649
|
* @throws {AgentbaseException}
|
|
@@ -794,7 +794,7 @@ export declare class Account {
|
|
|
794
794
|
*/
|
|
795
795
|
updateMagicURLSession(userId: string, secret: string): Promise<Models.Session>;
|
|
796
796
|
/**
|
|
797
|
-
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the
|
|
797
|
+
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Agentbase console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
798
798
|
*
|
|
799
799
|
* If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
|
|
800
800
|
*
|
|
@@ -815,7 +815,7 @@ export declare class Account {
|
|
|
815
815
|
scopes?: string[];
|
|
816
816
|
}): void | string;
|
|
817
817
|
/**
|
|
818
|
-
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the
|
|
818
|
+
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Agentbase console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
819
819
|
*
|
|
820
820
|
* If there is already an active session, the new session will be attached to the logged-in account. If there are no active sessions, the server will attempt to look for a user with the same email address as the email received from the OAuth2 provider and attach the new session to the existing user. If no matching user is found - the server will create a new user.
|
|
821
821
|
*
|
|
@@ -1072,7 +1072,7 @@ export declare class Account {
|
|
|
1072
1072
|
*/
|
|
1073
1073
|
createMagicURLToken(userId: string, email: string, url?: string, phrase?: boolean): Promise<Models.Token>;
|
|
1074
1074
|
/**
|
|
1075
|
-
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the
|
|
1075
|
+
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Agentbase console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
1076
1076
|
*
|
|
1077
1077
|
* If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session]([HOSTNAME]/docs/references/cloud/client-web/account#createSession) endpoint.
|
|
1078
1078
|
*
|
|
@@ -1092,7 +1092,7 @@ export declare class Account {
|
|
|
1092
1092
|
scopes?: string[];
|
|
1093
1093
|
}): void | string;
|
|
1094
1094
|
/**
|
|
1095
|
-
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the
|
|
1095
|
+
* Allow the user to login to their account using the OAuth2 provider of their choice. Each OAuth2 provider should be enabled from the Agentbase console first. Use the success and failure arguments to provide a redirect URL's back to your app when login is completed.
|
|
1096
1096
|
*
|
|
1097
1097
|
* If authentication succeeds, `userId` and `secret` of a token will be appended to the success URL as query parameters. These can be used to create a new session using the [Create session]([HOSTNAME]/docs/references/cloud/client-web/account#createSession) endpoint.
|
|
1098
1098
|
*
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { Client } from '../client';
|
|
2
|
+
export declare class AgentRuntime {
|
|
3
|
+
client: Client;
|
|
4
|
+
constructor(client: Client);
|
|
5
|
+
/**
|
|
6
|
+
* Accept a Langfuse-compatible E2E evaluation for the current Published Agent Version.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
9
|
+
* @throws {AgentbaseException}
|
|
10
|
+
* @returns {Promise<{}>}
|
|
11
|
+
*/
|
|
12
|
+
evaluateAgent(params: {
|
|
13
|
+
agentId: string;
|
|
14
|
+
}): Promise<{}>;
|
|
15
|
+
/**
|
|
16
|
+
* Accept a Langfuse-compatible E2E evaluation for the current Published Agent Version.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
19
|
+
* @throws {AgentbaseException}
|
|
20
|
+
* @returns {Promise<{}>}
|
|
21
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
22
|
+
*/
|
|
23
|
+
evaluateAgent(agentId: string): Promise<{}>;
|
|
24
|
+
/**
|
|
25
|
+
* Create a Run in an existing Thread.
|
|
26
|
+
*
|
|
27
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
28
|
+
* @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
|
|
29
|
+
* @param {string} params.threadId - Thread identifier.
|
|
30
|
+
* @param {string} params.userMessage - User message.
|
|
31
|
+
* @throws {AgentbaseException}
|
|
32
|
+
* @returns {Promise<{}>}
|
|
33
|
+
*/
|
|
34
|
+
createRun(params: {
|
|
35
|
+
agentId: string;
|
|
36
|
+
agentVersionId: string;
|
|
37
|
+
threadId: string;
|
|
38
|
+
userMessage: string;
|
|
39
|
+
}): Promise<{}>;
|
|
40
|
+
/**
|
|
41
|
+
* Create a Run in an existing Thread.
|
|
42
|
+
*
|
|
43
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
44
|
+
* @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
|
|
45
|
+
* @param {string} threadId - Thread identifier.
|
|
46
|
+
* @param {string} userMessage - User message.
|
|
47
|
+
* @throws {AgentbaseException}
|
|
48
|
+
* @returns {Promise<{}>}
|
|
49
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
50
|
+
*/
|
|
51
|
+
createRun(agentId: string, agentVersionId: string, threadId: string, userMessage: string): Promise<{}>;
|
|
52
|
+
/**
|
|
53
|
+
* List Threads created by the current Project principal.
|
|
54
|
+
*
|
|
55
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
56
|
+
* @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
|
|
57
|
+
* @param {number} params.limit - Maximum number of records.
|
|
58
|
+
* @param {string} params.after - Pagination cursor.
|
|
59
|
+
* @throws {AgentbaseException}
|
|
60
|
+
* @returns {Promise<{}>}
|
|
61
|
+
*/
|
|
62
|
+
listThreads(params: {
|
|
63
|
+
agentId: string;
|
|
64
|
+
agentVersionId: string;
|
|
65
|
+
limit?: number;
|
|
66
|
+
after?: string;
|
|
67
|
+
}): Promise<{}>;
|
|
68
|
+
/**
|
|
69
|
+
* List Threads created by the current Project principal.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
72
|
+
* @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
|
|
73
|
+
* @param {number} limit - Maximum number of records.
|
|
74
|
+
* @param {string} after - Pagination cursor.
|
|
75
|
+
* @throws {AgentbaseException}
|
|
76
|
+
* @returns {Promise<{}>}
|
|
77
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
78
|
+
*/
|
|
79
|
+
listThreads(agentId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
|
|
80
|
+
/**
|
|
81
|
+
* Create a Thread using the Agent current Published Version.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
84
|
+
* @throws {AgentbaseException}
|
|
85
|
+
* @returns {Promise<{}>}
|
|
86
|
+
*/
|
|
87
|
+
createThread(params: {
|
|
88
|
+
agentId: string;
|
|
89
|
+
}): Promise<{}>;
|
|
90
|
+
/**
|
|
91
|
+
* Create a Thread using the Agent current Published Version.
|
|
92
|
+
*
|
|
93
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
94
|
+
* @throws {AgentbaseException}
|
|
95
|
+
* @returns {Promise<{}>}
|
|
96
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
97
|
+
*/
|
|
98
|
+
createThread(agentId: string): Promise<{}>;
|
|
99
|
+
/**
|
|
100
|
+
* Get a Thread owned by the current Project principal.
|
|
101
|
+
*
|
|
102
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
103
|
+
* @param {string} params.threadId - Agent Runtime route identifier.
|
|
104
|
+
* @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
|
|
105
|
+
* @throws {AgentbaseException}
|
|
106
|
+
* @returns {Promise<{}>}
|
|
107
|
+
*/
|
|
108
|
+
getThread(params: {
|
|
109
|
+
agentId: string;
|
|
110
|
+
threadId: string;
|
|
111
|
+
agentVersionId: string;
|
|
112
|
+
}): Promise<{}>;
|
|
113
|
+
/**
|
|
114
|
+
* Get a Thread owned by the current Project principal.
|
|
115
|
+
*
|
|
116
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
117
|
+
* @param {string} threadId - Agent Runtime route identifier.
|
|
118
|
+
* @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
|
|
119
|
+
* @throws {AgentbaseException}
|
|
120
|
+
* @returns {Promise<{}>}
|
|
121
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
122
|
+
*/
|
|
123
|
+
getThread(agentId: string, threadId: string, agentVersionId: string): Promise<{}>;
|
|
124
|
+
/**
|
|
125
|
+
* Delete a Thread owned by the current Project principal.
|
|
126
|
+
*
|
|
127
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
128
|
+
* @param {string} params.threadId - Agent Runtime route identifier.
|
|
129
|
+
* @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
|
|
130
|
+
* @throws {AgentbaseException}
|
|
131
|
+
* @returns {Promise<{}>}
|
|
132
|
+
*/
|
|
133
|
+
deleteThread(params: {
|
|
134
|
+
agentId: string;
|
|
135
|
+
threadId: string;
|
|
136
|
+
agentVersionId: string;
|
|
137
|
+
}): Promise<{}>;
|
|
138
|
+
/**
|
|
139
|
+
* Delete a Thread owned by the current Project principal.
|
|
140
|
+
*
|
|
141
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
142
|
+
* @param {string} threadId - Agent Runtime route identifier.
|
|
143
|
+
* @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
|
|
144
|
+
* @throws {AgentbaseException}
|
|
145
|
+
* @returns {Promise<{}>}
|
|
146
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
147
|
+
*/
|
|
148
|
+
deleteThread(agentId: string, threadId: string, agentVersionId: string): Promise<{}>;
|
|
149
|
+
/**
|
|
150
|
+
* List Context compactions for a Thread.
|
|
151
|
+
*
|
|
152
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
153
|
+
* @param {string} params.threadId - Agent Runtime route identifier.
|
|
154
|
+
* @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
|
|
155
|
+
* @param {number} params.limit - Maximum number of records.
|
|
156
|
+
* @param {string} params.after - Pagination cursor.
|
|
157
|
+
* @throws {AgentbaseException}
|
|
158
|
+
* @returns {Promise<{}>}
|
|
159
|
+
*/
|
|
160
|
+
listContextCompactions(params: {
|
|
161
|
+
agentId: string;
|
|
162
|
+
threadId: string;
|
|
163
|
+
agentVersionId: string;
|
|
164
|
+
limit?: number;
|
|
165
|
+
after?: string;
|
|
166
|
+
}): Promise<{}>;
|
|
167
|
+
/**
|
|
168
|
+
* List Context compactions for a Thread.
|
|
169
|
+
*
|
|
170
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
171
|
+
* @param {string} threadId - Agent Runtime route identifier.
|
|
172
|
+
* @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
|
|
173
|
+
* @param {number} limit - Maximum number of records.
|
|
174
|
+
* @param {string} after - Pagination cursor.
|
|
175
|
+
* @throws {AgentbaseException}
|
|
176
|
+
* @returns {Promise<{}>}
|
|
177
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
178
|
+
*/
|
|
179
|
+
listContextCompactions(agentId: string, threadId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
|
|
180
|
+
/**
|
|
181
|
+
* List messages in a Thread.
|
|
182
|
+
*
|
|
183
|
+
* @param {string} params.agentId - Agent Runtime route identifier.
|
|
184
|
+
* @param {string} params.threadId - Agent Runtime route identifier.
|
|
185
|
+
* @param {string} params.agentVersionId - Published Agent Version returned when the Thread was created.
|
|
186
|
+
* @param {number} params.limit - Maximum number of records.
|
|
187
|
+
* @param {string} params.after - Pagination cursor.
|
|
188
|
+
* @throws {AgentbaseException}
|
|
189
|
+
* @returns {Promise<{}>}
|
|
190
|
+
*/
|
|
191
|
+
listThreadMessages(params: {
|
|
192
|
+
agentId: string;
|
|
193
|
+
threadId: string;
|
|
194
|
+
agentVersionId: string;
|
|
195
|
+
limit?: number;
|
|
196
|
+
after?: string;
|
|
197
|
+
}): Promise<{}>;
|
|
198
|
+
/**
|
|
199
|
+
* List messages in a Thread.
|
|
200
|
+
*
|
|
201
|
+
* @param {string} agentId - Agent Runtime route identifier.
|
|
202
|
+
* @param {string} threadId - Agent Runtime route identifier.
|
|
203
|
+
* @param {string} agentVersionId - Published Agent Version returned when the Thread was created.
|
|
204
|
+
* @param {number} limit - Maximum number of records.
|
|
205
|
+
* @param {string} after - Pagination cursor.
|
|
206
|
+
* @throws {AgentbaseException}
|
|
207
|
+
* @returns {Promise<{}>}
|
|
208
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
209
|
+
*/
|
|
210
|
+
listThreadMessages(agentId: string, threadId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
|
|
211
|
+
/**
|
|
212
|
+
* Get a Run owned by the current Project principal.
|
|
213
|
+
*
|
|
214
|
+
* @param {string} params.runId - Agent Runtime route identifier.
|
|
215
|
+
* @param {string} params.agentVersionId - Published Agent Version associated with the Run.
|
|
216
|
+
* @throws {AgentbaseException}
|
|
217
|
+
* @returns {Promise<{}>}
|
|
218
|
+
*/
|
|
219
|
+
getRun(params: {
|
|
220
|
+
runId: string;
|
|
221
|
+
agentVersionId: string;
|
|
222
|
+
}): Promise<{}>;
|
|
223
|
+
/**
|
|
224
|
+
* Get a Run owned by the current Project principal.
|
|
225
|
+
*
|
|
226
|
+
* @param {string} runId - Agent Runtime route identifier.
|
|
227
|
+
* @param {string} agentVersionId - Published Agent Version associated with the Run.
|
|
228
|
+
* @throws {AgentbaseException}
|
|
229
|
+
* @returns {Promise<{}>}
|
|
230
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
231
|
+
*/
|
|
232
|
+
getRun(runId: string, agentVersionId: string): Promise<{}>;
|
|
233
|
+
/**
|
|
234
|
+
* Cancel a Run owned by the current Project principal.
|
|
235
|
+
*
|
|
236
|
+
* @param {string} params.runId - Agent Runtime route identifier.
|
|
237
|
+
* @param {string} params.agentVersionId - Published Agent Version associated with the Run.
|
|
238
|
+
* @throws {AgentbaseException}
|
|
239
|
+
* @returns {Promise<{}>}
|
|
240
|
+
*/
|
|
241
|
+
cancelRun(params: {
|
|
242
|
+
runId: string;
|
|
243
|
+
agentVersionId: string;
|
|
244
|
+
}): Promise<{}>;
|
|
245
|
+
/**
|
|
246
|
+
* Cancel a Run owned by the current Project principal.
|
|
247
|
+
*
|
|
248
|
+
* @param {string} runId - Agent Runtime route identifier.
|
|
249
|
+
* @param {string} agentVersionId - Published Agent Version associated with the Run.
|
|
250
|
+
* @throws {AgentbaseException}
|
|
251
|
+
* @returns {Promise<{}>}
|
|
252
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
253
|
+
*/
|
|
254
|
+
cancelRun(runId: string, agentVersionId: string): Promise<{}>;
|
|
255
|
+
/**
|
|
256
|
+
* Stream resumable events for a Run.
|
|
257
|
+
*
|
|
258
|
+
* @param {string} params.runId - Agent Runtime route identifier.
|
|
259
|
+
* @param {string} params.agentVersionId - Published Agent Version associated with the Run.
|
|
260
|
+
* @throws {AgentbaseException}
|
|
261
|
+
* @returns {Promise<{}>}
|
|
262
|
+
*/
|
|
263
|
+
streamRunEvents(params: {
|
|
264
|
+
runId: string;
|
|
265
|
+
agentVersionId: string;
|
|
266
|
+
}): Promise<{}>;
|
|
267
|
+
/**
|
|
268
|
+
* Stream resumable events for a Run.
|
|
269
|
+
*
|
|
270
|
+
* @param {string} runId - Agent Runtime route identifier.
|
|
271
|
+
* @param {string} agentVersionId - Published Agent Version associated with the Run.
|
|
272
|
+
* @throws {AgentbaseException}
|
|
273
|
+
* @returns {Promise<{}>}
|
|
274
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
275
|
+
*/
|
|
276
|
+
streamRunEvents(runId: string, agentVersionId: string): Promise<{}>;
|
|
277
|
+
/**
|
|
278
|
+
* List messages produced by a Run.
|
|
279
|
+
*
|
|
280
|
+
* @param {string} params.runId - Agent Runtime route identifier.
|
|
281
|
+
* @param {string} params.agentVersionId - Published Agent Version associated with the Run.
|
|
282
|
+
* @param {number} params.limit - Maximum number of records.
|
|
283
|
+
* @param {string} params.after - Pagination cursor.
|
|
284
|
+
* @throws {AgentbaseException}
|
|
285
|
+
* @returns {Promise<{}>}
|
|
286
|
+
*/
|
|
287
|
+
listRunMessages(params: {
|
|
288
|
+
runId: string;
|
|
289
|
+
agentVersionId: string;
|
|
290
|
+
limit?: number;
|
|
291
|
+
after?: string;
|
|
292
|
+
}): Promise<{}>;
|
|
293
|
+
/**
|
|
294
|
+
* List messages produced by a Run.
|
|
295
|
+
*
|
|
296
|
+
* @param {string} runId - Agent Runtime route identifier.
|
|
297
|
+
* @param {string} agentVersionId - Published Agent Version associated with the Run.
|
|
298
|
+
* @param {number} limit - Maximum number of records.
|
|
299
|
+
* @param {string} after - Pagination cursor.
|
|
300
|
+
* @throws {AgentbaseException}
|
|
301
|
+
* @returns {Promise<{}>}
|
|
302
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
303
|
+
*/
|
|
304
|
+
listRunMessages(runId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
|
|
305
|
+
/**
|
|
306
|
+
* List model invocations for a Run.
|
|
307
|
+
*
|
|
308
|
+
* @param {string} params.runId - Agent Runtime route identifier.
|
|
309
|
+
* @param {string} params.agentVersionId - Published Agent Version associated with the Run.
|
|
310
|
+
* @param {number} params.limit - Maximum number of records.
|
|
311
|
+
* @param {string} params.after - Pagination cursor.
|
|
312
|
+
* @throws {AgentbaseException}
|
|
313
|
+
* @returns {Promise<{}>}
|
|
314
|
+
*/
|
|
315
|
+
listModelInvocations(params: {
|
|
316
|
+
runId: string;
|
|
317
|
+
agentVersionId: string;
|
|
318
|
+
limit?: number;
|
|
319
|
+
after?: string;
|
|
320
|
+
}): Promise<{}>;
|
|
321
|
+
/**
|
|
322
|
+
* List model invocations for a Run.
|
|
323
|
+
*
|
|
324
|
+
* @param {string} runId - Agent Runtime route identifier.
|
|
325
|
+
* @param {string} agentVersionId - Published Agent Version associated with the Run.
|
|
326
|
+
* @param {number} limit - Maximum number of records.
|
|
327
|
+
* @param {string} after - Pagination cursor.
|
|
328
|
+
* @throws {AgentbaseException}
|
|
329
|
+
* @returns {Promise<{}>}
|
|
330
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
331
|
+
*/
|
|
332
|
+
listModelInvocations(runId: string, agentVersionId: string, limit?: number, after?: string): Promise<{}>;
|
|
333
|
+
/**
|
|
334
|
+
* Submit one client Tool result to a waiting Run.
|
|
335
|
+
*
|
|
336
|
+
* @param {string} params.runId - Agent Runtime route identifier.
|
|
337
|
+
* @param {string} params.agentVersionId - Published Agent Version associated with the Run.
|
|
338
|
+
* @param {string} params.id - Tool message identifier.
|
|
339
|
+
* @param {string} params.role - Message role. Must be `tool`.
|
|
340
|
+
* @param {string} params.toolCallId - Tool call identifier.
|
|
341
|
+
* @param {string} params.content - JSON encoded Tool result.
|
|
342
|
+
* @param {string} params.error - Optional Tool execution error.
|
|
343
|
+
* @throws {AgentbaseException}
|
|
344
|
+
* @returns {Promise<{}>}
|
|
345
|
+
*/
|
|
346
|
+
submitToolMessage(params: {
|
|
347
|
+
runId: string;
|
|
348
|
+
agentVersionId: string;
|
|
349
|
+
id: string;
|
|
350
|
+
role: string;
|
|
351
|
+
toolCallId: string;
|
|
352
|
+
content: string;
|
|
353
|
+
error?: string;
|
|
354
|
+
}): Promise<{}>;
|
|
355
|
+
/**
|
|
356
|
+
* Submit one client Tool result to a waiting Run.
|
|
357
|
+
*
|
|
358
|
+
* @param {string} runId - Agent Runtime route identifier.
|
|
359
|
+
* @param {string} agentVersionId - Published Agent Version associated with the Run.
|
|
360
|
+
* @param {string} id - Tool message identifier.
|
|
361
|
+
* @param {string} role - Message role. Must be `tool`.
|
|
362
|
+
* @param {string} toolCallId - Tool call identifier.
|
|
363
|
+
* @param {string} content - JSON encoded Tool result.
|
|
364
|
+
* @param {string} error - Optional Tool execution error.
|
|
365
|
+
* @throws {AgentbaseException}
|
|
366
|
+
* @returns {Promise<{}>}
|
|
367
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
368
|
+
*/
|
|
369
|
+
submitToolMessage(runId: string, agentVersionId: string, id: string, role: string, toolCallId: string, content: string, error?: string): Promise<{}>;
|
|
370
|
+
}
|
|
@@ -104,6 +104,7 @@ export declare class AiGateway {
|
|
|
104
104
|
* @param {string[]} params.allowedAgents - Allowed A2A or HTTP Agent Target resource IDs. Use `["*"]` for every Agent; an empty list denies all Agents.
|
|
105
105
|
* @param {string} params.defaultLogicalModel - Optional default logical model used only when a request omits `model`.
|
|
106
106
|
* @param {object} params.principal - Optional roles and flat claims signed into this credential and exposed to AI Gateway policies.
|
|
107
|
+
* @param {any[][]} params.limits - Optional hard credential/model/Tool/Agent rate and quota rules.
|
|
107
108
|
* @throws {AgentbaseException}
|
|
108
109
|
* @returns {Promise<{}>}
|
|
109
110
|
*/
|
|
@@ -116,6 +117,7 @@ export declare class AiGateway {
|
|
|
116
117
|
allowedAgents?: string[];
|
|
117
118
|
defaultLogicalModel?: string;
|
|
118
119
|
principal?: object;
|
|
120
|
+
limits?: any[][];
|
|
119
121
|
}): Promise<{}>;
|
|
120
122
|
/**
|
|
121
123
|
* Issue an encrypted, recoverable API key for one or more AI Gateways.
|
|
@@ -128,11 +130,12 @@ export declare class AiGateway {
|
|
|
128
130
|
* @param {string[]} allowedAgents - Allowed A2A or HTTP Agent Target resource IDs. Use `["*"]` for every Agent; an empty list denies all Agents.
|
|
129
131
|
* @param {string} defaultLogicalModel - Optional default logical model used only when a request omits `model`.
|
|
130
132
|
* @param {object} principal - Optional roles and flat claims signed into this credential and exposed to AI Gateway policies.
|
|
133
|
+
* @param {any[][]} limits - Optional hard credential/model/Tool/Agent rate and quota rules.
|
|
131
134
|
* @throws {AgentbaseException}
|
|
132
135
|
* @returns {Promise<{}>}
|
|
133
136
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
134
137
|
*/
|
|
135
|
-
createKey(name: string, gatewayIds: string[], region?: string, allowedModels?: string[], allowedTools?: string[], allowedAgents?: string[], defaultLogicalModel?: string, principal?: object): Promise<{}>;
|
|
138
|
+
createKey(name: string, gatewayIds: string[], region?: string, allowedModels?: string[], allowedTools?: string[], allowedAgents?: string[], defaultLogicalModel?: string, principal?: object, limits?: any[][]): Promise<{}>;
|
|
136
139
|
/**
|
|
137
140
|
* Retrieve the plaintext of an encrypted AI Gateway API key.
|
|
138
141
|
*
|