Skip to content

System Diagnostics (doctor)

The evonic doctor command runs a comprehensive health check across the entire Evonic system. It checks environment, configuration, connections, services, files, agents, skills, and LLM providers — all from the terminal.

Run system diagnostics and health checks.

Terminal window
evonic doctor [--quick]
FlagRequiredDescription
--quickNoSkip slow checks (LLM provider connection tests)

Example:

Terminal window
# Full diagnostics
evonic doctor
# Quick diagnostics (skip LLM provider tests)
evonic doctor --quick

The doctor command runs seven categories of checks in sequence:

Validates the runtime environment:

CheckDetails
Python versionMust be 3.9+. Warns if older.
OS informationDisplays OS, release, and architecture.
Environment variablesChecks presence of PORT, HOST, SECRET_KEY, DEBUG, ADMIN_PASSWORD_HASH, SANDBOX_NETWORK, LOG_FULL_THINKING, LOG_FULL_RESPONSE. Secret values are masked (***).
DependenciesVerifies flask, requests, and anthropic are importable with their versions.
Database driverConfirms sqlite3 is available.

Validates configuration files:

CheckDetails
.env fileChecks existence, counts active (non-comment) variables. Warns if empty.
.env encodingVerifies the file is valid UTF-8.
config.pyImports and checks for required attributes: BASE_DIR, DB_PATH, PORT, HOST, SECRET_KEY.

Tests connectivity to infrastructure:

CheckDetails
DatabaseConnects to SQLite database and runs SELECT 1.
RedisIf REDIS_URL is configured, pings the Redis server. Skipped if not configured.
InternetHTTP GET to https://httpbin.org/status/200 with 5-second timeout.

Checks the Evonic server itself (only if the server is running):

CheckDetails
Health endpointSends HTTP GET to http://localhost:{PORT}/api/health and verifies HTTP 200.
Port bindingAttempts a TCP connection to localhost:{PORT}.

If the server is not running, live service checks are skipped with an informational message.

Verifies existence and permissions of important directories:

Directories checked: logs/, data/, plugins/, skills/, agents/, skillsets/, templates/, db/, run/.

Each directory is checked for:

  • Existence — warns if missing
  • Read/write access — reports rw, read-only, or no read access

Validates agent and skill configurations from the database:

Agents:

  • Counts total, enabled, and disabled agents
  • For each agent: shows enabled/disabled status, assigned model, tool count, skill count
  • Warns if an enabled agent has no model assigned

Skills:

  • Lists all installed skills via SkillsManager
  • Counts total, enabled, and disabled skills
  • For each skill: shows enabled/disabled status and tool count
  • Scans skills/ directory for corrupted skill.json manifest files

Tests connectivity to each configured LLM provider. Skipped in --quick mode.

For every LLM model with a base_url:

  • Sends HTTP GET to {base_url}/models
  • Uses the same test-connection logic as the web UI (routes/models.py api_test_model)
  • Reports success (HTTP 200), authentication errors (HTTP 401/403), or connection failures

No models to test? An informational message is shown.

Output is color-coded for readability:

SymbolColorMeaning
GreenCheck passed
RedCheck failed — needs attention
YellowWarning — non-critical issue
BlueInformational — no pass/fail judgment

Each section is displayed with a cyan header banner:

══ 1. Environment Check ══
✓ Python 3.11.9
ℹ OS: Linux 6.8.0 (x86_64)
...

At the end, a summary table shows:

Total checks: 25
✓ Passed: 20
⚠ Warnings: 3
✗ Failed: 2

Followed by an overall verdict:

ResultMessage
No failures”All checks passed. System is healthy!” (exit code 0)
Warnings, no failures”System is operational with minor warnings.” (exit code 0)
Failures present”System has issues that need attention.” (exit code 1)
CodeMeaning
0All checks passed, or only warnings (no failures)
1One or more checks failed

Use exit codes in scripts to automate health monitoring:

#!/bin/bash
if evonic doctor --quick; then
echo "System healthy"
else
echo "System needs attention!"
# trigger alert, notification, etc.
fi
  • Pure CLI — no plugin, no API endpoint, no web UI. Runs entirely in the terminal.
  • Reuses existing logic — LLM connection tests use the same api_test_model pattern from routes/models.py (HTTP GET to {base_url}/models).
  • No external dependencies beyond what Evonic already requires.
  • Located in cli/commands.py as doctor_command(), dispatched from cli/__main__.py.