Skip to main content
Workflows can be exported as self-contained JSON files and imported on any MIRA installation. Exports capture all steps, routing rules, and metadata — no credentials or session data are included.

Exporting a workflow

1

Open Workflows

Press ⌘3 to open the Workflows view.
2

Select the workflow

Click the workflow card, then click ⋮ → Export.
3

Save the file

Choose a location and save as [workflow-name].json.

Importing a workflow

1

Open Workflows

Press ⌘3.
2

Click Import

Click the Import button at the top of the workflow list.
3

Select the JSON file

Pick the .json file. The workflow appears in your list immediately and is ready to run.

Workflow JSON format

The exported JSON mirrors the internal workflow schema exactly. All fields are required unless marked optional.
{
  "name": "My Custom Pipeline",
  "description": "What this workflow does — shown in the workflow card.",
  "trigger": "manual",
  "isEnabled": true,
  "skillId": null,
  "tags": [],
  "steps": [
    {
      "stepOrder": 0,
      "name": "Clarify Scope",
      "description": "Restate the user request clearly before proceeding.",
      "stepType": "prompt",
      "conditionExpr": "",
      "promptTemplate": "Restate the following request in precise, unambiguous terms:\n\n{{input}}",
      "outputFormat": "markdown",
      "onSuccess": "continue",
      "onFailure": "retry:2"
    },
    {
      "stepOrder": 1,
      "name": "Human Review",
      "description": "Pause for the user to review and approve before continuing.",
      "stepType": "human_review",
      "conditionExpr": "",
      "promptTemplate": "",
      "outputFormat": "text",
      "onSuccess": "continue",
      "onFailure": "abort"
    },
    {
      "stepOrder": 2,
      "name": "Format Output",
      "description": "Transform the previous step's output into a final Markdown report.",
      "stepType": "transform",
      "conditionExpr": "",
      "promptTemplate": "Format the following as a structured Markdown report:\n\n{{prev_output}}",
      "outputFormat": "markdown",
      "onSuccess": "continue",
      "onFailure": "skip"
    }
  ]
}

Workflow root fields

FieldTypeRequiredNotes
namestringDisplayed on the workflow card
descriptionstringOne-line summary
triggerstring"manual" (user starts it) or "auto" (starts with session)
isEnabledbooleantrue to make the workflow selectable
skillIdstring | nullID of a skill to activate automatically when this workflow runs, or null
tagsstring[]User-defined labels for filtering. Use [] for none.
stepsStep[]Ordered array of steps — executed top to bottom by stepOrder

Step fields

FieldTypeRequiredNotes
stepOrdernumberZero-based execution order. Must be sequential: 0, 1, 2, …
namestringShort label shown in the workflow progress bar
descriptionstringLonger explanation of what this step does
stepTypestringSee valid values below
conditionExprstringNatural-language condition for condition steps. Leave "" for other types.
promptTemplatestringThe prompt sent to the LLM. Use template variables (see below). Leave "" for human_review.
outputFormatstringSee valid values below
onSuccessstringWhat to do when the step succeeds
onFailurestringWhat to do when the step fails
stepType valid values:
  • "prompt" — send promptTemplate to the LLM and collect output
  • "transform" — reshape or reformat the previous step’s output
  • "condition" — evaluate conditionExpr; routes based on result
  • "human_review" — pause execution and wait for the user to approve before continuing
outputFormat valid values: "text" · "markdown" · "json" · "code" · "table" onSuccess valid values: "continue" · "pause" onFailure valid values: "retry:1" · "retry:2" · "retry:3" · "skip" · "abort"

Template variables

VariableResolves to
{{input}}The original user message that started the workflow
{{prev_output}}The full output of the immediately preceding step
{{document}}The content of any document attached to the session

Version history

MIRA saves a new version each time you save a workflow. To access version history:
  1. Open the workflow editor.
  2. Click ⋮ → Version History.
  3. Browse versions by timestamp.
  4. Click Restore to roll back — this creates a new version entry rather than overwriting the history.

Distributing workflows to your team

  1. Export the workflow JSON.
  2. Commit the file to your team’s shared repository.
  3. Each team member imports the file into their MIRA installation.
Because workflows reference only template variables (not local paths or credentials), the same JSON runs identically on any machine.
Edit this page — Open a pull request