ElizaOS DKG agent
Last updated
Was this helpful?
Last updated
Was this helpful?
ElizaOS is a popular open source AI agent framework which supports a native DKG integration through the DKG plugin. You can now build AI agents that store their memories on the Decentralized Knowledge Graph (DKG). This setup enables agents to share memories (creating a collective memory) and manage their knowledge transparently and verifiably.
You can watch the following video to learn how to setup a ElizaOS DKG agent, or follow the text instructions below.
ElizaOS is operational on Mac and Ubuntu devices, Windows is not yet supported
Copy the .env.example
file (from the Elizagraph folder in cloned repository) and rename it to .env
and fill in the necessary details. The following instructions will help you populate the .env file.
Node information
If you do not already have a DKG node set up, you can use a public node that the OriginTrail team set up so that everyone has an easy way to interact with the DKG.
ENVIRONMENT
: Define your environment. For example, use development
if you're running a local setup, testnet
for a testnet setup, or mainnet
a mainnet setup.
OT_NODE_HOSTNAME
: Enter the hostname or IP address of your OriginTrail DKG node. This will be the URL of the node you set up or http://localhost if you're running it locally.
OT_NODE_PORT
: The port used by the DKG node, typically 8900
.
PUBLIC_KEY
: The public key of the wallet you will use to publish Knowledge Assets.
PRIVATE_KEY
: The private key corresponding to the above wallet. Ensure you keep this secure and never share it outside of the .env file.
BLOCKCHAIN_NAME
: Specify the blockchain network you’re using. otp:2043
(NeuroWeb mainnet), base:8453
(Base mainnet), gnosis:100
(Gnosis mainnet), otp:20430
(NeuroWeb testnet), base:84532
(Base testnet), gnosis:10200
(Gnosis testnet)
LLM key
Eliza supports a wide range of LLM providers. To use one of them, create an API key and paste it into the environment file.
For example, if you want to use an Open AI LLM, populate the OPENAI_API_KEY variable in the .env.
X credentials (in case you want to use X)
Eliza uses a basic X authentication setup. Use your username, password, and email so that the application can post on the platform. If you encounter issues, we recommend you to use the TWITTER_COOKIES variable and copy the cookies from the browser.
If you wish to do so, modify the templates in plugin-dkg/constants.ts
to change the format in which your data is stored or queried.
Firstly, create a character in the characters
folder, for example chatdkg.character.json.
You can look at existing examples in the characters
folder for inspiration.
You can use the OriginTrail , which includes the plugin, or using the , where the plugin has already been integrated. The following instructions will assume you are using the Elizagraph Starter kit.
There's one public node available for mainnet () and one for testnet (). All blockchains are supported on each of the nodes.
Here's an example of how to set up a MetaMask wallet:
In order to fund your wallet on testnet, feel free to use the in the . There's a message pinned in the #faucet-bot channel in case some of the faucets are down. In that case, feel free to ping the core team to send you some testnet funds manually.
Here’s how to get an .