Skip to content

Built-in workflows & orchestration patterns

The 21 prebuilt operator workflows plus the multi-agent patterns: review-fix, refinement, handoff, group chat, supervisor, map-reduce, and team spawning.

Revka ships two libraries of ready-made orchestration so you don’t author everything from scratch: built-in workflow templates (declarative YAML you can run by name, duplicate, and edit) and multi-agent orchestration patterns (imperative MCP tools that coordinate several agents at once). Above both sit agent teams (spawn_team) and inter-agent chat rooms for ad-hoc coordination.

Use this page when you want to start from a working template instead of an empty file, or when a single agent isn’t enough and you need a reviewer, a critic, a fan-out, or a supervised committee. If you are still learning the YAML schema, read Your first workflow and the step types reference first. The patterns here run on the Operator MCP server, so make sure the sidecars are installed (see Install the Python MCP sidecars).

The operator ships 21 prebuilt workflow YAML definitions covering common development and content patterns. They are embedded in the revka binary at build time and seeded into your workspace, so you do not need the Python operator checked out to use them. Reference any of them by name in run_workflow(workflow="<name>", ...) or via POST /api/workflows/run/{name}.

WorkflowWhat it doesKey inputs
code-reviewCoder implements, reviewer checks, produces a fix if rejectedtask, cwd
code-review-advancedEnhanced code-review flowtask, cwd
bug-fixResearcher investigates, coder fixes, tester verifiesbug_description
spec-to-implArchitect designs, coder implements, reviewer verifiestask
refactorResearcher analyzes, architect plans, coder implements, reviewer approvestarget
multi-module-reviewParallel review across multiple modules
research-onlyPure research workflow
data-pipeline-ingestIngest and analyze data, produce a report entitytask, cwd
data-pipeline-distributeDistribute pipeline results
data-pipeline-summarizeSummarize pipeline outputs
revka-agentops-a2aIT incident-response control plane with a human_approval gateincident_id, alert_payload, cwd
revka-workflow-composerMeta-workflow for composing new workflows
architecture-discussionGroup chat for architecture decisions
novel-writingCreative writing workflow
cold-outreachOutreach content generation
canonworks-serial-episode-factorySerialized story episode generation
canonworks-serial-canon-state-syncCanon-state synchronization for serial fiction
quantum-soul-arc-roomArc-planning production room for the Quantum Soul serial
quantum-soul-episode-roomEpisode production room
quantum-soul-production-roomFinal production room
smoke-test-all-stepsIntegration test exercising every step type

Built-in definitions are a good place to copy from. For example, code-review chains an agent (coder) → agent (reviewer) → conditional (verdict check) → agent (fix) → output, branching on whether the reviewer’s text contains APPROVED:

steps:
- id: review
type: agent
depends_on: [implement]
agent:
agent_type: codex
role: reviewer
prompt: |
Review the changes. Say APPROVED if good,
else NEEDS_CHANGES with specific feedback.
- id: check_verdict
type: conditional
depends_on: [review]
conditional:
branches:
- condition: "${review.output} contains APPROVED"
goto: summary
- condition: default
goto: fix

revka workflows — list and sync templates

Section titled “revka workflows — list and sync templates”

The built-in YAMLs live in your workspace at operator_mcp/workflow/builtins/, which is the lowest-priority discovery location (see Your first workflow for the full override order). The revka workflows subcommand manages that on-disk copy.

Terminal window
revka workflows list # list the templates embedded in this binary
revka workflows sync # seed templates into the workspace (skips existing)
revka workflows sync --force # overwrite existing template files
CommandFlagsBehavior
revka workflows listPrints the workflow templates compiled into the running binary.
revka workflows sync--forceCopies the embedded YAMLs into <workspace>/operator_mcp/workflow/builtins/. Existing files are left alone unless --force is passed.

Onboarding seeds these templates automatically; run revka workflows sync later to pick up new templates after a Revka upgrade. Because sync only writes missing files by default, your edits to other workflows are never clobbered — pass --force only when you want the shipped versions restored.

Presets are a lighter-weight cousin of YAML workflows: reusable orchestration patterns defined in code rather than YAML. A preset is a list of steps, each with a role, an agent_type, optional depends_on edges (by step index), and an optional review_loop flag. Presets like code-review, spec-to-impl, and bug-fix are available as imperative MCP tools and can be previewed before you commit to a multi-agent run.

ToolPurpose
list_workflow_presets(tag?)List built-in and custom presets; filter by tag (e.g. review, testing).
save_workflow_preset(name, description, steps, tags?)Save a custom preset for reuse.
get_workflow_plan(preset)Preview a preset’s execution plan — steps, waves, and dependencies — without running it.

Use get_workflow_plan to sanity-check the wave structure (which steps run in parallel and which gate on others) before spending tokens. Presets are simpler than full YAML workflows: they describe an agent topology, not the full typed step grammar with shell, Python, conditionals, and triggers.

When one agent isn’t enough, the operator exposes six higher-level patterns as MCP tools. Each spawns and coordinates several agents and returns a structured result. They are also available as workflow step types (map_reduce, supervisor, group_chat, handoff) — see the step types reference.

Spawns a reviewer on a completed agent’s work, parses the verdict (APPROVED / NEEDS_CHANGES / BLOCKED), and — if changes are needed — spawns a fixer with the feedback, repeating up to max_rounds.

review_fix_loop(coder_agent_id, cwd, task?, reviewer_type?, fixer_type?,
max_rounds?, review_focus?, timeout?)
ParameterDefaultMeaning
coder_agent_id— (required)Completed agent whose work to review.
cwd— (required)Working directory for reviewer and fixer.
reviewer_typecodexAgent type for the reviewer.
fixer_typecodexAgent type for the fixer.
max_rounds2 (max 5)Review → fix iterations.
review_focusExtra guidance, e.g. focus on security.
timeout300Per-agent timeout in seconds.

The structured successor to review_fix_loop. It runs critique → refine cycles with a 0–100 quality score, trust-informed critic selection (auto-switches the critic if its trust score drops below 0.7), and a fallback ladder (creator → dedicated fixer → escalate).

refinement_loop(creator_agent_id, cwd, task?, creator?, critic?, model?,
max_rounds?, threshold?, review_focus?, timeout?)
ParameterDefaultMeaning
creator_agent_id— (required)Agent whose work to review and refine.
cwd— (required)Working directory for critic and fixer.
creatorcodexAgent type used to apply fixes.
criticclaudeAgent type for the critic; auto-switches if trust < 0.7.
max_rounds2 (max 5)Critique → refine iterations.
threshold70Quality score (0–100) required to pass.
timeout300Per-agent timeout in seconds.

Extracts findings, files touched, and task state from a source agent and injects them into a receiving agent’s prompt, tracking the handoff chain in Kumiho. Use it to pass a researcher’s findings to a coder, or a coder’s work to a tester, without re-deriving context.

handoff_agent(from_agent_id, reason, to_agent_type?, task?, cwd?, model?, timeout?)
ParameterDefaultMeaning
from_agent_id— (required)Agent whose work to hand off.
reason— (required)Why the handoff is happening.
to_agent_typeclaudeReceiver agent type or pool template name.
taskSpecific task for the receiver.
cwdsource agent’s cwdWorking directory for the receiver.
timeout300Per-agent timeout in seconds.

Runs a moderated multi-agent discussion. Participants take turns (round_robin or moderator_selected), and a moderator synthesizes consensus at the end. Returns a transcript, a summary, and a conclusion.

group_chat(topic, participants, moderator?, strategy?, max_rounds?, cwd?, model?, timeout?)
ParameterDefaultMeaning
topic— (required)Discussion topic.
participants— (required)Agent types or pool template names (min 2).
moderatorclaudeModerator agent.
strategymoderator_selectedTurn order: round_robin or moderator_selected.
max_rounds8 (max 20)Maximum speaking turns.
timeout120Per-turn timeout in seconds.

The architecture-discussion built-in workflow is a group-chat template; the step inspector shows the full transcript for each group_chat step.

Dynamic delegation: a supervisor analyzes the task, delegates a subtask to the best available specialist, integrates the result, and repeats — choosing the next agent based on results so far. Unlike spawn_team (a static DAG), the topology is decided at run time.

supervisor_run(task, cwd, templates?, max_iterations?, supervisor_type?, model?, timeout?)
ParameterDefaultMeaning
task— (required)Task to accomplish.
cwd— (required)Working directory.
templatesall in poolSpecialist pool template names to draw from.
max_iterations5 (max 10)Delegate → integrate cycles.
supervisor_typeclaudeSupervisor agent.
timeout300Per-agent timeout in seconds.

Fans a task out to N parallel mapper agents over a list of splits (file paths, sections, subtasks), then a reducer synthesizes all results. Ideal for reviewing or analyzing many files at once.

map_reduce(task, splits, cwd, mapper?, reducer?, concurrency?, model?, timeout?, halt_on_failure?)
ParameterDefaultMeaning
task— (required)Overall task description.
splits— (required)Segments to process in parallel (min 2).
cwd— (required)Working directory.
mapperclaudeMapper agent type or pool template.
reducerclaudeReducer agent type or pool template.
concurrency3 (max 10)Maximum simultaneous mappers.
halt_on_failurefalseStop remaining mappers if one fails.
timeout300Per-agent timeout in seconds.

A team is a bundle of agent templates plus dependency edges, stored in Kumiho under Revka/Teams. The edges (REPORTS_TO, SUPPORTS, DEPENDS_ON) define a DAG topology, and spawn_team executes it in waves — agents with no unresolved dependencies run simultaneously, then the next wave fires once theirs complete. This is the static counterpart to the dynamic supervisor_run.

ToolPurpose
create_team(name, description, member_krefs, edges?)Create or update a team bundle (members and edges are replaced on update).
list_teams()List all teams from Kumiho.
get_team(kref)Full team detail, including members and edges.
search_teams(query)Search teams by name or description.
spawn_team(team_kref, task, cwd?, dry_run?, halt_on_failure?, resume_from?)Execute the team in waves.
get_spawn_progress(team_name?)Per-wave progress, completions, and halt reasons.
lint_team(team_kref, task?)Check role balance, naming, capability coverage, and edge completeness.

Edges are declared as {from_kref, to_kref, edge_type}:

{
"name": "rust-dev-team",
"description": "Implement + review Rust features",
"member_krefs": ["kref://.../coder", "kref://.../reviewer"],
"edges": [
{ "from_kref": "kref://.../reviewer", "to_kref": "kref://.../coder", "edge_type": "DEPENDS_ON" }
]
}

Key behaviors:

  • dry_run: true validates the graph and returns the stage preview without spawning anything — pair it with lint_team before a real run.
  • halt_on_failure defaults to true, stopping downstream stages when an upstream stage has failures. Set it to false to continue regardless.
  • resume_from takes a checkpoint ID. When a spawn halts mid-run, the response includes a checkpoint_id; pass it back to resume from the failed wave instead of re-running everything.

For the broader agent and team model, see Agents, teams & swarms and Spawning & coordinating agents.

Chat rooms are named channels for async coordination between spawned agents. An agent posts a message, optionally @mentions other agents (which triggers a follow-up prompt to any mentioned agent that is currently idle), and reads the shared log. The session manager wires those mention-based interrupts automatically, so a room doubles as shared memory and a decision log for a team.

ToolPurpose
chat_create(name, purpose?)Create a room.
chat_post(room_id, content, sender_id?, sender_name?, mentions?, reply_to?)Post a message; mentions triggers follow-up prompts to idle agents.
chat_read(room_id, limit?, since?)Read recent messages (default 50; since filters to new ones by ISO timestamp).
chat_list()List all active rooms.
chat_wait(room_id, timeout?)Long-poll for a new message (up to 60,000 ms).
chat_delete(room_id)Delete a room and its messages.
{ "name": "design-review", "purpose": "Review the auth module" }

Rooms persist for the lifetime of the agent session. The shipped operator-orchestrator.md skill describes the full “chat room as backbone” team-coordination pattern that combines rooms with spawn_team and the patterns above.

You want to…Use
Improve one agent’s output against a verdictreview_fix_loop
Improve one agent’s output against a quality scorerefinement_loop
Pass context from one agent to anotherhandoff_agent
Reach a decision among several agentsgroup_chat
Let the system decide who works nextsupervisor_run
Process many files/sections in parallelmap_reduce
Run a fixed, repeatable agent topologyspawn_team (or a YAML workflow)
Coordinate agents asynchronously by messageInter-agent chat rooms