Query the agent that references this tool

Lists the agents in the current workspace that are effectively bound to the specified tool. This interface returns the display summary of the agent, but does not return the complete definition of the agent.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/tools/{tool_id}/referencing-agents

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 query the tool list to obtain the tool ID. Prepare a personal access token and target workspace ID that can access the target workspace.

Request parameters

Shell
curl "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/tools/$TOOL_ID/referencing-agents?limit=20" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"

Path parameters

Parameter

Type

Required

Description

workspace_id

string

Yes

Query the current workspace ID of the reference relationship.

tool_id

string

Yes

The referenced tool ID.

Query parameters

Parameter

Type

Required

Description

tool_workspace_id

string

No

The workspace to which the resource in the reference belongs. Matches the current workspace when omitted or empty. The explicit value must be a legal workspace identifier. This parameter does not trigger a system catalog rollback.

limit

integer

No

Quantity per page. Default 50, maximum 200.

cursor

string

No

next_cursor from the previous page response. Cursors must be used with the same workspace and tool combination.

Successful response

JSON
{
  "code": 0,
  "data": {
    "items": [
      {
        "id": "agent_01",
        "workspace_id": "ws_01",
        "name": "数据助手",
        "status": "active",
        "description": "",
        "updated_at": "2026-01-02T15:04:05Z",
        "knowledge_base_count": 1
      }
    ],
    "limit": 20,
    "next_cursor": "cursor_01"
  }
}

Field

Type

Description

code

integer

0 on success.

data

object

The result of this request.

data.items

array

Result list.

data.items[].id

string

agent ID. Can be omitted if empty or not set.

data.items[].workspace_id

string

The identity of the workspace to which it belongs. Can be omitted if empty or not set.

data.items[].name

string

Name. Can be omitted if empty or not set.

data.items[].description

string

Description. Can be omitted if empty or not set.

data.items[].status

string

status. Can be omitted if empty or not set.

data.items[].updated_at

string

Last updated time. Use RFC 3339 format. Can be omitted if empty or not set.

data.items[].knowledge_base_count

integer

The number of bound knowledge bases. Can be omitted if empty or not set.

data.limit

integer

The actual return quantity limit this time.

data.next_cursor

string

Next page cursor. Can be omitted if empty or not set.

Error response

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

Common HTTP errors

HTTP status code

error code

Description

400

2(INVALID_ARGUMENT)

Common reasons: The tool ID, tool_workspace_id, or the cursor is invalid, or the cursor does not belong to the current tool scope. Recommended Action: Use the cursor returned as is, and check the path and query parameters.

401

6(UNAUTHENTICATED)

Common Cause: Valid identity credentials are missing. Recommended Action: Check the API Key.

403

5(PERMISSION_DENIED)

Common reasons: The current identity does not have permission to read the tool or candidate agent. Recommended Action: Check the workspace authorization.

503

15(UNAVAILABLE)

Common reasons: The tool or agent reference service is temporarily unavailable. Recommended Action: Try again later.

Last updated on