> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codemachine.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Orchestration Patterns

> Learn the common orchestration patterns and when to use each execution style.

**Workflows take many shapes. Here's how to choose.**

## At a Glance

<CardGroup cols={4}>
  <Card title="Interactive" icon="hand" href="#interactive">
    You control every step
  </Card>

  <Card title="Autonomous" icon="robot" href="#autonomous">
    Controller runs agents
  </Card>

  <Card title="Continuous" icon="forward" href="#continuous">
    Zero interaction
  </Card>

  <Card title="Hybrid" icon="shuffle" href="#hybrid">
    Mix both styles
  </Card>
</CardGroup>

***

## Interactive

You respond at every step. Each agent asks questions, gathers insights, and produces output for the next agent. Press enter to proceed and inject the next prompt.

<Accordion title="When to use" icon="check" defaultOpen>
  * Tasks need human judgment at each stage
  * You want full control over direction
  * Multiple perspectives improve the outcome
</Accordion>

<Card title="See Interactive Example" icon="book-open" href="/build-workflows/workflow-examples#interactive:-technical-design-review">
  View a complete interactive workflow with logical flow and technical implementation
</Card>

***

## Autonomous

<Warning>
  This mode is in beta. Behavior may change as we refine controller-agent coordination.
</Warning>

**Controller agent runs agents on your behalf.**

You brief the controller agent with your objective and workflow structure. It manages the agents, makes decisions between steps. You review the results instead of managing the process.

<Accordion title="When to use" icon="check" defaultOpen>
  * You have a clear objective but don't need to control every decision
  * The task is too long to babysit
  * You want to review results, not manage the process
</Accordion>

**Prefixes:**

Both controller and step agents see input prefixes: `{USER (username):}` or `{agent_name:}`. You have full control to talk to either at any time.

<Accordion title="You can pause anytime to" icon="pause" defaultOpen>
  * Talk to controller agent — give more instructions about the project
  * Talk to step agent — give direct instructions for that step
</Accordion>

<Note>
  You must brief the controller about the full workflow: what agents it will talk to and what output is expected from each. This keeps it on track. Autonomous is the hardest mode to control, but powerful for long objectives when managed correctly.

  Both step agents and controller agent must be configured to use the signals MCP. Step agents propose proceeding to the next step, and the controller accepts or rejects. This replaces user interaction.
</Note>

<Card title="See Autonomous Example" icon="book-open" href="/build-workflows/workflow-examples#autonomous:-greenfield-project-build">
  View a complete autonomous workflow with logical flow and technical implementation
</Card>

***

## Continuous

**Auto-advance with zero interaction. Agents run to completion.**

You provide a specification file upfront. Agents iterate on it following a well-defined pattern. No pauses, no approvals — just results.

<Accordion title="When to use" icon="check" defaultOpen>
  * The workflow pattern is proven and repeatable
  * You have a clear specification file
  * Same objective, different inputs each time
</Accordion>

<Card title="See Continuous Example" icon="book-open" href="/build-workflows/workflow-examples#continuous:-adding-apis">
  View a complete continuous workflow with logical flow and technical implementation
</Card>

***

## Hybrid

**Mix interactive and auto-advance agents in the same workflow.**

Some steps need your input. Others run automatically. Hybrid gives you both — time effective and controllable.

This is possible because interactivity is set at the agent level, not the workflow level. Each agent decides whether to wait for you or proceed automatically.

<Accordion title="When to use" icon="check" defaultOpen>
  * Key decisions need you, routine steps don't
  * You want speed without losing control
  * Most workflows fit this pattern
</Accordion>

<Card title="See Hybrid Example" icon="book-open" href="/build-workflows/workflow-examples#hybrid:-bug-fix-pipeline">
  View a complete hybrid workflow with logical flow and technical implementation
</Card>

***

## Choosing a Pattern

<CardGroup cols={2}>
  <Card title="Interactive" icon="hand">
    **User Involvement:** Every step

    Best for tasks needing judgment, exploration, Q\&A
  </Card>

  <Card title="Autonomous" icon="robot">
    **User Involvement:** Brief controller, review results

    Best for long-running tasks, clear objectives
  </Card>

  <Card title="Continuous" icon="forward">
    **User Involvement:** None (spec upfront)

    Best for repeatable, proven workflows
  </Card>

  <Card title="Hybrid" icon="shuffle">
    **User Involvement:** Key decisions only

    Best for most real-world workflows
  </Card>
</CardGroup>

<Tip>
  Most workflows end up being **Hybrid** — you want control where it matters and speed everywhere else.
</Tip>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Workflow Controls" icon="sliders" href="./controls">
    Learn how to control execution at runtime
  </Card>

  <Card title="Agent Basics" icon="users" href="../agent-basics">
    Understand multi-agent orchestration
  </Card>
</CardGroup>
