Skip to main content

Template gallery

These are the starter machines the console editor seeds when you create a machine. Each card is that starter: its name, states, events, and definition. Hosted Orchestate is in private beta. Reading this page does not publish a machine. Request access, then follow the quickstart to publish a definition, create an instance, and inspect it.

Request accessQuickstartMachine definitions

Governance

Approval gate

A change waits for an authorized approval before it can proceed — the classic guardrail. APPROVE and REJECT are accepted only from a signed-in org owner or admin who is not the requester; an API key or agent cannot decide.

Initial state: pending

States

  • pending
  • approved
  • rejected
  • expired

Events

  • APPROVE
  • REJECT
  • EXPIRE

Definition

{
  "initial": "pending",
  "context": {
    "requesterId": "",
    "subject": ""
  },
  "states": {
    "pending": {
      "approval": {
        "events": [
          "APPROVE",
          "REJECT"
        ],
        "requireActor": "user",
        "roles": [
          "owner",
          "admin"
        ],
        "distinctFrom": "$.requesterId"
      },
      "on": {
        "APPROVE": {
          "target": "approved",
          "actions": [
            {
              "type": "emit",
              "params": {
                "event": "approval.approved"
              }
            }
          ]
        },
        "REJECT": {
          "target": "rejected",
          "actions": [
            {
              "type": "emit",
              "params": {
                "event": "approval.rejected"
              }
            }
          ]
        },
        "EXPIRE": {
          "target": "expired"
        }
      }
    },
    "approved": {
      "type": "final"
    },
    "rejected": {
      "type": "final"
    },
    "expired": {
      "type": "final"
    }
  }
}

Guardrail check

An action only proceeds once its defined checks pass — the machine blocks it otherwise, so an agent can never act on unvalidated input. PASS is guarded on checksPassed.

Initial state: submitted

States

  • submitted
  • checking
  • allowed
  • blocked

Events

  • RUN_CHECKS
  • PASS
  • FAIL
  • REMEDIATE

Definition

{
  "initial": "submitted",
  "context": {
    "checks": []
  },
  "states": {
    "submitted": {
      "on": {
        "RUN_CHECKS": {
          "target": "checking"
        }
      }
    },
    "checking": {
      "on": {
        "PASS": {
          "target": "allowed",
          "guard": "event.payload.checksPassed == true"
        },
        "FAIL": {
          "target": "blocked"
        }
      }
    },
    "allowed": {
      "type": "final"
    },
    "blocked": {
      "on": {
        "REMEDIATE": {
          "target": "submitted"
        }
      }
    }
  }
}

Policy-gated action

Every action routes through a policy decision — allow, deny, or require human approval — before it can execute. The managed-gateway governance pattern.

Initial state: requested

States

  • requested
  • policy_eval
  • pending_approval
  • executing
  • completed
  • failed
  • denied

Events

  • EVALUATE
  • ALLOW
  • DENY
  • REQUIRE_APPROVAL
  • APPROVE
  • REJECT
  • DONE
  • ERROR

Definition

{
  "initial": "requested",
  "context": {
    "tool": "",
    "actor": "",
    "requesterId": ""
  },
  "states": {
    "requested": {
      "on": {
        "EVALUATE": {
          "target": "policy_eval"
        }
      }
    },
    "policy_eval": {
      "on": {
        "ALLOW": {
          "target": "executing"
        },
        "DENY": {
          "target": "denied"
        },
        "REQUIRE_APPROVAL": {
          "target": "pending_approval"
        }
      }
    },
    "pending_approval": {
      "approval": {
        "events": [
          "APPROVE",
          "REJECT"
        ],
        "requireActor": "user",
        "roles": [
          "owner",
          "admin"
        ],
        "distinctFrom": "$.requesterId"
      },
      "on": {
        "APPROVE": {
          "target": "executing"
        },
        "REJECT": {
          "target": "denied"
        }
      }
    },
    "executing": {
      "on": {
        "DONE": {
          "target": "completed"
        },
        "ERROR": {
          "target": "failed"
        }
      }
    },
    "completed": {
      "type": "final"
    },
    "failed": {
      "type": "final"
    },
    "denied": {
      "type": "final"
    }
  }
}

Symphony — autonomous run

The guardrail spine for a Symphony autonomous run: queued → planning → executing → verifying → patching, then in_review (REVIEW_FAIL returns to patching, MERGE reaches merged), blocked or failed. Only these reviewed transitions are valid, so the executor can never skip a phase. Each phase declares allowedTools/allowedActions, ENFORCED at the transition boundary (deny-by-default) — an unauthorised tool or step is rejected by the FSM, not just a cooperating client. safeNext diverts a blocked/over-budget run to `blocked`, and maxTransitions bounds the patch/retry loop.

Initial state: queued. Apps: symphony-control

States

  • queued
  • planning
  • executing
  • verifying
  • patching
  • in_review
  • merged
  • blocked
  • failed

Events

  • PLAN
  • BLOCK
  • EXECUTE
  • VERIFY
  • HEARTBEAT
  • PASS
  • FAIL
  • INFRA_RETRY
  • RETRY
  • GIVE_UP
  • REVIEW_FAIL
  • MERGE
  • RESOLVE

Definition

{
  "initial": "queued",
  "context": {
    "runId": "",
    "attempts": 0,
    "prUrl": "",
    "mergeSha": "",
    "previousState": "",
    "blockReason": "",
    "infraRetries": 0,
    "lastFailureExcerpt": ""
  },
  "guardrails": {
    "maxTransitions": 50
  },
  "states": {
    "queued": {
      "on": {
        "PLAN": {
          "target": "planning"
        },
        "BLOCK": {
          "target": "blocked",
          "actions": [
            {
              "type": "assign",
              "params": {
                "previousState": "queued"
              }
            }
          ]
        }
      },
      "safeNext": "blocked",
      "guardrails": {
        "allowedTools": [
          "plan"
        ],
        "allowedActions": [
          "assign",
          "log",
          "agent_step"
        ]
      }
    },
    "planning": {
      "entry": [
        {
          "type": "agent_step",
          "params": {
            "step": "plan",
            "tool": "plan"
          }
        }
      ],
      "on": {
        "EXECUTE": {
          "target": "executing"
        },
        "BLOCK": {
          "target": "blocked",
          "actions": [
            {
              "type": "assign",
              "params": {
                "previousState": "planning"
              }
            }
          ]
        }
      },
      "safeNext": "blocked",
      "guardrails": {
        "allowedTools": [
          "plan"
        ],
        "allowedActions": [
          "assign",
          "log",
          "agent_step",
          "emit"
        ]
      }
    },
    "executing": {
      "entry": [
        {
          "type": "agent_step",
          "params": {
            "step": "execute",
            "tool": "apply_patch"
          }
        }
      ],
      "on": {
        "VERIFY": {
          "target": "verifying"
        },
        "HEARTBEAT": {
          "target": "executing"
        },
        "BLOCK": {
          "target": "blocked",
          "actions": [
            {
              "type": "assign",
              "params": {
                "previousState": "executing"
              }
            }
          ]
        }
      },
      "after": {
        "delayMs": 7200000,
        "target": "blocked",
        "actions": [
          {
            "type": "assign",
            "params": {
              "previousState": "executing",
              "blockReason": "agent_quiet"
            }
          }
        ]
      },
      "safeNext": "blocked",
      "guardrails": {
        "allowedTools": [
          "apply_patch"
        ],
        "allowedActions": [
          "assign",
          "log",
          "http",
          "agent_step",
          "emit"
        ]
      }
    },
    "verifying": {
      "entry": [
        {
          "type": "agent_step",
          "params": {
            "step": "verify",
            "tool": "run_tests"
          }
        }
      ],
      "on": {
        "PASS": {
          "target": "in_review",
          "guard": "event.payload.checksPassed == true",
          "actions": [
            {
              "type": "assign",
              "params": {
                "prUrl": "{{event.payload.prUrl}}"
              }
            },
            {
              "type": "emit",
              "params": {
                "event": "symphony.run.in_review"
              }
            }
          ]
        },
        "FAIL": {
          "target": "patching",
          "actions": [
            {
              "type": "assign",
              "params": {
                "lastFailureExcerpt": "{{event.payload.logExcerpt}}"
              }
            }
          ]
        },
        "INFRA_RETRY": {
          "target": "verifying",
          "actions": [
            {
              "type": "assign",
              "params": {
                "infraRetries": "{{event.payload.infraRetries}}"
              }
            }
          ]
        },
        "HEARTBEAT": {
          "target": "verifying"
        },
        "BLOCK": {
          "target": "blocked",
          "actions": [
            {
              "type": "assign",
              "params": {
                "previousState": "verifying"
              }
            }
          ]
        }
      },
      "after": {
        "delayMs": 3600000,
        "target": "blocked",
        "actions": [
          {
            "type": "assign",
            "params": {
              "previousState": "verifying",
              "blockReason": "agent_quiet"
            }
          }
        ]
      },
      "safeNext": "blocked",
      "guardrails": {
        "allowedTools": [
          "run_tests"
        ],
        "allowedActions": [
          "assign",
          "log",
          "agent_step",
          "emit"
        ]
      }
    },
    "patching": {
      "entry": [
        {
          "type": "agent_step",
          "params": {
            "step": "patch",
            "tool": "apply_patch"
          }
        }
      ],
      "on": {
        "RETRY": {
          "target": "executing"
        },
        "GIVE_UP": {
          "target": "failed"
        },
        "HEARTBEAT": {
          "target": "patching"
        },
        "BLOCK": {
          "target": "blocked",
          "actions": [
            {
              "type": "assign",
              "params": {
                "previousState": "patching"
              }
            }
          ]
        }
      },
      "after": {
        "delayMs": 3600000,
        "target": "blocked",
        "actions": [
          {
            "type": "assign",
            "params": {
              "previousState": "patching",
              "blockReason": "agent_quiet"
            }
          }
        ]
      },
      "safeNext": "blocked",
      "guardrails": {
        "allowedTools": [
          "apply_patch"
        ],
        "allowedActions": [
          "assign",
          "log",
          "agent_step",
          "emit"
        ]
      }
    },
    "in_review": {
      "on": {
        "REVIEW_FAIL": {
          "target": "patching",
          "allowedActors": [
            "wentzel-bot-gh"
          ]
        },
        "MERGE": {
          "target": "merged",
          "allowedActors": [
            "wentzel-bot-gh"
          ],
          "actions": [
            {
              "type": "assign",
              "params": {
                "mergeSha": "{{event.payload.mergeSha}}"
              }
            }
          ]
        },
        "BLOCK": {
          "target": "blocked",
          "actions": [
            {
              "type": "assign",
              "params": {
                "previousState": "in_review"
              }
            }
          ]
        }
      },
      "safeNext": "blocked",
      "guardrails": {
        "allowedTools": [
          "run_tests"
        ],
        "allowedActions": [
          "assign",
          "log",
          "agent_step",
          "emit"
        ]
      }
    },
    "merged": {
      "type": "final"
    },
    "blocked": {
      "on": {
        "RESOLVE": {
          "target": "{{context.previousState}}"
        }
      }
    },
    "failed": {
      "type": "final"
    }
  }
}

Approval

Human-in-the-loop review

Draft → review → approve / request-changes / reject. Keeps a human reviewer in the loop on AI-generated output before it ships.

Initial state: draft

States

  • draft
  • in_review
  • approved
  • rejected

Events

  • SUBMIT
  • APPROVE
  • REQUEST_CHANGES
  • REJECT

Definition

{
  "initial": "draft",
  "context": {
    "requesterId": ""
  },
  "states": {
    "draft": {
      "on": {
        "SUBMIT": {
          "target": "in_review"
        }
      }
    },
    "in_review": {
      "approval": {
        "events": [
          "APPROVE",
          "REJECT"
        ],
        "requireActor": "user",
        "roles": [
          "owner",
          "admin",
          "editor"
        ],
        "distinctFrom": "$.requesterId"
      },
      "on": {
        "APPROVE": {
          "target": "approved"
        },
        "REQUEST_CHANGES": {
          "target": "draft"
        },
        "REJECT": {
          "target": "rejected"
        }
      }
    },
    "approved": {
      "type": "final"
    },
    "rejected": {
      "type": "final"
    }
  }
}

Pipeline

Task with retries

Queued → running → done / failed, with a bounded retry path. For governed background jobs that must converge to a terminal state.

Initial state: queued

States

  • queued
  • running
  • failed
  • done
  • abandoned

Events

  • START
  • SUCCEED
  • FAIL
  • RETRY
  • GIVE_UP

Definition

{
  "initial": "queued",
  "context": {
    "attempts": 0
  },
  "states": {
    "queued": {
      "on": {
        "START": {
          "target": "running"
        }
      }
    },
    "running": {
      "on": {
        "SUCCEED": {
          "target": "done"
        },
        "FAIL": {
          "target": "failed"
        }
      }
    },
    "failed": {
      "on": {
        "RETRY": {
          "target": "queued"
        },
        "GIVE_UP": {
          "target": "abandoned"
        }
      }
    },
    "done": {
      "type": "final"
    },
    "abandoned": {
      "type": "final"
    }
  }
}

App

Cytra — AI-action approval

Governs an AI/agent action awaiting approval through the managed gateway: pending → approved / rejected / expired. (The shadow-pilot machine.)

Initial state: pending. Apps: cytra

States

  • pending
  • approved
  • rejected
  • expired

Events

  • APPROVE
  • REJECT
  • EXPIRE

Definition

{
  "initial": "pending",
  "context": {
    "approvalRequestId": "",
    "workspaceId": "",
    "appSlug": "",
    "toolName": ""
  },
  "states": {
    "pending": {
      "on": {
        "APPROVE": {
          "target": "approved",
          "guard": "event.payload.isSelfApproval == false",
          "actions": [
            {
              "type": "emit",
              "params": {
                "event": "approval.approved"
              }
            }
          ]
        },
        "REJECT": {
          "target": "rejected",
          "actions": [
            {
              "type": "emit",
              "params": {
                "event": "approval.rejected"
              }
            }
          ]
        },
        "EXPIRE": {
          "target": "expired"
        }
      }
    },
    "approved": {
      "type": "final"
    },
    "rejected": {
      "type": "final"
    },
    "expired": {
      "type": "final"
    }
  }
}

Cytra — tool-call governance

A governed MCP tool call: policy evaluation → allow / deny / require-approval → execute. Mirrors the gateway policy engine end to end.

Initial state: requested. Apps: cytra

States

  • requested
  • policy_eval
  • pending_approval
  • executing
  • executed
  • failed
  • blocked

Events

  • EVALUATE
  • ALLOW
  • DENY
  • REQUIRE_APPROVAL
  • APPROVE
  • REJECT
  • DONE
  • ERROR

Definition

{
  "initial": "requested",
  "context": {
    "appSlug": "",
    "toolName": "",
    "actorId": ""
  },
  "states": {
    "requested": {
      "on": {
        "EVALUATE": {
          "target": "policy_eval"
        }
      }
    },
    "policy_eval": {
      "on": {
        "ALLOW": {
          "target": "executing"
        },
        "DENY": {
          "target": "blocked"
        },
        "REQUIRE_APPROVAL": {
          "target": "pending_approval"
        }
      }
    },
    "pending_approval": {
      "on": {
        "APPROVE": {
          "target": "executing",
          "guard": "event.payload.isSelfApproval == false"
        },
        "REJECT": {
          "target": "blocked"
        }
      }
    },
    "executing": {
      "on": {
        "DONE": {
          "target": "executed"
        },
        "ERROR": {
          "target": "failed"
        }
      }
    },
    "executed": {
      "type": "final"
    },
    "failed": {
      "type": "final"
    },
    "blocked": {
      "type": "final"
    }
  }
}

Cytra — approval workflow

Multi-step approval: draft → pending → approved | rejected | cancelled. APPROVE needs a peer approver or admin (approverGrant "approver:peer" | "admin:peer"; self-approval is rejected); REJECT needs role approver or admin. Distinct from the cytra-approval shadow of gateway approval_requests.

Initial state: draft. Apps: cytra

States

  • draft
  • pending
  • approved
  • rejected
  • cancelled

Events

  • SUBMIT
  • CANCEL
  • APPROVE
  • REJECT

Definition

{
  "initial": "draft",
  "context": {
    "approverRoles": [
      "approver",
      "admin"
    ],
    "approveGrants": [
      "approver:peer",
      "admin:peer"
    ]
  },
  "states": {
    "draft": {
      "on": {
        "SUBMIT": {
          "target": "pending"
        },
        "CANCEL": {
          "target": "cancelled"
        }
      }
    },
    "pending": {
      "on": {
        "APPROVE": {
          "target": "approved",
          "guard": "event.payload.approverGrant in context.approveGrants",
          "actions": [
            {
              "type": "emit",
              "params": {
                "event": "approval.approved"
              }
            }
          ]
        },
        "REJECT": {
          "target": "rejected",
          "guard": "event.payload.role in context.approverRoles",
          "actions": [
            {
              "type": "emit",
              "params": {
                "event": "approval.rejected"
              }
            }
          ]
        },
        "CANCEL": {
          "target": "cancelled",
          "actions": [
            {
              "type": "emit",
              "params": {
                "event": "approval.cancelled"
              }
            }
          ]
        }
      }
    },
    "approved": {
      "type": "final"
    },
    "rejected": {
      "type": "final"
    },
    "cancelled": {
      "type": "final"
    }
  }
}

Pragma — eval run (Specshift)

An eval run with a quality gate: queued → running → scored → published only if the score clears the threshold; otherwise rejected.

Initial state: queued. Apps: pragma

States

  • queued
  • running
  • scored
  • published
  • rejected
  • failed

Events

  • START
  • COMPLETE
  • ERROR
  • PUBLISH
  • REJECT

Definition

{
  "initial": "queued",
  "context": {
    "threshold": 0.8,
    "edition": ""
  },
  "states": {
    "queued": {
      "on": {
        "START": {
          "target": "running"
        }
      }
    },
    "running": {
      "on": {
        "COMPLETE": {
          "target": "scored"
        },
        "ERROR": {
          "target": "failed"
        }
      }
    },
    "scored": {
      "on": {
        "PUBLISH": {
          "target": "published",
          "guard": "event.payload.score >= context.threshold"
        },
        "REJECT": {
          "target": "rejected"
        }
      }
    },
    "published": {
      "type": "final"
    },
    "rejected": {
      "type": "final"
    },
    "failed": {
      "type": "final"
    }
  }
}

MapsHub — engagement qualification

An M&A advisory engagement: inquiry → screening → assessment → review → qualified / declined, gated on a completed assessment.

Initial state: inquiry. Apps: mapshub

States

  • inquiry
  • screening
  • assessment
  • review
  • qualified
  • declined

Events

  • SCREEN
  • ASSESS
  • DECLINE
  • SUBMIT
  • QUALIFY

Definition

{
  "initial": "inquiry",
  "context": {
    "dealId": ""
  },
  "states": {
    "inquiry": {
      "on": {
        "SCREEN": {
          "target": "screening"
        }
      }
    },
    "screening": {
      "on": {
        "ASSESS": {
          "target": "assessment"
        },
        "DECLINE": {
          "target": "declined"
        }
      }
    },
    "assessment": {
      "on": {
        "SUBMIT": {
          "target": "review"
        }
      }
    },
    "review": {
      "on": {
        "QUALIFY": {
          "target": "qualified",
          "guard": "event.payload.assessmentComplete == true"
        },
        "DECLINE": {
          "target": "declined"
        }
      }
    },
    "qualified": {
      "type": "final"
    },
    "declined": {
      "type": "final"
    }
  }
}