Base Tool • AI Agent SDK

BaseTool: Abstract base class for all PraisonAI tools.

BaseTool

Defined in the base module.

AI Agent

Abstract base class for all PraisonAI tools.

Subclass this to create custom tools that can be:

  • Used directly by agents
  • Distributed as pip-installable plugins
  • Auto-discovered via entry_points

Attributes: name: Unique identifier for the tool description: Human-readable description (used by LLM) version: Tool version string (default: “1.0.0”) parameters: JSON Schema for parameters (auto-generated if not provided)

Diagram

uses

returns

Agent

Tool: BaseTool

Result

Constructor

ParamField Optional

No description available.

Properties

ResponseField str

No description available.

ResponseField str

No description available.

ResponseField str

No description available.

ResponseField Optional

No description available.

ResponseField Optional[bool]

No description available.

ResponseField Optional

No description available.

ResponseField Optional

No description available.

Methods

Usage

python
class WeatherTool(BaseTool):
        name = "get_weather"
        description = "Get current weather for a location"

        def run(self, location: str, units: str = "celsius") -> dict:
            # Implementation here
            return {"temp": 22, "condition": "sunny"}

Source

View on GitHub

praisonaiagents/tools/base.py at line 179


Related Documentation