Skip to main content

Creating a Plugin

Plugin Interface

Every plugin corresponds to the Plugin class:

Tool Interface

Each tool must assume the Tool class structure:
See hedera_agent_kit/shared/tool.py for the full definition.
This is NOT a breaking change. BaseToolV2 is an abstract class that implements the Tool interface — plain Tool implementations continue to work exactly as before. However, they do not support the hooks and policies system (e.g., HcsAuditTrailHook, MaxRecipientsPolicy, RejectToolPolicy). To enable those features, migrate your tool to BaseToolV2.
Extending BaseToolV2 splits execution into a 7-stage lifecycle that hooks and policies tap into automatically. For complete step-by-step instructions, see the Python ToolV2 Migration Guide.
Aspectv3 (Legacy)v4 (BaseToolV2)
DeclarationFunctional factory (Tool(...))Class extending BaseToolV2
Lifecycle stagesAll inside a single execute()normalize_paramscore_actionsecondary_action
Hook/Policy support✗ None✓ Automatic at stages 1, 3, 5, 7
Breaking change?No

Creating a Plugin

Step 1: Create Plugin Structure

Step 2: Implement Your Tool

Step 3: Create Plugin Definition


Using Your Plugin

Publish and Register Your Plugin

To create a plugin to be used with the Hedera Agent Kit, you will need to create a plugin in your own repository, publish a PyPI package, and provide a description of the functionality included in that plugin, as well as the required and optional parameters. Once you have a repository, published PyPI package, and a README with a description of the functionality included in that plugin in your plugin’s repo, as well as the required and optional parameters, you can add it to the Hedera Agent Kit by forking and opening a Pull Request to:
  1. Include the plugin as a bullet point under the Available Third Party Plugin section under the Third Party Plugin section in the README.md in the hedera-agent-kit-py. Include the name, a brief description, and a link to the repository with the README, as well as the URL linked to the published PyPI package.
  2. If you would like to include your plugin functionality in the Hedera plugin built for ElizaOS simply make a PR to add your plugin name to the plugins array in the Hedera ElizaOS plugin where the configuration is initiated. The hedera-agent-kit adaptor architecture means your plugin functionality will be usable with no additional configuration needed.
  3. All commits for your plugin must be DCO signed, have the names of the tools & core actions exposed by the plugin, and point to the exact version of the Python package. To avoid having pull requests blocked in the future, always include a sign-off:
Feel free to also reach out to the Hedera Agent Kit maintainers on Discord or another channel so we can test out your plugin, include it in our docs, and let our community know thorough marketing and community channels. Please also reach out in the Hedera Discord in the Support > developer-help-desk channel create an Issue in this repository for help building, publishing, and promoting your plugin

Plugin README Template

Resources

Examples and References