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.The Eight Optional Packages
Per-Package Timeout
Each import runs on its own daemon thread with an individual deadline computed from the global--timeout:
--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:CI/JSON Output
Gate CI onmetadata.broken being empty. A broken install is actionable; a missing install often is not.
broken list in a shell script:
Best Practices
Gate CI on broken, not missing
Gate CI on broken, not missing
Gate CI on
metadata.broken being empty — a broken install is actionable, a missing install often isn’t.Handle slow packages in short-timeout environments
Handle slow packages in short-timeout environments
If a package repeatedly lands in
slow, raise --timeout or skip the entire check with --skip optional_deps in short-timeout environments.Reinstall a broken package
Reinstall a broken package
pip install --force-reinstall <package> clears a broken C-extension cache.Related
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

