Quick Start
How It Works
| Component | Purpose |
|---|---|
| ToolsetRegistry | Maps toolset names to tool lists with recursive resolution |
| Tool Resolution | Expands toolset names to flat lists, handles cycles and includes |
| TTL Cache | 30-second cache for tool availability checks to improve performance |
| Deduplication | Ensures no duplicate tools when mixing explicit tools and toolsets |
Configuration Reference
Toolsets API Reference
TypeScript configuration options
Toolsets Rust Reference
Rust configuration options
Prebuilt Toolsets
| Name | Direct tools | Includes | Description |
|---|---|---|---|
web | internet_search, duckduckgo, searxng_search, tavily_search, exa_search | — | Web search and crawling tools |
files | read_file, write_file, list_files, get_file_info, copy_file, move_file, delete_file | — | File system operations |
code | execute_code, analyze_code, format_code, lint_code | — | Python code execution and analysis |
system | execute_command, list_processes, kill_process, get_system_info | — | System administration and shell operations |
scraping | scrape_page, extract_links, crawl, extract_text | — | Web page scraping and content extraction |
research | (none) | web, files, scraping | Complete research workflow |
safe | internet_search, read_file, tavily_search | — | Minimal safe toolset for restricted environments |
development | (none) | code, files, system | Complete development workflow |
ToolsetSpec Fields
| Field | Type | Default | Description |
|---|---|---|---|
name | str | (required) | Unique name for the toolset |
tools | List[str] | [] | Tool names included directly in this toolset |
includes | List[str] | [] | Other toolset names to include (recursive composition) |
description | str | "" | Optional description of the toolset’s purpose |
Common Patterns
Mixing Explicit Tools and Toolsets
Composition with Includes
Environment-Specific Toolsets
CLI Usage
Use toolsets withpraisonai run and praisonai chat commands:
YAML Usage
Addtoolsets: key under each agent definition:
Custom Toolsets
Register Function
Overwrite Behavior
By default,register_toolset is a silent no-op if the name already exists. Set overwrite=True to replace:
Recursive Includes
Toolsets can include other toolsets with automatic cycle detection:ValueError:
Performance Note
Tool availability is cached for 30 seconds by default. Thelist_available_tools() function uses TTL caching to avoid expensive availability checks on every agent initialization, improving performance when creating many agents.
Best Practices
Pick 'safe' for production sandboxes
Pick 'safe' for production sandboxes
Use the
safe toolset in production environments where you need to restrict tool capabilities. It includes only read-only operations like internet_search and read_file.Compose with 'includes=' rather than copying tool lists
Compose with 'includes=' rather than copying tool lists
Use the
includes parameter to build on existing toolsets instead of duplicating tool lists:Register custom toolsets at app boot, not per-request
Register custom toolsets at app boot, not per-request
Register toolsets once during application initialization, not in request handlers:
Mix explicit 'tools=' with 'toolsets=' when you need one extra tool
Mix explicit 'tools=' with 'toolsets=' when you need one extra tool
Use both parameters when you need a toolset plus one additional tool:
Related
Allowed Tools
Environment variable whitelist for tool restriction
Bot Default Tools
Default tools for bot agents
Load MCP Tools
Model Context Protocol tool loading
Tools Concepts
Core concepts of the tool system

