CodyCody

Authoring workflows

Execution model

A workflow is a directed graph run cooperatively by the engine and an agent. Design for that split — the engine decides what happens next, the agent does the work.

A workflow is a directed graph of steps joined by transitions. It is executed cooperatively between the engine and an executing agent — an LLM coding agent connected over MCP.

  1. The agent calls ccw_start. The engine runs automatically through every engine-executed step until it reaches an agent-facing step, then returns that step's instruction.

  2. The agent does the work and calls ccw_continue with a StepResult:

    { "status": "success", "summary": "…", "output": {  }, "branchLabel": "…" }
  3. The engine records the result under the step's name, picks the next transition, runs through any engine-executed steps, and returns the next agent-facing instruction. This repeats until an end or stop step.

Who runs which step

Agent-facing — execution pauses, the agent acts Engine-executed — run instantly, no agent involved
instruction, decision, shell, review, gate start, end, stop, set_variable, create_task_list, get_next_task, complete_task, sub_workflow, execute_task_list

The consequence for an author: prompts in instruction and decision steps are read by an LLM at runtime. Write them like good agent prompts — state the goal, the exact inputs via templates, and exactly what to report back: what goes in output, and which branchLabel values are allowed.

What a later step can see

Only what was reported. A step's result is stored under variables.steps["<step name>"] and reached in templates as {{steps.<step name>.output}}. If a step does work and reports nothing in output, the next step has nothing to read. Every prompt should end with an explicit contract for output.

Where authoring happens

The engine exposes two servers. Workflows are created, validated and published against the API on port 3001 — through the visual designer on every tier, or, from the Team tier and up, by a coding agent calling the API directly with its agent token. The API refuses every request without a credential; see authoring over the API.

The MCP server on port 3002 is execution only. Nothing can be authored there.

Next

Step types — the fourteen kinds of step and what each one's config means.