Summary
The Hedera Agent Kit provides a comprehensive set of tools organized into plugins, which can be installed alongside the Hedera Agent Kit and used to extend the core functionality of the Hedera Agent Kit SDK. These tools can be used both by the conversational agent and when you are building with the SDK. The Hedera services built into this agent toolkit are also implemented as plugins. You can see a description of each plugin in the HEDERAPLUGINS.md file, as well as a list of the individual tools for each Hedera service that are included in each plugin.Available Third-Party Plugins
- Memejob Plugin provides a streamlined interface to the memejob protocol, exposing the core actions (
create,buy,sell) for interacting with meme tokens on Hedera. See the GitHub repository for more information.
Plugin Architecture
The tools are organized into plugins, each containing a set of functionality related to the Hedera service or project they are created for.Plugin Interface
Every plugin must implement the Plugin interface:Tool Interface
Each tool must implement the Tool interface:Note: TheSee typescript/src/shared/tools.ts for the full definition.outputParseris important for LangChain v1 tools. It extracts tool output into{ raw, humanMessage }format. Two built-in parsers are available:If not defined, a default parser is used.
transactionToolOutputParser- For transaction tools (handles RETURN_BYTES and EXECUTE_TRANSACTION modes)untypedQueryOutputParser- For query tools (generic parser)
Step-by-Step Guide
Step 1: Create Plugin Directory Structure
Step 2: Implement Your Tool
Create your tool file (e.g.,tools/my-service/my-tool.ts):
Step 3: Create Plugin Definition
Create your plugin index file (index.ts):index.ts
Step 4: Register Your Plugin
Add your plugin to the main plugins index (src/plugins/index.ts):
Best Practices
Parameter Validation- Use Zod schemas for robust input validation
- Provide clear descriptions for all parameters
- Mark required vs optional parameters appropriately
- Group related tools by service type
- Use consistent naming conventions
- Follow the established directory structure
- Use handleTransaction() to facilitate human-in-the-loop and autonomous execution flows
- Respect the AgentMode (AUTONOMOUS vs. RETURN_BYTES)
- Implement proper transaction building patterns
Using Your Custom Plugin
LangChain v0.3 (Classic)
LangChain v1 (New)
Publish and Register Your Plugin
See How To: Publish & Register Your Plugin for instructions on creating, publishing, and registering your plugin with the Hedera Agent Kit ecosystem.Examples and References
- See existing core plugins in typescript/src/plugins/core-*-plugin/
- Follow the patterns established in tools like transfer-hbar.ts
- See plugin-tool-calling-agent.ts for usage examples