Skip to main content

discover_plugins

Method
This is a method of the ToolRegistry class in the registry module.
Discover and register tools from entry_points. External packages publish a tool by registering it under the canonical praisonai.tools entry-point group in pyproject.toml:: [project.entry-points.”praisonai.tools”] my_tool = “my_package.tools:MyTool” The historical praisonaiagents.tools and praisonai.tool_sources groups are still discovered as deprecated aliases (a one-time DeprecationWarning is emitted on first hit). The canonical group wins on a name collision, so a name is never overwritten by an alias group.

Signature

Returns

int
Number of tools discovered

Uses

  • ep.load
  • tool_class_or_func
  • register
  • callable
  • logging.warning
  • warnings.warn
  • seen.add
  • logging.info

Used By

Source

View on GitHub

praisonaiagents/tools/registry.py at line 436

Plugins Feature