🇹🇭 ETHGlobal Bangkok 2024 - AIlice
Manage wallets from multiple chains with an AI agent, in a secure & non-custodial way.
How many wallets do you have?
The web3 space nowadays is crowded with many different projects: Ethereum & EVMs, Solana, Cosmos, Bitcoin... managing your addresses between all those chains can be challenging, especially when you have multiple wallets on each one of them (hot wallet, cold wallet, test/garbage one...).
On the other end, AI Agents 🧠 🤖 and assistants are increasingly popular in the web3 community.
What if you could, with a single Ethereum wallet, use a decentralized messaging app to chat with an AI Agent that will automatically create, manage and allow you to transact with wallets on a multitude of chains:
❓ "transfer 1 ETH from my cold wallet to my hot wallet"
❓ "I need a fresh Ethereum wallet to trade memecoins, can you create one with the name 'Degen trades'? You can set its password to qwerty and transfer 0.02 ETH to it from my hot wallet."
❓ "What's the balance of my Bitcoin cold wallet?"
Feels tempting right? Meet AIlice (AI-lice), an AI Agent built on top of XMTP and Near that does exactly this, in a secure, non-custodial way to make sure that only you can access those wallets, and that you could export their private key at any time if you need it.
Currently supported chains for derivative accounts:
- Ethereum
- Bitcoin
Actions that can be done by discussing with AIlice:
- Create a new wallet on one of the supported chain
- Rename an existing wallet
- Delete an existing wallet (removes it from the agent's decentralized storage, but can be regenerated by the same user and password with the wallet creation action)
- List all the derivative wallets currently under AIlice's management
- Get the balance of a wallet or a summary of the total balance of all your wallets combined (only supports the main chain asset currently)
- Send some tokens from a wallet (only supports the main chain asset currently, with the chosen amount and destination address)
and this is just the beginning 🚀
To run the project locally, simply clone the repository and follow these steps:
Duplicate the .env.example
file into .env
and fill the required variables:
# The address and private key of your agent's wallet, using for storing data on Aleph.im
AGENT_WALLET_ADDRESS=0x
AGENT_WALLET_PRIVATE_KEY=0x
# MessageKit variables, key should be the private key of an ETH wallet (can be the same as above)
KEY=0x
OPEN_AI_API_KEY=sk-proj-
# Near account used to fund the implicit Near account of each user
NEAR_ACCOUNT_ID="your-account.testnet"
NEAR_PRIVATE_KEY="ed25519:xxx"
# Public MPC contracts data for testnet
MPC_CONTRACT_ID="v1.signer-prod.testnet"
MPC_PUBLIC_KEY="secp256k1:4NfTiv3UsGahebgTaHyD9vF8KYKMBnfd6kh94mK6xv8fGBiJB8TBtFMP5WWXz6B89Ac1fbpzPwAvoyQebemHFwx3"
Then you just need to install the dependencies and start the project:
yarn install
yarn dev
To use AIlice, you can either follow the steps above to launch your own version of the assistant or use the deployed version.
💡 For the local version, the username and address will be different when discussing on Converse, make sure to use the right one
As a hackathon project built in solo, this is obviously not finished and can be improved in many ways. Some examples and ideas I'd like to explore are listed below
- 📈 Manage wallets for other chains supported by Near's Chain Signatures (L2s EVM, Cosmos, XRPL...)
- 🏎️ Complete set of actions to truly interact with the managed account (swap, send ERC-20 / NFTs, sign messages...)
- ⚙️ Add some security options to require additional verifications / confirmations for certain transaction types / wallets
- 🧠 Extend MessageKit to provide a less-opinionated AI framework (use with other standard framework, rely on decentralized models instead of OpenAI, provide a configuration object instead of fixed variable names...)