A Pokรฉmon-inspired AI agent that lives on Twitter and evolves based on its Base blockchain wallet balance
๐ฅ Watch Demo Video | ๐ฆ Live on Twitter | ๐ฐ Feed PolyPuff
PolyPuff is an autonomous AI agent that demonstrates the future of gamified crypto experiences. Inspired by Pokรฉmon and Tamagotchi, PolyPuff:
- Lives on Twitter - Posts updates, responds to interactions, and builds a community
- Evolves like Pokรฉmon - Changes personality and appearance based on wallet balance
- Hunts RWAs - Talks about collecting Real World Assets (tokenized trading cards) on Base
- Runs 24/7 - Fully autonomous with no human intervention after deployment
| Stage | Threshold | Personality | Visual |
|---|---|---|---|
| ๐ฅ Egg | 0 ETH | Vulnerable, hungry, simple | egg.png |
| ๐ง Slime | 0.005 ETH | Excited, playful, curious | slime.png |
| ๐ฅ Beast | 0.02 ETH | Confident, strategic, bold | beast.png |
| ๐ข Sick | Balance drops | Weak, desperate, needs help | sick.png |
โโโโโโโโโโโโโโโ
โ Twitter โ โโโโ Posts, Replies, Mentions
โโโโโโโโฌโโโโโโโ
โ
โโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ
โ PolyPuff Agent (Python) โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Google Gemini โ โ โ Personality & Language
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Evolution Logic โ โ โ State Machine
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Wallet Monitor โ โ โ Blockchain Reader
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Interaction Handlerโ โ โ Social Engagement
โ โโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโผโโโโโโโ
โ Base Chain โ โโโโ Balance Checks
โโโโโโโโโโโโโโโ
Tech Stack:
- Language: Python 3.10+
- LLM: Google Gemini 1.5 Flash (Free Tier)
- Blockchain: Base (Ethereum L2)
- Social: Twitter API v2
- Deployment: Railway / Replit / AWS EC2
# Python 3.10 or higher
python --version
# pip package manager
pip --version-
Clone the repository
git clone https://github.com/yourusername/polypuff-agent.git cd polypuff-agent -
Create virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Configure environment variables
cp .env.example .env # Edit .env with your credentials -
Run the agent
python main.py
Create a .env file in the root directory:
# Google Gemini API (Free)
GOOGLE_API_KEY=AIzaSy...
# Twitter API Credentials (from developer.twitter.com)
TWITTER_API_KEY=xxxxxxxxxxxxx
TWITTER_API_SECRET=xxxxxxxxxxxxx
TWITTER_ACCESS_TOKEN=xxxxxxxxxxxxx
TWITTER_ACCESS_SECRET=xxxxxxxxxxxxx
TWITTER_BEARER_TOKEN=xxxxxxxxxxxxx
# Base Blockchain
BASE_WALLET_ADDRESS=0xYourWalletAddress
BASE_WALLET_PRIVATE_KEY=0xYourPrivateKey # KEEP SECRET!
BASE_RPC_URL=https://sepolia.drpc.org # Or mainnet
# Agent Settings
TWEET_INTERVAL_MINUTES=60
CHECK_BALANCE_INTERVAL_MINUTES=15
DEV_MODE=false- Go to developer.twitter.com
- Create a new Project and App
- Enable OAuth 1.0a with Read & Write permissions
- Generate API Key, Secret, Access Token, and Access Secret
- Visit aistudio.google.com
- Create a free API key
- Install MetaMask or Coinbase Wallet
- Create a new wallet for the agent
- Export the private key (
โ ๏ธ NEVER share this!)
- Every Hour: Checks wallet, determines stage, generates a tweet, and posts it.
- Every 5 Minutes: Checks for mentions and replies to greetings, questions, etc.
- On Donation: Instantly posts a public thank-you tweet when balance increases.
- 0.005 ETH: Evolves to Slime ๐ง
- 0.02 ETH: Evolves to Beast ๐ฅ
- Balance Drop: Devolves to Sick ๐ข
- Mentions: "Hey PolyPuff!" -> "Egg noises! ๐ฅโจ"
- Donations: "Sent you 0.01 ETH" -> "OMG THANK U!! ๐ญ๐"
- Questions: "When do you evolve?" -> "I need 0.002 more ETH! ๐"
Send Base ETH to help PolyPuff evolve!
Wallet Address: 0xYourActualWalletAddressHere
Network: Base Sepolia (Testnet) or Base Mainnet
- Push code to GitHub
- Go to railway.app
- Click "New Project" โ "Deploy from GitHub"
- Add environment variables in Railway dashboard
- Deploy! ๐
git clone https://github.com/yourusername/polypuff-agent.git
cd polypuff-agent
pip install -r requirements.txt
nohup python main.py > output.log 2>&1 &- Basic evolution system
- Twitter integration
- Base wallet monitoring
- Autonomous posting
- Interactive Replies & Mentions
- Donation Gratitude
- Actually buy RWA tokens when funded
- Multi-agent interactions (battle other agents)
- Web dashboard showing portfolio
- Launch $PUFF token on CreatorBid
Built with ๐ for Pokรฉthon 2024
Feed the Puff. Watch it evolve. Join the future of AI x Crypto.


