This guide walks you through scaffolding a minimal Node.js project that uses the Hedera Agent Kit to run an AI agent against the Hedera Testnet. Pick your framework (LangChain, Vercel AI SDK, or Google ADK), install the packages, configure credentials, and run a single-shot “what’s my balance?” call.Documentation Index
Fetch the complete documentation index at: https://hedera-0c6e0218-514-egress-ports.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Hedera testnet account - create one at https://portal.hedera.com/dashboard
- An LLM API key:
- OpenAI (for LangChain or Vercel AI SDK) - https://platform.openai.com/api-keys
- Google AI (for the Google ADK example) - https://aistudio.google.com/apikey
1. Create your project directory
2. Install the agent kit and init the project
package.json and add "type": "module" to enable ES modules.
Install the core package plus your chosen framework toolkit:
3. Add environment variables
Create a.env file in your project directory:
OPENAI_API_KEY for the LangChain / Vercel AI SDK examples, or GOOGLE_API_KEY for the Google ADK example:
You can get a Hedera Testnet account on portal.hedera.com.
4. Create your agent
Create anindex.js file:
5. Run your example
From the project root:Agent Execution Modes
This tool has two execution modes with AI agents:| Mode | Description |
|---|---|
AgentMode.AUTONOMOUS | The transaction is executed autonomously using the operator account |
AgentMode.RETURN_BYTES | The transaction bytes are returned for the user to sign and execute |
Resources
- GitHub: https://github.com/hashgraph/hedera-agent-kit-js
- Issues: https://github.com/hashgraph/hedera-agent-kit-js/issues
- Developer Examples: DEVEXAMPLES.md
Examples
Clone the repository and try out different example agents. See the full Developer Examples documentation for detailed setup instructions. Available Examples:- Option A - Example Tool Calling Agent
- Option B - Example Structured Chat Agent
- Option C - Example Return Bytes Agent
- Option D - Example MCP Server
- Option E - Example External MCP Agent
- Option F - Example ElizaOS Agent
- Option G - Example Preconfigured MCP Client Agent
- Option H - Example Policy Enforcement Agent
- Option I - Example Audit Trail Agent
- Option J - Example Google ADK Agent
- @hashgraph/hedera-agent-kit - Hedera Agent Kit Core
- @hashgraph/hedera-agent-kit-langchain - LangChain toolkit
- @hashgraph/hedera-agent-kit-ai-sdk - Vercel AI SDK toolkit
- @hashgraph/hedera-agent-kit-adk - Google ADK toolkit
- @hashgraph/hedera-agent-kit-mcp - MCP toolkit
- @hashgraph/hedera-agent-kit-elizaos - ElizaOS toolkit