The PraisonAI CLI includes a safety system that requires human approval before executing potentially dangerous tools. This page explains how to control this behavior.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Certain tools are marked with risk levels and require approval before execution:| Risk Level | Tools | Default Behavior |
|---|---|---|
| CRITICAL | execute_command, kill_process, execute_code | Always prompts |
| HIGH | write_file, delete_file, move_file, copy_file | Always prompts |
| MEDIUM | evaluate, crawl, scrape_page | Always prompts |
| LOW | (none by default) | Always prompts |
YAML Configuration
Configure approval settings in your YAML configuration file using theapproval: block:
Shorthand Forms
Legacy YAML Aliases (Backward Compatible)
| Legacy key | New key |
|---|---|
backend_name | backend |
all_tools | approve_all_tools |
approval_timeout | timeout |
Validation
Unknown keys now raiseValueError with the list of allowed keys — silent typos no longer pass through undetected.
CLI ⇄ YAML ⇄ Python Mapping
All three surfaces use the same unified configuration:| CLI flag | YAML key | Python field |
|---|---|---|
--trust | N/A (use backend: auto) | backend="auto", enabled=True |
--approval <backend> | backend: <backend> | backend="<backend>", enabled=True |
--approve-all-tools | approve_all_tools: true | approve_all_tools=True |
--approval-timeout <sec> | timeout: <sec> | timeout=<sec> |
--approve-level <level> | approve_level: <level> | approve_level="<level>" |
--guardrail "<text>" | guardrails: "<text>" | guardrails="<text>" |
Auto-Approve All Tools (--trust)
Use the --trust flag to auto-approve all tool executions without prompting:

Usage
Level-Based Approval (--approve-level)
Use --approve-level to auto-approve tools up to a specific risk level:
low- Only auto-approve low risk toolsmedium- Auto-approve low and medium risk toolshigh- Auto-approve low, medium, and high risk toolscritical- Auto-approve all tools (same as--trust)
Examples
Approval Backend (--approval)
Use --approval to route tool approvals to a specific backend — Slack, Telegram, Discord, a webhook, or more:
Available Backends
| Value | Backend | Required Env Vars |
|---|---|---|
console | Interactive terminal prompt (default) | — |
slack | Slack Block Kit message + reply polling | SLACK_BOT_TOKEN, SLACK_CHANNEL |
telegram | Telegram inline keyboard + polling | TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID |
discord | Discord embed + text reply polling | DISCORD_BOT_TOKEN, DISCORD_CHANNEL_ID |
webhook | POST to HTTP endpoint + poll for decision | APPROVAL_WEBHOOK_URL |
http | Local web dashboard (browser-based) | — |
agent | Delegate to an AI reviewer agent | — |
auto | Auto-approve all (same as --trust) | — |
none | Disable approval entirely | — |
Works With All CLI Commands
Default Behavior (No Flags)
Without any flags, the CLI will prompt for approval on all dangerous tools:Programmatic Control
You can also control approval behavior programmatically:Risk Level Reference
Critical Risk Tools
execute_command- Run shell commandskill_process- Terminate processesexecute_code- Execute arbitrary code
High Risk Tools
write_file- Write to filesdelete_file- Delete filesmove_file- Move/rename filescopy_file- Copy filesexecute_query- Database queries
Medium Risk Tools
evaluate- Evaluate expressionscrawl- Web crawlingscrape_page- Web scraping
Best Practices
The approval system is designed to prevent accidental destructive actions. Consider your use case carefully before bypassing it.
Related Features
Approval Protocol
All approval backends (Slack, Telegram, Discord, Webhook, HTTP, Agent)
Sandbox Execution
Secure isolated command execution
Autonomy Modes
Control AI autonomy levels
Tool Tracking
Monitor tool usage

