A Rust-based AI agent implementation featuring SolanaTracker API integration and rig for AI functionality, powering an autonomous social media presence on X.
🤖 Follow our AI agent: @ChainFud
- Create a new profile in
./characters
- Set API keys in
.env
(see Installation) - Run a specific character:
# PowerShell $env:CHARACTER_NAME="fud"; cargo run # Command Prompt set CHARACTER_NAME=fud; cargo run
- Creates consistent interactions through structured personality profiles
- Adapts writing style and topics based on configurable preferences
- Generates unique responses that align with the character's traits
- Posts original content based on interests and context
- Responds thoughtfully to interactions and mentions
- Maintains natural conversation flows with intelligent filtering
- Introduces random timing delays to mirror human behavior
- Uploads engaging images to enhance posts
- Intelligently pairs visual content with text for maximum impact
- Records and learns from past interactions
- Builds relationships with other users over time
- Leverages conversation history for relevant responses
- Full Twitter API v2 integration with built-in rate limiting
- Supports Grok, Claude, GPT, Perplexity, Gemini, and more.
- Modular architecture separating core logic from platform specifics
- Extensible design for adding new traits and platform integrations
- Efficient Rust implementation prioritizing performance and reliability
- Rust (latest stable version)
- API Keys:
- Anthropic Claude API access (or any other supported LLM)
- Twitter API v2 credentials (OAuth 1.0a)
- SolanaTracker API
-
Clone the repository:
git clone https://github.com/invntiv/ChainFudAgent cd ChainFudAgent
-
Create a
.env
file with required credentials:ANTHROPIC_API_KEY=your_api_key TWITTER_CONSUMER_KEY=your_key TWITTER_CONSUMER_SECRET=your_secret TWITTER_ACCESS_TOKEN=your_token TWITTER_ACCESS_TOKEN_SECRET=your_token_secret CHARACTER_NAME=your_character_name SOLANA_TRACKER_API_KEY=your_solanatracker_api_key
-
Configure your character:
- Create a new directory:
characters/{CHARACTER_NAME}/
- Add character definition in
character.json
- Create a new directory:
Characters are defined using a structured JSON format:
{
"instructions": {
"base": "Base character instructions",
"suffix": "Additional instructions"
},
"adjectives": ["trait1", "trait2"],
"bio": {
"headline": "Character headline",
"key_traits": ["trait1", "trait2"]
},
"lore": ["background1", "background2"],
"styles": ["style1", "style2"],
"topics": ["topic1", "topic2"],
"post_style_examples": ["example1", "example2"]
}
ChainFud/
├── src/
│ ├── core/ # Core agent functionality
│ ├── characteristics/# Character trait implementations
│ ├── providers/ # External service integrations
│ └── memory/ # Persistence layer
├── characters/ # Character definitions
└── tests/ # Test suite
- rig - AI agent framework
twitter-v2
- Twitter API clienttokio
- Async runtimeserde
- Serialization/deserializationanyhow
- Error handling
- rig team for the AI agent framework
- Contributors and maintainers
For questions and support, please open an issue in the GitHub repository.