Tool whitelisting prevents agent confusion by filtering visible tools to only those explicitly allowed, solving collision problems in multi-environment deployments.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.
Quick Start
Set Environment Variable
Enable tool whitelisting by setting
ALLOWED_TOOLS to a comma-separated list of tool names:How It Works
The filter operates at tool registration time, intercepting the complete tool registry and returning only whitelisted tools.| Environment State | Behavior |
|---|---|
ALLOWED_TOOLS unset | All tools visible (with collision warning) |
ALLOWED_TOOLS="" | Error - empty string not allowed |
ALLOWED_TOOLS=search,send_message | Only these tools visible |
Unknown tool + CI=true | Strict failure at startup |
| Unknown tool + dev mode | Warning logged, unknown tools stripped |
Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
ALLOWED_TOOLS (env) | str (csv) | unset | Comma-separated tool names to whitelist |
HERMES_ONLY_TOOLS (env) | str (csv) | unset | Deprecated backward-compatibility alias |
CI (env) | str | unset | When truthy (true/1/yes), unknown tools cause startup failure |
env_var_name (constructor) | str | "ALLOWED_TOOLS" | Override the primary environment variable name |
AllowedToolsFilter Methods
| Method | Returns | Description |
|---|---|---|
filter_tools(available_tools) | Set[str] | Apply whitelist filter to tool set |
is_enabled() | bool | Check if filtering is active |
get_whitelist() | Optional[Set[str]] | Get current whitelist set |
log_diagnostics() | None | Print startup diagnostics report |
get_diagnostics() | Dict[str, Any] | Get diagnostics as dictionary |
Common Patterns
Multi-Environment Composition
Combine YouTube, Twilio, and Gmail tool modules while ensuring agents see only canonical tools:CI/CD Strict Mode
Catch typos early by enabling strict mode in pipelines:Backward Compatibility Migration
Existing projects usingHERMES_ONLY_TOOLS continue working:
Best Practices
Use exact registered tool names
Use exact registered tool names
Tool names are case-sensitive and must match exactly as registered in the tool registry. Use
list_tools() to verify available names before whitelisting.Enable strict mode in CI pipelines
Enable strict mode in CI pipelines
Set
CI=true in automated environments to catch typos in ALLOWED_TOOLS that would otherwise be silently ignored in development.Prefer ALLOWED_TOOLS over legacy naming
Prefer ALLOWED_TOOLS over legacy naming
New projects should use
ALLOWED_TOOLS instead of the deprecated HERMES_ONLY_TOOLS. The new name is clearer and future-proof.Combine with BotConfig for layered security
Combine with BotConfig for layered security
Environment-variable whitelisting is global and name-based, while
BotConfig.allowed_tools provides per-bot runtime filtering. Use both for comprehensive tool security.When to Use ALLOWED_TOOLS
Real-World Scenario
User runs an agent in an environment with YouTube, Gmail, and Twilio integrations. Each provides asend_message tool:
- Without ALLOWED_TOOLS: Agent might pick wrong
send_messageimplementation - With ALLOWED_TOOLS: Agent gets deterministic tool set:
search,gmail_send,twilio_sms - User types: “/summarize latest emails and send alerts”
- Agent behavior: Uses
searchfor email summary,gmail_sendfor notifications (not the conflicting tools)
Related
Tool Configuration
Environment variables and tool setup
Security Best Practices
Agent and tool security guidelines

