Save a workflow from the Workflow Agent
save_workflow_from_agentSaves a Workflow Agent proposal as a new private workflow or, after confirmation, applies it to an existing workflow while keeping saved inputs and secrets.
Instructions
Save the workflow the Workflow Agent proposed in one of its replies. Without workflow it is saved as a new private workflow. With workflow (the workflow that was attached when the agent was asked to edit it) the proposal replaces that workflow's steps, title and description; its saved input values and hidden secret inputs are kept. Applying needs the attached workflow's loaded_updatetime, and without confirm: true it only returns what would change: show that to the user and repeat the call with confirm: true after they agree. The reply is read again from Wiro, so pass its ids, not the JSON. Wiro checks and prepares the graph against the live model catalog first; if it finds problems, send them back to the Workflow Agent in the same session. Save each proposal once; saving it again can create another copy. Saving is free; running the workflow is charged.
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": {
"message_id": "<message_id>",
"session": "<session>"
},
"name": "save_workflow_from_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Tags for the workflow. | |
| force | No | When applying: overwrite a newer version. Only when the user explicitly wants that. | |
| confirm | No | Required to apply a proposal to an existing workflow, after the user approved the change summary. | |
| session | Yes | The session that reply belongs to. | |
| workflow | No | Full slug or URL of the workflow to apply the proposal to. Leave it out to save a new workflow. | |
| message_id | Yes | The message id from send_agent_message or get_agent_message. One id covers the message and its reply. | |
| artifact_hash | No | Which proposal to save when the reply has more than one (from send_agent_message or get_agent_message). | |
| loaded_updatetime | No | Required with `workflow`: the attached workflow's `updatetime` from send_agent_message or get_agent_message. Stops the save if someone changed the workflow since. | |
| acknowledge_review_reset | No | Required to change a published workflow, after the user agreed it leaves the gallery until reviewed. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | ||
| mode | Yes | ||
| state | No | ||
| title | Yes | ||
| inputs | Yes | ||
| changes | No | ||
| outputs | Yes | ||
| preview | No | ||
| renamed | Yes | ||
| fullSlug | Yes | ||
| warnings | Yes | ||
| discarded | No | With unchanged: Start field changes Wiro does not keep, because it saves Start fields the way the wiro.ai editor writes them. | |
| unchanged | No | ||
| nextAction | No | ||
| updatetime | No | ||
| reviewReset | No | ||
| alreadySaved | Yes | ||
| contentsChanged | No |