Skip to Content
Orchestrator

Orchestrator

The orchestrator is the central coordination layer that manages task execution, agent delegation, and workflow optimization. It uses a DAG-based scheduler to maximize parallelism while respecting task dependencies.

Starting the Orchestrator

In interactive mode, use slash commands to control the orchestrator:

# Run until all tasks complete > /orchestrator run # Run continuously (watches for new tasks) > /orchestrator run --infinite # Stop the orchestrator > /orchestrator stop # Check status > /orchestrator status

Orchestrator Commands

CommandDescription
/orchestrator runRun the orchestrator (processes tasks until complete)
/orchestrator run --infiniteRun continuously, watching for new tasks
/orchestrator generate <description>Generate AGILE tasks from a project description
/orchestrator statusShow current orchestrator status
/orchestrator agentsLive agent monitoring with real-time status
/orchestrator kanbanOpen interactive kanban board
/orchestrator stopStop the running orchestrator
/orchestrator clearClear all tasks for the current project
/orchestrator logs <task-id>Show agent execution logs for a task

DAG-Based Task Management

The orchestrator uses a Directed Acyclic Graph (DAG) to manage task dependencies. This allows it to:

  • Determine execution order - Tasks are processed in dependency order
  • Maximize parallelism - Independent tasks run simultaneously
  • Handle complex chains - Multi-level dependencies are resolved automatically
  • Prevent cycles - Invalid dependency configurations are rejected

DAG Commands

CommandDescription
/orchestrator dagShow DAG status with statistics
/orchestrator dag asciiASCII visualization of task dependencies
/orchestrator dag dotExport DAG in DOT format (for Graphviz)

Managing Dependencies

Use natural language to manage dependencies:

> Add a dependency so task 3 must complete before task 7
> Make the login task depend on the database setup task
> Remove the dependency between tasks 2 and 5
> Show me which tasks are ready to start

Parallel Execution

The orchestrator can run multiple agents in parallel. Configure parallelism in your config:

[orchestrator] max_parallel_agents = 4 # Number of agents that can run simultaneously

Each parallel agent can work in its own isolated environment:

  • Git Worktrees - Separate working directories for each branch
  • Container Sandboxes - Podman containers with resource limits

Generating Tasks

The orchestrator can generate AGILE tasks from a project description:

> /orchestrator generate "Build a REST API for user management with CRUD operations"

Agent Monitoring

View live agent status:

> /orchestrator agents

This shows:

  • Which agents are currently active
  • What task each agent is working on
  • Real-time progress and status updates

Viewing Logs

Check execution logs for any task:

> /orchestrator logs 5

This shows the complete agent execution history for the specified task.

Execution Modes

Standard Mode

Processes all pending tasks until the queue is empty:

> /orchestrator run

The orchestrator will:

  1. Query the DAG for ready tasks
  2. Assign tasks to available agents
  3. Process until all tasks are done or blocked
  4. Stop automatically

Infinite Mode

Runs continuously, picking up new tasks as they’re added:

> /orchestrator run --infinite

The orchestrator will:

  1. Process all ready tasks
  2. Wait for new tasks to be added
  3. Continue indefinitely until stopped

Stop with:

> /orchestrator stop

Workflow Example

# Initialize the project > /init # Generate tasks from a description > /orchestrator generate "Add user authentication with login, logout, and password reset" # View the generated tasks > /orchestrator kanban # Adjust dependencies if needed > Make sure password reset depends on login being complete # Start processing > /orchestrator run # Monitor agent progress > /orchestrator agents # View specific task logs > /orchestrator logs 3 # After completion, view results > /orchestrator status

Configuration

Orchestrator settings in your config file:

[orchestrator] max_parallel_agents = 1 # Number of parallel agents use_worktrees = false # Enable git worktrees worktrees_dir = ".worktrees" # Worktrees directory cleanup_worktrees_on_complete = false # Auto-cleanup

See Configuration for all options.

The orchestrator includes self-healing recovery—it automatically detects and recovers from orphaned tasks, stale executions, and other failure scenarios.

Last updated on