dragon.ai.agent.tools.base.BaseTool
- class BaseTool[source]
Bases:
ABCBase class for all tools available to Dragon agents.
Subclasses must set
nameanddescriptionas class-level attributes (or properties) and implementrun().Example
class WebSearch(BaseTool): name = "web_search" description = "Search the web and return top results." def run(self, input: dict) -> dict: query = input["query"] ... return {"results": [...]}
- __init__()
Methods
__init__()run(input)Execute the tool with the given input and return a result dict.
Return an OpenAI-compatible tool/function schema.
Attributes