Demo repo for the Hedera AI and agents workshop.
To run on Gitpod (a cloud development environment), click the button below:
- Wait for Gitpod to load, this should take less than 10 seconds
- In the VS code terminal, you should see 4 terminals:
config_eliza
,install_eliza
,run_eliza
, andrun_client_eliza
- In the
config_eliza
terminal, a script will interactively prompt you for your LLM API key and your Hedera network credentials - Congratulations, you can now move on to the sequences! 🎉
This repo contains the code required to configure and run Eliza, then use Hedera AI agents to query and transact on Hedera. The following sections outline what each sequence will cover.
What you will accomplish:
- Configure Eliza with LLM credentials and Hedera credentials
- Run Eliza server and Eliza client
- Query Hedera network state (no transaction)
- Modify Hedera network state (transaction)
Video:
Steps:
- Check that you have your
.env
file updated with all the required keys. These will be prompted in theconfig_eliza
terminal.- If you skipped this, you can manually edit the
.env
file
- If you skipped this, you can manually edit the
- Open the character file for the Hedera AI agent
- You can find this in
eliza-hedera/characters/hedera.character.json
- If you are using a different LLM provider:
- Edit this file to set the value of the model provider.
- For example, for OpenRouter:
"modelProvider": "openrouter",
- For example, for OpenRouter:
- Ensure that you have the necessary configurations for your chosen LLM in the
.env
file.- For example, for OpenRouter:
OPENROUTER_API_KEY
andOPENROUTER_MODEL
.
- For example, for OpenRouter:
- Edit this file to set the value of the model provider.
- You can find this in
- Wait for Eliza installation to complete.
- This happens in the
install_eliza
terminal. - Note that this takes more than 5 minutes, even on a fast Internet connection.
- This happens in the
- Wait for the Eliza server to start.
- This happens in the
run_eliza
terminal
- This happens in the
- Wait for the Eliza client to start.
- This happens in the
run_client_eliza
terminal
- This happens in the
- Open the Eliza client in a new browser tab
- This should open automatically for you.
- If not, click on
PORTS
, and in the table, click on theAddress
for port 5173
- In the list of agents, press the
Chat
button underHederaHelper
- You will now see a chat interface.
- Let's query state on the Hedera network!
- Example message from you:
Hi! What is the HBAR balance of account ID 0.0.1534 ?
- Note: Replace
0.0.1534
with your account ID
- Example response from Hedera AI agent:
Hello! I'm HederaHelper, here to help you with all your Hedera-related operations. Let me check the balance of my account (0.0.1534) for you.
Address 0.0.1534 has balance of 9441.62 HBAR
- Action: Verify that displayed in the corner of the message, there is also the name of the action the agent intends to perform via Hedera Agent Kit. This should be
HEDERA_HBAR_BALANCE
- Navigate to your account ID on Hashscan
- Action: Verify that the Hedera AI agent has output the correct HBAR balance!
- Example message from you:
- Let's update state on the Hedera network!
- Example message from you:
Can you please create an HCS topic with the memo "Brendan's topic created using Hedera AI Agent on Eliza" ?
- Note: Replace
Brendan
with your own name
- Example response from Hedera AI agent:
I'll create the new HCS topic with the memo "Brendan's topic created using Hedera AI Agent on Eliza" (HEDERA_CREATE_TOPIC)
Successfully created topic: 0.0.5533495 Transaction link: https://hashscan.io/testnet/transaction/1739956989.737784273
- Action: Verify that displayed in the corner of the message, there is also the name of the action the agent intends to perform via Hedera Agent Kit. This should be
HEDERA_CREATE_TOPIC
- Action: Verify that displayed in the corner of the message, there is also the name of the action the agent intends to perform via Hedera Agent Kit. This should be
- Navigate to the topic ID or transaction URL output on Hashscan
- Action: Verify that the Hedera AI agent has actually created the topic correctly, and the topic memo is what you requested.
- Example message from you:
MIT