Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 18 or higher recommended
pnpm
Fast, disk space efficient package manager
MetaMask
Or another Web3 wallet for blockchain interactions
Git
For cloning the repository
Installing Prerequisites
Install Node.js
Install Node.js
Download and install Node.js from nodejs.org. We recommend using the LTS version.Verify installation:
Install pnpm
Install pnpm
MetaVault AI uses pnpm as its package manager. Install it globally:Verify installation:
Install MetaMask
Install MetaMask
Install the MetaMask browser extension from metamask.io.You’ll need this to interact with the vault through the frontend.
Repository Structure
MetaVault AI is a monorepo containing three main packages:Each package can be developed independently, but they work together to form the complete MetaVault AI system.
Initial Setup
Install Dependencies
Install all dependencies for the entire monorepo:This command will:
- Install root-level dependencies
- Install dependencies for all packages (contracts, frontend, agents)
- Set up workspace links between packages
Configure Smart Contracts
Navigate to the contracts package and set up environment variables:Edit
.env and add your configuration:Configure AI Agents
Navigate to the agents package and set up environment variables:Edit
.env and configure the following:You’ll need to obtain an OpenRouter API key from openrouter.ai to run the AI agents. Contract addresses will be populated after deploying the contracts.
Configure Frontend
Navigate to the frontend package and set up environment variables:Edit
.env.local:Verify Installation
To verify your setup is complete, run these checks:- Contracts
- Agents
- Frontend
Tech Stack Overview
Smart Contracts
- Solidity 0.8.28
- Hardhat 2.26.5
- OpenZeppelin 5.4.0
Frontend
- Next.js 14
- TypeScript 5.5
- Wagmi & Viem
- Tailwind CSS
AI Agents
- ADK-TS 0.5.7
- Express 5.2.1
- TypeScript 5.9
- node-cron 4.2.1
Common Issues
pnpm command not found
pnpm command not found
Make sure pnpm is installed globally:
Node version mismatch
Node version mismatch
Check your Node.js version:Update to Node.js 18 or higher if needed.
Compilation errors in contracts
Compilation errors in contracts
Try cleaning and reinstalling:
Port already in use
Port already in use
If ports 3000, 3001, 3002, or 8545 are already in use, you can:
- Change the ports in your
.envfiles - Kill the process using the port
- Use different port numbers in your configuration
Next Steps
Now that your environment is set up, you can:Run Locally
Learn how to run the full stack locally
Testing Guide
Run tests and verify functionality