Skip to main content

Understanding Tool Discovery

PraisonAI automatically discovers tools from ~/.praisonai/tools/ (user-global) and .praisonai/tools/ in your project (walk-up) on every praisonai run. Any .py file you place there will be loaded and its functions become available as tools.
  • praisonai init scaffolds .praisonai/tools/example.py for you.
See Project-Local Tools for the full discovery rules and precedence.
1

Create Your Tools File

2

Add File to Tools Directory

Output:
3

Verify Tools Are Discovered

Tools in ~/.praisonai/tools/ are auto-discovered:
4

Use in Agent

Why Packages Need Wrapper Tools

Running praisonai tools add pandas will show:
Packages like pandas are NOT tools - they are libraries. To use them with agents, you must create wrapper functions with:
  • Type hints for parameters
  • Docstrings with Args section
  • JSON-serializable return values

How to Add Tools from Local Files

1

Create Tools File

2

Add File to Tools

Output:
3

Use in Template

Reference the tool in your agents.yaml:

How to Add Tools from GitHub

1

Add from GitHub Repository

2

Verify Download

Tools are downloaded to ~/.praisonai/tools/

Configuration File

Tools sources are stored in ~/.praisonai/tools_sources.yaml:

Key Concept

Packages vs Tools: When you add a package like pandas, you’re registering it as a source. To use it with agents, you need to create wrapper functions that expose specific functionality as tools with proper docstrings and type hints.