Skip to main content
Glama

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
NameRequiredDescriptionDefault
actionYesAction to perform: save_graph, node_update, node_add, node_delete, edge_add, edge_delete
workflow_idYesThe workflow UUID
nodesYesArray 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.
edgesNoArray of edge objects. Each must have: source_node_index (int), target_node_index (int), and optionally condition, label, is_default.
node_idYesThe workflow node UUID
labelNoNew label for this node
agent_idNoUUID of the agent to assign to this node. Pass empty string to detach.
skill_idNoUUID of the skill to assign to this node. Pass empty string to detach.
crew_idNoUUID of the crew to assign to this node. Pass empty string to detach.
configNoNode configuration object (e.g. timeout, retries, prompt_override)
expressionNoCondition expression for conditional/switch nodes (e.g. "output.score > 0.8")
position_xNoHorizontal position on the canvas
position_yNoVertical position on the canvas
typeYesNode 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_idYesUUID of the source node (where the edge originates)
target_node_idYesUUID of the target node (where the edge points to)
conditionNoCondition object for conditional edges (e.g. {"field": "score", "op": "gt", "value": 0.8})
case_valueNoCase value for switch node routing — this edge is taken when the expression equals this value
is_defaultNoMark this as the default edge when no other condition matches. Default: false
source_channelNoOutput port of the source node, e.g. "on_success", "on_error", "on_timeout"
target_channelNoInput slot of the target node (for multi-input nodes)
edge_idYesThe workflow edge UUID to delete

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/escapeboy/agent-fleet-o'

If you have feedback or need assistance with the MCP directory API, please join our Discord server