Skip to content

Tasks

A Task is the fundamental unit of work in Red Station. It represents a clear objective that an Agent or Workflow must execute.

Task Lifecycle

Every task moves through a defined state machine:

  1. Pending: Task created but not started.
  2. Planning: Agent is analyzing requirements and generating a plan.
  3. Planned: Plan generated and waiting for approval.
  4. Approved: Plan approved by user/policy.
  5. Running: Workflow or Agent is actively executing steps.
  6. Reviewing: Work finished, awaiting human verification/merge.
  7. Completed: Work is done and verified.
  8. Failed: Execution encountered an unrecoverable error.
  9. Cancelled: Terminated by user or policy.

Creating Tasks

1. Ad-Hoc (CLI)

Quickly run a task without saving it permanently.

bash
# Direct run
pilot agent run coder --task "Refactor login.py"

2. Local Task Files

Define complex tasks in YAML within your project (.pilot/tasks/). This allows for version control and team collaboration on task definitions.

File: .pilot/tasks/TASK-001.yaml

yaml
task:
  id: TASK-001
  title: Implement User Auth
  description: |
    Create a JWT-based authentication system.
    Must support email/password login.
  acceptance_criteria:
    - Endpoints created for /login and /register
    - Password hashed with Argon2
    - JWT token expires in 1 hour

To run this task:

bash
# Sync local files to the DB
pilot task sync

# Run the task
pilot task run TASK-001 --workflow feature-dev

3. Importing Sources

Red Station can pull tasks directly from your issue tracker.

Configure Source:

bash
pilot config source github --repo my-org/my-project --token $GITHUB_TOKEN

Import Task:

bash
# Import Issue #42 as a Pilot Task
pilot task import 42 --source github

4. Other Sources

Red Station also supports:

  • Jira
  • Linear
  • GitLab

To integrate a proprietary or unsupported system (like Azure DevOps or Trello), see Custom Sources.

Managing Tasks

bash
# List all active tasks
pilot task list

# Generate a plan without running
pilot task plan TASK-001

# View task details and history
pilot task show TASK-001

Released under the MIT License.