Skip to main content
Tools give agents the ability to take actions — search the web, run code, read files, and call APIs — beyond what an LLM knows from training.
The user asks a research question; the agent calls web search and returns an answer grounded in live results.

Quick Start

1

Built-in Tools

2

Custom Tool Function

3

Multiple Tools


Which Tools to Use?


How It Works


Common Patterns

Pattern 1 — Web research agent

Pattern 2 — Custom API tool

Drop a @tool-decorated function into .praisonai/tools/*.py for auto-load with no imports required — see Project-local tools.

Pattern 3 — Tool search for large toolsets


Best Practices

The LLM reads your tool’s docstring to decide when and how to use it. Write clear, specific descriptions: “Fetch the current stock price for a given ticker symbol (e.g., ‘AAPL’, ‘GOOGL’). Returns price in USD.”
Tools should return strings (or JSON-serializable data that gets converted to strings). Complex objects confuse the LLM — format results as readable text.
When you have more than 10–15 tools, enable tool_search=True to let the agent dynamically find the right tools instead of sending all tool definitions with every request.
Wrap external API calls with timeouts using ToolConfig(timeout=30). Without timeouts, a slow API can block the entire agent run.

Tool Config — timeouts, retries, and artifact storage

Tool Search — dynamic tool discovery for large toolsets