How it works
While a Flow runs, Xura records each tool call as a node and each transition as an edge. On completion, the server sends a singlegraph SSE event with the full { nodes, edges, prompt } payload. The client stashes it and enables the Save as Flow button on the completion card.
Click it once:
POST /api/agent-studio/flowswith{ name, description, nodes, edges, enabled: false }.- Server returns the created flow’s id.
- Button flips to Open in Flows — click through to the editor.
What gets saved
- name — the workflow’s display name (or first 60 chars of the prompt).
- description — the original prompt text. Used by the planner if you re-plan later.
- enabled: false — saved as Draft. Turn on when ready.
- nodes / edges — the exact graph. Approval nodes retain their proposed action, action nodes retain their
toolName+ args.
Fallback: graph event never arrived
If thegraph SSE event drops (network hiccup, run cancelled early), Save as Flow still works — it saves an outline flow: name + description with only a Trigger node. You can then click Plan from description in the editor to regenerate the graph, or add nodes manually.
Re-running a saved Flow
Open the Flow → click Run now. The same 4-stage panel appears. Approval gates behave identically. Actions execute with fresh interpolation over the new data.Data nodes in a saved Flow use the same
query_data step type. They re-query your live data — they don’t snapshot it.