This example repo shows how to create an AI agent with capabilities to interact with your Safe using Vercel AI SDK.
Prerequisite knowledge: You will need some basic familiarity with Node.js.
Before progressing with the tutorial, please make sure you have:
- Installed and opened
ollama
. This tutorial will runllama3.2
, but feel free to explore other models; - Set up a wallet for your agent with some Sepolia test funds to pay for the transactions, for example with Metamask;
- (Optional) If you wish to use OpenAI models instead (or another provider), you will need to create an account on their website and get an API key
See: https://github.com/ollama/ollama
ollama run llama3.2
create a file named .env at the root of your project, and add your private key and address key to it:
cp .env.example .env
npx tsx src/index.ts
Please post any questions on Stack Exchange with the safe-core
tag.
MIT, see LICENSE.