Skip to main content
Drop a Python file in .praisonai/tools/ and praisonai run auto-loads every public function as a tool — no --tools flag.
The tool name uses the namespaced form — <module>.<function> — so greet.py::greet becomes greet.greet.

Quick Start

1

Scaffold the convention

praisonai init writes a commented @tool stub at .praisonai/tools/example.py:
2

Drop a plain function and run

Add a plain function at .praisonai/tools/greet.py:
Run — no --tools flag needed, just the opt-in env var:
3

Promote to @tool for a rich schema

Decorate a function with @tool when you want a typed schema for the LLM:

How It Works

praisonai run walks .praisonai/tools/, loads each module behind the security gate, and hands the callables to the agent.

Discovery Rules

The rules below come straight from the SDK’s CustomDefinitionsDiscovery and _load_tools.

@tool-decorated vs Plain Callable

Both a plain function and a @tool-decorated function become tools — but if a file has any @tool, only the decorated functions win.
Exposed as greet.greet.

User-Global vs Project-Local

Two locations feed discovery, and they differ on the working-directory boundary.
User-global tools live at ~/.praisonai/tools/ and load even though they sit outside your project directory — the CWD boundary is deliberately opted out for that explicitly user-owned location (a regression fix that mirrors how an explicit --tools absolute path is trusted). Project-local tools walk up from your current directory and keep the strict CWD check, so an untrusted checkout cannot escape it.

Best Practices

Prefix helper functions with _ so they stay internal. Underscore names are never exported, and modules whose filename starts with _ are skipped entirely.
Decorate with @tool from praisonaiagents to give the LLM a typed schema. In a mixed file, only the @tool functions are exported — plain helpers are dropped.
Loading a tool module executes its code. Keep the opt-in on only in shells where you trust the .praisonai/tools/ contents.
Pass --no-tools to praisonai run to skip auto-discovery entirely when you want a run with no local tools loaded.

Local Tools Loading

Load your own tools.py or —tools file safely with the PRAISONAI_ALLOW_LOCAL_TOOLS opt-in.

Tool Discovery Order

The tier order that resolves a tool name — local files, built-ins, package, or plugin.

Add Tools

Copy tool files into ~/.praisonai/tools/ from local files or GitHub.

Tools CLI

List and manage the tools available to praisonai run.