Skip to main content
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 under tools: 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.
The user lists tools in agents.yaml; PraisonAI resolves built-ins and runs the configured agent.

Quick Start

1

Create YAML File

Reference tools by name in your agents.yaml:
agents.yaml
2

Run Your Agents

No tools.py needed - tools are auto-resolved:

Tool Sources

Built-in Tools

70+ tools from praisonaiagents.tools
  • tavily_search
  • internet_search
  • execute_command
  • read_file
  • And more…

Local tools.py

Custom tools you create
  • Takes precedence
  • Full control
  • Custom variables

External Tools

120+ tools from praisonai-tools
  • EmailTool
  • SlackTool
  • GitHubTool
  • And more…

Resolution Order

Tools are resolved in this order (first match wins):
Local tools.py always takes precedence. This lets you override built-in tools with custom implementations.

Available Built-in Tools

CLI Commands

List Available Tools

Validate YAML Tools

Get Tool Info

Custom Tools (tools.py)

For custom logic or variables, create a tools.py file:
tools.py
Then reference in YAML:
agents.yaml
Local tools with the same name as built-in tools will override them.

Examples

Troubleshooting

  1. Check the tool name spelling
  2. Run praisonai tools list to see available tools
  3. If using external tools, ensure praisonai-tools is installed:
  1. Check if the tool requires an API key (e.g., TAVILY_API_KEY)
  2. Run praisonai tools info <tool_name> for details
  3. Test the tool: praisonai tools test <tool_name>
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 different tools_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 callstools.py is only read once, praisonai-tools is only probed once.
  • CWD-anchored — the cached resolver picks up ./tools.py from 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)

ToolResolver Class


Python Usage

Custom Tools

Build your own agent tools

Tools Overview

Browse PraisonAI tool documentation