cancel-agent
Cancel running AI agents or clear the entire workspace with task IDs. Supports single, batch (up to 50), or 'all' to kill active agents and remove state.
Instructions
Cancel running agents or clear the entire workspace.
Cancel: { "task_id": "abc123" } or { "task_id": ["abc", "def"] } (max 50).
Clear all: { "task_id": "all", "clear": true } — kills active agents, removes all state.
Running agents are killed (SIGTERM → SIGKILL). Terminal agents are removed from memory.
Find task_id: Read task:///all.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"task_id": "<task_id>"
},
"name": "cancel-agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clear | No | Required when task_id="all". Set true to confirm clearing all tasks. | |
| task_id | Yes | Task ID, array of task IDs (max 50), or "all" to clear workspace. |