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.
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¶
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 |
|---|---|---|---|
|
string |
Yes |
The workspace ID of this call must be consistent with the workspace request header. |
|
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 |
|---|---|---|---|
|
string |
No |
The workspace to which the agent belongs. Only the current workspace or |
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¶
{
"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 |
|---|---|---|
|
string |
agent display name. |
|
string |
agent description. |
|
string |
The A2A address declared by the Card is generated based on the public base address configured by the service. |
|
string |
agent version. |
|
string |
A2A protocol version. |
|
object |
Statement of Competencies. |
|
boolean |
Whether to support streaming calls. |
|
boolean |
Whether to support push notifications. Returned if there is a value. |
|
boolean |
Whether to support status change history. |
|
array of string |
Default input media type. |
|
array of string |
Default output media type. |
|
array of object |
The skills declared by the agent. Returned if there is a value. |
|
object |
Data segmentation protocol metadata. moi.version and moi.dataParts. |
|
object |
CloudSigma Data Segmentation Protocol Statement. |
|
integer |
Protocol version. Currently it is 1. |
|
array of object |
Supported data segmentation types and directions. Seven types of paragraph statements. |
|
string |
Segmentation type. See the response example for the value, and use the corresponding type when sending segments. |
|
integer |
A data segmented version of this type. Currently it is 1. |
|
string |
|
|
array of string |
A JSON-RPC method capable of carrying this segment. |
|
object |
Constraints returned by segment type. Omitted when there are no additional constraints. |
|
array of string |
Feedback submissions support the intent. Currently record_only. |
|
array of string |
Target fields required for feedback submission. Currently messageId. |
|
array of string |
Modes supported by rerun control. Currently same_manifest. |
|
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.
{
"jsonrpc": "2.0",
"id": null,
"error": {
"code": -32008,
"message": "agent not found"
}
}
HTTP status code |
JSON-RPC error codes |
Common causes. |
|---|---|---|
|
|
The request or workspace parameter is invalid. |
|
|
The current identity does not have access rights. |
|
|
agent not found. |
|
|
Card address or content construction failed. |