enqueue_task
Queue a coding or execution task in a local SQLite queue for asynchronous execution by a background agy CLI worker; returns a task ID and log path for tracking.
Instructions
将一条编码或执行任务入队,由后台 Worker 异步调用本地 agy CLI 执行。 Enqueue a task into the local agy-bus SQLite queue for asynchronous execution by the background Worker.
Args: prompt: 给 agy 的完整任务指令(建议包含目标、约束与验收标准)。 cwd: 目标工作目录(如 Git 仓库绝对路径);同目录任务会自动串行互斥,不同目录并发执行。 mode: agy 执行权限模式,可选 "accept-edits"(默认)、"auto"、"plan"。 use_sandbox: 是否开启 agy --sandbox 终端限制(默认 True)。 conversation_id: 可选,传入既有会话 ID 以通过 --conversation 续接上下文;留空表示新会话。 model: 可选,指定 agy 使用的模型名称(对应 --model);留空使用默认模型。 effort: 可选,指定推理强度:low / medium / high / xhigh / max(对应 --effort)。 agent: 可选,指定 agy Agent 名称(对应 --agent)。 add_dirs: 可选,附加到工作区的额外目录路径列表(对应可重复的 --add-dir)。
Returns: 包含 task_id、status 与 log_path 的入队回执(毫秒级返回)。
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": {
"prompt": "<prompt>",
"cwd": "<cwd>"
},
"name": "enqueue_task"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | Yes | ||
| mode | No | accept-edits | |
| agent | No | ||
| model | No | ||
| effort | No | ||
| prompt | Yes | ||
| add_dirs | No | ||
| use_sandbox | No | ||
| conversation_id | No |