AdSageAI is a cutting-edge, Multi-Agent Marketing System designed to optimize social media campaigns using advanced AI personas and real-time data. It leverages Google's Gemini models to simulate a diverse marketing team—Gen Z, Millennial, and Strategist—negotiating the best approach for your content.
- Multi-Persona Agentic Core: Run parallel analysis using distinct AI personas (Youth vs. Adult) to get diverse feedback on a single campaign.
- "Human-in-the-Loop" Logic: A specialized Strategist Agent synthesizes conflicting viewpoints from other agents to propose a balanced, actionable strategy.
- Visual Predictive Analysis: Uses Gemini Vision (Multimodal) to "see" your draft images and predict engagement scores, emotional impact, and virality potential before you post.
- Dynamic Intelligence:
- Real-time Hashtag Scraping: Automatically scrapes live, trending hashtags from the web based on AI-generated search queries (bypassing the knowledge cutoff of LLMs).
- Structured Output: Enforces strict JSON schemas for UI rendering, turning unstructured AI thoughts into dynamic dashboards.
- Runtime: Python 3.12+
- Framework: Flask (REST API)
- AI Engine: Google Gemini 1.5 Flash / Pro (via
google-genaiSDK) - Scraping:
BeautifulSoup4+requests(Targeting best-hashtags.com dynamically) - Image Processing:
Pillow(PIL) - API Communication: RESTful endpoints with CORS enabled.
- Framework: Vanilla JavaScript (ES6+), HTML5, CSS3.
- Design: Custom CSS Grid/Flexbox layout (No heavy framework overhead).
- Communication:
Fetch APIfor async non-blocking calls to the backend.
RigtusHuddle/
├── backend/
│ └── agent/
│ ├── server.py # Flask API Entry Point
│ ├── agent_core.py # Main Agent Orchestrator (The Brain)
│ ├── hashtag_scraper.py # Real-time Web Scraper Tool
│ ├── prompts/ # System Instructions for Agents
│ │ ├── analyze_campaign.prompt (Youth Persona)
│ │ ├── analyze_campaign_adult.prompt (Adult Persona)
│ │ ├── negotiate_suggestions.prompt (Strategist)
│ │ └── predictive_analysis.prompt (Vision Agent)
│ └── tools/ # Helper modules (Image Gen, LinkedIn API)
├── UI/
│ ├── dashboard.html # Main User Interface
│ ├── app.js # Client-side Logic
│ └── style.css # Styling
└── requirements.txt # Python Dependencies- Python 3.10 or higher
- A Google Cloud API Key (for Gemini)
git clone https://github.com/alysajad/adsageai.git
cd adsageai/RigtusHuddleIt is recommended to use a virtual environment.
# Windows
python -m venv .venv
.venv\Scripts\activate
# Install requirements
pip install -r requirements.txtCreate a .env file in the RigtusHuddle root directory:
GOOGLE_API_KEY=your_actual_api_key_here
LINKEDIN_CLIENT_ID=optional_for_posting
LINKEDIN_CLIENT_SECRET=optional_for_postingNavigate to the agent directory and run the Flask server:
cd backend/agent
python server.py
# Server runs on http://localhost:5000Open a new terminal, navigate to the UI directory, and start a simple HTTP server:
cd ../../UI
python -m http.server 8000
# Access dashboard at http://localhost:8000/dashboard.html- Open
http://localhost:8000/dashboard.html. - Text Campaign: Enter a description of your product or campaign idea.
- System Action: The Youth and Adult agents will analyze it. The Strategist will merge their insights and display a strategy.
- Draft Analysis: Upload an image and add a caption.
- System Action: The Vision Agent will predict the "Engagement Score" (1-10) and suggest live hashtags. Note how the hashtags are fetched dynamically from the web!
| Endpoint | Method | Description |
|---|---|---|
/analyze |
POST |
Triggers the multi-agent negotiation flow (Youth + Adult + Strategist). |
/analyze_draft |
POST |
Uploads an image for predictive visual analysis & hashtag scraping. |
/generate_image_for_post |
POST |
Generates a new image asset based on a text prompt. |
/status |
GET |
Checks system health and API connections. |
- Fork the repo.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
Built with ❤️ for the AI Agent Hackathon.