An intelligent automation system that finds trending topics and creates engaging social media content using AI agents and Android device automation.
- Finds trending topics using Google Trends
- Generates an illustrative, clickbait image using gemini
- Generates a really interesting post for twitter
- Then opens twitter and posts the image and caption.
No trends or twitter api needed.
- Trend Discovery: Automatically finds trending topics from Google Trends
- AI Content Generation: Uses Gemini API to create engaging Twitter posts and image prompts
- Image Generation: Creates relevant images using Gemini's image generation capabilities
- Social Media Automation: Posts to Twitter/X with generated content and images
- Full Pipeline Automation: End-to-end automation from trend discovery to posting
- Android Device: Android phone/tablet with USB debugging enabled or use an Emulator
- ADB: Android Debug Bridge installed and device connected
- Gemini API Key: Get from Google AI Studio
- Apps Installed: Chrome, Gemini app, Twitter/X app on your Android device
-
Clone and Navigate:
cd TweetFire -
Install Dependencies:
pip install -r requirements.txt
-
Environment Configuration:
cp .env.example .env # Edit .env and add your GEMINI_API_KEY -
Android Setup:
- Enable Developer Options on your Android device
- Enable USB Debugging
- Connect device via USB
-
App Installation: Make sure these apps are installed on your Android device:
- Chrome Browser
- Twitter/X App
-
Droidrun Portal setup
droidrun setup
./tweetfireShoppingAutopilot/
├── main.py # Main orchestration script
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── agents/
│ ├── __init__.py
│ ├── find_trend.py # Google Trends scraper agent
│ ├── content_generator.py # AI content generation
│ ├── image_generator.py # Gemini image generation agent
│ ├── twitter_poster.py # Twitter posting agent
│ └── prompts/
│ ├── __init__.py
│ └── prompts.py # All agent prompts and goals
└── images/
├── banner_logo.png
└── youtube_link.png
GEMINI_API_KEY=your_gemini_api_key_here
All agent instructions and goals are stored in agents/prompts/prompts.py. You can customize:
- Trend search behavior
- Content generation style
- Image generation prompts
- Social media posting behavior
- Trend Discovery: DroidAgent opens Chrome, navigates to Google Trends, and extracts trending topics
- Content Generation: Gemini API generates engaging Twitter posts and image prompts based on trends
- Image Creation: Another DroidAgent opens Gemini app and creates images using the generated prompts
- Social Posting: Final DroidAgent opens Twitter/X and posts the content with generated images
The system generates:
execution_log.json: Detailed log of each run with all generated content- Console output with step-by-step progress
- Posted content on your Twitter/X account
This project is for educational and personal use. Please comply with all relevant terms of service for the platforms and APIs used.
Feel free to fork, modify, and improve this automation pipeline. Pull requests are welcome!