Regenerate agent candidate solutions¶
Modify valid candidates and replace old versions. Please check the verification status of the new candidate. The information currently returned may not be sufficient to reconstruct the complete input.
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-builder/candidates/{agent_id}/candidate-versions/{candidate_version}/repropose
Before you call¶
Configure the CloudSigma regional endpoint and authentication before calling. The endpoint, credentials, workspace, and resource IDs must belong to the same region.
First generate the agent candidate plan to obtain the candidate version and source_digest. Prepare the personal access token, target workspace ID, agent ID, and candidate version that can access the target workspace.
Request body¶
Replace $WORKSPACE_ID, $AGENT_ID, $CANDIDATE_VERSION, $CLOUDSIGMA_API_KEY, $SOURCE_DIGEST in the example with actual values.
curl -X POST "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-builder/candidates/$AGENT_ID/candidate-versions/$CANDIDATE_VERSION/repropose" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"source_digest": "'"$SOURCE_DIGEST"'",
"overrides": {
"agent_md": "<UPDATED_AGENT_MD>"
}
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
agent ID. |
|
string |
Yes |
Current release candidate. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Digest of the current candidate response, used for concurrent verification. Cannot be empty. |
|
object |
No |
Candidate fields to overwrite. |
|
string |
No |
agentMarkdown text. |
|
array of string |
No |
Tool name. |
|
array of string |
No |
Skill name. |
|
array of string |
No |
knowledge base name. |
|
array of object |
No |
Catalog file reference. |
|
string |
When the object is provided |
The workspace ID to which it belongs. Cannot be empty. |
|
integer |
When the object is provided |
Volume ID. Not less than 1. |
|
string |
When the object is provided |
File ID. Cannot be empty. |
|
array of object |
No |
Candidate channel binding, can be omitted. |
|
string |
No |
Tool name. |
|
string |
No |
Tool source workspace ID. |
|
string |
No |
Skill name. |
|
string |
No |
Skill source workspace ID. |
|
string |
No |
Provider. |
|
string |
When the object is provided |
The workspace ID to which it belongs. |
|
string |
When the object is provided |
Channel instance ID. |
|
object |
No |
Change collection. |
overrides and changes Choose one to fill in. When overrides is empty, the request body is null or does not contain actual modifications, the request will be rejected.
Successful response¶
{
"code": 0,
"data": {
"render_type": "agent_candidate",
"workspace_id": "ws_01",
"agent_id": "agent_01",
"candidate_version": "0.2.0",
"load_version": "0.2.0",
"source_digest": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
"mode": "revise",
"status": "valid",
"display": {
"agent_name": "产品助手",
"agent_id": "",
"candidate_version": "0.2.0",
"load_version": "0.2.0",
"model": "",
"tools": null,
"skills": null,
"knowledge_bases": null,
"catalog_files": [],
"channel_bindings": [],
"agent_md": "",
"change_reason": ""
},
"resolved_refs": {},
"package_summary": {
"manifest_path": "",
"prompt_path": "",
"file_paths": []
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Display type. Fixed to “agent_candidate”. |
|
string |
The workspace ID to which it belongs. |
|
string |
agent ID. |
|
string |
New release candidates and their summary. Used when confirming or canceling. |
|
string |
The loaded version to use after this candidate is confirmed. |
|
string |
New release candidates and their summary. Used when confirming or canceling. |
|
string |
processing mode. Value: |
|
string |
Candidate status, display content, diagnostics, and resolved resource references. Value: |
|
object |
Candidate status, display content, diagnostics, and resolved resource references. |
|
string |
agent name. |
|
string |
agent ID. |
|
string |
Release Candidate. |
|
string |
Load version. |
|
string |
model. |
|
array of string or null |
Tool collection. |
|
array of string or null |
Skill set. |
|
array of string or null |
knowledge base reference. |
|
array of object |
Catalog file reference. |
|
string |
The workspace ID to which it belongs. |
|
integer |
Volume ID. |
|
string |
File ID. |
|
array of object |
Channel binding. |
|
string |
Tool name. |
|
string |
Tool source workspace ID. |
|
string |
Skill name. |
|
string |
Skill source workspace ID. |
|
string |
Provider. |
|
string |
The workspace ID to which it belongs. |
|
string |
Channel instance ID. |
|
string |
agentMarkdown text. |
|
string |
Reason for change. |
|
array of object |
Candidate status, display content, diagnostics, and resolved resource references. At least 1 items. |
|
string |
Diagnostic level. |
|
string |
Error or diagnostic code. |
|
string |
Message content. |
|
string |
Field path. |
|
string |
Resource references. |
|
object |
Candidate status, display content, diagnostics, and resolved resource references. |
|
object |
model. |
|
string |
Name. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
The name when requested. |
|
array of object |
Tool collection. |
|
string |
Name. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
The name when requested. |
|
array of object |
Skill set. |
|
string |
Name. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
The name when requested. |
|
array of object |
Skill tool mapping. |
|
string |
Skill name. |
|
string |
Skill ID. |
|
string |
Skill source workspace ID. |
|
string |
Tool name. |
|
string |
Tool ID. |
|
string |
Tool source workspace ID. |
|
array of object |
knowledge base reference. |
|
string |
Name. |
|
string |
logo. |
|
string |
The workspace ID to which it belongs. |
|
string |
The name when requested. |
|
array of object |
Catalog file reference. |
|
string |
The workspace ID to which it belongs. |
|
integer |
Volume ID. |
|
string |
File ID. |
|
array of object |
Channel binding. |
|
string |
Tool name. |
|
string |
Tool source workspace ID. |
|
string |
Skill name. |
|
string |
Skill source workspace ID. |
|
string |
Provider. |
|
string |
The workspace ID to which it belongs. |
|
string |
Channel instance ID. |
|
object |
Summary of candidate packages. |
|
string |
Manifest file path. |
|
string |
Prompt word file path. |
|
array of string |
List of file paths. |
Error response¶
{
"code": 4,
"message": "<错误信息>"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
The coverage field is unknown, the type is invalid, or the requested field is incomplete. Suggestion: Only submit fields supported by |
|
|
Valid identity credentials are missing. Recommendation: Check the API Key. |
|
|
The current identity does not have permission to revise the candidate. Suggestion: Check workspace and agent authorization. |
|
|
The release candidate does not exist. Recommendation: Check out the release candidates. |
|
|
|
|
|
Candidate build failed. Suggestion: Check the current status first. Do not automatically resubmit. |
|
|
Agent building or authorization services are temporarily unavailable. Suggestion: Check the current status first. Do not automatically resubmit. |