Approval pauses an agent before it runs a risky tool and asks a human (or another channel) to allow or deny it.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.
Sync and Async Parity: Approval checks now work uniformly in both sync and async tool execution paths. Previously, async calls bypassed approval prompts.
Quick Start
How users approve
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Turn approval on/off |
backend | str | "console" | One of: console, slack, telegram, discord, webhook, http, agent, auto, none |
approve_all_tools | bool | false | If true, every tool needs approval (not just risky ones) |
timeout | float | null | Seconds to wait for a decision; null = no timeout |
approve_level | str | null | Auto-approve up to this risk level: low, medium, high, critical |
guardrails | str | null | Free-text guardrail description |
YAML
approval: true (console), approval: slack (named backend), approval: false / null (off).
Unknown keys raiseValueError— typos likeapprove_levels:will fail loudly.
CLI
| CLI flag | YAML / Python field |
|---|---|
--trust | backend: auto |
--approval <name> | backend: <name> |
--approve-all-tools | approve_all_tools: true |
--approval-timeout <s> | timeout: <s> |
--approve-level <l> | approve_level: <l> |
--guardrail "<txt>" | guardrails: "<txt>" |
Using approval with async agents
When using async agents (.achat(), .astart(), or async tools), the default console backend will fail with PermissionError. Configure a non-console backend:
webhook, http, slack, telegram, discord, agent.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
PermissionError: Approval request failed for <tool> | Async agent with console backend | Configure a non-console backend |
RuntimeError: Tool '<tool>' requires approval but cannot use console I/O from async context. | Same root cause, surfaced earlier | Same fix |
Best practices
Console approval
Console approval
No env vars needed; you see the prompt directly in the terminal.
Slack approval
Slack approval
Routes approval requests to a channel humans already watch.
Set timeouts
Set timeouts
Without a timeout, the agent blocks indefinitely waiting for a decision.
Use approve_level
Use approve_level
approve_level: high lets safe tools run without prompts and only gates the dangerous ones.Related
All backend protocols (Slack, Telegram, Discord, Webhook, HTTP, Agent)
Full CLI flag reference

