Wiro AI Workflows
Design, save, run, test, repair and edit Wiro AI workflows, the saved chains of model steps with their own inputs and results, through the Wiro MCP tools or the REST API, alone or with the Workflow Agent. Use when the user wants a repeatable pipeline on Wiro (for example product photo to ad video, text to voice-over to captions), or asks to run, resume, clone, change or debug a Wiro workflow.
Wiro AI workflows
A workflow is a saved graph of steps. Each step runs one Wiro model or one free built-in utility. The Start node holds the inputs people fill in, the End node lists the results, and the saved workflow runs again and again on new inputs.
Choose the route first
- One or two runs the user describes, such as an image and then a video of it: run the models one after the other with
run_model, passing the first file URL to the next model. No workflow needed. - A chain the user will run again on new inputs: a workflow. Saving is free; each run pays for its model steps.
- Let Wiro pick the models for a one-off creative job: Studio (
send_agent_messagewith agent "studio"). - Work that should run by itself on a schedule or from a chat channel: a deployed agent (see the wiro-agents skill).
- "Build me a workflow" means save it. Run it only when the user also asked for a run.
With the Wiro MCP tools, read get_playbook with the topics "workflows" and "workflow-graph" before you build or edit, and "workflow-agent" before you message the Workflow Agent. They hold the full rules; this skill is the map.
Find and read workflows
list_workflowswith scope "mine" lists the workspace's workflows; scope "public" searches the gallery (bysearch,tagsormodel).get_workflowreturns one workflow: its Start fields (which ones a run must get), its End fields, the graph and its update time.- A workflow is named by its full slug: the slug plus a 5 character id, such as
product-shots-a1B2c. Use it exactly as the tools return it. - A workflow belongs to the workspace it was made in. A row marked "graph hidden" is protected: it can be run, and its steps cannot be read or edited.
Design and save a graph yourself
When you know the steps, write the graph and save it with create_workflow. It is free and private.
- Split the goal into steps, one job each. For each step find a model (
recommend_model, orsearch_modelswith a category) and read its parameter ids, options and price withget_model_schema. - Write the graph (at most 40 KB of JSON):
versionis "1".nodesholds the steps, keyednode-<id>, plus the End node under the keyoutput.schema.inputholds the Start fields andschema.outputis{}. The top-leveloutputis a copy of the End node'sfields.metadata.input.positionplaces the Start node, such as{ "x": 0, "y": 0 }.- A step is
{ "id", "type": "run", "tool": "owner/model", "depends", "input", "metadata": { "position": { "x", "y" } } }.idrepeats its key.inputmaps the tool's parameter ids to fixed values or references.dependslists "input" when the step reads a Start field, plus every step it references. - Start fields: each key is the input's name at run time (short, lowercase with underscores, such as
product_photo), withlabel,type,defaultValueandui. Text:"type": "string"with"ui": { "field": "textarea" }. A choice:"ui": { "field": "select", "options": [{ "value": "16:9", "text": "Wide" }] }. A file:"type": "string"with"ui": { "field": "image" }(or "audio", "video", "pdf"); its value is a public URL. Numbers:"number"or"float"; yes or no:"boolean", both with"ui": {}. - References:
$input.<key>for a Start field,$node-<id>.outputsfor what a model step made,$node-<id>.resultforoutput-filterandmerge-text,$node-<id>.text1to.textNforsplit-text. A reference is always a whole string value or one whole array item, never part of a longer text: to put a Start field into a prompt, join the parts withmerge-textand reference itsresult. - The End node:
"output": { "id": "output", "type": "display", "depends": [...], "input": {}, "fields": { "<result name>": "<reference>" }, "metadata": {...} }. Itsdependscannot be empty; steps that do not lead to it never run. - Utilities, all free:
workflow-utilities/output-filter(pick files by type or name from a step, or one field of an LLM reply),workflow-utilities/merge-text(join texts),workflow-utilities/split-text(split a text into 2 to 10 parts). Read their parameters withget_model_schema. Joining videos or adding a voice track are ordinary catalog models. - File parameters: a single file field takes one URL string, a combined field (
combinefileinput) an array, a multi-file field its URLs comma-separated in the matching...UrlMultiplefield. To leave a file parameter empty, set""or[].
- Save with
create_workflow. Wiro checks the graph and lists every problem at once (an unknown parameter id, a broken reference, a file where an array belongs): fix them all againstget_model_schema, then save again. A step's values, such as a duration, are checked when the step runs, so check them against the schema before you save. - Show the user the inputs, the results, the models with their prices and the estimate for one run.
A minimal graph, one text input, one image model, one result (take owner/model and its prompt id from get_model_schema):
{
"version": "1",
"nodes": {
"node-image": {
"id": "node-image", "type": "run", "tool": "owner/model", "depends": ["input"],
"input": { "prompt": "$input.prompt" },
"metadata": { "position": { "x": 350, "y": 0 } }
},
"output": {
"id": "output", "type": "display", "depends": ["node-image"], "input": {},
"fields": { "image": "$node-image.outputs" },
"metadata": { "position": { "x": 700, "y": 0 } }
}
},
"output": { "image": "$node-image.outputs" },
"schema": {
"input": { "prompt": { "label": "Prompt", "type": "string", "defaultValue": "", "ui": { "field": "textarea" } } },
"output": {}
},
"metadata": { "input": { "position": { "x": 0, "y": 0 } } }
}
To chain a video after it, add a step that reads the image, such as "input": { "inputImage": "$node-image.outputs", "prompt": "$input.motion" } with "depends": ["input", "node-image"], add the motion Start field, and point the End node (and the top-level output) at the new step.
Draft or edit with the Workflow Agent
The Workflow Agent designs and edits workflows by chat, choosing current models and wiring the steps. It never saves or runs anything.
- Cost: the workspace wallet needs at least 10 USD to send a message, and each turn's chat usage is billed after the turn. Say this in one line and check
get_accountbefore the first message. A question the catalog answers for free, such as which model is cheapest, needs no turn. - Make the first message complete: what goes in, what should come out, and the user's limits (budget, speed, quality, a model). Ask the user one question first when the idea is thin.
send_agent_messagewith agent "workflow-agent", the brief and a new session name. FollownextAction(get_agent_message) until the turn completes; never send the message again. One turn at a time per session.- To edit an existing workflow, pass its full slug in
workflow. The agent sees the graph, never the saved Start values. - A reply holds an explanation and zero or more proposals, each with its models, step count and any problems. Show them with the models' prices and the cost of one run. Send problems back in the same session.
- Save the one the user picks with
save_workflow_from_agent, passing the message and the proposal as the reply'snextActionshows. As a new workflow it is free and private; onto the attached workflow it replaces the steps, title and description, and the first call returns a summary to confirm withconfirm: trueafter a yes.
Run a workflow
- Read the Start fields with
get_workflow(right aftercreate_workflow, its result lists them). - Estimate one run: the sum of each model step's price from
get_model_schemaat the settings the step uses, or what earlier runs cost inlist_workflow_runs. Tell the user in one line. run_workflowwith the full slug andinputkeyed exactly like the Start fields: strings, numbers, booleans or arrays of strings; files are public URLs up to about 100 MB. A field left out uses its saved value, then its default.- Follow
nextAction(wait_for_workflow_run) until the status iscompleted,failed,stoppedorcancelled. A video step can take many minutes. Never start the run again because a wait ran out. - Show the End fields: files inline or as links, texts in full, and the cost.
To test the first steps of a workflow you can edit, pass breakpoint_node_id: the run stops after that step's layer (not the last layer) as stopped. Check the outputs, then continue with resume_workflow_run.
Money
- Nothing is charged up front. Each model step is billed like a model run when it succeeds; utility steps are free and failed steps are not charged.
- To start, the wallet must hold 0.50 USD for each model step that will run (up to the breakpoint, when one is set).
- A started run keeps going until it ends.
cancel_taskandkill_taskdo not apply to its steps, so start a run only when the user asked for it.
Failed and stopped runs
- Find the run with
list_workflow_runs(status "failed"), thenwait_for_workflow_runwithwait_seconds0: it names the failed step and its error. Withdebug_node_idset to that step it also shows the inputs its model received. resume_workflow_runcontinues a failed or stopped run on the same run token. Finished steps are kept and not charged again; the rest run as new tasks. A resume uses the inputs and settings the run started with, so it fits a temporary failure such as an outage or a timeout.- An error about a parameter value, a file or a limit comes from the inputs or settings: fix it and start a new run, which pays for every step again. Say so first.
- Resuming spends money: ask the user first, unless they asked you to continue this run.
Edit safely
- Start from
get_workflow, change the graph you got back, and send the whole graph toupdate_workflowwith the update time you read. Keep what you did not mean to change. - New
contentsfirst come back as a change summary, with the defaults Wiro filled and any problems: show it, then repeat withconfirm: trueafter a yes. A new graph replaces the old one with no undo. Title, description and tag changes alone are saved at once. - If someone saved the workflow in the meantime, the update is refused: read it again and redo the change on top.
- Changing a published workflow sends it back to review, and it leaves the gallery until it is approved. Tell the user first. Tags that start with
wiro-are reserved. - Never put keys, tokens or passwords in Start values, prompts or steps: everyone who can open the workflow can read them. Model steps are billed to the Wiro wallet and need no key from the model's provider.
Clone and delete
clone_workflowcopies a published gallery workflow into the workspace, private and free. Each call makes another copy.delete_workflowremoves a workflow for everyone, with no undo; the first call describes the removal and needsconfirm: trueafter a yes. With a team key the list holds teammates' workflows too.
From code: the REST API
Base URL https://api.wiro.ai/v1, every endpoint POST with JSON, auth headers as in the wiro-ai skill (x-api-key, plus x-nonce and x-signature for a Signature project).
# Start a run: answers at once with a run token
curl -s -X POST "https://api.wiro.ai/v1/Workflow/Run" \
-H "Content-Type: application/json" -H "x-api-key: ${WIRO_API_KEY}" \
-d '{"slug": "product-shots-a1B2c", "input": {"product_photo": "https://example.com/mug.jpg"}}'
# {"result": true, "errors": [], "workflowtoken": "..."}
# Poll until status is completed, failed, stopped or cancelled
curl -s -X POST "https://api.wiro.ai/v1/Workflow/RunDetail" \
-H "Content-Type: application/json" -H "x-api-key: ${WIRO_API_KEY}" \
-d '{"workflowtoken": "WORKFLOW_TOKEN"}'
Workflow/List,Workflow/Detail,Workflow/Add,Workflow/Update,Workflow/CloneandWorkflow/Deletemanage workflows;Workflow/RunResumecontinues a run (breakpointNodeIdsets a new breakpoint);Workflow/RunHistorylists past runs.RunDetailreturnsworkflowrun(status,canresume,totalcost, andchargedcostonce the run ends) andworkflowrunnodes(each step'sstatus,errorandoutputs). Read the End node'sfieldsincontentsand take theoutputsof the steps they reference.- Check
resultanderrorsfirst: code97is an insufficient balance,96the concurrency limit.
Links
- Workflows: https://wiro.ai/docs/workflows
- Workflow Agent: https://wiro.ai/docs/workflow-agent
- MCP server: https://wiro.ai/docs/wiro-mcp-server
- Workflows on wiro.ai: https://wiro.ai/workflows
- Downloads
- 129All time
- Security audit
- Pass
- Last updated
- 1w ago
- Current version
- v1.0.1
- License
- MIT-0
