update_workflow
Replace a workflow's name, context, directory, flags, worktree config and hooks.
WorkflowwritesidempotentMCP tool
Every field is written, so read the workflow first and send back the ones you are not changing, the hooks list included. Editing the context reaches only agents spawned afterwards, since existing agents took a snapshot at launch, while worktree.enabled reaches agents already running, since whether komrad removes an agent's directory is read when the agent is deleted. worktree.baseBranch is the branch worktrees are cut from and every agent's work is measured against, and a blank one is refused here, so send back the stored name when it is not what you are changing. worktree.dir names the parent new worktrees are made in, blank meaning the one every workflow shares. worktree.diffExclude drops paths from the diff the panel draws, as paths or globs relative to the checkout such as proto/gen or *.pb.go. docs/src/content/guides/workflows.md says why each is there.
Calling it#
curl -X POST http://127.0.0.1:8787/workflow.v1.WorkflowService/UpdateWorkflow \
-H 'Content-Type: application/json' \
-d '{
"id": "<id>",
"name": "<name>"
}'komrad rpc update-workflow \
--id <string> \
--name <string>{
"name": "update_workflow",
"arguments": {
"id": "<id>",
"name": "<name>"
}
}Offered by the komrad MCP server to orchestrator agents.
Request#
UpdateWorkflowRequest#
| Field | Type | Description |
|---|---|---|
id | string | Which workflow to rewrite. required |
name | string | Every field here is written, so send back the ones you are not changing. required, at most 200 characters |
context | string | Reaches only agents launched afterwards, since existing ones took a snapshot. at most 50000 characters |
cwd | string | Where agents launched afterwards start. at most 4096 characters |
flags | string | Flags prefilled for agents launched afterwards. at most 500 characters |
harness | string | Which CLI agents launched afterwards run. at most 40 characters, matching ^[a-z0-9-]*$ |
worktree | WorktreeConfig | Turning worktrees off reaches agents already running, since whether komrad removes a directory is read when the agent is deleted. |
hooks | list of WorkflowHook | The whole hook list, so send back the ones you are keeping. |
Response#
Empty#
No fields.
Types#
WorktreeConfig#
| Field | Type | Description |
|---|---|---|
enabled | bool | Whether komrad cuts a worktree for each agent, or leaves it in the directory it was given. |
baseBranch | string | The branch worktrees are cut from and every agent's work is measured against, filled in from the clone when left blank on create and never blank once stored. at most 255 characters |
copyPaths | list of string | Files copied into each new worktree, for the untracked ones a build needs. |
symlinkPaths | list of string | Files linked into each new worktree rather than copied, for the large shared ones. |
diffExclude | list of string | Paths or globs the panel leaves out of the diff it draws, such as generated output. |
dir | string | Where new worktrees are made, blank for the parent every workflow shares. at most 4096 characters |