Skip to main content
Route tool approvals to Slack, Discord, Telegram, a webhook, or a local dashboard. Agents pause before executing dangerous tools and wait for human approval via your chosen platform.
This page covers tool approval — asking a human before running dangerous tools such as execute_command or delete_file. Plan approval (used by planning=True) is a separate system; see Planning › Non-interactive environments.

Quick Start

1

Pick a backend

Choose your approval channel. Each backend reads its token from an environment variable:
2

Set environment variables

3

Run with --approval


CLI Commands

The --approval flag works with all CLI commands:

All CLI Approval Flags

Available Backends


Programmatic Usage

The Slack bot token needs chat:write and channels:history (or im:history for DMs) scopes.

Approval Keywords

All messaging backends (Slack, Discord, Telegram) understand these keywords:
Users can reply with richer text like “yes, but change the path to ~/Downloads”. The backend uses an LLM to classify intent and extract modified arguments — the tool runs with the updated values.

How It Works


Configuration Options

Other Methods


Multi-Agent Example

Different agents can have different approval policies:

Dangerous Tools (Default)

These tools require approval by default: Add or remove requirements:

Best Practices

Set approval=True directly on agent constructors for unattended bots. This is the simplest, most agent-centric approach.
Route dangerous tool approvals to a shared Slack channel so your team can review and approve in real time. Works across timezones — the agent waits up to 5 minutes by default.
Users can chat with your agent via Telegram while dangerous tool approvals are routed to a Slack admin channel. Just set approval=SlackApproval(...) on the agent powering the Telegram bot.
Set PRAISONAI_AUTO_APPROVE=true in your CI environment to avoid blocking on prompts during automated testing.
Different agents may need different approval policies. Pass different backends to each agent’s approval= parameter.

Approval Protocol

Full protocol reference, custom backend interface, and registry API

CLI Tool Approval

--trust, --approve-level, and --approval CLI flags

Planning

Plan approval and non-interactive auto-approve

Messaging Bots

Telegram, Discord, Slack, WhatsApp bots

Tools

Built-in tools reference