> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Discover Plugins • AI Agent SDK

> discover_plugins: Discover and register tools from entry_points.

# discover\_plugins

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**ToolRegistry**](../classes/ToolRegistry) class in the [**registry**](../modules/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

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def discover_plugins() -> int
```

### Returns

<ResponseField name="Returns" type="int">
  Number of tools discovered
</ResponseField>

## Uses

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

## Used By

* [`get_plugin_registry`](../functions/get_plugin_registry)
* [`ToolRegistry.get`](../functions/ToolRegistry-get)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/registry.py#L436">
  `praisonaiagents/tools/registry.py` at line 436
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Plugins Feature" icon="plug" href="/docs/docs/features/plugins" />
</CardGroup>
