praisonai doctor runtime detects legacy cli_backend fields in your agent YAML and migrates them to the new models.default.runtime field.
Quick Start
Apply fix with backup
Apply the migration and create a timestamped backup:A backup is created at
agents.backup.20240115_143022.yaml alongside your original file.What Gets Migrated
Thecli_backend field at the top level and inside roles.<role_name> is migrated to models.default.runtime.
- Before
- After
Legacy cli_backend value | Migrated runtime value |
|---|---|
claude-code | claude-code |
openai-gpt | openai-gpt |
anthropic | anthropic |
gemini | gemini |
| any other value | preserved as-is |
How It Works
Flags Reference
| Flag | Default | Purpose |
|---|---|---|
--file, -f TEXT | auto-detect agents.yaml/agents.yml/config.yaml/config.yml in cwd | Config file to check |
--fix | False | Enable migration mode |
--dry-run / --execute | --dry-run | Preview changes vs apply changes |
--team TEXT | — | Team YAML file to validate |
--workflow TEXT | — | Workflow YAML file to validate |
--json | False | JSON output |
--deep | False | Enable deeper probes |
- Without
--fix: ReportsWARNwith count of legacy configs found. - With
--fix(dry-run): Shows a preview diff; suggests--fix --execute. - With
--fix --execute: Writes migrated YAML and leaves a<stem>.backup.<YYYYMMDD_HHMMSS>.yamlbackup. - If
--fileis specified but file does not exist:ERROR, severity HIGH. - If no config file is found:
SKIP.
Writing a Custom Rule
ImplementDoctorContractProtocol to add your own migration rules:
Plugin Registration via Entry Point
For distribution as a package, register via thepraisonai.doctor_contracts entry-point group:
get_rules() is called — no manual register_rule() needed.
Finding Dataclass
Programmatic API
Best Practices
Always preview with --dry-run first
Always preview with --dry-run first
Run
praisonai doctor runtime --fix (default dry-run) before --execute. Verify the diff is what you expect — especially for complex YAML with deeply nested roles.Commit your YAML before running --execute
Commit your YAML before running --execute
Even though
--execute creates a backup, commit or stage your agents.yaml in version control before migrating. This gives you a clean diff to review in your VCS history.Keep the backup files until you've verified
Keep the backup files until you've verified
The
.backup.<timestamp>.yaml file is left next to the migrated file. Delete it once you’ve confirmed the migrated config works as expected.Prefer entry-point registration for reusable rules
Prefer entry-point registration for reusable rules
Use
pyproject.toml entry-points rather than register_rule() in application code. Entry-point rules are discoverable by any consumer of the praisonaiagents.runtime package without requiring code changes.Related
Doctor CLI
Full reference for praisonai doctor health checks and subcommands
CLI Backend Protocol
The cli_backend field and CLI backend registration system

