.praisonai/agents/ and .praisonai/commands/ to extend the CLI without writing Python.
The user runs praisonai run --agent researcher; discovery loads custom agents and slash commands from .praisonai/.
How It Works
Quick Start
Skip the boilerplate —
praisonai init scaffolds a working .praisonai/ with a starter agent and command, then read on to customise.How discovery works
| Location | Scope |
|---|---|
~/.praisonai/agents/ / commands/ | User-global |
./.praisonai/agents/ / commands/ | Project (walks up to git root) |
Agent definitions
Files:.praisonai/agents/*.md or *.yaml
| Field | Description |
|---|---|
model | LLM model |
tools | Tool list |
role | Agent role |
goal | Agent goal |
instructions | System instructions |
mode | Coarse permission shorthand: build, read-only, plan, review |
permission | Per-capability allow / deny / ask rules |
| Markdown body | Becomes system_prompt when no instructions field |
Scoping permissions
Three built-in agents (
build, plan, review) are available without any file — see Agent Presets & Modes.mode: to a definition for instant read-only or review scoping:
permission: block:
Command templates
Files:.praisonai/commands/*.md
| Pattern | Behaviour |
|---|---|
$ARGUMENTS | Replaced with user input |
@path/to/file | Inlines file contents |
!`cmd` | Opt-in live shell substitution — runs cmd and inlines stdout |
$(shell cmd) | Escaped — not executed (safety) |
Opt-in live shell substitution
!`cmd` is disabled by default. Enable with any one of:
PRAISONAI_ALLOW_SHELL=trueenvironment variablecommands.allow_shell: truein.praisonai/config.yaml- Per-command frontmatter
allow_shell: true
ShellSubstitutionError. !`cmd` inside $ARGUMENTS or @file contents is never executed — only markers in the original template run.
Agent vs command vs skill vs rule
Slash commands
Custom commands auto-register in interactive mode asCommandKind.CUSTOM. Disable with SlashCommandHandler(discover_custom=False).
Custom commands appear automatically in Telegram / Discord / autocomplete when your bot restarts, filtered by the same CommandAccessPolicy that gates execution. See Native / Autocomplete.
Inside praisonai code too
The same .praisonai/commands/*.md files work as /name inside praisonai code, the REPL, and the async TUI. A unified CommandRegistry aggregates built-ins, your custom commands, skills, MCP prompts, and pip-installed praisonai.commands packs into one namespace:
praisonai run --command mydeploy staging would — byte-for-byte parity between interactive and CLI. See Slash Commands → Unified Command Registry.
Python API
Best Practices
Use project files for team sharing
Use project files for team sharing
Commit
.praisonai/agents/ and .praisonai/commands/ to git.Keep user-global files personal
Keep user-global files personal
Use
~/.praisonai/ for personal shortcuts that should not override team agents.Never rely on unguarded shell substitution
Never rely on unguarded shell substitution
!`cmd` requires an explicit opt-in gate (allow_shell: true, config, or PRAISONAI_ALLOW_SHELL). $(...) is always escaped — use !`cmd` only when you need live output like git diff.Start with praisonai init
Start with praisonai init
Run
praisonai init to scaffold .praisonai/agents/ and .praisonai/commands/ before hand-writing files.Related
Run CLI
—agent and —command flags
Agent CLI
List and inspect custom agents
Command CLI
List and preview commands
Slash Commands
Interactive custom commands
Init CLI
Scaffold .praisonai/ in one command
Agent Presets & Modes
Built-in presets and per-agent permission scoping

