Confirm saving a skill candidate¶
Import a server-saved skill candidate into the current workspace and, when explicitly selected, attempt to add it to its originating agent. Saving and binding occur in separate transaction phases.
POST https://api.moi.matrixorigin.cn/v5/workspaces/{workspace_id}/agent-runtime-tasks/{task_id}/skills/confirm
Before you call this API¶
Prepare a structured skill candidate from a trusted source and review its instructions and files. Use its original task_id/call_id/source_digest. Target workspace, current principal, and original run must match. Natural-language chat, manually assembled display content, or another task’s candidate are not substitutes. See candidate identity for provenance and permissions.
Request parameters¶
curl -X POST "https://api.moi.matrixorigin.cn/v5/workspaces/$WORKSPACE_ID/agent-runtime-tasks/$TASK_ID/skills/confirm" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID" \
-H "Content-Type: application/json" \
--data '{"call_id":"<candidate-call-id>","source_digest":"<candidate-source-digest>","bind_current":false}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Target workspace, matching X-Workspace-ID. |
|
string |
Yes |
Original run task ID that produced the candidate, not an automation task definition or skill ID. |
|
string |
Yes |
Target workspace in the current environment. |
|
string |
Yes |
Personal access token used in this example; current workspace access and candidate ownership checks also apply. |
|
string |
Yes |
Original Skill Creator tool-call identifier, supplied in the JSON request body. |
|
string |
Yes |
Complete digest returned by the server candidate, used unchanged in the JSON request body. |
|
boolean |
Yes |
false saves only; true saves and then attempts binding to the candidate’s agent. Send an explicit boolean; omission, null, and strings are invalid. |
Submit only call_id/source_digest/bind_current in the body, without display, a target agent_id, or file contents. Replace both candidate placeholders before calling.
Results¶
{
"code": 0,
"data": {
"skill_id": "skill-example",
"workspace_id": "ws-example",
"agent_id": "agent-example",
"bound": false
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
0 on success. |
|
string |
Skill identifier for this candidate. GET returns the reserved ID even before saving. |
|
string |
Workspace where the skill is saved. |
|
string |
Target agent that owns the original candidate, not the operator. |
|
boolean |
Whether the requested binding step completed in this call. bind_current=false returns false without unbinding anything. Reread with GET for current state. |
Interpret the result¶
bind_current=false does not unbind an existing skill. Reread GET for current binding state. With bind_current=true, binding can fail after the skill has been saved; an error does not mean saving was rolled back. For package-managed agents, binding may load a new package version rather than merely write one binding reference.
See saving, binding, and recovery, actual errors and environments, and AI Studio.