Query the current agent configuration

Read the configuration view of the specified agent version in the current system.

HTTP
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.

Shell
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

workspace_id

string

Yes

workspace ID.

agent_id

string

Yes

agent ID.

version

string

Yes

Version ID.

Query parameters

Parameter

Type

Required

Description

agent_workspace_id

string

No

Current workspace or system. When omitted, the agent source is not limited.

Successful response

JSON
{
  "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

data.base_revision

string

Baseline revision identifier.

data.agent_id

string

agent identification, name and description.

data.name

string

agent identification, name and description.

data.description

string

agent identification, name and description.

data.model_name

string

Model name and model configuration reference.

data.model_config_ref

string

Model name and model configuration reference.

data.tool_names

array of string

Tool, skill, and knowledge base names in the candidate configuration.

data.skill_names

array of string

Tool, skill, and knowledge base names in the candidate configuration.

data.knowledge_base_names

array of string

Tool, skill, and knowledge base names in the candidate configuration.

data.catalog_files

array of object

Catalog file reference.

data.catalog_files[].workspace_id

string

The workspace ID to which it belongs.

data.catalog_files[].volume_id

integer

Volume ID.

data.catalog_files[].file_id

string

File ID.

data.channel_bindings

array of object

Channel bonding configuration.

data.channel_bindings[].tool_name

string

Tool name.

data.channel_bindings[].tool_workspace_id

string

Tool source workspace ID.

data.channel_bindings[].skill_name

string

Skill name.

data.channel_bindings[].skill_workspace_id

string

Skill source workspace ID.

data.channel_bindings[].provider

string

Provider.

data.channel_bindings[].workspace_id

string

The workspace ID to which it belongs.

data.channel_bindings[].instance_id

string

Channel instance ID.

data.agent_md

string

Editable agent description content and reasons for changes.

data.resource_refs

object

Full source citation.

data.resource_refs.model

object

model.

data.resource_refs.model.name

string

Name.

data.resource_refs.model.id

string

logo.

data.resource_refs.model.workspace_id

string

The workspace ID to which it belongs.

data.resource_refs.model.requested_name

string

The name when requested.

data.resource_refs.tools

array of object

Tool collection.

data.resource_refs.tools[].name

string

Name.

data.resource_refs.tools[].id

string

logo.

data.resource_refs.tools[].workspace_id

string

The workspace ID to which it belongs.

data.resource_refs.tools[].requested_name

string

The name when requested.

data.resource_refs.skills

array of object

Skill set.

data.resource_refs.skills[].name

string

Name.

data.resource_refs.skills[].id

string

logo.

data.resource_refs.skills[].workspace_id

string

The workspace ID to which it belongs.

data.resource_refs.skills[].requested_name

string

The name when requested.

data.resource_refs.skill_tools

array of object

Skill tool mapping.

data.resource_refs.skill_tools[].skill_name

string

Skill name.

data.resource_refs.skill_tools[].skill_id

string

Skill ID.

data.resource_refs.skill_tools[].skill_workspace_id

string

Skill source workspace ID.

data.resource_refs.skill_tools[].tool_name

string

Tool name.

data.resource_refs.skill_tools[].tool_id

string

Tool ID.

data.resource_refs.skill_tools[].tool_workspace_id

string

Tool source workspace ID.

data.resource_refs.knowledge_bases

array of object

knowledge base reference.

data.resource_refs.knowledge_bases[].name

string

Name.

data.resource_refs.knowledge_bases[].id

string

logo.

data.resource_refs.knowledge_bases[].workspace_id

string

The workspace ID to which it belongs.

data.resource_refs.knowledge_bases[].requested_name

string

The name when requested.

data.resource_refs.catalog_files

array of object

Catalog file reference.

data.resource_refs.catalog_files[].workspace_id

string

The workspace ID to which it belongs.

data.resource_refs.catalog_files[].volume_id

integer

Volume ID.

data.resource_refs.catalog_files[].file_id

string

File ID.

data.resource_refs.channel_bindings

array of object

Channel binding.

data.resource_refs.channel_bindings[].tool_name

string

Tool name.

data.resource_refs.channel_bindings[].tool_workspace_id

string

Tool source workspace ID.

data.resource_refs.channel_bindings[].skill_name

string

Skill name.

data.resource_refs.channel_bindings[].skill_workspace_id

string

Skill source workspace ID.

data.resource_refs.channel_bindings[].provider

string

Provider.

data.resource_refs.channel_bindings[].workspace_id

string

The workspace ID to which it belongs.

data.resource_refs.channel_bindings[].instance_id

string

Channel instance ID.

Error response

When the resource is too large, HTTP 413 is returned.

JSON
{
  "code": 3,
  "message": "<错误信息>"
}

Common HTTP errors

HTTP status code

error code

Description

400

2(INVALID_ARGUMENT)

The path or agent_workspace_id is invalid or the editable configuration cannot be generated based on the loaded version. Recommendation: Check version, workspace scope and package contents.

401

6(UNAUTHENTICATED)

Valid identity credentials are missing. Recommendation: Check the API Key.

403

5(PERMISSION_DENIED)

The current caller does not have permission to modify the agent. Suggestion: Check workspace and agent authorization.

404

3(NOT_FOUND)

The agent version does not exist. Recommendation: Use load_version in the confirmation candidate response.

500

1(INTERNAL)

Unable to generate editable configuration for current version. Recommendation: Check the package contents. Contact support if it continues to fail.

503

15(UNAVAILABLE)

The agent package configuration reading or authorization service is temporarily unavailable. Suggestion: Try again later.

Last updated on