Tools can now be referenced by name directly in YAML files without creating a local
tools.py file.How It Works
When you specify tools in your YAML configuration, PraisonAI automatically resolves them from multiple sources. Only tools you list undertools: in your YAML (under each role and each task) are loaded. Misspelled or unknown tool names now produce a warning log line, not a silent skip.
Quick Start
Tool Sources
Built-in Tools
70+ tools from
praisonaiagents.toolstavily_searchinternet_searchexecute_commandread_file- And more…
Local tools.py
Custom tools you create
- Takes precedence
- Full control
- Custom variables
External Tools
120+ tools from
praisonai-toolsEmailToolSlackToolGitHubTool- And more…
Resolution Order
Tools are resolved in this order (first match wins):Available Built-in Tools
Search Tools
Search Tools
| Tool | Description |
|---|---|
tavily_search | AI-powered web search |
tavily_extract | Extract content from URLs |
internet_search | DuckDuckGo search |
exa_search | Exa semantic search |
search_web | Unified search (auto-fallback) |
File Tools
File Tools
| Tool | Description |
|---|---|
read_file | Read file contents |
write_file | Write to files |
list_files | List directory contents |
copy_file | Copy files |
delete_file | Delete files |
Shell Tools
Shell Tools
| Tool | Description |
|---|---|
execute_command | Run shell commands |
list_processes | List running processes |
kill_process | Terminate processes |
get_system_info | System information |
Web Crawling
Web Crawling
| Tool | Description |
|---|---|
crawl4ai | Async web crawling |
crawl4ai_extract | Extract with CSS selectors |
scrape_page | Spider page scraping |
extract_links | Extract page links |
CLI Commands
List Available Tools
Validate YAML Tools
- Valid
- Invalid
Get Tool Info
Custom Tools (tools.py)
For custom logic or variables, create atools.py file:
tools.py
agents.yaml
Examples
Troubleshooting
Tool not found
Tool not found
- Check the tool name spelling
- Run
praisonai tools listto see available tools - If using external tools, ensure
praisonai-toolsis installed:
Tool not working as expected
Tool not working as expected
- Check if the tool requires an API key (e.g.,
TAVILY_API_KEY) - Run
praisonai tools info <tool_name>for details - Test the tool:
praisonai tools test <tool_name>
Want to override a built-in tool
Want to override a built-in tool
Create a
tools.py file with a function of the same name:Per-Agent Tool Resolution
Multi-agent: one resolver per agent
When agents need differenttools_py_path values, construct separate resolvers:
Thread Safety: Each
ToolResolver instance is safe to share across threads — its local-tools cache is loaded once under a lock and exposed as an immutable MappingProxyType.Default resolver: When you call resolve_tool(name) without passing resolver=, PraisonAI uses a single process-level cached resolver to avoid recreating it on every call. This cached resolver is anchored to the working directory at first call.When to pass an explicit resolver: For test isolation, multi-project CLIs, or per-agent tools_py_path values, construct your own ToolResolver(...) and pass it as resolver= to the convenience functions.Caching Behaviour
The convenience functions (resolve_tool, resolve_tools, list_available_tools, has_tool, validate_yaml_tools) share a single cached ToolResolver for the whole process. This means:
- Fast repeated calls —
tools.pyis only read once,praisonai-toolsis only probed once. - CWD-anchored — the cached resolver picks up
./tools.pyfrom whatever directory was active when the first call happened. - Need isolation? Pass an explicit
resolver=ToolResolver(...)instance — the cached default is bypassed.
Configuration Options
Convenience Functions (with optional resolver parameter)
| Function | Signature | Description |
|---|---|---|
resolve_tool | resolve_tool(name: str, resolver: Optional[ToolResolver] = None) -> Optional[Callable] | Resolve single tool |
resolve_tools | resolve_tools(names: List[str], resolver: Optional[ToolResolver] = None) -> List[Callable] | Resolve multiple tools |
list_available_tools | list_available_tools(resolver: Optional[ToolResolver] = None) -> Dict[str, str] | List all available tools |
has_tool | has_tool(name: str, resolver: Optional[ToolResolver] = None) -> bool | Check if tool exists |
validate_yaml_tools | validate_yaml_tools(yaml_config: Dict[str, Any], resolver: Optional[ToolResolver] = None) -> List[str] | Validate YAML tools |
ToolResolver Class
| Method | Description | Thread Safe |
|---|---|---|
resolve(name, instantiate=False) | Resolve single tool name. Pass instantiate=True to get an instance of class tools (BaseTool / langchain) instead of the raw class. | ✅ |
resolve_many(names) | Resolve multiple tool names | ✅ |
list_available() | List available tools | ✅ |
has_tool(name) | Check if tool exists | ✅ |
clear_cache() | Clear local tools cache | ✅ (lock-protected) |
Python Usage
Related
Custom Tools
Build your own agent tools
Tools Overview
Browse PraisonAI tool documentation

