workflow_graph
Edit workflow DAG graph structure by adding, updating, or deleting nodes and edges to manage agent execution flows.
Instructions
Edit workflow DAG graph structure. Actions: save_graph (workflow_id, nodes, edges — full graph replace), node_update (workflow_id, node_id, config), node_add (workflow_id, type, config), node_delete (workflow_id, node_id), edge_add (workflow_id, source_id, target_id), edge_delete (workflow_id, edge_id).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform: save_graph, node_update, node_add, node_delete, edge_add, edge_delete | |
| workflow_id | Yes | The workflow UUID | |
| nodes | Yes | Array of node objects. Each must have: type (start|end|agent|conditional|human_task|switch|dynamic_fork|do_while), label (string), and optionally agent_id, skill_id, config. | |
| edges | No | Array of edge objects. Each must have: source_node_index (int), target_node_index (int), and optionally condition, label, is_default. | |
| node_id | Yes | The workflow node UUID | |
| label | No | New label for this node | |
| agent_id | No | UUID of the agent to assign to this node. Pass empty string to detach. | |
| skill_id | No | UUID of the skill to assign to this node. Pass empty string to detach. | |
| crew_id | No | UUID of the crew to assign to this node. Pass empty string to detach. | |
| config | No | Node configuration object (e.g. timeout, retries, prompt_override) | |
| expression | No | Condition expression for conditional/switch nodes (e.g. "output.score > 0.8") | |
| position_x | No | Horizontal position on the canvas | |
| position_y | No | Vertical position on the canvas | |
| type | Yes | Node type: agent (executes an agent), conditional (branches on expression), human_task (waits for human), switch (multi-way branch), dynamic_fork (parallel split), do_while (loop) | |
| source_node_id | Yes | UUID of the source node (where the edge originates) | |
| target_node_id | Yes | UUID of the target node (where the edge points to) | |
| condition | No | Condition object for conditional edges (e.g. {"field": "score", "op": "gt", "value": 0.8}) | |
| case_value | No | Case value for switch node routing — this edge is taken when the expression equals this value | |
| is_default | No | Mark this as the default edge when no other condition matches. Default: false | |
| source_channel | No | Output port of the source node, e.g. "on_success", "on_error", "on_timeout" | |
| target_channel | No | Input slot of the target node (for multi-input nodes) | |
| edge_id | Yes | The workflow edge UUID to delete |