Mada Router stores its local runtime data under the macOS Application Support directory:
${HOME}/Library/Application Support/Mada Router/
Token-usage aggregates are stored in SQLite:
${HOME}/Library/Application Support/Mada Router/state/usage.sqlite3
usage.sqlite3 contains token-usage data. usage_events retains per-request detail for 31 days; usage_totals retains lifetime aggregate totals. It uses SQLite WAL mode, so current data can also be present in usage.sqlite3-wal and usage.sqlite3-shm. Do not copy only the main database file and assume it is a complete current snapshot.
Activity records are memory-only. Each Agent keeps the latest 50 model requests and 50 auxiliary requests for the current application session; the application neither loads nor writes Activity history at startup or shutdown. Diagnose is controlled independently for each Agent. With Diagnose disabled, Activity still records metadata, route destination, HTTP outcome, and applicable token totals, but skips diagnostic payload capture.
Export is the only Activity write-to-disk operation. User-initiated exports are written beneath:
${HOME}/Downloads/madarouter-request-log/<agent>/
Exports contain redacted diagnostics only when that request started with Diagnose enabled. Treat every export as sensitive even though known credentials and account identifiers are redacted during capture.
The path definitions are implemented in crates/router-runtime/src/config_manager.rs; Usage persistence is implemented in crates/router-runtime/src/usage.rs.