AI-Agent is a powerful automation tool designed to interact with Twitter, providing functionalities to crawl tweets, automatically post content, and reply to comments. This agent is powered by the Gemini Model to generate human-like content.
# AI-Agent: Twitter Automation with Gemini Model
AI-Agent is a powerful automation tool designed to interact with Twitter, providing functionalities to crawl tweets, automatically post content, and reply to comments. This agent is powered by the Gemini Model to generate human-like content.
## 🚀 Features
- **Crawl Tweets**: Collect recent tweets from specific users.
- **Auto-Tweet**: Generate and post tweets using the Gemini Model.
- **Auto-Reply**: Automatically reply to comments with context-aware responses.
## 🛠️ Installation
1. **Install Dependencies**
```bash
npm install
```
2. **Set Up Environment Variables**
- Copy the example environment file:
```bash
cp .env.example .env
```
- Fill in your environment variables in `.env`.
3. **Configure Agent Profile**
- Provide character details in `character/main.json`:
```json
{
"agent": "YourAgentName",
"bio": ["Short description of your agent"],
"knowledge": ["Key facts or context your agent should know"]
}
```
## 📘 Usage
### 1️⃣ Crawl Tweets
To crawl tweets from a specific user:
```bash
npm start crawl [username]
```
Example:
```bash
npm start crawl elonmusk
```
### 2️⃣ Post a Tweet
Generate and post a tweet using the Gemini Model:
```bash
npm start tweet
```
### 3️⃣ Reply to Comments
Automatically reply to the latest comments:
```bash
npm start reply
```
## 💡 Notes
- Ensure your `.env` file contains valid credentials (e.g., Twitter API keys and Claude API key).
- The `character/main.json` file helps the agent generate personalized responses.
- The agent uses `Gemini Model` for tweet generation and replies.
## 📝 Example `.env` Structure
```env
TWITTER_USERNAME=your_username
TWITTER_PASSWORD=your_password
TWITTER_EMAIL=your_email
TWITTER_2FA_SECRET=your_2fa_secret
TWEET_CRAWL=10 # Number of tweets to crawl (default: 10, max: 800)
TWEET_CHAR_LIMIT=280 # Tweet character limit (reqGoogle's AI-powered research notebook that ingests your documents and becomes an expert on your content. Generates audio overviews, study guides, FAQs, and interactive discussions from uploaded sources.
Google DeepMind's experimental AI agent that can navigate websites, fill forms, and complete multi-step browser tasks autonomously. Uses Gemini's multimodal understanding to interact with web interfaces.
Google DeepMind's universal AI assistant prototype that can see, hear, and respond in real-time through your device camera and microphone. Demonstrates the future of multimodal AI interaction.
Google Cloud's enterprise platform for building, deploying, and managing AI agents powered by Gemini. Supports multi-agent orchestration, tool integration, and enterprise governance.
Gemini's agentic research capability that autonomously browses the web, synthesizes information from dozens of sources, and produces comprehensive research reports on any topic.
Interactive coding and content creation agent that generates, previews, and iterates on code, documents, and interactive applications in a side panel. Supports HTML/CSS/JS, Python, and more.