hedera-agent-kit package with a family of @hashgraph scoped packages. The core package (@hashgraph/hedera-agent-kit) now contains only shared APIs, types, and the plugin system. Framework integrations (LangChain, Vercel AI SDK, ElizaOS, MCP) have been extracted into dedicated toolkit packages that bundle their own framework dependencies. Built-in plugins are no longer exported from the package root; they must be imported from the @hashgraph/hedera-agent-kit/plugins subpath and explicitly passed in the configuration. Several deprecated aliases (coreHTSPlugin, coreSCSPlugin, coreQueriesPlugin) have been removed. This guide documents all breaking changes, provides before/after migration examples for each supported framework, and includes a checklist for documentation maintainers updating docs.hedera.com.
Breaking Changes
1. Package rename and scope
The package has moved from the unscopedhedera-agent-kit to the @hashgraph scope:
hedera-agent-kit package on npm will no longer receive updates.
2. Toolkit packages extracted into separate packages
Framework integrations are no longer bundled in the core package. Each toolkit is its own npm package:| Package | Exports |
|---|---|
@hashgraph/hedera-agent-kit | HederaAgentAPI, AgentMode, Configuration, Context, Plugin, Tool, ToolDiscovery, HederaBuilder, handleTransaction, ExecuteStrategy, parameter schemas, mirrornode types |
@hashgraph/hedera-agent-kit-langchain | HederaLangchainToolkit, ResponseParserService, HederaMCPServer |
@hashgraph/hedera-agent-kit-ai-sdk | HederaAIToolkit, HederaMCPServer |
@hashgraph/hedera-agent-kit-elizaos | HederaElizaOSToolkit |
@hashgraph/hedera-agent-kit-mcp | HederaMCPToolkit |
3. Plugin imports moved to /plugins subpath
Plugins are no longer exported from the root of the core package. They must be imported from the /plugins subpath:
4. Explicit plugin opt-in (behavioral change)
In v3, the toolkit may have loaded default tools even with an emptyplugins array. In v4, empty plugins means zero tools. You must explicitly pass every plugin you need.
This is a silent behavioral change. The code will not throw an error, but your agent will have no tools available.
allCorePlugins shortcut from the /plugins subpath:
allCorePlugins is the array of every built-in core plugin (account, token, consensus, EVM, plus all query plugins). Pick individual plugins instead when you want a smaller tool surface; bundlers will tree-shake the unused ones either way.
5. Deprecated aliases removed
The following deprecated plugin aliases have been removed. Update your imports:| Removed alias | Replacement |
|---|---|
coreHTSPlugin | coreTokenPlugin |
coreSCSPlugin | coreEVMPlugin |
coreQueriesPlugin | Use individual query plugins: coreAccountQueryPlugin, coreTokenQueryPlugin, coreConsensusQueryPlugin, coreEVMQueryPlugin, coreMiscQueriesPlugin, coreTransactionQueryPlugin |
6. Framework dependencies are now transitive
In v3, you had to install framework dependencies alongside the agent kit:@hashgraph/hedera-agent-kit-langchainbundles@langchain/core,langchain,@langchain/mcp-adapters@hashgraph/hedera-agent-kit-ai-sdkbundlesai,@ai-sdk/mcp
7. MCP configuration moved to toolkit packages
HederaMCPServer enum and MCP-related configuration are no longer exported from core. They are now in the respective toolkit packages:
8. Hedera SDK renamed to @hiero-ledger/sdk and moved to peer dependency
The Hedera SDK has been renamed from @hashgraph/sdk to @hiero-ledger/sdk. In v3, the SDK was a regular dependency of the agent kit and installed automatically. In v4, all packages declare @hiero-ledger/sdk as a peer dependency (^2.81.0) - you must install it yourself:
@hashgraph/sdk:
@hiero-ledger/sdk is the successor package maintained under the Hiero Ledger project; the @hashgraph/sdk package on npm is no longer receiving updates aligned with the agent kit.
9. RETURN_BYTES mode - raw.bytes standardized to Uint8Array
In v3, raw.bytes returned by ResponseParserService could be a Node.js Buffer or a { type: 'Buffer', data: [...] } plain object, depending on the environment. In v4, raw.bytes is always a Uint8Array in both Node.js and browser environments.
Transaction.fromBytes, remove that conversion - raw.bytes is now a plain Uint8Array and can be passed directly.
Installation Changes
LangChain
In v4,@langchain/core and langchain are bundled in the toolkit. Install your LLM provider separately.
Vercel AI SDK
In v4,ai is bundled in the toolkit. LLM provider is not bundled, always install it.
ElizaOS
MCP
Framework-Specific Migration
LangChain
Install:HederaLangchainToolkitnow comes from@hashgraph/hedera-agent-kit-langchainAgentModecomes from@hashgraph/hedera-agent-kit- Plugins come from
@hashgraph/hedera-agent-kit/pluginsand must be explicitly passed @langchain/coreandlangchainno longer need separate install (LLM provider like@langchain/openaistill does)
Vercel AI SDK
Install:HederaAIToolkitnow comes from@hashgraph/hedera-agent-kit-ai-sdkAgentModecomes from@hashgraph/hedera-agent-kit- Plugins come from
@hashgraph/hedera-agent-kit/pluginsand must be explicitly passed aino longer needs separate install; LLM provider (@ai-sdk/openai) still does
ElizaOS
Install:- The
hedera-agent-kit/elizaossubpath no longer exists - ElizaOS is now its own package:
@hashgraph/hedera-agent-kit-elizaos
MCP
Install:HederaMCPToolkitnow comes from@hashgraph/hedera-agent-kit-mcpAgentModecomes from@hashgraph/hedera-agent-kit- Plugins come from
@hashgraph/hedera-agent-kit/pluginsand must be explicitly passed
Preconfigured MCP Client
TheHederaMCPServer enum configures connections to external MCP servers (Such as the Hgraph Hedera MCP). It moved from core to the toolkit packages.
HederaMCPServer is for connecting to external MCP servers as a client. It is separate from @hashgraph/hedera-agent-kit-mcp, which exports the HederaMCPToolkit adapter.Plugin Author Migration
If you maintain a third-party plugin for the Hedera Agent Kit, update the following: 1. Update your imports:Plugin, Tool, Context, and handleTransaction types/utilities are still exported from the core package. The interface has not changed.
2. Update your package.json peer dependency:
@hashgraph/hedera-agent-kit/plugins for built-in plugins.
4. (Recommended) Migrate your tools to BaseTool to gain support for the hooks and policies system introduced in v4. See the Migrating Custom Tools to BaseTool section below.
Migrating Custom Tools to BaseTool (Recommended, Non-Breaking)
Why migrate?
- Unlock hooks (logging, audit trails, metrics) and policies (blocking rules, rate limits)
- Enforce a consistent, structured tool lifecycle across your plugin
- Benefit from built-in error handling and hook dispatching
What is BaseTool?
BaseTool is an abstract class that implements the Tool interface. This means any class extending BaseTool is a drop-in replacement everywhere a Tool is expected - including inside Plugin.tools(). The class enforces a 7-stage lifecycle:
Step-by-step migration
Below is a fully annotated before/after comparison using thetransfer_hbar tool as the reference example.
What changed – summary
| Aspect | v3 (Tool object) | v4 (BaseTool class) |
|---|---|---|
| Declaration | Object literal { method, name, … execute } | Class extending BaseTool |
| Import | import type { Tool } | import { BaseTool } |
| Lifecycle stages | All inside a single execute() function | Split into normalizeParams, coreAction, secondaryAction |
| Hook/Policy support | ✗ None | ✓ Automatic at stages 1, 3, 5, 7 |
| Error handling | Manual try/catch inside execute | Override handleError() (BaseTool provides a default) |
| Breaking change? | - | No - BaseTool implements Tool |
Migrating a query-only tool
For tools that only read data (no transaction signing), overrideshouldSecondaryAction to skip stage 6:
Quick-Reference Cheat Sheet
Package mapping
Import mapping
Toolkits (each moved to its own package):/plugins subpath):
FAQ / Troubleshooting
My agent has no tools / does nothing.
My agent has no tools / does nothing.
In v4, you must explicitly pass plugins. An empty
plugins array means zero tools. Pass allCorePlugins from @hashgraph/hedera-agent-kit/plugins to restore the v3 “everything” behaviour, or list individual plugins. See Breaking Change #4.Cannot find module 'hedera-agent-kit'.
Cannot find module 'hedera-agent-kit'.
The package has been renamed. Install
@hashgraph/hedera-agent-kit instead.Cannot find module '@hashgraph/hedera-agent-kit/plugins'.
Cannot find module '@hashgraph/hedera-agent-kit/plugins'.
Make sure you have
@hashgraph/hedera-agent-kit@4.x installed. The /plugins subpath was added in v4.coreHTSPlugin is not exported.
coreHTSPlugin is not exported.
This alias was removed in v4. Use
coreTokenPlugin from @hashgraph/hedera-agent-kit/plugins instead.coreQueriesPlugin is not exported.
coreQueriesPlugin is not exported.
This monolithic plugin was removed. Use the individual query plugins:
coreAccountQueryPlugin, coreTokenQueryPlugin, coreConsensusQueryPlugin, coreEVMQueryPlugin, coreMiscQueriesPlugin, coreTransactionQueryPlugin.ResponseParserService is not exported from @hashgraph/hedera-agent-kit.
ResponseParserService is not exported from @hashgraph/hedera-agent-kit.
It moved to
@hashgraph/hedera-agent-kit-langchain.My hooks / policies don't work with my custom plugin tools.
My hooks / policies don't work with my custom plugin tools.
Hooks and policies only fire for tools that extend the
BaseTool abstract class. Tools that implement the Tool interface directly (the v3 functional pattern) are fully supported but bypass the hook/policy lifecycle entirely - this is intentional and not a breaking change. To gain hook and policy support, migrate your tools to BaseTool. The migration is straightforward and non-breaking: BaseTool itself implements Tool, so no call sites need to change. See the Migrating Custom Tools to BaseTool section for a step-by-step guide and annotated before/after example.Versioning
All packages in the@hashgraph/hedera-agent-kit family use independent versioning with aligned major versions:
- Minor and patch versions may differ between packages
- Packages on the same major version are intended to work together
@hashgraph/hedera-agent-kit@4.2.0@hashgraph/hedera-agent-kit-langchain@1.1.0@hashgraph/hedera-agent-kit-ai-sdk@1.1.3