Repository navigation
Description
Summary
Today, building multi-agent pipelines in Orca (e.g. a code review loop where a reviewer agent hands off to a fixer agent, posts comments on Linear tasks, and chains back to the coordinator) requires either:
- Writing custom bash scripts that manually sequence
orca orchestrationcommands, or - Relying entirely on LLM reasoning — putting all the routing logic in natural language in the agent's system prompt and trusting the model to call the right commands in the right order.
Both approaches are brittle for production workflows. Scripts are fragile and hard to maintain. LLM-driven control flow is non-deterministic — the model can deviate, hallucinate steps, or fail to recover from errors in unexpected ways.
This feature request proposes a declarative workflow definition format and an Orca-native dispatcher that executes multi-agent workflows deterministically, without requiring custom scripts or trusting LLM routing decisions.
Problem in Detail
Current state
When you want to build a pipeline like:
Trigger (cron/manual)
→ Coordinator LLM
→ spawns Reviewer agent (new worktree)
→ waits for worker_done
→ if issues found → spawns Fixer agent (new worktree)
→ Fixer posts Linear comment, sets status
→ Fixer reports worker_done
→ Coordinator closes loop
You have two options today:
Option A — bash script:
orca orchestration run-create --objective "Review PR"
orca orchestration task-create --spec "Review PR #42"
orca orchestration worker-start --task task_a --worktree new-child --agent claude
orca orchestration check --wait --timeout-ms 60000
# parse JSON, check outcome, branch...
orca orchestration task-create --spec "Fix issues from review"
orca orchestration worker-start --task task_b --worktree new-child --agent codex
# ...and so onThis requires scripting knowledge, error handling, JSON parsing, and manual wiring of every step. It's not accessible to non-engineers and breaks easily.
Option B — LLM prompt:
"You are a coordinator. Find open PRs, spin up a reviewer agent per PR,
wait for results, and if issues are found start a fixer agent..."
The LLM may or may not follow the intended routing. Conditional branching (if issues_found → route to fixer) is expressed in English and executed probabilistically. There is no guarantee of correct routing, retry behaviour, or failure handling.
What's missing
- No way to define a workflow as structured data (steps, conditions, transitions)
- No built-in dispatcher that reads a workflow definition and drives the
orca orchestrationprimitives deterministically - No visual workflow builder in the Orca UI to compose pipelines without writing code
- No conditional branching based on structured worker output (e.g.
if outcome == failed → retry,if findings.count > 0 → dispatch fixer) - No event-based triggers (e.g.
on PR opened,on worker_done with outcome=failed)
Proposed Solution
1. Declarative workflow format (orca.workflow.yaml or inline in Automation)
A structured YAML/JSON definition that describes the pipeline without any scripting:
name: PR Review Loop
trigger:
type: schedule
cron: "0 9 * * 1-5"
steps:
- id: fetch_prs
type: tool
tool: linear.list
params:
filter: open
output: prs
- id: review
type: worker
foreach: "${prs}"
agent: claude
worktree: new-child
prompt: "Review PR ${item.id} for security issues. Report findings as JSON."
output: review_result
- id: route_on_findings
type: branch
condition: "${review_result.findings.length} > 0"
if_true: fix
if_false: comment_clean
- id: fix
type: worker
agent: codex
worktree: new-child
prompt: "Fix the issues identified in review: ${review_result.findings}"
on_complete:
- tool: linear.comment
params:
issue: "${item.id}"
body: "Fixes applied: ${output.summary}"
- tool: linear.status.set
params:
issue: "${item.id}"
to: "In Review"
- id: comment_clean
type: tool
tool: linear.comment
params:
issue: "${item.id}"
body: "Review passed. No issues found."2. Orca workflow dispatcher
A built-in dispatcher (not an LLM) that:
- Reads the workflow definition
- Executes steps in declared order
- Evaluates branch conditions deterministically using structured output from workers
- Handles
foreachparallelism (fan-out across items, e.g. one worker per PR) - Manages retries and error handling per-step
- Reports run status to the Automations UI
3. Visual workflow builder in the Automations UI
Extend the existing Automations page with a visual node editor that:
- Lets users compose workflows by dragging/connecting step nodes (Worker, Tool, Branch, Gate)
- Generates the YAML definition under the hood
- Shows live run state (which step is executing, which workers are active)
- Allows inspecting each step's output inline
4. Event-based triggers
Extend AutomationRunTrigger beyond scheduled | manual to support:
on_pr_opened,on_pr_merged(via GitHub/Linear webhook)on_worker_done(chain automations)on_gate_resolved(human-in-the-loop approval unblocks next workflow)
Concrete Use Case: Code Review Loop
The motivating use case that drove this request:
- Trigger: Daily at 9am (or on PR opened)
- Step 1: List all open PRs from Linear/GitHub
- Step 2: For each PR → spawn a Reviewer agent in a new worktree
- Step 3: Reviewer posts findings as structured JSON via
worker_done - Step 4: Branch — if findings exist → spawn Fixer agent; else → post "LGTM" comment
- Step 5: Fixer agent applies changes, posts comment on Linear issue, sets status to "In Review"
- Step 6: Fixer self-assigns the Linear issue (
orca linear assignee set --current --me) - Step 7: Coordinator closes the run, logs usage
Today this requires ~80 lines of bash + careful error handling. With this feature it would be a ~30-line YAML that any team member could read and modify.
Why This Matters
The orchestration primitives (task-create, worker-start, check --wait, send, ask, gate-create) are excellent and expressive. The gap is the glue layer — today that glue must be either a bash script or an LLM, both of which are unreliable for production pipelines.
A declarative dispatcher would:
- Make multi-agent workflows accessible to non-engineers
- Make pipelines auditable and version-controllable (YAML in repo)
- Make routing deterministic — no LLM needed to decide "should I call the fixer?"
- Preserve full use of LLMs where they belong — doing the actual work inside each worker step, not making routing decisions
Relationship to Existing Features
| Existing feature | This proposal |
|---|---|
orca orchestration worker-start |
Used under the hood by the dispatcher |
orca orchestration check --wait |
Dispatcher handles this loop internally |
| Automations (cron) | Extended with workflow steps instead of single-agent prompt |
| Decision gates | Exposed as type: gate step with human resolution |
| Bundled orchestration skill | Still useful for fully autonomous LLM-driven flows; this is complementary for deterministic pipelines |
Prior Art / References
- GitHub Actions — YAML workflow definition with
on:triggers,jobs:,steps:, andif:conditionals - Temporal.io — durable workflow engine with deterministic replay
- LangGraph — graph-based agent routing with explicit edges and conditions
- Prefect / Airflow — DAG-based task orchestration
Orca already has all the primitives. This request is about surfacing them through a structured, no-code-friendly layer rather than requiring users to write orchestration logic themselves.
Filed by a user exploring Orca's multi-agent capabilities for automated code review pipelines.
Activity
AmethystLiang commentedon Jul 28, 2026
thanks for proposing it. will give it some thought!
dcieslak19973 commentedon Jul 28, 2026
More food for thought in terms of prior-art/inspiration - https://code.claude.com/docs/en/workflows
netdragon-beep commentedon Aug 15, 2026
is anyone currently working on implementing this?
Tauri-EPO commentedon Aug 17, 2026
Sibling, not a substitute: #15012 is the Claude-style authoring loop (agent writes a small JS script, a non-LLM runtime executes it, phases skip from data). This issue stays the YAML / visual / Automations shape. Cross-linked from there so the two don't get collapsed.
chirag127 commentedon Nov 21, 2026
Use case: automatic tasks through APIs, CLI, and skills, with verifiable completion
I want to describe an authorized task once and have its supported setup, execution, verification, reporting, and cleanup run automatically. The workflow work here and in #11378 should be callable through the public API, CLI, and task skills, using Orca's existing orchestration/coordinator completion model.
Suggested execution-contract refinements:
orca events subscribe) #37016 is related event-stream work.Acceptance examples: one API/CLI invocation completes the declared extension setup/build/reload/test/report flow and each supported web/mobile/desktop test procedure; disconnect/reconnect does not blindly repeat an installation or publication; cancellation cleans up only run-owned resources; a failed assertion or rebuild cannot become a fresh pass merely because input was delivered or an older app remains visible.
Concrete domain requests are #46537, #46542, #46544, #46545, #46546, and #46547; public operation schemas belong to #14273. Please retain the orchestration-v3 coordinator/wakeup ownership discussed in the closure of #15012 when implementing these semantics. These refinements build on that execution model and the existing automation facilities.
0xAlbertChen commentedon Nov 30, 2026
Strong +1. Deterministic workflows are essential for reliable, unattended multi-agent execution.
We previously relied on an AI coordinator to manage task transitions, but this introduced unnecessary token consumption, inconsistent decisions, missed handoffs, and unpredictable recovery behavior.
We are now moving toward program-controlled workflows:
Implementation → Independent Review → Rework → Review → Acceptance.
The LLM should perform engineering work, while deterministic code controls workflow transitions.
Ideally, Orca should support:
A native deterministic workflow engine, or a sufficiently reliable interface for external workflow engines, would significantly reduce the need for custom orchestration infrastructure.
Related: #9228, #37407, #21747.