Tools Guide
Complete guide to working with PraisonAI tools
Tools let agents read data, call APIs, and run code—this hub links every tools how-to.
from praisonaiagents import Agent, tool
@tool
def ping() -> str:
"""Health check tool."""
return "pong"
agent = Agent(name="Tools Intro", tools=[ping])
agent.start("Run the ping tool.")The user follows a tools guide, attaches capabilities to agents, and validates behaviour with doctor.
Quick Start
- Simple Usage
Decorate a function with
@tooland hand it to an agent.python from praisonaiagents import Agent, tool @tool def ping() -> str: """Health check tool.""" return "pong" agent = Agent(name="Tools Intro", tools=[ping]) agent.start("Run the ping tool.") - With Configuration
Add tools from a package or file with the CLI, then verify resolution.
bash praisonai tools add ./my_tools.py praisonai tools doctor
How It Works
Tools Guides
Learn how to create, configure, debug, and manage tools in PraisonAI.
Build your own tools from scratch
Assign Tools to TemplatesConfigure tools for templates
Debug ToolsTroubleshoot tool issues
Different Ways to CreateExplore all tool creation methods
Remote Tools from GitHubUse tools from GitHub and remote URLs
Quick Reference
| Task | Command |
|---|---|
| List tools | praisonai tools list |
| Add package | praisonai tools add pandas |
| Add file | praisonai tools add ./my_tools.py |
| Add from GitHub | praisonai tools add github:user/repo |
| Add source | praisonai tools add-sources <source> |
| Get info | praisonai tools info <name> |
| Search | praisonai tools search <query> |
| Doctor | praisonai tools doctor |
| Resolve | praisonai tools resolve <name> |
| Discover | praisonai tools discover |
| Show sources | praisonai tools show-sources |
Best Practices
Decorate functions with @tool
@tool registers a function as agent-callable and reads its type hints and docstring to build the schema — the fastest path to a working tool.
Type-hint every parameter and return
The model relies on type hints to call tools correctly. Include them, plus a JSON-serializable return type.
Verify with tools doctor before shipping
praisonai tools doctor walks the full resolver chain, so it confirms a tool is reachable before an agent tries to call it.