Skip to content

StevenDanielL17/pokemon-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

18 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฅš PolyPuff - The Evolving RWA Hunter

A Pokรฉmon-inspired AI agent that lives on Twitter and evolves based on its Base blockchain wallet balance

Twitter Follow Base Network License: MIT

๐ŸŽฅ Watch Demo Video | ๐Ÿฆ Live on Twitter | ๐Ÿ’ฐ Feed PolyPuff


๐ŸŽฏ What is 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

Evolution Stages

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

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   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

๐Ÿš€ Quick Start

Prerequisites

# Python 3.10 or higher
python --version

# pip package manager
pip --version

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/polypuff-agent.git
    cd polypuff-agent
  2. Create virtual environment

    python -m venv .venv
    source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  3. Install dependencies

    pip install -r requirements.txt
  4. Configure environment variables

    cp .env.example .env
    # Edit .env with your credentials
  5. Run the agent

    python main.py

โš™๏ธ Configuration

Environment Variables

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

Getting API Keys

Twitter API

  1. Go to developer.twitter.com
  2. Create a new Project and App
  3. Enable OAuth 1.0a with Read & Write permissions
  4. Generate API Key, Secret, Access Token, and Access Secret

Google Gemini API

  1. Visit aistudio.google.com
  2. Create a free API key

Base Wallet

  1. Install MetaMask or Coinbase Wallet
  2. Create a new wallet for the agent
  3. Export the private key (โš ๏ธ NEVER share this!)

๐ŸŽฎ How It Works

1. Autonomous Loop

  • 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.

2. Evolution Triggers

  • 0.005 ETH: Evolves to Slime ๐Ÿ’ง
  • 0.02 ETH: Evolves to Beast ๐Ÿ”ฅ
  • Balance Drop: Devolves to Sick ๐Ÿ˜ข

3. Interactive Features

  • 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! ๐Ÿ“ˆ"

๐Ÿ’ฐ How to Feed PolyPuff

Send Base ETH to help PolyPuff evolve!

Wallet Address: 0xYourActualWalletAddressHere

Network: Base Sepolia (Testnet) or Base Mainnet


๐Ÿšข Deployment

Option 1: Railway (Recommended)

  1. Push code to GitHub
  2. Go to railway.app
  3. Click "New Project" โ†’ "Deploy from GitHub"
  4. Add environment variables in Railway dashboard
  5. Deploy! ๐Ÿš€

Option 2: VPS (Ubuntu)

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 &

๐Ÿ—บ๏ธ Roadmap

Phase 1: Hackathon (Completed โœ…)

  • Basic evolution system
  • Twitter integration
  • Base wallet monitoring
  • Autonomous posting
  • Interactive Replies & Mentions
  • Donation Gratitude

Phase 2: Future

  • 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.

About

The "Tamagotchi" Portfolio Concept: An AI pet that lives on Twitter. Function: It starts as a "Level 1 Slime." It posts: "I am hungry. Feed me Base ETH." Evolution: If its wallet balance grows, it "evolves" (you change its profile picture and prompt personality to be more aggressive/confident). If the balance drops, it "devolves" or gets sick.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages