Skip to content

prx doctor

Run comprehensive diagnostics on the PRX installation. Checks configuration validity, daemon connectivity, channel health, provider API access, and model availability.

Usage

bash
prx doctor [SUBCOMMAND] [OPTIONS]

Options

FlagShortDefaultDescription
--config-c~/.config/prx/config.tomlConfig file path
--json-jfalseOutput as JSON
--verbose-vfalseShow detailed check output
--fixfalseAttempt to auto-fix common issues

Subcommands

prx doctor (no subcommand)

Run all diagnostic checks.

bash
prx doctor

Example output:

 PRX Doctor
 ══════════════════════════════════════════

 Configuration
   Config file exists ............... OK
   Config file valid ................ OK
   Data directory writable .......... OK

 Daemon
   Daemon running ................... OK (PID 12345)
   Gateway reachable ................ OK (127.0.0.1:3120)
   Uptime ........................... 3d 14h 22m

 Providers
   anthropic ....................... OK (claude-sonnet-4-20250514)
   ollama .......................... OK (llama3, 2 models)
   openai .......................... WARN (key not configured)

 Channels
   telegram-main ................... OK (connected)
   discord-dev ..................... OK (connected)
   slack-team ...................... FAIL (auth error)

 Memory
   Backend (sqlite) ................ OK
   Entries ......................... 1,247

 Evolution
   Engine .......................... OK (running)
   Last L1 cycle ................... 2h ago

 Summary: 10 passed, 1 warning, 1 failure

prx doctor models

Check model availability across all configured providers.

bash
prx doctor models [OPTIONS]
FlagShortDefaultDescription
--provider-PallCheck a specific provider only
bash
# Check all provider models
prx doctor models

# Check only Ollama models
prx doctor models --provider ollama

Example output:

 Provider     Model                        Status    Latency
 anthropic    claude-sonnet-4-20250514              OK        245ms
 anthropic    claude-haiku-4-20250514               OK        189ms
 ollama       llama3                       OK        12ms
 ollama       codellama                    OK        15ms
 openai       gpt-4o                       SKIP (no key)

Diagnostic Checks

The doctor runs the following checks:

CategoryCheckDescription
ConfigFile existsConfig file is present at the expected path
ConfigValid syntaxTOML parses without errors
ConfigSchema validAll values match expected types and ranges
DaemonProcess runningDaemon PID is alive
DaemonGateway reachableHTTP health endpoint responds
ProvidersAPI key setRequired API keys are configured
ProvidersAPI reachableProvider API responds to a test request
ChannelsToken validChannel bot tokens are accepted
ChannelsConnectedChannel is actively connected
MemoryBackend availableMemory store is accessible
EvolutionEngine runningEvolution engine is active

Auto-Fix

The --fix flag attempts to resolve common issues automatically:

  • Creates missing data directories
  • Refreshes expired OAuth tokens
  • Restarts disconnected channels
  • Removes invalid cache entries
bash
prx doctor --fix

Released under the Apache-2.0 License.