veirox task

Manage scheduled and triggered tasks — the agent's recurring work unit.

Synopsis

veirox task <subcommand> [args] [flags]

Description

A task is a named, idempotent unit of agent work. Tasks can fire on a cron schedule, on an inbound webhook, on a Slack mention, or be invoked directly via the CLI. Each invocation creates a session with its own streaming transcript, cost, and audit trail.

Use the CLI for CI integration (deterministic triggers with --idempotency-key), bulk operations, and scripting. Use the Console at /console/<org>/tasks for visual editing and run history.

Subcommands

CommandDescription
task listList tasks with optional filters (enabled, search).
task statsAggregate task statistics (count, last-run, success rate).
task info <task-id>Show full task details including schedule, MCP servers, repos.
task newCreate a new task (interactive wizard or flags).
task update <task-id>Update an existing task (rename, change schedule, swap prompt).
task run <task-id>Trigger a task immediately; idempotency-key auto-attached.
task clone <task-id>Duplicate a task as a new task (handy for staging copies).
task delete <task-id>Soft-delete a task. Use --yes to skip confirmation.
task rm-manyBulk soft-delete multiple tasks by id.
task templatesList available task templates (org + global).

task list

List tasks visible to the current project. Filter by enabled state or substring search.

FlagTypeDefaultDescription
--enabledboolIf set, list only enabled tasks (use --enabled=false for disabled).
--searchstringSubstring match against task name + description.
--limitint50Maximum tasks to return (backend caps at 500).
--offsetint0Offset for pagination.
veirox task list --enabled --limit 20
veirox task list --search "deploy"

task run <task-id>

Trigger a task immediately. Creates a new session and returns the session ID (or streams the live transcript if --wait). Every run carries an auto-generated Idempotency-Key so safe to retry from CI.

FlagTypeDefaultDescription
--idempotency-keystringauto-UUIDOverride the auto-generated key. Useful for CI retry loops where you want the second attempt to be deduplicated.
--waitboolfalseBlock until the session completes; stream transcript inline.
veirox task run b1f5b1d4-... --wait
veirox task run b1f5b1d4-... --idempotency-key "$GITHUB_RUN_ID"

task new

Create a new task. Flags are interactive when omitted (TTY only).

FlagTypeDefaultDescription
--namestringTask display name.
--promptstringInline prompt body. Use --prompt-file for files.
--prompt-filestringPath to a file whose contents become the prompt.
--cronstringCron schedule (e.g. 0 9 * * *).
--enabledbooltrueWhether the task is active when created.
veirox task new \
  --name "morning-health-check" \
  --prompt-file ./prompts/health.md \
  --cron "0 9 * * *"

Remaining subcommands (stats, info, update, clone, delete, rm-many, templates) follow the same pattern — flag table + example. See the binary with veirox task <sub> --help for the exact flags shipped in your version.

Examples

List enabled tasks and trigger the first one:

ID=$(veirox task list --enabled --limit 1 -o json | jq -r '.[0].id')
veirox task run "$ID" --wait

Trigger from GitHub Actions with run-id as idempotency key:

# .github/workflows/nightly.yml
- run: |
    veirox task run "$VEIROX_TASK_ID" --idempotency-key "$GITHUB_RUN_ID" --wait
  env:
    VEIROX_API_KEY: <set-in-your-ci-secret-store>

Exit codes

CodeMeaning
0Success.
1Generic error (network, API 5xx).
2Validation error (bad flag, missing required arg).
3Unauthenticated. Run veirox login or set VEIROX_API_KEY.
4Not found (task id doesn't exist in this project).
5Permission denied (your role / API key lacks the scope).

See also