Goa’s workflow system enables multi-stage, multi-agent collaboration where different AI agents work together as a team to complete complex tasks.
A workflow is a sequence of stages, each assigned to a different agent role (planner, coder, reviewer). Agents communicate via a shared AgentBus and advance through stages by calling the workflows:next tool.
Workflow "Implement Feature"
│
├── Stage 1: Plan → planner agent
├── Stage 2: Implement → coder agent
└── Stage 3: Review → reviewer agent
All agents are registered on the same AgentBus and can message each other at any time using the send_message tool.
/workflows:listLists all available workflows with box-drawn formatting:
┌─ Implement Feature ─────────────────────────────────────────────┐
│ Plan, implement, and review a feature │
│ 3 stages: Plan → Implement → Review │
│ Run: /workflows:run:implement-feature │
└─────────────────────────────────────────────────────────────────┘
/workflows:show <name>Shows detailed information about a workflow, including stage prompts.
/workflows:run:<name> [input]Runs a workflow. Supports colon syntax for tab completion:
/workflows:run:implement-feature "Add OAuth login"
/workflows:implement-feature "Add OAuth login" (shorthand)
workflows:next, the orchestrator:
send_message/receive_message tools to communicate| Tool | Planner | Coder | Reviewer |
|---|---|---|---|
send_message |
✅ | ✅ | ✅ |
receive_message |
✅ | ✅ | ✅ |
workflows:next |
✅ | ✅ | ✅ |
read |
❌ | ✅ | ✅ |
edit |
❌ | ✅ | ❌ |
bash |
❌ | ✅ | ❌ |
User: /workflows:run:implement-feature "Build a fire animation"
[system] Starting workflow: Implement Feature
Stage 1 (planner):
- Reads the user request
- Asks clarification questions ONE at a time:
Summary: <what's understood>
Question: <one question>
Options: <possible answers>
- Creates a detailed plan
- Calls workflows:next
Stage 2 (coder):
- Reads the plan from conversation history
- Can message planner for clarification
- Implements using tools (write, bash, etc.)
- Calls workflows:next
Stage 3 (reviewer):
- Reviews the implementation
- Can request fixes from coder via send_message
- Calls workflows:next → workflow complete
Workflows are defined in the workflows/ directory at the project root:
workflows/
implement-feature/
definition.yaml # Workflow stages configuration
plan.md # Planner stage prompt
implement.md # Coder stage prompt
review.md # Reviewer stage prompt
review-changes/
definition.yaml
review.md
definition.yaml Formatid: implement-feature
name: Implement Feature
description: Plan, implement, and review a feature
stages:
- id: plan
name: Plan
agent: planner
prompt: plan.md # Relative to workflow dir, or prompts:// URI
- id: implement
name: Implement
agent: coder
prompt: implement.md
- id: review
name: Review
agent: reviewer
prompt: review.md
Prompts are resolved in this order:
prompts:// URI — resolved from the shared prompt registryRelative paths take precedence over prompts:// URIs, allowing workflows to override shared prompts.
| Method | Description |
|---|---|
NewPipelineRun(pipeline) |
Create a new run with all stages pending |
NextStage() |
Advance to the next stage, mark previous as complete |
CompleteStage(id) |
Mark a specific stage as completed |
Cancel() |
Cancel the run |
StatusSnapshot() |
Thread-safe snapshot of current state |
| Workflow | Stages | Description |
|---|---|---|
implement-feature |
Plan → Implement → Review | Full feature implementation pipeline |
review-changes |
Review | Quick review of uncommitted changes |
workflows/<name>/definition.yaml file/workflows:run:<name>Workflows can also be loaded from ~/.goa/workflows/<name>/definition.yaml for user-level custom workflows.