Skip to content

Your first workflow

Author a minimal workflow YAML, create it in the dashboard, run it, and read the output.

A Revka workflow is a YAML file that defines a multi-step pipeline — spawn agents, run shell or Python, branch on conditions, publish results — that the operator-mcp backend executes deterministically and audits in Kumiho graph memory. This page walks you end to end: write the smallest workflow that does something, create it in the dashboard, run it, and read what came back.

Use this page the first time you author a workflow. Once you are comfortable, the Workflow YAML reference documents every field, the Step types reference covers each step type, and Workflows, editor & runs goes deeper on the dashboard. Make sure your gateway and the operator sidecars are running first — see Quickstart and Install the Python MCP sidecars.

A workflow has a few top-level fields and an ordered list of steps. The smallest useful workflow is one agent step that does some work, followed by an output step that renders the result:

name: hello-world
version: "1.0"
description: A minimal two-step workflow.
steps:
- id: greet
type: agent
agent:
agent_type: claude
role: researcher
prompt: "Say hello in three languages."
- id: summary
type: output
depends_on: [greet]
output:
format: text
template: "Agent said: ${greet.output}"

Two things are happening here:

  • The greet step spawns a claude agent with the researcher role and a prompt. Its text result becomes available as ${greet.output}.
  • The summary step depends_on greet, so it runs after it, and renders a template that interpolates ${greet.output}. The ${...} syntax pulls values from workflow state at run time. (See Variables, expressions & triggers for every namespace.)

These are the top-level keys you will use most. name, version, and at least one step are required; the rest are optional.

FieldTypeRequiredMeaning
namestringyesUnique slug that identifies the workflow.
versionstringyesSemantic version, e.g. "1.0".
descriptionstringnoHuman-readable purpose.
tagslistnoClassification labels for search and filtering.
inputslistnoTyped parameters the run accepts (see below).
outputslistnoNamed outputs that map to step results for callers.
stepslistyesThe ordered step definitions — at least one required.
triggerslistnoAuto-launch conditions (cron schedules or entity events).
checkpointboolnoPersist state after each step. Defaults to true.

To make the workflow take a parameter, declare it under inputs and reference it with ${inputs.<name>}:

name: hello-world
version: "1.0"
description: Greet the caller in a chosen language.
inputs:
- name: language
type: string # string | number | boolean | list
required: true
default: "English"
description: The language to greet in.
steps:
- id: greet
type: agent
agent:
agent_type: claude
role: researcher
prompt: "Say hello in ${inputs.language}."
- id: summary
type: output
depends_on: [greet]
output:
format: text
template: "Agent said: ${greet.output}"

When you load or run a workflow by name, the operator searches several locations and later sources override earlier ones:

PriorityLocationPurpose
3 (highest).revka/workflows/Project-local overrides (relative to the run’s cwd).
2~/.revka/workflows/User-global workflows.
1 (lowest).revka/operator_mcp/workflow/builtins/Shipped built-in defaults.
FallbackKumiho space Revka/WorkflowsCloud-managed definitions, resolved by kref.

So a hello-world.yaml in a project’s .revka/workflows/ shadows a user-global one of the same name, which in turn shadows a built-in.

The dashboard is the fastest way to author and store a workflow. Definitions are saved as Kumiho items (space Revka/Workflows, item kind workflow), with the YAML stored as a workflow.yaml revision artifact — not in config.toml. Every save writes a new revision and tags it published.

  1. Open Workflows from the Orchestration section of the sidebar, or go to /workflows. (Need the dashboard? See Run the dashboard.)

  2. Click Create to open the full-screen editor overlay on a blank workflow.

  3. The editor keeps a visual DAG and a YAML document in bi-directional sync. Switch to the YAML pane and paste the hello-world YAML above, or drag step nodes from the palette onto the canvas and configure each one in the right-hand panel.

  4. Click Save. The gateway validates the YAML (a six-pass check for duplicate step IDs, dangling dependencies, cycles, per-step config, variable references, and triggers). On success it creates a published Kumiho revision and syncs any cron jobs the YAML declares. Validation errors appear inline so you can fix them before the save lands.

Each definition in the list shows its source: builtin, builtin-modified, or custom.

If you prefer scripting, POST the YAML as a string. Every workflow route requires the pairing bearer token (see Pairing & authentication).

POST /api/workflows
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "hello-world",
"description": "A minimal two-step workflow.",
"definition": "name: hello-world\nversion: \"1.0\"\nsteps:\n - id: greet\n type: agent\n agent:\n agent_type: claude\n role: researcher\n prompt: \"Say hello in three languages.\"\n",
"version": "1.0",
"tags": ["example"]
}
FieldRequiredMeaning
nameyesDisplay name; slugified into the item identifier.
descriptionyesHuman-readable purpose.
definitionyesThe full workflow YAML, as a string.
versionnoSemantic version label.
tagsnoClassification list for search and filtering.

On success the gateway validates, slugifies the name, writes a published revision with the YAML as the workflow.yaml artifact, and returns 201 Created. The full definition CRUD surface is in Workflows & Architect API.

You can launch a run from the dashboard or the API.

On the Workflows page, select hello-world and click Execute. If the workflow declares inputs, you are prompted for their values first. The run appears on the Workflow Runs page (/runs), where you watch each step light up live.

A run moves through these statuses:

StatusMeaning
pendingCreated but not yet picked up by the executor.
runningThe executor is active.
pausedWaiting at a human_approval or human_input gate.
completedAll steps finished successfully.
failedA step failed; the checkpoint is preserved so you can retry.
cancelledStopped by a user or the system.
staleNon-terminal status with no checkpoint and no live lock (for example, after a redeploy wiped local state).

Open the run on the Workflow Runs page (/runs). The run viewer pins the run to the exact YAML revision it executed, so the graph always reflects what actually ran. Click any node to open the step inspector, which shows the step’s status, agent id and role, and an output preview. For your hello-world run, the summary node’s output is the rendered "Agent said: ..." template.

Fetch the run by its id:

GET /api/workflows/runs/{run_id}
Authorization: Bearer <token>

The response is { "run": { ... } } with per-step detail. Live runs are read from the executor’s in-memory status; finished runs are resolved from the Kumiho run record. An unknown run_id returns 404. The run lifecycle endpoints (list, retry, cancel, delete, approve) are documented in Workflows & Architect API.