Cancel the agent candidate plan¶
Cancel an unconfirmed agent candidate.
POST $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-builder/candidates/{agent_id}/candidate-versions/{candidate_version}/cancel
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 or regenerate 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/cancel" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H 'Content-Type: application/json' \
-d '{
"source_digest": "'"$SOURCE_DIGEST"'"
}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
agent ID. |
|
string |
Yes |
Release Candidate. |
Request body
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
A summary of the current candidate response. Cannot be empty. |
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": "create",
"status": "superseded",
"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, agent and candidate version to which the candidate belongs. |
|
string |
The workspace, agent and candidate version to which the candidate belongs. |
|
string |
The workspace, agent and candidate version to which the candidate belongs. |
|
string |
Load version. |
|
string |
A summary of the content that was disqualified. |
|
string |
processing mode. Value: |
|
string |
Superseded on success. Fixed to “superseded”. |
|
object |
Candidate 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 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 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¶
The candidate status may have changed before the response is returned. When HTTP 500 is encountered, the candidate status is first queried, and the cancellation operation cannot be judged to have been revoked based on this.
{
"code": 4,
"message": "<错误信息>"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
The request contains unknown fields or is invalid |
|
|
Valid identity credentials are missing. Recommendation: Check the API Key. |
|
|
The current identity does not have the permission to cancel candidacy. Suggestion: Check workspace and agent authorization. |
|
|
The release candidate does not exist. Recommendation: Check out the release candidates. |
|
|
Summary does not match or status cannot be canceled. Duplicate cancellation of digest matches returns the status quo. |
|
|
An internal error occurred while canceling the candidate. 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. |