Understanding Tool Discovery
PraisonAI automatically discovers tools from~/.praison/tools/. Any .py file you place there will be loaded and its functions become available as tools.
How to Add Tools from Local Files (Recommended)
1
Create Your Tools File
2
Add File to Tools Directory
3
Verify Tools Are Discovered
Tools in
~/.praison/tools/ are auto-discovered:4
Use in Agent
Why Packages Need Wrapper Tools
Runningpraisonai tools add pandas will show:
- 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
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
~/.praison/tools/Configuration File
Tools sources are stored in~/.praison/tools_sources.yaml:
Key Concept
Packages vs Tools: When you add a package likepandas, 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.
