> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mira-app.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Building a Workflow

> Create a custom multi-step pipeline with MIRA's workflow builder.

Workflows chain multiple prompt, transform, and human-review steps into a repeatable pipeline. Each step receives the previous step's output through the `{{prev_output}}` template variable.

## Create a new workflow

<Steps>
  <Step title="Open Workflows">Press ⌘3 or click the Workflows icon in the left sidebar.</Step>

  <Step title="Click New Workflow">
    Click the **+ New** button at the top of the workflow list.
  </Step>

  <Step title="Fill in details">
    Enter a **Name**, optional **Description**, and choose an **Icon** and **Color**.
  </Step>

  <Step title="Add the first step">
    Click **Add Step**. Choose a step type: `prompt`, `transform`, `condition`, or `human_review`.
    See [Step Types & Templates](./step-types-and-templates) for details.
  </Step>

  <Step title="Write the step instruction">
    Use plain language plus template variables (`{{ input }}`, `{{ document }}`, `{{ prev_output }}
            `). See the [Step Types](./step-types-and-templates) page for variable reference.
  </Step>

  <Step title="Add routing rules (optional)">
    Click **Add Rule** on a step to control what happens after it runs — continue, retry, or skip.
    See [Routing Rules](./routing-rules) for details.
  </Step>

  <Step title="Add more steps">
    Repeat steps 4–6 until the pipeline is complete. Drag steps to reorder them.
  </Step>

  <Step title="Save the workflow">
    Click **Save**. The workflow appears in the list and is ready to run.
  </Step>
</Steps>

## Running a workflow

1. Select the workflow from the list.
2. Click **Run** (or press ⌘↵).
3. Optionally type an initial input in the prompt box before running.
4. Watch each step execute in sequence in the chat panel.

## Editing a workflow

* Click the workflow in the list.
* Click the **Edit** (pencil) icon.
* Modify any step, reorder steps by dragging, or add/remove steps.
* Click **Save** to create a new version (previous version is preserved in history).

## Deleting a workflow

Click **⋮ → Delete** on the workflow card. Built-in workflows cannot be deleted — duplicate them first to modify.

<Note>
  Edit this page — [Open a pull
  request](https://github.com/satyendra2013/mira-app/edit/main/docs/features/workflows/building-a-workflow.mdx)
</Note>
