Welcome to MetaVault AI
MetaVault AI is an intelligent DeFi vault that combines secure smart contracts with AI agents to optimize your yield strategies. Built using the Agent Development Kit for TypeScript (ADK-TS) by IQAI, it demonstrates how autonomous agents can monitor, manage, and optimize DeFi positions in real-time.Quick start
How it works
Learn about the vault architecture and AI agent system
Key features
Discover what makes MetaVault AI unique
Getting started
Set up and run the full stack locally
API reference
Explore smart contract interfaces and agent tools
What is MetaVault AI?
MetaVault AI is a DeFi vault that automatically manages your funds across multiple strategies to maximize yield while minimizing risk. Unlike traditional vaults that rely on predetermined rules, MetaVault AI uses autonomous agents that can:- Monitor strategy health in real-time
- Detect and respond to market changes
- Automatically adjust leverage and allocations
- Harvest yields and compound returns
- Interact with users through natural language
MetaVault AI currently runs on mock contracts for testing purposes, simulating Aave V3 mechanics. All liquidation thresholds, interest accrual, and borrowing flows use mocked logic for predictable testing.
Architecture overview
The system is built as a monorepo with three main packages:Smart contracts
Solidity contracts deployed on-chain that handle:- User deposits and withdrawals
- Strategy allocation and routing
- Fee management and accounting
- Yield distribution
AI agents
TypeScript agents built with ADK-TS that:- Monitor vault and strategy health
- Execute autonomous management decisions
- Provide user assistance via chat
- Simulate yields for testing
Frontend
A Next.js web application where users can:- Connect their wallet
- Deposit and withdraw funds
- View real-time performance metrics
- Chat with the AI assistant
Tech stack
- Smart contracts: Solidity ^0.8.28, Hardhat, OpenZeppelin
- Frontend: Next.js 14, TypeScript, Tailwind CSS, Wagmi, Viem
- AI agents: ADK-TS, Node.js, Express
- DeFi protocols: Aave V3 (mocked), Uniswap V2 (mocked)
Repository structure
Next steps
Understand how the system works
Dive deep into the vault mechanics, strategies, and AI agent architecture
Explore key features
Learn about autonomous monitoring, risk management, and leverage optimization