2. ElizaOS and AI Agent Frameworks
Now that you know the basics of interacting with VeChainThor, let's look at how to make the SDK a resource for our first AI Agent on-chain. For this tutorial we’ll be using ElizaOS framework, but you will be able to use your VeChain knowledge to apply it on any other agentic model.
2.1 What is ElizaOS?
ElizaOS is an open-source framework that makes it easy to build AI agents with persistent personalities. Think of it as an operating system for your AI.
We chose it for this tutorial because it's widely used in Web3 and makes it straightforward to integrate blockchain tools like VeChain into your agent.
The framework's plugin architecture means you can add VeChain functionality without modifying core code - you simply register your blockchain actions and they become part of your agent's capabilities.
If you want to learn more about ElizaOS check out the official documentation for detailed guides.
2.2 Installing ElizaOS
ElizaOS uses Bun (a fast JavaScript runtime) instead of Node.js.
As mentioned in Prerequisites, first, install Bun if you don't have it:
Once you have Node.js and Bun installed, you can install the ElizaOS CLI globally:
After installation, verify that elizaOS CLI is properly installed:
2.3 Creating Your First Agent
We'll use the veAgentX starter template which already has VeChain tools configured:
In your root directory, install all the dependencies using
This command will install all the necessary ElizaOS plugins and the VeChain SDK libraries you learned about in the introductory section.
2.4 Configuring Your Agent
Edit the .env file to configure your agent:
2.5 Running Your Agent
Start your agent with:
This will:
Load your character file
Connect to your chosen AI model
Initialize the database for memory
Start the web interface at http://localhost:3000
Join our Telegram