Autonomous AI agents on Hedera enabling decentralized travel booking and insurance quotes through multi-agent coordination.
AgentH demonstrates autonomous-to-autonomous (A2A) communication, where specialized AI agents act as independent economic participants:
- Decentralized Travel Booking — Hotel search and reservation through agent coordination
- On-Chain Insurance Quotes — Travel insurance pricing via specialized agents
- Verifiable Agent Communication — All inter-agent messages recorded immutably on HCS
- Real-Time Interaction — WebSocket-based chat interface for natural language requests
- Multi-Agent Coordination — Specialized sub-agents work together transparently
Natural language insurance quote request and AI agent response
Hotel agent presenting available options with pricing and details
Continuing hotel booking flow with agent recommendations
Completed hotel booking verified on Hedera HashScan explorer
Ask your agent in plain English:
- "Find me a hotel in Paris for next weekend under $200/night"
- "Get travel insurance quotes for my Tokyo trip"
- "Compare hotel options and recommend the best value"
- Agents coordinate over Hedera Topics, creating verifiable decision trails
- Decentralized Booking — No centralized server; agents coordinate directly
- Immutable Agreements — All negotiations recorded on HCS
- Transparent Pricing — Every quote visible on-chain
- HashScan Verification — All transactions viewable on Hedera's explorer
Powered by Hedera AI Agent Kit and ElizaOS framework:
- LangChain Integration — Natural language understanding via Groq/Ollama LLMs
- Hedera JavaScript SDK — Direct network interaction
- WebSocket API — Real-time bidirectional communication
- Agent Runtime — Autonomous decision-making and task delegation
- LangChain — Build conversational AI agents
- ElizaOS — Agent orchestration framework
- Model Context Protocol (MCP) — Connect AI models to Hedera services
Backend:
- Node.js + Express
- ElizaOS agent orchestration
- Hedera AI Agent Kit
- WebSocket server
Frontend:
- WebSocket client
- HTML/CSS for UI
AI Layer:
- LangChain for reasoning
- Groq LLM
- Intent recognition
Blockchain:
- Hedera Consensus Service (HCS)
- Hedera JavaScript SDK
- HashScan integration
Follow these steps to set up your environment and run the agents.
This project uses environment variables to securely manage your Hedera account credentials and agent configurations.
-
Create the .env file: In the root directory of the project, create a new file named
.env. -
Add Your Main Hedera Credentials: You need a Hedera testnet account. Get your Account ID and Private Key from the Hedera Portal. Add them to your
.envfile.# Add your personal Hedera Account ID and Private Key HEDERA_ACCOUNT_ID="YOUR_ACCOUNT_ID" HEDERA_PRIVATE_KEY="YOUR_PRIVATE_KEY"
Example format:
# HEDERA_ACCOUNT_ID="0.0.xxxxxxx" # HEDERA_PRIVATE_KEY="0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
-
Create the Main Agent Topic: Run the
createTopic.jsscript to create the main topic for agent-to-agent (A2A) communication.node createTopic.js
-
Add Agent and Topic IDs: After running the script, add the following lines to your
.envfile. These are used to identify the main travel agent and its communication topic.AGENT_ID=hedera-travel-agent A2A_TOPIC_ID=0.0.x
-
Create Sub-Agents (Hotel & Insurance): Run the scripts to create the dedicated hotel and insurance agents.
node createHotelAgent.js node createInsuranceAgent.js
-
Add Sub-Agent Credentials: Finally, add the credentials for the newly created agents to your
.envfile. These are pre-defined for this example.HOTEL_ACCOUNT_ID="0.0.xxxxxxx" HOTEL_PRIVATE_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" INSURANCE_ACCOUNT_ID="0.0.xxxxxxx" INSURANCE_PRIVATE_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
Your final .env file should look similar to this (with your own credentials at the top):
# Your personal account from Hedera Portal
HEDERA_ACCOUNT_ID="0.0.xxxxxxx"
HEDERA_PRIVATE_KEY="0x................"
# Main agent identifiers
AGENT_ID=hedera-travel-agent
A2A_TOPIC_ID=0.0.xxxxxxx
# Sub-agent credentials
HOTEL_ACCOUNT_ID="0.0.xxxxxxx"
HOTEL_PRIVATE_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
INSURANCE_ACCOUNT_ID="0.0.xxxxxxx"
INSURANCE_PRIVATE_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"Built with ♥ at ETHOnline 2025
