@crestal/nation-sdk 0.6.32 → 0.7.1
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/.openapi-generator/FILES +1 -0
- package/README.md +4 -2
- package/api.ts +111 -71
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +69 -71
- package/dist/api.js +98 -5
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AgentApi.md +1 -1
- package/docs/AgentDeployRequest.md +25 -0
- package/docs/AgentResponse.md +6 -26
- package/docs/DraftApi.md +54 -0
- package/docs/LLMModelInfoWithProviderName.md +2 -2
- package/index.ts +1 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @crestal/nation-sdk@0.
|
|
1
|
+
## @crestal/nation-sdk@0.7.1
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @crestal/nation-sdk@0.
|
|
39
|
+
npm install @crestal/nation-sdk@0.7.1 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -80,6 +80,7 @@ Class | Method | HTTP request | Description
|
|
|
80
80
|
*CreditApi* | [**listUserEvents**](docs/CreditApi.md#listuserevents) | **GET** /credit/user/events | List User Events
|
|
81
81
|
*CreditApi* | [**listUserTransactions**](docs/CreditApi.md#listusertransactions) | **GET** /credit/user/transactions | List User Transactions
|
|
82
82
|
*DraftApi* | [**createAgentDraft**](docs/DraftApi.md#createagentdraft) | **POST** /agent/draft | Create Agent Draft
|
|
83
|
+
*DraftApi* | [**deployAgentFromDraft**](docs/DraftApi.md#deployagentfromdraft) | **POST** /agent/deploy | Deploy Agent From Draft
|
|
83
84
|
*DraftApi* | [**getAgentDraftById**](docs/DraftApi.md#getagentdraftbyid) | **GET** /agents/{agent_id}/drafts/{draft_id} | Get Agent Draft By Id
|
|
84
85
|
*DraftApi* | [**getAgentDrafts**](docs/DraftApi.md#getagentdrafts) | **GET** /agents/{agent_id}/drafts | Get Agent Drafts
|
|
85
86
|
*DraftApi* | [**getAgentLatestDraft**](docs/DraftApi.md#getagentlatestdraft) | **GET** /agents/{agent_id}/draft/latest | Get Agent Latest Draft
|
|
@@ -107,6 +108,7 @@ Class | Method | HTTP request | Description
|
|
|
107
108
|
- [AgentAssetsResponse](docs/AgentAssetsResponse.md)
|
|
108
109
|
- [AgentAutonomous](docs/AgentAutonomous.md)
|
|
109
110
|
- [AgentCreate](docs/AgentCreate.md)
|
|
111
|
+
- [AgentDeployRequest](docs/AgentDeployRequest.md)
|
|
110
112
|
- [AgentDraft](docs/AgentDraft.md)
|
|
111
113
|
- [AgentExample](docs/AgentExample.md)
|
|
112
114
|
- [AgentGenerateRequest](docs/AgentGenerateRequest.md)
|
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Nation IntentKit API
|
|
5
5
|
* API for Nation IntentKit services
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 0.
|
|
7
|
+
* The version of the OpenAPI document: 0.7.1
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -638,6 +638,31 @@ export const AgentCreateShortTermMemoryStrategyEnum = {
|
|
|
638
638
|
|
|
639
639
|
export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
|
|
640
640
|
|
|
641
|
+
/**
|
|
642
|
+
* Request model for agent deployment.
|
|
643
|
+
* @export
|
|
644
|
+
* @interface AgentDeployRequest
|
|
645
|
+
*/
|
|
646
|
+
export interface AgentDeployRequest {
|
|
647
|
+
/**
|
|
648
|
+
* Agent ID to deploy
|
|
649
|
+
* @type {string}
|
|
650
|
+
* @memberof AgentDeployRequest
|
|
651
|
+
*/
|
|
652
|
+
'agent_id': string;
|
|
653
|
+
/**
|
|
654
|
+
* Draft ID to deploy
|
|
655
|
+
* @type {string}
|
|
656
|
+
* @memberof AgentDeployRequest
|
|
657
|
+
*/
|
|
658
|
+
'draft_id': string;
|
|
659
|
+
/**
|
|
660
|
+
* Transaction ID for upstream tracking
|
|
661
|
+
* @type {string}
|
|
662
|
+
* @memberof AgentDeployRequest
|
|
663
|
+
*/
|
|
664
|
+
'tx_id': string;
|
|
665
|
+
}
|
|
641
666
|
/**
|
|
642
667
|
* Agent draft model.
|
|
643
668
|
* @export
|
|
@@ -967,7 +992,7 @@ export interface AgentListResponse {
|
|
|
967
992
|
'next_cursor'?: string | null;
|
|
968
993
|
}
|
|
969
994
|
/**
|
|
970
|
-
*
|
|
995
|
+
* Agent response model that excludes sensitive fields from JSON output and schema.
|
|
971
996
|
* @export
|
|
972
997
|
* @interface AgentResponse
|
|
973
998
|
*/
|
|
@@ -1032,54 +1057,12 @@ export interface AgentResponse {
|
|
|
1032
1057
|
* @memberof AgentResponse
|
|
1033
1058
|
*/
|
|
1034
1059
|
'picture'?: string | null;
|
|
1035
|
-
/**
|
|
1036
|
-
*
|
|
1037
|
-
* @type {string}
|
|
1038
|
-
* @memberof AgentResponse
|
|
1039
|
-
*/
|
|
1040
|
-
'purpose'?: string | null;
|
|
1041
|
-
/**
|
|
1042
|
-
*
|
|
1043
|
-
* @type {string}
|
|
1044
|
-
* @memberof AgentResponse
|
|
1045
|
-
*/
|
|
1046
|
-
'personality'?: string | null;
|
|
1047
|
-
/**
|
|
1048
|
-
*
|
|
1049
|
-
* @type {string}
|
|
1050
|
-
* @memberof AgentResponse
|
|
1051
|
-
*/
|
|
1052
|
-
'principles'?: string | null;
|
|
1053
1060
|
/**
|
|
1054
1061
|
* AI model identifier to be used by this agent for processing requests.
|
|
1055
1062
|
* @type {string}
|
|
1056
1063
|
* @memberof AgentResponse
|
|
1057
1064
|
*/
|
|
1058
1065
|
'model'?: string;
|
|
1059
|
-
/**
|
|
1060
|
-
*
|
|
1061
|
-
* @type {string}
|
|
1062
|
-
* @memberof AgentResponse
|
|
1063
|
-
*/
|
|
1064
|
-
'prompt'?: string | null;
|
|
1065
|
-
/**
|
|
1066
|
-
*
|
|
1067
|
-
* @type {string}
|
|
1068
|
-
* @memberof AgentResponse
|
|
1069
|
-
*/
|
|
1070
|
-
'prompt_append'?: string | null;
|
|
1071
|
-
/**
|
|
1072
|
-
*
|
|
1073
|
-
* @type {number}
|
|
1074
|
-
* @memberof AgentResponse
|
|
1075
|
-
*/
|
|
1076
|
-
'temperature'?: number | null;
|
|
1077
|
-
/**
|
|
1078
|
-
*
|
|
1079
|
-
* @type {number}
|
|
1080
|
-
* @memberof AgentResponse
|
|
1081
|
-
*/
|
|
1082
|
-
'frequency_penalty'?: number | null;
|
|
1083
1066
|
/**
|
|
1084
1067
|
*
|
|
1085
1068
|
* @type {number}
|
|
@@ -1128,24 +1111,6 @@ export interface AgentResponse {
|
|
|
1128
1111
|
* @memberof AgentResponse
|
|
1129
1112
|
*/
|
|
1130
1113
|
'telegram_entrypoint_enabled'?: boolean | null;
|
|
1131
|
-
/**
|
|
1132
|
-
*
|
|
1133
|
-
* @type {string}
|
|
1134
|
-
* @memberof AgentResponse
|
|
1135
|
-
*/
|
|
1136
|
-
'telegram_entrypoint_prompt'?: string | null;
|
|
1137
|
-
/**
|
|
1138
|
-
*
|
|
1139
|
-
* @type {object}
|
|
1140
|
-
* @memberof AgentResponse
|
|
1141
|
-
*/
|
|
1142
|
-
'telegram_config'?: object | null;
|
|
1143
|
-
/**
|
|
1144
|
-
*
|
|
1145
|
-
* @type {string}
|
|
1146
|
-
* @memberof AgentResponse
|
|
1147
|
-
*/
|
|
1148
|
-
'xmtp_entrypoint_prompt'?: string | null;
|
|
1149
1114
|
/**
|
|
1150
1115
|
*
|
|
1151
1116
|
* @type {string}
|
|
@@ -1237,7 +1202,7 @@ export interface AgentResponse {
|
|
|
1237
1202
|
*/
|
|
1238
1203
|
'solana_wallet_address'?: string | null;
|
|
1239
1204
|
/**
|
|
1240
|
-
* Whether the agent has
|
|
1205
|
+
* Whether the agent has Twitter linked
|
|
1241
1206
|
* @type {boolean}
|
|
1242
1207
|
* @memberof AgentResponse
|
|
1243
1208
|
*/
|
|
@@ -1255,13 +1220,13 @@ export interface AgentResponse {
|
|
|
1255
1220
|
*/
|
|
1256
1221
|
'linked_twitter_name'?: string | null;
|
|
1257
1222
|
/**
|
|
1258
|
-
* Whether the agent has self
|
|
1223
|
+
* Whether the agent has Twitter self key
|
|
1259
1224
|
* @type {boolean}
|
|
1260
1225
|
* @memberof AgentResponse
|
|
1261
1226
|
*/
|
|
1262
1227
|
'has_twitter_self_key'?: boolean;
|
|
1263
1228
|
/**
|
|
1264
|
-
* Whether the agent has self
|
|
1229
|
+
* Whether the agent has Telegram self key
|
|
1265
1230
|
* @type {boolean}
|
|
1266
1231
|
* @memberof AgentResponse
|
|
1267
1232
|
*/
|
|
@@ -1279,13 +1244,13 @@ export interface AgentResponse {
|
|
|
1279
1244
|
*/
|
|
1280
1245
|
'linked_telegram_name'?: string | null;
|
|
1281
1246
|
/**
|
|
1282
|
-
* Whether the agent accepts image
|
|
1247
|
+
* Whether the agent accepts image input
|
|
1283
1248
|
* @type {boolean}
|
|
1284
1249
|
* @memberof AgentResponse
|
|
1285
1250
|
*/
|
|
1286
1251
|
'accept_image_input'?: boolean;
|
|
1287
1252
|
/**
|
|
1288
|
-
* Whether the agent accepts image
|
|
1253
|
+
* Whether the agent accepts image input in private mode
|
|
1289
1254
|
* @type {boolean}
|
|
1290
1255
|
* @memberof AgentResponse
|
|
1291
1256
|
*/
|
|
@@ -3907,7 +3872,7 @@ export const AgentApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
3907
3872
|
};
|
|
3908
3873
|
},
|
|
3909
3874
|
/**
|
|
3910
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
3875
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3911
3876
|
* @summary Override Agent
|
|
3912
3877
|
* @param {string} agentId ID of the agent to update
|
|
3913
3878
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -4199,7 +4164,7 @@ export const AgentApiFp = function(configuration?: Configuration) {
|
|
|
4199
4164
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4200
4165
|
},
|
|
4201
4166
|
/**
|
|
4202
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
4167
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
4203
4168
|
* @summary Override Agent
|
|
4204
4169
|
* @param {string} agentId ID of the agent to update
|
|
4205
4170
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -4358,7 +4323,7 @@ export const AgentApiFactory = function (configuration?: Configuration, basePath
|
|
|
4358
4323
|
return localVarFp.importAgent(agentId, file, options).then((request) => request(axios, basePath));
|
|
4359
4324
|
},
|
|
4360
4325
|
/**
|
|
4361
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
4326
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
4362
4327
|
* @summary Override Agent
|
|
4363
4328
|
* @param {string} agentId ID of the agent to update
|
|
4364
4329
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -4523,7 +4488,7 @@ export class AgentApi extends BaseAPI {
|
|
|
4523
4488
|
}
|
|
4524
4489
|
|
|
4525
4490
|
/**
|
|
4526
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
4491
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
4527
4492
|
* @summary Override Agent
|
|
4528
4493
|
* @param {string} agentId ID of the agent to update
|
|
4529
4494
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -5945,6 +5910,46 @@ export const DraftApiAxiosParamCreator = function (configuration?: Configuration
|
|
|
5945
5910
|
options: localVarRequestOptions,
|
|
5946
5911
|
};
|
|
5947
5912
|
},
|
|
5913
|
+
/**
|
|
5914
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
5915
|
+
* @summary Deploy Agent From Draft
|
|
5916
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
5917
|
+
* @param {*} [options] Override http request option.
|
|
5918
|
+
* @throws {RequiredError}
|
|
5919
|
+
*/
|
|
5920
|
+
deployAgentFromDraft: async (agentDeployRequest: AgentDeployRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
5921
|
+
// verify required parameter 'agentDeployRequest' is not null or undefined
|
|
5922
|
+
assertParamExists('deployAgentFromDraft', 'agentDeployRequest', agentDeployRequest)
|
|
5923
|
+
const localVarPath = `/agent/deploy`;
|
|
5924
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
5925
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
5926
|
+
let baseOptions;
|
|
5927
|
+
if (configuration) {
|
|
5928
|
+
baseOptions = configuration.baseOptions;
|
|
5929
|
+
}
|
|
5930
|
+
|
|
5931
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
5932
|
+
const localVarHeaderParameter = {} as any;
|
|
5933
|
+
const localVarQueryParameter = {} as any;
|
|
5934
|
+
|
|
5935
|
+
// authentication HTTPBearer required
|
|
5936
|
+
// http bearer authentication required
|
|
5937
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
5938
|
+
|
|
5939
|
+
|
|
5940
|
+
|
|
5941
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
5942
|
+
|
|
5943
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
5944
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
5945
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
5946
|
+
localVarRequestOptions.data = serializeDataIfNeeded(agentDeployRequest, localVarRequestOptions, configuration)
|
|
5947
|
+
|
|
5948
|
+
return {
|
|
5949
|
+
url: toPathString(localVarUrlObj),
|
|
5950
|
+
options: localVarRequestOptions,
|
|
5951
|
+
};
|
|
5952
|
+
},
|
|
5948
5953
|
/**
|
|
5949
5954
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
5950
5955
|
* @summary Get Agent Draft By Id
|
|
@@ -6130,6 +6135,19 @@ export const DraftApiFp = function(configuration?: Configuration) {
|
|
|
6130
6135
|
const localVarOperationServerBasePath = operationServerMap['DraftApi.createAgentDraft']?.[localVarOperationServerIndex]?.url;
|
|
6131
6136
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6132
6137
|
},
|
|
6138
|
+
/**
|
|
6139
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
6140
|
+
* @summary Deploy Agent From Draft
|
|
6141
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
6142
|
+
* @param {*} [options] Override http request option.
|
|
6143
|
+
* @throws {RequiredError}
|
|
6144
|
+
*/
|
|
6145
|
+
async deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>> {
|
|
6146
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deployAgentFromDraft(agentDeployRequest, options);
|
|
6147
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
6148
|
+
const localVarOperationServerBasePath = operationServerMap['DraftApi.deployAgentFromDraft']?.[localVarOperationServerIndex]?.url;
|
|
6149
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
6150
|
+
},
|
|
6133
6151
|
/**
|
|
6134
6152
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
6135
6153
|
* @summary Get Agent Draft By Id
|
|
@@ -6204,6 +6222,16 @@ export const DraftApiFactory = function (configuration?: Configuration, basePath
|
|
|
6204
6222
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft> {
|
|
6205
6223
|
return localVarFp.createAgentDraft(agentUserInput, options).then((request) => request(axios, basePath));
|
|
6206
6224
|
},
|
|
6225
|
+
/**
|
|
6226
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
6227
|
+
* @summary Deploy Agent From Draft
|
|
6228
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
6229
|
+
* @param {*} [options] Override http request option.
|
|
6230
|
+
* @throws {RequiredError}
|
|
6231
|
+
*/
|
|
6232
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse> {
|
|
6233
|
+
return localVarFp.deployAgentFromDraft(agentDeployRequest, options).then((request) => request(axios, basePath));
|
|
6234
|
+
},
|
|
6207
6235
|
/**
|
|
6208
6236
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
6209
6237
|
* @summary Get Agent Draft By Id
|
|
@@ -6268,6 +6296,18 @@ export class DraftApi extends BaseAPI {
|
|
|
6268
6296
|
return DraftApiFp(this.configuration).createAgentDraft(agentUserInput, options).then((request) => request(this.axios, this.basePath));
|
|
6269
6297
|
}
|
|
6270
6298
|
|
|
6299
|
+
/**
|
|
6300
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
6301
|
+
* @summary Deploy Agent From Draft
|
|
6302
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
6303
|
+
* @param {*} [options] Override http request option.
|
|
6304
|
+
* @throws {RequiredError}
|
|
6305
|
+
* @memberof DraftApi
|
|
6306
|
+
*/
|
|
6307
|
+
public deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig) {
|
|
6308
|
+
return DraftApiFp(this.configuration).deployAgentFromDraft(agentDeployRequest, options).then((request) => request(this.axios, this.basePath));
|
|
6309
|
+
}
|
|
6310
|
+
|
|
6271
6311
|
/**
|
|
6272
6312
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
6273
6313
|
* @summary Get Agent Draft By Id
|
package/base.ts
CHANGED
package/common.ts
CHANGED
package/configuration.ts
CHANGED
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Nation IntentKit API
|
|
3
3
|
* API for Nation IntentKit services
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 0.
|
|
5
|
+
* The version of the OpenAPI document: 0.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -618,6 +618,31 @@ export declare const AgentCreateShortTermMemoryStrategyEnum: {
|
|
|
618
618
|
readonly Summarize: "summarize";
|
|
619
619
|
};
|
|
620
620
|
export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
|
|
621
|
+
/**
|
|
622
|
+
* Request model for agent deployment.
|
|
623
|
+
* @export
|
|
624
|
+
* @interface AgentDeployRequest
|
|
625
|
+
*/
|
|
626
|
+
export interface AgentDeployRequest {
|
|
627
|
+
/**
|
|
628
|
+
* Agent ID to deploy
|
|
629
|
+
* @type {string}
|
|
630
|
+
* @memberof AgentDeployRequest
|
|
631
|
+
*/
|
|
632
|
+
'agent_id': string;
|
|
633
|
+
/**
|
|
634
|
+
* Draft ID to deploy
|
|
635
|
+
* @type {string}
|
|
636
|
+
* @memberof AgentDeployRequest
|
|
637
|
+
*/
|
|
638
|
+
'draft_id': string;
|
|
639
|
+
/**
|
|
640
|
+
* Transaction ID for upstream tracking
|
|
641
|
+
* @type {string}
|
|
642
|
+
* @memberof AgentDeployRequest
|
|
643
|
+
*/
|
|
644
|
+
'tx_id': string;
|
|
645
|
+
}
|
|
621
646
|
/**
|
|
622
647
|
* Agent draft model.
|
|
623
648
|
* @export
|
|
@@ -944,7 +969,7 @@ export interface AgentListResponse {
|
|
|
944
969
|
'next_cursor'?: string | null;
|
|
945
970
|
}
|
|
946
971
|
/**
|
|
947
|
-
*
|
|
972
|
+
* Agent response model that excludes sensitive fields from JSON output and schema.
|
|
948
973
|
* @export
|
|
949
974
|
* @interface AgentResponse
|
|
950
975
|
*/
|
|
@@ -1009,54 +1034,12 @@ export interface AgentResponse {
|
|
|
1009
1034
|
* @memberof AgentResponse
|
|
1010
1035
|
*/
|
|
1011
1036
|
'picture'?: string | null;
|
|
1012
|
-
/**
|
|
1013
|
-
*
|
|
1014
|
-
* @type {string}
|
|
1015
|
-
* @memberof AgentResponse
|
|
1016
|
-
*/
|
|
1017
|
-
'purpose'?: string | null;
|
|
1018
|
-
/**
|
|
1019
|
-
*
|
|
1020
|
-
* @type {string}
|
|
1021
|
-
* @memberof AgentResponse
|
|
1022
|
-
*/
|
|
1023
|
-
'personality'?: string | null;
|
|
1024
|
-
/**
|
|
1025
|
-
*
|
|
1026
|
-
* @type {string}
|
|
1027
|
-
* @memberof AgentResponse
|
|
1028
|
-
*/
|
|
1029
|
-
'principles'?: string | null;
|
|
1030
1037
|
/**
|
|
1031
1038
|
* AI model identifier to be used by this agent for processing requests.
|
|
1032
1039
|
* @type {string}
|
|
1033
1040
|
* @memberof AgentResponse
|
|
1034
1041
|
*/
|
|
1035
1042
|
'model'?: string;
|
|
1036
|
-
/**
|
|
1037
|
-
*
|
|
1038
|
-
* @type {string}
|
|
1039
|
-
* @memberof AgentResponse
|
|
1040
|
-
*/
|
|
1041
|
-
'prompt'?: string | null;
|
|
1042
|
-
/**
|
|
1043
|
-
*
|
|
1044
|
-
* @type {string}
|
|
1045
|
-
* @memberof AgentResponse
|
|
1046
|
-
*/
|
|
1047
|
-
'prompt_append'?: string | null;
|
|
1048
|
-
/**
|
|
1049
|
-
*
|
|
1050
|
-
* @type {number}
|
|
1051
|
-
* @memberof AgentResponse
|
|
1052
|
-
*/
|
|
1053
|
-
'temperature'?: number | null;
|
|
1054
|
-
/**
|
|
1055
|
-
*
|
|
1056
|
-
* @type {number}
|
|
1057
|
-
* @memberof AgentResponse
|
|
1058
|
-
*/
|
|
1059
|
-
'frequency_penalty'?: number | null;
|
|
1060
1043
|
/**
|
|
1061
1044
|
*
|
|
1062
1045
|
* @type {number}
|
|
@@ -1105,24 +1088,6 @@ export interface AgentResponse {
|
|
|
1105
1088
|
* @memberof AgentResponse
|
|
1106
1089
|
*/
|
|
1107
1090
|
'telegram_entrypoint_enabled'?: boolean | null;
|
|
1108
|
-
/**
|
|
1109
|
-
*
|
|
1110
|
-
* @type {string}
|
|
1111
|
-
* @memberof AgentResponse
|
|
1112
|
-
*/
|
|
1113
|
-
'telegram_entrypoint_prompt'?: string | null;
|
|
1114
|
-
/**
|
|
1115
|
-
*
|
|
1116
|
-
* @type {object}
|
|
1117
|
-
* @memberof AgentResponse
|
|
1118
|
-
*/
|
|
1119
|
-
'telegram_config'?: object | null;
|
|
1120
|
-
/**
|
|
1121
|
-
*
|
|
1122
|
-
* @type {string}
|
|
1123
|
-
* @memberof AgentResponse
|
|
1124
|
-
*/
|
|
1125
|
-
'xmtp_entrypoint_prompt'?: string | null;
|
|
1126
1091
|
/**
|
|
1127
1092
|
*
|
|
1128
1093
|
* @type {string}
|
|
@@ -1214,7 +1179,7 @@ export interface AgentResponse {
|
|
|
1214
1179
|
*/
|
|
1215
1180
|
'solana_wallet_address'?: string | null;
|
|
1216
1181
|
/**
|
|
1217
|
-
* Whether the agent has
|
|
1182
|
+
* Whether the agent has Twitter linked
|
|
1218
1183
|
* @type {boolean}
|
|
1219
1184
|
* @memberof AgentResponse
|
|
1220
1185
|
*/
|
|
@@ -1232,13 +1197,13 @@ export interface AgentResponse {
|
|
|
1232
1197
|
*/
|
|
1233
1198
|
'linked_twitter_name'?: string | null;
|
|
1234
1199
|
/**
|
|
1235
|
-
* Whether the agent has self
|
|
1200
|
+
* Whether the agent has Twitter self key
|
|
1236
1201
|
* @type {boolean}
|
|
1237
1202
|
* @memberof AgentResponse
|
|
1238
1203
|
*/
|
|
1239
1204
|
'has_twitter_self_key'?: boolean;
|
|
1240
1205
|
/**
|
|
1241
|
-
* Whether the agent has self
|
|
1206
|
+
* Whether the agent has Telegram self key
|
|
1242
1207
|
* @type {boolean}
|
|
1243
1208
|
* @memberof AgentResponse
|
|
1244
1209
|
*/
|
|
@@ -1256,13 +1221,13 @@ export interface AgentResponse {
|
|
|
1256
1221
|
*/
|
|
1257
1222
|
'linked_telegram_name'?: string | null;
|
|
1258
1223
|
/**
|
|
1259
|
-
* Whether the agent accepts image
|
|
1224
|
+
* Whether the agent accepts image input
|
|
1260
1225
|
* @type {boolean}
|
|
1261
1226
|
* @memberof AgentResponse
|
|
1262
1227
|
*/
|
|
1263
1228
|
'accept_image_input'?: boolean;
|
|
1264
1229
|
/**
|
|
1265
|
-
* Whether the agent accepts image
|
|
1230
|
+
* Whether the agent accepts image input in private mode
|
|
1266
1231
|
* @type {boolean}
|
|
1267
1232
|
* @memberof AgentResponse
|
|
1268
1233
|
*/
|
|
@@ -3524,7 +3489,7 @@ export declare const AgentApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
3524
3489
|
*/
|
|
3525
3490
|
importAgent: (agentId: string, file: File, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
3526
3491
|
/**
|
|
3527
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
3492
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3528
3493
|
* @summary Override Agent
|
|
3529
3494
|
* @param {string} agentId ID of the agent to update
|
|
3530
3495
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3641,7 +3606,7 @@ export declare const AgentApiFp: (configuration?: Configuration) => {
|
|
|
3641
3606
|
*/
|
|
3642
3607
|
importAgent(agentId: string, file: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>>;
|
|
3643
3608
|
/**
|
|
3644
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
3609
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3645
3610
|
* @summary Override Agent
|
|
3646
3611
|
* @param {string} agentId ID of the agent to update
|
|
3647
3612
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3758,7 +3723,7 @@ export declare const AgentApiFactory: (configuration?: Configuration, basePath?:
|
|
|
3758
3723
|
*/
|
|
3759
3724
|
importAgent(agentId: string, file: File, options?: RawAxiosRequestConfig): AxiosPromise<string>;
|
|
3760
3725
|
/**
|
|
3761
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
3726
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3762
3727
|
* @summary Override Agent
|
|
3763
3728
|
* @param {string} agentId ID of the agent to update
|
|
3764
3729
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3886,7 +3851,7 @@ export declare class AgentApi extends BaseAPI {
|
|
|
3886
3851
|
*/
|
|
3887
3852
|
importAgent(agentId: string, file: File, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<string, any, {}>>;
|
|
3888
3853
|
/**
|
|
3889
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
3854
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
3890
3855
|
* @summary Override Agent
|
|
3891
3856
|
* @param {string} agentId ID of the agent to update
|
|
3892
3857
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -4560,6 +4525,14 @@ export declare const DraftApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
4560
4525
|
* @throws {RequiredError}
|
|
4561
4526
|
*/
|
|
4562
4527
|
createAgentDraft: (agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4528
|
+
/**
|
|
4529
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4530
|
+
* @summary Deploy Agent From Draft
|
|
4531
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4532
|
+
* @param {*} [options] Override http request option.
|
|
4533
|
+
* @throws {RequiredError}
|
|
4534
|
+
*/
|
|
4535
|
+
deployAgentFromDraft: (agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
4563
4536
|
/**
|
|
4564
4537
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
4565
4538
|
* @summary Get Agent Draft By Id
|
|
@@ -4608,6 +4581,14 @@ export declare const DraftApiFp: (configuration?: Configuration) => {
|
|
|
4608
4581
|
* @throws {RequiredError}
|
|
4609
4582
|
*/
|
|
4610
4583
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentDraft>>;
|
|
4584
|
+
/**
|
|
4585
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4586
|
+
* @summary Deploy Agent From Draft
|
|
4587
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4588
|
+
* @param {*} [options] Override http request option.
|
|
4589
|
+
* @throws {RequiredError}
|
|
4590
|
+
*/
|
|
4591
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentResponse>>;
|
|
4611
4592
|
/**
|
|
4612
4593
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
4613
4594
|
* @summary Get Agent Draft By Id
|
|
@@ -4656,6 +4637,14 @@ export declare const DraftApiFactory: (configuration?: Configuration, basePath?:
|
|
|
4656
4637
|
* @throws {RequiredError}
|
|
4657
4638
|
*/
|
|
4658
4639
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): AxiosPromise<AgentDraft>;
|
|
4640
|
+
/**
|
|
4641
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4642
|
+
* @summary Deploy Agent From Draft
|
|
4643
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4644
|
+
* @param {*} [options] Override http request option.
|
|
4645
|
+
* @throws {RequiredError}
|
|
4646
|
+
*/
|
|
4647
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentResponse>;
|
|
4659
4648
|
/**
|
|
4660
4649
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
4661
4650
|
* @summary Get Agent Draft By Id
|
|
@@ -4707,6 +4696,15 @@ export declare class DraftApi extends BaseAPI {
|
|
|
4707
4696
|
* @memberof DraftApi
|
|
4708
4697
|
*/
|
|
4709
4698
|
createAgentDraft(agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentDraft, any, {}>>;
|
|
4699
|
+
/**
|
|
4700
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
4701
|
+
* @summary Deploy Agent From Draft
|
|
4702
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
4703
|
+
* @param {*} [options] Override http request option.
|
|
4704
|
+
* @throws {RequiredError}
|
|
4705
|
+
* @memberof DraftApi
|
|
4706
|
+
*/
|
|
4707
|
+
deployAgentFromDraft(agentDeployRequest: AgentDeployRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentResponse, any, {}>>;
|
|
4710
4708
|
/**
|
|
4711
4709
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
4712
4710
|
* @summary Get Agent Draft By Id
|
package/dist/api.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.
|
|
8
|
+
* The version of the OpenAPI document: 0.7.1
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -789,7 +789,7 @@ var AgentApiAxiosParamCreator = function (configuration) {
|
|
|
789
789
|
});
|
|
790
790
|
},
|
|
791
791
|
/**
|
|
792
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
792
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
793
793
|
* @summary Override Agent
|
|
794
794
|
* @param {string} agentId ID of the agent to update
|
|
795
795
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -1204,7 +1204,7 @@ var AgentApiFp = function (configuration) {
|
|
|
1204
1204
|
});
|
|
1205
1205
|
},
|
|
1206
1206
|
/**
|
|
1207
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
1207
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
1208
1208
|
* @summary Override Agent
|
|
1209
1209
|
* @param {string} agentId ID of the agent to update
|
|
1210
1210
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -1403,7 +1403,7 @@ var AgentApiFactory = function (configuration, basePath, axios) {
|
|
|
1403
1403
|
return localVarFp.importAgent(agentId, file, options).then(function (request) { return request(axios, basePath); });
|
|
1404
1404
|
},
|
|
1405
1405
|
/**
|
|
1406
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
1406
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
1407
1407
|
* @summary Override Agent
|
|
1408
1408
|
* @param {string} agentId ID of the agent to update
|
|
1409
1409
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -1572,7 +1572,7 @@ var AgentApi = /** @class */ (function (_super) {
|
|
|
1572
1572
|
return (0, exports.AgentApiFp)(this.configuration).importAgent(agentId, file, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
1573
1573
|
};
|
|
1574
1574
|
/**
|
|
1575
|
-
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
1575
|
+
* Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
1576
1576
|
* @summary Override Agent
|
|
1577
1577
|
* @param {string} agentId ID of the agent to update
|
|
1578
1578
|
* @param {AgentUpdate} [agentUpdate]
|
|
@@ -3282,6 +3282,54 @@ var DraftApiAxiosParamCreator = function (configuration) {
|
|
|
3282
3282
|
});
|
|
3283
3283
|
});
|
|
3284
3284
|
},
|
|
3285
|
+
/**
|
|
3286
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3287
|
+
* @summary Deploy Agent From Draft
|
|
3288
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3289
|
+
* @param {*} [options] Override http request option.
|
|
3290
|
+
* @throws {RequiredError}
|
|
3291
|
+
*/
|
|
3292
|
+
deployAgentFromDraft: function (agentDeployRequest_1) {
|
|
3293
|
+
var args_1 = [];
|
|
3294
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
3295
|
+
args_1[_i - 1] = arguments[_i];
|
|
3296
|
+
}
|
|
3297
|
+
return __awaiter(_this, __spreadArray([agentDeployRequest_1], args_1, true), void 0, function (agentDeployRequest, options) {
|
|
3298
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
3299
|
+
if (options === void 0) { options = {}; }
|
|
3300
|
+
return __generator(this, function (_a) {
|
|
3301
|
+
switch (_a.label) {
|
|
3302
|
+
case 0:
|
|
3303
|
+
// verify required parameter 'agentDeployRequest' is not null or undefined
|
|
3304
|
+
(0, common_1.assertParamExists)('deployAgentFromDraft', 'agentDeployRequest', agentDeployRequest);
|
|
3305
|
+
localVarPath = "/agent/deploy";
|
|
3306
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3307
|
+
if (configuration) {
|
|
3308
|
+
baseOptions = configuration.baseOptions;
|
|
3309
|
+
}
|
|
3310
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
3311
|
+
localVarHeaderParameter = {};
|
|
3312
|
+
localVarQueryParameter = {};
|
|
3313
|
+
// authentication HTTPBearer required
|
|
3314
|
+
// http bearer authentication required
|
|
3315
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
3316
|
+
case 1:
|
|
3317
|
+
// authentication HTTPBearer required
|
|
3318
|
+
// http bearer authentication required
|
|
3319
|
+
_a.sent();
|
|
3320
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3321
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3322
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3323
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
3324
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentDeployRequest, localVarRequestOptions, configuration);
|
|
3325
|
+
return [2 /*return*/, {
|
|
3326
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3327
|
+
options: localVarRequestOptions,
|
|
3328
|
+
}];
|
|
3329
|
+
}
|
|
3330
|
+
});
|
|
3331
|
+
});
|
|
3332
|
+
},
|
|
3285
3333
|
/**
|
|
3286
3334
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
3287
3335
|
* @summary Get Agent Draft By Id
|
|
@@ -3512,6 +3560,29 @@ var DraftApiFp = function (configuration) {
|
|
|
3512
3560
|
});
|
|
3513
3561
|
});
|
|
3514
3562
|
},
|
|
3563
|
+
/**
|
|
3564
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3565
|
+
* @summary Deploy Agent From Draft
|
|
3566
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3567
|
+
* @param {*} [options] Override http request option.
|
|
3568
|
+
* @throws {RequiredError}
|
|
3569
|
+
*/
|
|
3570
|
+
deployAgentFromDraft: function (agentDeployRequest, options) {
|
|
3571
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3572
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
3573
|
+
var _a, _b, _c;
|
|
3574
|
+
return __generator(this, function (_d) {
|
|
3575
|
+
switch (_d.label) {
|
|
3576
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.deployAgentFromDraft(agentDeployRequest, options)];
|
|
3577
|
+
case 1:
|
|
3578
|
+
localVarAxiosArgs = _d.sent();
|
|
3579
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3580
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DraftApi.deployAgentFromDraft']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3581
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
3582
|
+
}
|
|
3583
|
+
});
|
|
3584
|
+
});
|
|
3585
|
+
},
|
|
3515
3586
|
/**
|
|
3516
3587
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
3517
3588
|
* @summary Get Agent Draft By Id
|
|
@@ -3626,6 +3697,16 @@ var DraftApiFactory = function (configuration, basePath, axios) {
|
|
|
3626
3697
|
createAgentDraft: function (agentUserInput, options) {
|
|
3627
3698
|
return localVarFp.createAgentDraft(agentUserInput, options).then(function (request) { return request(axios, basePath); });
|
|
3628
3699
|
},
|
|
3700
|
+
/**
|
|
3701
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3702
|
+
* @summary Deploy Agent From Draft
|
|
3703
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3704
|
+
* @param {*} [options] Override http request option.
|
|
3705
|
+
* @throws {RequiredError}
|
|
3706
|
+
*/
|
|
3707
|
+
deployAgentFromDraft: function (agentDeployRequest, options) {
|
|
3708
|
+
return localVarFp.deployAgentFromDraft(agentDeployRequest, options).then(function (request) { return request(axios, basePath); });
|
|
3709
|
+
},
|
|
3629
3710
|
/**
|
|
3630
3711
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
3631
3712
|
* @summary Get Agent Draft By Id
|
|
@@ -3694,6 +3775,18 @@ var DraftApi = /** @class */ (function (_super) {
|
|
|
3694
3775
|
var _this = this;
|
|
3695
3776
|
return (0, exports.DraftApiFp)(this.configuration).createAgentDraft(agentUserInput, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3696
3777
|
};
|
|
3778
|
+
/**
|
|
3779
|
+
* Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
3780
|
+
* @summary Deploy Agent From Draft
|
|
3781
|
+
* @param {AgentDeployRequest} agentDeployRequest
|
|
3782
|
+
* @param {*} [options] Override http request option.
|
|
3783
|
+
* @throws {RequiredError}
|
|
3784
|
+
* @memberof DraftApi
|
|
3785
|
+
*/
|
|
3786
|
+
DraftApi.prototype.deployAgentFromDraft = function (agentDeployRequest, options) {
|
|
3787
|
+
var _this = this;
|
|
3788
|
+
return (0, exports.DraftApiFp)(this.configuration).deployAgentFromDraft(agentDeployRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3789
|
+
};
|
|
3697
3790
|
/**
|
|
3698
3791
|
* Get a specific draft by ID. Retrieves a specific draft for the given agent and draft ID. This endpoint is useful for viewing detailed information about a particular draft version. Possible HTTP errors: - 401: Unauthorized (invalid or missing authentication) - 404: Draft not found or user doesn\'t have access to this draft - 500: Internal server error
|
|
3699
3792
|
* @summary Get Agent Draft By Id
|
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/docs/AgentApi.md
CHANGED
|
@@ -511,7 +511,7 @@ const { status, data } = await apiInstance.importAgent(
|
|
|
511
511
|
# **overrideAgent**
|
|
512
512
|
> AgentResponse overrideAgent()
|
|
513
513
|
|
|
514
|
-
Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `
|
|
514
|
+
Override an existing agent. Use input to override agent configuration. If some fields are not provided, they will be reset to default values. **Path Parameters:** * `agent_id` - ID of the agent to update **Request Body:** * `data` - Agent update configuration **Returns:** * `AgentResponse` - Updated agent configuration with additional processed data **Raises:** * `HTTPException`: - 400: Invalid agent ID format - 404: Agent not found - 403: Permission denied (if owner mismatch) - 422: Invalid agent configuration from JSON schema validation - 500: Database error
|
|
515
515
|
|
|
516
516
|
### Example
|
|
517
517
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# AgentDeployRequest
|
|
2
|
+
|
|
3
|
+
Request model for agent deployment.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**agent_id** | **string** | Agent ID to deploy | [default to undefined]
|
|
10
|
+
**draft_id** | **string** | Draft ID to deploy | [default to undefined]
|
|
11
|
+
**tx_id** | **string** | Transaction ID for upstream tracking | [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AgentDeployRequest } from '@crestal/nation-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: AgentDeployRequest = {
|
|
19
|
+
agent_id,
|
|
20
|
+
draft_id,
|
|
21
|
+
tx_id,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/docs/AgentResponse.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AgentResponse
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Agent response model that excludes sensitive fields from JSON output and schema.
|
|
4
4
|
|
|
5
5
|
## Properties
|
|
6
6
|
|
|
@@ -16,14 +16,7 @@ Name | Type | Description | Notes
|
|
|
16
16
|
**examples** | [**Array<AgentExample>**](AgentExample.md) | | [optional] [default to undefined]
|
|
17
17
|
**name** | **string** | | [default to undefined]
|
|
18
18
|
**picture** | **string** | | [optional] [default to undefined]
|
|
19
|
-
**purpose** | **string** | | [optional] [default to undefined]
|
|
20
|
-
**personality** | **string** | | [optional] [default to undefined]
|
|
21
|
-
**principles** | **string** | | [optional] [default to undefined]
|
|
22
19
|
**model** | **string** | AI model identifier to be used by this agent for processing requests. | [optional] [default to 'gpt-5-mini']
|
|
23
|
-
**prompt** | **string** | | [optional] [default to undefined]
|
|
24
|
-
**prompt_append** | **string** | | [optional] [default to undefined]
|
|
25
|
-
**temperature** | **number** | | [optional] [default to undefined]
|
|
26
|
-
**frequency_penalty** | **number** | | [optional] [default to undefined]
|
|
27
20
|
**presence_penalty** | **number** | | [optional] [default to undefined]
|
|
28
21
|
**wallet_provider** | **string** | | [optional] [default to undefined]
|
|
29
22
|
**readonly_wallet_address** | **string** | | [optional] [default to undefined]
|
|
@@ -32,9 +25,6 @@ Name | Type | Description | Notes
|
|
|
32
25
|
**short_term_memory_strategy** | **string** | | [optional] [default to undefined]
|
|
33
26
|
**autonomous** | [**Array<AgentAutonomous>**](AgentAutonomous.md) | | [optional] [default to undefined]
|
|
34
27
|
**telegram_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
35
|
-
**telegram_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
36
|
-
**telegram_config** | **object** | | [optional] [default to undefined]
|
|
37
|
-
**xmtp_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
38
28
|
**upstream_id** | **string** | | [optional] [default to undefined]
|
|
39
29
|
**upstream_extra** | **object** | | [optional] [default to undefined]
|
|
40
30
|
**id** | **string** | Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens | [optional] [default to undefined]
|
|
@@ -50,15 +40,15 @@ Name | Type | Description | Notes
|
|
|
50
40
|
**cdp_wallet_address** | **string** | | [optional] [default to undefined]
|
|
51
41
|
**evm_wallet_address** | **string** | | [optional] [default to undefined]
|
|
52
42
|
**solana_wallet_address** | **string** | | [optional] [default to undefined]
|
|
53
|
-
**has_twitter_linked** | **boolean** | Whether the agent has
|
|
43
|
+
**has_twitter_linked** | **boolean** | Whether the agent has Twitter linked | [optional] [default to false]
|
|
54
44
|
**linked_twitter_username** | **string** | | [optional] [default to undefined]
|
|
55
45
|
**linked_twitter_name** | **string** | | [optional] [default to undefined]
|
|
56
|
-
**has_twitter_self_key** | **boolean** | Whether the agent has self
|
|
57
|
-
**has_telegram_self_key** | **boolean** | Whether the agent has self
|
|
46
|
+
**has_twitter_self_key** | **boolean** | Whether the agent has Twitter self key | [optional] [default to false]
|
|
47
|
+
**has_telegram_self_key** | **boolean** | Whether the agent has Telegram self key | [optional] [default to false]
|
|
58
48
|
**linked_telegram_username** | **string** | | [optional] [default to undefined]
|
|
59
49
|
**linked_telegram_name** | **string** | | [optional] [default to undefined]
|
|
60
|
-
**accept_image_input** | **boolean** | Whether the agent accepts image
|
|
61
|
-
**accept_image_input_private** | **boolean** | Whether the agent accepts image
|
|
50
|
+
**accept_image_input** | **boolean** | Whether the agent accepts image input | [optional] [default to false]
|
|
51
|
+
**accept_image_input_private** | **boolean** | Whether the agent accepts image input in private mode | [optional] [default to false]
|
|
62
52
|
|
|
63
53
|
## Example
|
|
64
54
|
|
|
@@ -76,14 +66,7 @@ const instance: AgentResponse = {
|
|
|
76
66
|
examples,
|
|
77
67
|
name,
|
|
78
68
|
picture,
|
|
79
|
-
purpose,
|
|
80
|
-
personality,
|
|
81
|
-
principles,
|
|
82
69
|
model,
|
|
83
|
-
prompt,
|
|
84
|
-
prompt_append,
|
|
85
|
-
temperature,
|
|
86
|
-
frequency_penalty,
|
|
87
70
|
presence_penalty,
|
|
88
71
|
wallet_provider,
|
|
89
72
|
readonly_wallet_address,
|
|
@@ -92,9 +75,6 @@ const instance: AgentResponse = {
|
|
|
92
75
|
short_term_memory_strategy,
|
|
93
76
|
autonomous,
|
|
94
77
|
telegram_entrypoint_enabled,
|
|
95
|
-
telegram_entrypoint_prompt,
|
|
96
|
-
telegram_config,
|
|
97
|
-
xmtp_entrypoint_prompt,
|
|
98
78
|
upstream_id,
|
|
99
79
|
upstream_extra,
|
|
100
80
|
id,
|
package/docs/DraftApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *http://localhost*
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**createAgentDraft**](#createagentdraft) | **POST** /agent/draft | Create Agent Draft|
|
|
8
|
+
|[**deployAgentFromDraft**](#deployagentfromdraft) | **POST** /agent/deploy | Deploy Agent From Draft|
|
|
8
9
|
|[**getAgentDraftById**](#getagentdraftbyid) | **GET** /agents/{agent_id}/drafts/{draft_id} | Get Agent Draft By Id|
|
|
9
10
|
|[**getAgentDrafts**](#getagentdrafts) | **GET** /agents/{agent_id}/drafts | Get Agent Drafts|
|
|
10
11
|
|[**getAgentLatestDraft**](#getagentlatestdraft) | **GET** /agents/{agent_id}/draft/latest | Get Agent Latest Draft|
|
|
@@ -63,6 +64,59 @@ const { status, data } = await apiInstance.createAgentDraft(
|
|
|
63
64
|
|
|
64
65
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
65
66
|
|
|
67
|
+
# **deployAgentFromDraft**
|
|
68
|
+
> AgentResponse deployAgentFromDraft(agentDeployRequest)
|
|
69
|
+
|
|
70
|
+
Deploy an agent from a draft. Takes the latest draft for the specified agent, validates it matches the provided draft ID, ensures it hasn\'t been deployed yet, then deploys the agent using the draft configuration. The upstream_id is set to the provided tx_id. Possible HTTP errors: - 400: Draft is not the latest version or already deployed - 401: Unauthorized (invalid or missing authentication) - 404: Agent or draft not found - 403: Permission denied (not your agent) - 500: Internal server error
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
import {
|
|
76
|
+
DraftApi,
|
|
77
|
+
Configuration,
|
|
78
|
+
AgentDeployRequest
|
|
79
|
+
} from '@crestal/nation-sdk';
|
|
80
|
+
|
|
81
|
+
const configuration = new Configuration();
|
|
82
|
+
const apiInstance = new DraftApi(configuration);
|
|
83
|
+
|
|
84
|
+
let agentDeployRequest: AgentDeployRequest; //
|
|
85
|
+
|
|
86
|
+
const { status, data } = await apiInstance.deployAgentFromDraft(
|
|
87
|
+
agentDeployRequest
|
|
88
|
+
);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Parameters
|
|
92
|
+
|
|
93
|
+
|Name | Type | Description | Notes|
|
|
94
|
+
|------------- | ------------- | ------------- | -------------|
|
|
95
|
+
| **agentDeployRequest** | **AgentDeployRequest**| | |
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Return type
|
|
99
|
+
|
|
100
|
+
**AgentResponse**
|
|
101
|
+
|
|
102
|
+
### Authorization
|
|
103
|
+
|
|
104
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
105
|
+
|
|
106
|
+
### HTTP request headers
|
|
107
|
+
|
|
108
|
+
- **Content-Type**: application/json
|
|
109
|
+
- **Accept**: application/json
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
### HTTP response details
|
|
113
|
+
| Status code | Description | Response headers |
|
|
114
|
+
|-------------|-------------|------------------|
|
|
115
|
+
|**200** | Successful Response | - |
|
|
116
|
+
|**422** | Validation Error | - |
|
|
117
|
+
|
|
118
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
119
|
+
|
|
66
120
|
# **getAgentDraftById**
|
|
67
121
|
> AgentDraft getAgentDraftById()
|
|
68
122
|
|
|
@@ -27,8 +27,8 @@ Name | Type | Description | Notes
|
|
|
27
27
|
**supports_presence_penalty** | **boolean** | | [optional] [default to true]
|
|
28
28
|
**api_base** | **string** | | [optional] [default to undefined]
|
|
29
29
|
**timeout** | **number** | | [optional] [default to 180]
|
|
30
|
-
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-09-
|
|
31
|
-
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-
|
|
30
|
+
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-09-19T01:21:08.068+00:00]
|
|
31
|
+
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-09-19T01:21:08.068+00:00]
|
|
32
32
|
**provider_name** | **string** | | [default to undefined]
|
|
33
33
|
|
|
34
34
|
## Example
|
package/index.ts
CHANGED