Skip to main content

Automatic tools.py Loading

If a tools.py file exists in your current working directory, it will be automatically loaded:
# Create tools.py in your project
cat > tools.py << 'EOF'
def my_custom_tool(query: str) -> str:
    """My custom tool."""
    return f"Result: {query}"
EOF

# Run - tools.py is automatically loaded
praisonai templates run my-template

Explicit Tool Overrides

# Run template with custom tools from a file
praisonai templates run my-template --tools ./custom_tools.py

# Run template with tools from a directory
praisonai templates run my-template --tools-dir ~/.praisonai/tools

# Multiple tool sources
praisonai templates run my-template --tools ./tools1.py --tools ./tools2.py --tools-dir ./more_tools

# Combine with strict mode
praisonai templates run my-template --tools ./custom_tools.py --strict-tools

# Run workflow with custom tools
praisonai workflow run workflow.yaml --tools ./custom_tools.py

# Run workflow with tools directory
praisonai workflow run workflow.yaml --tools-dir ~/.praisonai/tools

Check Tool Sources

# See all configured tool sources including ./tools.py
praisonai tools show-sources