目录 / Wiro AI Workflows
Wiro AI Workflows
--- name: wiro-workflows description: 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_message` with 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_workflows` with scope "mine" lists the workspace's workflows; scope "public" searches the gallery (by `search`, `tags` or `model`). - `get_workflow` returns 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. 1. Split the goal into steps, one job each. For each step find a model (`recommend_model`, or `search_models` with a category) and read its parameter ids, options and price with `get_model_schema`. 2. Write the graph (at most 40 KB of JSON): - `version` is "1". `nodes` holds the steps, keyed `node-<id>`, plus the End node under the key `output`. `schema.input` holds the Start fields and `schema.output` is `{}`. The top-level `output` is a copy of the End node's `fields`. `metadata.input.position` places the Start node, such as `{ "x": 0, "y": 0 }`. - A step is `{ "id", "type": "run", "tool": "owner/model", "depends", "input", "metadata": { "position": { "x", "y" } } }`. `id` repeats its key. `input` maps the tool's parameter ids to fixed values or references. `depends` lists "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`), with `label`, `type`, `defaultValue` and `ui`. 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>.outputs` for what a model step made, `$node-<id>.result` for `output-filter` and `merge-text`, `$node-<id>.text1` to `.textN` for `split-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 with `merge-text` and reference its `result`. - The End node: `"output": { "id": "output", "type": "display", "depends": [...], "input": {}, "fields": { "<result name>": "<reference>" }, "metadata": {...} }`. Its `depends` cannot 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 with `get_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 `...UrlMultiple` field. To leave a file parameter empty, set `""` or `[]`. 3. 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 against `get_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. 4. 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`): ```json { "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_account` before 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_message` with agent "workflow-agent", the brief and a new session name. Follow `nextAction` (`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's `nextAction` shows. 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 with `confirm: true` after a yes. ## Run a workflow 1. Read the Start fields with `get_workflow` (right after `create_workflow`, its result lists them). 2. Estimate one run: the sum of each model step's price from `get_model_schema` at the settings the step uses, or what earlier runs cost in `list_workflow_runs`. Tell the user in one line. 3. `run_workflow` with the full slug and `input` keyed 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. 4. Follow `nextAction` (`wait_for_workflow_run`) until the status is `completed`, `failed`, `stopped` or `cancelled`. A video step can take many minutes. Never start the run again because a wait ran out. 5. 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_task` and `kill_task` do 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"), then `wait_for_workflow_run` with `wait_seconds` 0: it names the failed step and its error. With `debug_node_id` set to that step it also shows the inputs its model received. - `resume_workflow_run` continues 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 to `update_workflow` with the update time you read. Keep what you did not mean to change. - New `contents` first come back as a change summary, with the defaults Wiro filled and any problems: show it, then repeat with `confirm: true` after 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_workflow` copies a published gallery workflow into the workspace, private and free. Each call makes another copy. - `delete_workflow` removes a workflow for everyone, with no undo; the first call describes the removal and needs `confirm: true` after 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). ```bash # 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/Clone` and `Workflow/Delete` manage workflows; `Workflow/RunResume` continues a run (`breakpointNodeId` sets a new breakpoint); `Workflow/RunHistory` lists past runs. - `RunDetail` returns `workflowrun` (`status`, `canresume`, `totalcost`, and `chargedcost` once the run ends) and `workflowrunnodes` (each step's `status`, `error` and `outputs`). Read the End node's `fields` in `contents` and take the `outputs` of the steps they reference. - Check `result` and `errors` first: code `97` is an insufficient balance, `96` the 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
这是模型对公开材料的总结,不是官方声明,请以原链内容为准。
存档时间线
| 版本 | 存档时间 | 内容哈希 | 内容 |
|---|---|---|---|
| v1 | 2026-11-13 05:10 | edcd1789 | 可取 |
版本索引永久保留;内容副本只保留最新 1 份,更早版本仅留索引与哈希(存档时间线的证据链不会因此断裂)。
提交举报 / 纠错
侵权举报经核验成立后,我们会即时下线该条目并删除已存的内容副本。