Skip to content

A X (Twitter) AI agent that analyzes user blockchain activity and awards unique generative NFTs

License

Notifications You must be signed in to change notification settings

phdargen/xoninAgent

Repository files navigation

Xonin Agent

A X (Twitter) AI agent (@XoninNFT) that analyzes user blockchain activity and awards unique generative NFTs based on their (onchain reputation score). This project connects to Xonin, a fully onchain generative art project (GitHub), and is built using CDP AgentKit.

Overview

XoninBot is an autonomous AI agent with the following features:

  • Twitter Integration: Automatically monitors mentions and processes NFT mint requests
  • Onchain Analysis: Evaluates wallet addresses to determine reputation score
  • Generative NFT: Mints unique SVG-based NFTs
  • Address Resolution: Support for ENS domains and direct Ethereum addresses
  • Autonomous Operation: Fully automated workflow from Twitter interaction to NFT minting, with response messages containing transaction details and NFT preview images

The agents runs on a daily schedule via GitHub Actions (limited by X free tier API calls) and can also be triggered manually.

NFT examples

XoninNFT Example 1 XoninNFT Example 2
XoninNFT Example 3 XoninNFT Example 4

Architecture

XoninBot uses:

  • LangChain: For building the AI agent capabilities
  • CDP AgentKit: Coinbase Developer Platform for blockchain interactions
  • Tweepy: For X API integration
  • Pydantic: For data validation
  • Poetry: For dependency management

Setup

  1. Clone the repository

  2. Install dependencies:

    cd agentkit/cdp-langchain/examples/chatbot-python
    poetry install
  3. Set required environment variables:

    NETWORK_ID=<blockchain_network>
    ETHERSCAN_API_KEY=<your_api_key>
    TWITTER_API_KEY=<your_api_key>
    TWITTER_API_SECRET=<your_api_secret>
    TWITTER_ACCESS_TOKEN=<your_access_token>
    TWITTER_ACCESS_TOKEN_SECRET=<your_access_token_secret>
    CDP_WALLET_DATA=<your_wallet_data>
    OPENAI_API_KEY=<your_openai_api_key>
    

Usage

Automated Mode

The bot runs automatically via GitHub Actions every day at 12:00 UTC.

Manual Operation

You can run the bot manually with:

cd agentkit/cdp-langchain/examples/chatbot-python
poetry run python chatbot.py

The script provides two modes:

  1. Chat mode - for interactive testing
  2. Autonomous mode - for monitoring Twitter mentions and processing requests

Related Projects

License

This project is based on CPD AgentKit, which is licensed under the Apache-2.0 license.

About

A X (Twitter) AI agent that analyzes user blockchain activity and awards unique generative NFTs

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published