Kaia Eliza Plugin
Overview
The Kaia Eliza Plugin is a vital extension for integrating with ElizaOS, enabling seamless interaction with the Kaia Mainnet and Kairos Testnet. This plugin provides a robust suite of functionalities, including KAIA token transfers, wallet balance queries, and retrieval of fungible and non-fungible tokens (FTs/NFTs). Designed for developers, it simplifies wallet management and enhances application capabilities within the ElizaOS framework for the Kaia ecosystem.
Key Features
- Token Transfers: Effortlessly send KAIA tokens between wallets.
- Wallet Queries: Retrieve wallet balances and real-time KAIA price data.
- Network Management: Interact seamlessly with the Kaia blockchain.
- Block & Transaction Information: Access detailed insights into transactions and blocks on the network.
開始使用
1. Setup ElizaOS
git clone https://github.com/elizaOS/elizacd elizagit checkout $(git describe --tags --abbrev=0)pnpm installcp .env.example .env
2. Configuring Environment Variables
To integrate the Kaia plugin, developers must configure environment variables and secrets. The plugin can access these settings through agent.json.secret or directly at runtime.
Now, configure the .env
file and kaiaagent.character.json
values.
.env file:
GROK_API_KEY= # GROK API KeyGOOGLE_GENERATIVE_AI_API_KEY= # Gemini API Key
To use any LLM provider, configure the relevant API keys in .env
. Based on the key provided, update the modelProvider setting in the character file.
kaiaagent.character.json:
{ "name": "Kaia AI Dev Agent", "plugins": ["@elizaos-plugins/plugin-kaia"], "clients": [], "modelProvider": "grok", "settings": { "ragKnowledge": false, "secrets": { "KAIA_EVM_PRIVATE_KEY": "", "KAIA_KAIASCAN_API_KEY": "", "KAIA_FAUCET_AMOUNT": "1" } }}
Provide values for:
- KAIA_EVM_PRIVATE_KEY: Required for on-chain transactions.
- KAIA_KAIASCAN_API_KEY: Obtainable from KaiaScan.
- KAIA_FAUCET_AMOUNT: Specifies the token amount to distribute upon request.
Configuration Example
Download the required character.json file:
wget https://eco-klaytn-safe-asset.s3.ap-northeast-2.amazonaws.com/elizaagent/kaiaagent.character.json -O ./characters/kaiaagent.character.json
Plugin Registration
To enable the Kaia plugin, add it to your agent’s configuration:
{ "name": "Kaia AI Dev Agent", "plugins": ["@elizaos-plugins/plugin-kaia"]}
Also, run the command below to add the plugin as a dependency in package.json
:
npx elizaos plugins install @elizaos-plugins/plugin-kaia
{ "dependencies": { "@elizaos-plugins/plugin-kaia": "github:kaiachain/kaia-eliza-plugin" }}
Build & Start Eliza
pnpm buildpnpm start --character="./characters/kaiaagent.character.json"