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

ak agents model

ak agents model explain

Walk the precedence chain for one Agent's model, mark the deciding layer, and say what to do about a pending or drifted file.

Use ak agents model explain when you need to know why an Agent runs on a given model, or what to do about a file that is not in sync.

Usage

ak agents model explain <agent> --runtime <runtime> [--project <dir>]

Exactly one Agent name is required. The command is read-only, never prompts, and performs no network work.

FlagDefaultDescription
--runtime <runtime>requiredOne of claude-code, codex, cursor, omp, pi.
--project <dir>nearest project config, else the current directoryProject whose installs and .agentkit/config.yaml apply.

Precedence chain

For each installed file the command lists, highest first: project agent, user agent, project tier, user tier, and adapter default. For an OMP Agent whose model resolved to an @role alias, project and user role bindings are added before the adapter default. A global install never reads project config, so its project layers are omitted. The layer that decides the model is marked.

Output

Human stdout prints, per file, the install scope, kit, path, status, the model the file carries, and the model config resolves to. Layers follow, one per line, with * on the used layer, (unset) for an unset layer, and the config key in brackets. note: lines give guidance:

  • pending: ak agents model apply or a kit refresh updates the file.
  • drift: ak agents model adopt records the edit in config; ak agents model apply --yes replaces it.
  • not-materialized: a kit refresh recreates the file.
  • A file with no model means the runtime chooses, usually the parent session's model.
  • Runtime limitations (OMP, Pi) and OMP role resolution are noted.

JSON success uses:

schema_version: 1
kind: agents.model.explain
data.agents[]   (status fields plus layers[] and notes?)
data.warnings?

Each layers[] entry has layer, key?, value, set, and used.

Exit behavior

ExitMeaning
0At least one installed file of the Agent was explained.
1A local runtime error occurred.
2Wrong argument count, invalid flags, an unsupported runtime, or a missing --project directory.
5The Agent is not installed in the runtime.