Query the current agent configuration¶
Read the configuration view of the specified agent version in the current system.
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-builder/agents/{agent_id}/versions/{version}/current-agent
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.
Confirm the agent candidate first, use load_version in the response as version, and do not infer based on the candidate version. Prepare the personal access token, target workspace ID, agent ID, and version ID that can access the target workspace.
Confirm that the referenced resource is still available. The permissions required to read system resources and current workspace resources are different.
Request parameters¶
Replace $WORKSPACE_ID, $AGENT_ID, $VERSION, $CLOUDSIGMA_API_KEY in the example with actual values.
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-builder/agents/$AGENT_ID/versions/$VERSION/current-agent" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
The service generates editable configurations based on the latest resource inventory. It is also possible that the referenced resource is no longer available while the version exists.
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
workspace ID. |
|
string |
Yes |
agent ID. |
|
string |
Yes |
Version ID. |
Query parameters
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
No |
Current workspace or system. When omitted, the agent source is not limited. |
Successful response¶
{
"code": 0,
"data": {
"base_revision": "",
"agent_id": "agent_01",
"name": "产品助手",
"description": "回答产品问题。",
"model_name": "<MODEL_NAME>",
"model_config_ref": "mc_01",
"tool_names": [],
"skill_names": [],
"knowledge_base_names": [],
"catalog_files": [],
"channel_bindings": [],
"agent_md": "<AGENT_MARKDOWN>",
"resource_refs": {}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
Baseline revision identifier. |
|
string |
agent identification, name and description. |
|
string |
agent identification, name and description. |
|
string |
agent identification, name and description. |
|
string |
Model name and model configuration reference. |
|
string |
Model name and model configuration reference. |
|
array of string |
Tool, skill, and knowledge base names in the candidate configuration. |
|
array of string |
Tool, skill, and knowledge base names in the candidate configuration. |
|
array of string |
Tool, skill, and knowledge base names in the candidate configuration. |
|
array of object |
Catalog file reference. |
|
string |
The workspace ID to which it belongs. |
|
integer |
Volume ID. |
|
string |
File ID. |
|
array of object |
Channel bonding configuration. |
|
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 |
Editable agent description content and reasons for changes. |
|
object |
Full source citation. |
|
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. |
Error response¶
When the resource is too large, HTTP 413 is returned.
{
"code": 3,
"message": "<错误信息>"
}
Common HTTP errors
HTTP status code |
error code |
Description |
|---|---|---|
|
|
The path or |
|
|
Valid identity credentials are missing. Recommendation: Check the API Key. |
|
|
The current caller does not have permission to modify the agent. Suggestion: Check workspace and agent authorization. |
|
|
The agent version does not exist. Recommendation: Use |
|
|
Unable to generate editable configuration for current version. Recommendation: Check the package contents. Contact support if it continues to fail. |
|
|
The agent package configuration reading or authorization service is temporarily unavailable. Suggestion: Try again later. |