Defaults live in the configuration schema. With nothing set, QueryPilot runs as a fully local,
standalone install with every optional integration off.
Configuration file: set QUERYPILOT_CONFIG_FILE to a YAML file whose keys mirror the setting
paths below (for example agent.intervals.queryStatsMs).
Environment variables override the file. The mapping is explicit: only the variables listed
here are read, and a variable that cannot be parsed stops startup with a message naming it.
Booleans accept true/false, 1/0, yes/no, on/off; lists are comma-separated.
Secrets are read only from the environment, never from the file.
An invalid configuration fails startup loudly instead of running half-applied. Contradictions are
rejected too, for example an enabled webhook exporter without an endpoint, an openai-compatible AI
provider without ai.endpoint, or connection-utilization thresholds that do not increase.
Roadmap marks settings that are accepted and validated but have no
effect yet, because the feature behind them is not implemented.
These values are held by the API and delivered to agents when they register. Restart an agent to pick
up changed intervals or limits. Plan-capture settings are the exception: they are also delivered on
every heartbeat.
Variable
Setting
Default
Description
QUERYPILOT_AGENT_QUERY_STATS_INTERVAL_MS
agent.intervals.queryStatsMs
15000
pg_stat_statements collection.
QUERYPILOT_AGENT_ACTIVITY_INTERVAL_MS
agent.intervals.activityMs
5000
pg_stat_activity collection.
QUERYPILOT_AGENT_LOCKS_INTERVAL_MS
agent.intervals.locksMs
5000
pg_locks collection.
QUERYPILOT_AGENT_CONNECTIONS_INTERVAL_MS
agent.intervals.connectionsMs
10000
Connection counts.
QUERYPILOT_AGENT_TABLE_STATS_INTERVAL_MS
agent.intervals.tableStatsMs
60000
pg_stat_user_tables collection.
QUERYPILOT_AGENT_INDEX_STATS_INTERVAL_MS
agent.intervals.indexStatsMs
60000
pg_stat_user_indexes collection.
QUERYPILOT_AGENT_HEARTBEAT_INTERVAL_MS
agent.intervals.heartbeatMs
30000
Heartbeat. An agent silent for 3 intervals is shown OFFLINE.
QUERYPILOT_AGENT_STATEMENT_TIMEOUT_MS
agent.statementTimeoutMs
5000
statement_timeout on the agent’s sessions on the observed database.
QUERYPILOT_AGENT_REQUEST_TIMEOUT_MS
agent.requestTimeoutMs
10000
Agent → API request timeout.
QUERYPILOT_AGENT_MAX_QUEUE_SIZE
agent.maxQueueSize
10000
Rows the agent buffers in memory during an API outage (oldest dropped first).
QUERYPILOT_AGENT_MAX_BATCH_SIZE
agent.maxBatchSize
1000
Roadmap Accepted but not applied yet; agents currently cap a batch at 5,000 rows.
Switch one rule off by its id, for example analysis.rules.unused-index.enabled: false.
Rule thresholds are file-only (analysis.thresholds.*), so that “is this bad?” stays an operator
decision. connectionUtilization levels must increase from info to critical, or startup fails.
See the findings guide for what each rule does.