CLI Dashboard

When you run python -m ape config.toml, APE launches a full-screen terminal dashboard built with Rich. It refreshes 8 times per second and gives you a live view of the run without cluttering stdout with log lines.

Dashboard layout

The screen is split into three panels stacked vertically:

┌─────────────────────────────────────────────────┐
│                  Run Progress                   │
├───────────────────────┬─────────────────────────┤
│        Solvers        │        Checkers         │
├───────────────────────┴─────────────────────────┤
│                  Latest Logs                    │
└─────────────────────────────────────────────────┘

Run Progress

A progress bar showing how many data items have been fully processed:

⠋ Processing data ━━━━━━━━━━━━━━━  42%  42/100  0:01:23

The counter advances after every item's complete OutputBatch (all runs_per_data sessions + checks) has been saved to disk.

Workers

Two side-by-side tables — one for solver workers, one for checker workers.

Solvers table

Column Description
Solver Worker index (0-based)
State Current phase (see Solver states)
Data ID of the item being processed
Runs completed current_run / runs_per_data
Session length Number of LLM steps taken so far this session

Checkers table

Column Description
Checker Worker index (0-based)
State idle or busy
Data ID of the item being verified
From solver Index of the solver worker that submitted this check

Latest Logs

A scrolling log tail showing the most recent entries from the run, newest first. Each row has a timestamp, log level, logger name, and message. The number of visible rows scales with terminal height (between 6 and 30 rows). The in-memory buffer holds up to 50 entries; the full log is written to run.log (see Log files).

Solver states

State Meaning
idle Worker is waiting for the next data item
solving LLM call in progress
awaiting_tool Tool calls submitted, waiting for results
awaiting_check Solution produced, waiting for checker to finish

Log files

The CLI writes two log files during a run:

  • run.log — all log output from the run at the configured level, one line per entry (asctime name level message).
  • sessions.log and sessions.jsonl — per-session transcripts. The .log file is human-readable; the .jsonl sibling has the same data in JSON Lines format for automated post-processing.

Both paths default to output/ relative to the working directory from which the command is run and can be overridden via the [cli] config section.

Configuration

The [cli] section in the TOML file controls the dashboard and its logging:

[cli]
enabled = true                          # set to false to run headless
log_file = "output/run.log"
session_log_file = "output/sessions.log"
log_level = "INFO"                      # name or integer

All keys are optional; the defaults shown above are used when the section is absent.

Running headless

Set enabled = false to skip the dashboard entirely — useful in CI or when piping output elsewhere. The run proceeds normally and all output files are still written; only the live screen is suppressed.

[cli]
enabled = false