Get agent invocation information

Read the Agent Card and confirm the A2A protocol version, input and output type and capability supported by the target agent.

HTTP
GET $CLOUDSIGMA_API_BASE/workspaces/{workspace_id}/agents/{agent_id}/.well-known/agent-card.json

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 agent list, select the active agent and record the workspace to which it belongs.

Prepare personal access token and target workspace ID that can access the target workspace.

Request parameters

Shell
curl --get "$CLOUDSIGMA_API_BASE/workspaces/$WORKSPACE_ID/agents/$AGENT_ID/.well-known/agent-card.json" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H "Accept: application/json" \
  --data-urlencode "agent_workspace_id=$AGENT_WORKSPACE_ID"

$AGENT_ID and $AGENT_WORKSPACE_ID respectively come from the same item id and workspace_id in the agent list. $WORKSPACE_ID is the workspace where this call is located, and $CLOUDSIGMA_API_KEY is the calling credential.

Parameter

Type

Required

Description

workspace_id

string

Yes

The workspace ID of this call must be consistent with the workspace request header.

agent_id

string

Yes

The target agent ID returned by the agent list.

Query parameters

When no definition is found in the current workspace, it will fall back to the system directory. The same is true for explicitly specifying the current workspace. System-defined Card skills may also superimpose the binding configuration of the current workspace. Reading the Card does not mean that the agent is allowed to execute.

Parameter

Type

Required

Description

agent_workspace_id

string

No

The workspace to which the agent belongs. Only the current workspace or system can be specified. If omitted, the current workspace is used.

When selecting the system assistant, fill in system into the query parameters, and the path still uses the actual target workspace.

The universal entry GET /v5/agents/card?agent_id=...&agent_workspace_id=... can also be used to read the Card. The example in this article uses the workspace level entry. When the general portal returns an error, you can check the capabilities of the same agent according to the path on this page.

Successful response

JSON
{
  "name": "Matrixflow 工作流助手",
  "description": "根据自然语言和已注册工作项创建 Matrixflow 工作流。",
  "version": "1",
  "protocolVersion": "0.3.0",
  "capabilities": {
    "streaming": true,
    "stateTransitionHistory": true
  },
  "defaultInputModes": [
    "text/plain",
    "application/octet-stream"
  ],
  "defaultOutputModes": [
    "text/plain"
  ],
  "url": "$CLOUDSIGMA_API_BASE/workspaces/ws_01/agents/agent_01/a2a",
  "metadata": {
    "moi": {
      "version": 1,
      "dataParts": [
        {
          "type": "moi.feedback.submit",
          "version": 1,
          "direction": "client_to_runtime",
          "methods": [
            "message/send"
          ],
          "metadata": {
            "intent": [
              "record_only"
            ],
            "targetRequired": [
              "messageId"
            ]
          }
        },
        {
          "type": "moi.feedback.received",
          "version": 1,
          "direction": "runtime_to_client",
          "methods": [
            "message/send"
          ]
        },
        {
          "type": "moi.tool.call",
          "version": 1,
          "direction": "runtime_to_client",
          "methods": [
            "message/send",
            "message/stream",
            "tasks/resubscribe",
            "tasks/get"
          ]
        },
        {
          "type": "moi.tool.result",
          "version": 1,
          "direction": "runtime_to_client",
          "methods": [
            "message/send",
            "message/stream",
            "tasks/resubscribe",
            "tasks/get"
          ]
        },
        {
          "type": "moi.progress",
          "version": 1,
          "direction": "runtime_to_client",
          "methods": [
            "message/send",
            "message/stream",
            "tasks/resubscribe",
            "tasks/get"
          ]
        },
        {
          "type": "moi.run.control",
          "version": 1,
          "direction": "client_to_runtime",
          "methods": [
            "message/send"
          ],
          "metadata": {
            "rerunMode": [
              "same_manifest"
            ],
            "conversationMode": [
              "replace_view"
            ]
          }
        },
        {
          "type": "moi.run.control.result",
          "version": 1,
          "direction": "runtime_to_client",
          "methods": [
            "message/send"
          ]
        }
      ]
    }
  }
}

Field

Type

Description

name

string

agent display name.

description

string

agent description.

url

string

The A2A address declared by the Card is generated based on the public base address configured by the service.

version

string

agent version.

protocolVersion

string

A2A protocol version.

capabilities

object

Statement of Competencies.

capabilities.streaming

boolean

Whether to support streaming calls.

capabilities.pushNotifications

boolean

Whether to support push notifications. Returned if there is a value.

capabilities.stateTransitionHistory

boolean

Whether to support status change history.

defaultInputModes

array of string

Default input media type.

defaultOutputModes

array of string

Default output media type.

skills

array of object

The skills declared by the agent. Returned if there is a value.

metadata

object

Data segmentation protocol metadata. moi.version and moi.dataParts.

metadata.moi

object

CloudSigma Data Segmentation Protocol Statement.

metadata.moi.version

integer

Protocol version. Currently it is 1.

metadata.moi.dataParts

array of object

Supported data segmentation types and directions. Seven types of paragraph statements.

metadata.moi.dataParts[].type

string

Segmentation type. See the response example for the value, and use the corresponding type when sending segments.

metadata.moi.dataParts[].version

integer

A data segmented version of this type. Currently it is 1.

metadata.moi.dataParts[].direction

string

client_to_runtime means sent by the client, and runtime_to_client means returned at runtime.

metadata.moi.dataParts[].methods

array of string

A JSON-RPC method capable of carrying this segment.

metadata.moi.dataParts[].metadata

object

Constraints returned by segment type. Omitted when there are no additional constraints.

metadata.moi.dataParts[].metadata.intent

array of string

Feedback submissions support the intent. Currently record_only.

metadata.moi.dataParts[].metadata.targetRequired

array of string

Target fields required for feedback submission. Currently messageId.

metadata.moi.dataParts[].metadata.rerunMode

array of string

Modes supported by rerun control. Currently same_manifest.

metadata.moi.dataParts[].metadata.conversationMode

array of string

Session view controls supported modes. Currently replace_view.

Only the capabilities declared by Card are called, and are compatible with unknown extension fields. Confirm that url belongs to the intended service before sending credentials. For the workspace level calling method, please refer to Call agent through A2A.

According to capabilities, use the workspace-level public path call agent via A2A. Only use streaming calls or other extension capabilities if Card declares support.

Error response

Use the JSON-RPC error envelope for parameters, permissions, missing and construction errors of the workspace Card entry, which may return 400, 403, 404, and 500 respectively. There are still separate code / msg errors in the authentication layer.

JSON
{
  "jsonrpc": "2.0",
  "id": null,
  "error": {
    "code": -32008,
    "message": "agent not found"
  }
}

HTTP status code

JSON-RPC error codes

Common causes.

400

-32600

The request or workspace parameter is invalid.

403

-32005

The current identity does not have access rights.

404

-32008

agent not found.

500

-32603

Card address or content construction failed.

Last updated on