AgentKit
DocsKitsCLI ReferenceDesktop App
BetaYou are reading docs for the beta channel (2.13.0-beta.20). Features may change before the next stable release.Switch to stable →

ak analytics

ak analytics status

Inspect the local analytics lifecycle, serving mode, freshness, and aggregate count without creating analytics state.

Use ak analytics status before changing the local analytics index or when an analytics-backed view falls back to live collection.

Usage

ak analytics status

The command accepts no positional arguments and has no command-specific flags. Shared flags are described in CLI conventions.

Read the status

ak analytics status
ak analytics status --json --no-interactive

Human output is one line containing the serving mode and health. JSON success writes one envelope to stdout:

schema_version: 1
kind: analytics.status
data.schema_version: 1
data.enabled: boolean
data.serving_mode: index | live
data.health: string
data.will_auto_sync: boolean
data.staleness_reason: optional string
data.fact_count: integer
data.last_successful_at: optional timestamp

serving_mode=index means the current generation passed compatibility and validity checks. serving_mode=live means readers must use authoritative local sources. A serving index can still have a staleness_reason when sources have advanced since publication; that reason labels currency without invalidating the already published facts.

Common lifecycle health values include uninitialized, disabled, deleted, and ready. Store failures can report states such as missing, stale, busy, newer-schema, foreign-database, migration-error, corruption, permission, or disk-full.

will_auto_sync describes whether an external dashboard or desktop reconciler is allowed to act on the state. This CLI command starts no scheduler and leaves no background process.

Read-only and privacy boundaries

Status reads ~/.agentkit/analytics-state.json and, only when enabled, the existing private database at ~/.agentkit/analytics/analytics.db. AGENTKIT_HOME changes the base.

It does not create the AgentKit home, marker, directory, database, lease, generation, or recovery snapshot. It does not scan session contents, refresh the index, contact the network, or use stdin. --yes has no effect.

The response deliberately excludes paths, source names, HMAC values, and database-driver diagnostics.

Exit behavior

ExitMeaning
0Status was returned, including unhealthy or disabled states.
1Home resolution or a status read failed, or a positional argument was supplied.
2A flag was invalid.

Lifecycle/status failures with --json emit a versioned error envelope on stderr with schema_version, error, error_code, and exit_code. Flag-parse, argument-validation, and final output-render failures can fall outside that path and remain plain text or bodyless.

On macOS, the CLI-wide first-launch guard can also write ~/.agentkit/.first-run-darwin and print a one-time hint to stderr before this command runs.