An AI-powered fundraising agent built with XMTP protocol and Coinbase AgentKit. This agent helps users create and manage fundraisers through decentralized messaging on the XMTP network.
- XMTP Messaging: Secure, decentralized messaging protocol
- Coinbase AgentKit Integration: Blockchain operations on Base Sepolia
- Fundraiser Creation: Create fundraisers through chat commands
- QR Code Generation: Generate donation QR codes
- Multi-conversation Support: Works in both DMs and group chats
- AI-Powered Responses: Natural language understanding with OpenAI
- Node.js (v20 or higher)
- Yarn or npm
- CDP API keys from Coinbase Developer Platform
- OpenAI API key
- Clone and setup:
git clone <your-repo>
cd <your-repo>
npm install- Generate XMTP keys:
npm run gen:keys- Configure your
.envfile with:
# XMTP Environment Variables (generated by gen:keys)
WALLET_KEY=0x...
ENCRYPTION_KEY=...
XMTP_ENV=dev
# Add your API keys
CDP_API_KEY_NAME=organizations/.../apiKeys/...
CDP_API_KEY_PRIVATE_KEY=-----BEGIN EC...END EC PRIVATE KEY-----\n
OPENAI_API_KEY=sk-...- Start the agent:
npm run dev-
Development Environment:
- Go to xmtp.chat
- Connect your wallet
- Switch to "Dev" environment in settings
- Start a conversation with your agent's address
- Send test messages
-
Production Environment:
- Use Coinbase Wallet mobile app
- Go to messaging section
- Start conversation with your agent's address
create fundraiser "Name" 0.5- Create a fundraiser with name and goal amountfundraiser for 0.2 called "Project Name"- Alternative syntaxhelp- Show available commands
You: create fundraiser "Web3 Ladies" 0.5
Agent: π Creating fundraiser "Web3 Ladies" with goal of 0.5 ETH...
β
Fundraiser created successfully! [Details and QR code]
You: help
Agent: π **Zeon Fundraiser Agent Commands**
[Shows all available commands]
βββ index.ts # Main XMTP agent entry point
βββ helpers/
β βββ client.ts # XMTP and crypto utilities
βββ utils/
β βββ blockchain.ts # Blockchain utilities
β βββ fundraiser-contract.ts # Fundraiser contract management
β βββ ...
βββ scripts/
β βββ generateKeys.ts # Key generation script
βββ package.json
WALLET_KEY: Your agent's private keyENCRYPTION_KEY: Database encryption keyXMTP_ENV: Environment (dev, production)CDP_API_KEY_NAME: Coinbase CDP API key nameCDP_API_KEY_PRIVATE_KEY: Coinbase CDP private keyOPENAI_API_KEY: OpenAI API key
- Base Sepolia: Testnet for development
- XMTP Dev Network: For testing messaging
- Only responds when mentioned with
@zeonor@fundraiser - Or when someone replies to the agent's message
- Responds to all messages automatically
- Shows typing indicator with "π" reaction
- Graceful retry mechanism for network issues
- User-friendly error messages
- Automatic reconnection
- Custom Commands: Extend
processMessageWithAIfunction - New Tools: Add tools to the AgentKit configuration
- Content Types: Support additional XMTP content types
npm testnpm run build- Connect your GitHub repository to Railway
- Add environment variables in Railway dashboard
- Deploy automatically
- Heroku, Vercel, or any Node.js hosting
- Set environment variables in your platform
- Ensure Node.js 20+ support
-
"Cannot find module '@xmtp/node-sdk'"
- Run
npm installto install dependencies - Ensure Node.js version is 20+
- Run
-
"Missing environment variables"
- Run
npm run gen:keysto generate XMTP keys - Add your CDP and OpenAI API keys to
.env
- Run
-
Agent not responding
- Check XMTP environment setting
- Verify agent address is correct
- Check console logs for errors
To get your agent featured in Coinbase Wallet:
- Test thoroughly on both dev and production
- Ensure proper error handling
- Follow XMTP best practices
- Submit through the official form
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
Built with β€οΈ using XMTP protocol and Coinbase AgentKit