Skip to main content
praisonai doctor env --deep probes eight optional packages in parallel and reports each as available, missing, broken, or slow — no single hanging import can stall the check.

How It Works

Quick Start

1

Check before wiring up knowledge features

An agent that uses chromadb for RAG will fail at runtime if the package is broken. Run the check first:
2

CI/CD — capture the JSON report

Export the structured result so CI can gate on specific buckets:
The metadata object contains one list per bucket:

How It Works

The Four Outcome Buckets

Each optional package lands in exactly one bucket per run:
A broken result is distinct from missing: the package is installed but its import fails with a non-ImportError (e.g. a corrupted C extension). The check surfaces this as WARN rather than masking it as “not installed” — which would misleadingly tell users to install a package that is already there.

Broken praisonaiagents Install Surfaces the Real Import Error

Accessing anything exported through praisonai (for example from praisonai import Agent) points straight at a broken dependency instead of hiding it. When the praisonaiagents package is installed but fails to import — typically a transitive dependency version conflict — the error now reads:
The underlying exception is chained via __cause__ and cached, so the failing import is not retried on every lookup. Previously the same situation surfaced as a plain AttributeError that hid the real root cause; now the message points straight at the broken dependency.
A genuinely missing package (ModuleNotFoundError) still raises the ordinary AttributeError — only an installed-but-broken package triggers the chained diagnostic.

The Eight Optional Packages

Per-Package Timeout

Each import runs on its own daemon thread with an individual deadline computed from the global --timeout:
With the default --timeout 10, each package gets 2.5 seconds. The overall aggregate deadline is max(per_package_timeout, config.timeout * 0.8) — the check never exceeds 80% of the engine budget.

Why Daemon Threads

Daemon threads (rather than a ThreadPoolExecutor) are used deliberately: a pool’s worker threads are joined by its internal atexit handler at interpreter shutdown even after shutdown(wait=False), so a truly hanging import would still stall CLI exit. Daemon threads are abandoned on exit, so a hanging import can never block the process from terminating.

Configuration Options


Common Patterns

Gate CI on broken packages only:
Raise per-package timeout for slow environments:
Run only the optional deps check:

CI/JSON Output

Gate CI on metadata.broken being empty. A broken install is actionable; a missing install often is not.
Check the broken list in a shell script:

Best Practices

Gate CI on metadata.broken being empty — a broken install is actionable, a missing install often isn’t.
If a package repeatedly lands in slow, raise --timeout or skip the entire check with --skip optional_deps in short-timeout environments.
pip install --force-reinstall <package> clears a broken C-extension cache.

Doctor CLI

Full reference for praisonai doctor health checks and subcommands

Doctor CLI Reference

CLI command reference for all doctor subcommands

Runtime Config Migration

Detect and migrate legacy cli_backend fields with praisonai doctor runtime

Vector Store

chromadb-backed vector storage for knowledge and RAG features