mix exagent.doctor (ExAgent v3.0.0)

View Source

Inspect the local model catalogue, transport, optional dependencies and host runtime.

Stability — Stable.

mix exagent.doctor --model openai:gpt-4o --profile auto
mix exagent.doctor --model test --json

The task leaves the host stopped and never calls a provider. To inspect running processes, call Mix.Tasks.Exagent.Doctor.run(["--json"]) in an already running Mix application. For the selected model, an optional model.lifecycle warning reports retirement or a scheduled retirement date from the installed LLMDB catalogue. The required json.jason_decimal check exercises Jason's installed Decimal decoder. The optional model.catalogue row reports the installed LLMDB version and local snapshot generation date. It warns when the snapshot is older than --catalogue-max-age-days (default 30). Set :catalogue_max_age_days in the host configuration for a persistent threshold. A model.provider_redirect warning names a known provider-side redirect of the selected model. Pass --files-api or --stored-responses to report the provider's separate retention policy for those features. Set :files_api or :stored_responses to true in the host configuration for persistent checks.

The optional model.service_tier_retirement warning checks --service-tier (service_tier: in host configuration) for the affected OpenAI models. Doctor uses --base-url (base_url: in configuration) or the effective ReqLLM endpoint to identify OpenAI EU data residency. Declare per-host targets under config :my_app, :exagent_doctor, using the same :store descriptor, :conversations supervisor name and :mcp_finch child options as the application. Compile the host before running the CLI. An optional --check-store checks the snapshot, continuation and admission receipt schemas through the configured Repo. It also checks the segment columns and cascading reference when segments: true. The CLI temporarily starts an inactive PostgreSQL Repo for --check-store or --check-recovery. These checks cover the configured descriptor without reading conversation bodies. Doctor reports the pending unified migration, the Store's write format level and the installed binary's reader level. For C7, --check-run-headers also compares stored headers with their journals across namespaces. This check is read-only and its cost depends on the journal sizes. For supervised PostgreSQL recovery, --check-recovery verifies the recovery index and that claimed runs have a lease projection on the configured table. It reads headers and lease keys without loading journal bodies. With a scoped :store or a list of :catalog_scopes, and a :catalog, --check-catalog reads run headers and warns about missing versions. --check-catalog-lock verifies the deployment lock for the configured :exagent_catalog_lock target without starting the host. --check-mcp-lock verifies canonical files under priv/exagent/mcp/ and requires a lock for each endpoint in :exagent_mcp_lock. This check reads local files without connecting or invoking endpoint callbacks. Configure :jobs_repo with the Repo used by Jobs.Durable. The read-only --check-jobs verifies the admission table on that Repo's search path. For shared PostgreSQL quota, configure :quota_repo with the Repo used by the adapter. --check-quota checks the quota tables, columns and indexes, including the settled column's nullability and default, without reading any quota records. See the troubleshooting guide.

After printing a report with a missing required check, run/1 raises Mix.Error. The CLI exits nonzero in that case. Optional packages and unverified runtime checks are informational. JSON reports have schema version 1.