praisonai invocation starts in milliseconds regardless of how many commands exist.
Quick Start
Run a prompt directly
No sub-command is needed — and no sub-command modules load:The CLI equivalent is identical in startup cost:
How It Works
PraisonAI keeps a static map of command names (_COMMAND_GROUPS in praisonai/cli/app.py). When you run praisonai chat, the CLI checks that map and imports only the chat module. All other ~77 modules are never touched.
Best Practices
You don't have to opt in
You don't have to opt in
Lazy command dispatch is always on — no flag, no environment variable. Every
praisonai invocation benefits automatically.Adding a new sub-command
Adding a new sub-command
Add an entry to Without this entry,
_COMMAND_GROUPS in praisonai/cli/app.py:praisonai --help won’t list your command and dispatch won’t reach it.When things go wrong
When things go wrong
Run the built-in diagnostic to check your CLI setup:
Related
Lazy Imports & Fast Startup
SDK-side lazy imports for litellm, chromadb, and mem0 — a different but complementary optimization
Performance Benchmarks
Measured startup times and memory usage across PraisonAI versions

