Query available resources for agent construction

Read the resource collection in the current workspace that can be used to build the agent.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agent-builder/resources

Before you call this API

Configure the regional API endpoint and authentication, and select the target workspace.

Set the operation-specific values used in the request:

  • $WORKSPACE_ID: Target workspace ID, passed through the X-Workspace-ID header and also as workspace_id in the path.

Request

Shell
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agent-builder/resources" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameters

Type

Is it required

Description

workspace_id

string

Yes

Workspace ID.

Successful response

Returns 200 on success. Use this response as resources in the candidate request and do not construct the resource reference yourself.

JSON
{
  "code": 0,
  "data": {
    "models": [
      {
        "name": "<MODEL_NAME>",
        "model_config_ref": "mc_01"
      }
    ],
    "tools": [
      {
        "name": "<TOOL_NAME>"
      }
    ],
    "skills": [
      {
        "name": "<SKILL_NAME>"
      }
    ],
    "knowledge_bases": [
      {
        "name": "<KNOWLEDGE_BASE_NAME>"
      }
    ]
  }
}

The response fields are as follows.

Field

Type

Description

code

integer

0 on success.

data.models

array

The models, tools, skills and knowledge base that can be used to build in the current workspace.

data.tools

array

The models, tools, skills and knowledge base that can be used to build in the current workspace.

data.skills

array

The models, tools, skills and knowledge base that can be used to build in the current workspace.

data.knowledge_bases

array

The models, tools, skills and knowledge base that can be used to build in the current workspace.

name for each array item

string

The name used by the candidate configuration to reference the resource.

data.models[].model_config_ref

string

The model configuration, model name, and display name that the model item can return.

data.models[].model_name

string

The model configuration, model name, and display name that the model item can return.

data.models[].display_name

string

The model configuration, model name, and display name that the model item can return.

[] after a type denotes an array. [] in a field path denotes each item in an array.

Error response

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

Common HTTP errors

HTTP status code

error code

Common causes

Recommended actions

401

6(UNAUTHENTICATED)

Lack of valid identity credentials.

Check API Key.

403

5(PERMISSION_DENIED)

The current identity does not have permission to build an agent.

Check workspace authorization.

413

14(RESOURCE_EXHAUSTED)

The list of available resources exceeds the size allowed by the interface.

Narrow down the resource scope and try again.

500

1(INTERNAL)

Failed to read resource list.

Try again later; contact support if it continues to fail.

503

15(UNAVAILABLE)

The authoring resource service or licensing dependency is unavailable.

Try again later.

Follow-up operations

Use the resource list Generate agent candidate solutions.

Last updated on