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.
def tool(context: Context) -> Tool: return Tool( method=MY_TOOL, name="My Custom Tool", description=my_tool_prompt(context), parameters=MyToolParams, execute=my_tool_execute, # all logic in one function )
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:
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.
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.
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:
Bonzo Plugin is a unified SDK to the Bonzo protocol, exposing the core actions (deposit, withdraw, repay, borrow) for decentralised lending and borrowing on Hedera:PyPI: https://pypi.org/project/hak-bonzo-plugin/Github repository: https://github.com/Bonzo-Labs/bonzoPluginVersion: hak-bonzo-plugin==1.0.1Status: Not validated by HAK team, v3-compatible release
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 NameThis plugin was built by <?> for the <project, platform, etc>. It was built to enable <who?> to <do what?>_Feel free to include a description of your project and how it can be used with the Hedera Agent Kit. ### Installation# pip install <plugin-name># Usagefrom hedera_agent_kit.langchain.toolkit import HederaLangchainToolkitfrom hedera_agent_kit.shared.configuration import Configuration, Context, AgentModefrom <plugin_name> import my_pluginhedera_toolkit = HederaLangchainToolkit( client=client, configuration=Configuration( context=Context( mode=AgentMode.AUTONOMOUS, ), plugins=[ my_plugin, ], ),)tools = hedera_toolkit.get_tools()```### FunctionalityDescribe the different tools or individual pieces of functionality included in this plugin, and how to use them.**Plugin Name**_High level description of the plugin_| Tool Name | Description |Usage || ----------------------------------------------- | -------------------------------------------------- |--------------------------------------------------------- || `YOUR_PLUGIN_TOOL_NAME`| What it does | How to use. Include a list of parameters and their descriptions|