AI-Powered Content Automation System
This is an AI-powered news automation system I'm building to solve a real problem: creating and sharing tech news content across multiple platforms in multiple languages.

AI-Powered Content Automation System
# Overview
This is an AI-powered news automation system I'm building to solve a real problem: creating and sharing tech news content across multiple platforms in multiple languages. It's still in development, but foundation is solid. The system monitors RSS feeds, uses multiple AI models to create high-quality tech articles, translates them to Sinhala, and posts to Facebook, Twitter, and LinkedIn automatically.
Right now, I have core infrastructure done - database, encryption, rate limiting, backup system, and logging. The next phase is building the AI agents that will make this thing actually work. I'm designing it to work within free API limits, which makes it a fun engineering challenge.
# Why I'm Building This
I wanted to join the content creation game, but doing manual work is exhausting. Think about it - searching for news, filtering what's actually good, writing full articles about it, then translating to my own language, and doing this multiple times a day? Even once a day is too much work.
So I'm building my personal content creator. It works like this:
The Conversation Flow:
Me: "Hey dude, what's new in the last 24 hours? Anything good we can share?"
Bot: Goes and finds good stuff, filters it, creates shorter cleaner versions. Comes back: "Yeah dude, this looks good. This one is also good, but this one will work perfectly. Do you want to send it?"
Me: "Yeah dude, let's do it."
Bot: Translates it, finds the right info, comes back: "Bro, I translated it. What do you think?"
Me: "Kinda fire, but this needs to change like this, that needs to change like this... wait, I'll do it for you. Here, it's done. Post this."
Bot: "Nice dude, you nailed it. I'll post this to Facebook, Twitter, and LinkedIn."
Boom. It's live.
The Smart Part:
If I forget to share anything, the bot asks: "Hey boss, I found this, this looks good. What do you say, shall we send this?"
And if it's something huge - like a major vulnerability or viral-level stuff - it gets serious: "Bro, look at this. This looks so good and this will go viral for sure. This is on fire right now."
If I don't respond within 1 hour: "Bro, where have you been? Under a rock? I'm gonna share this anyway. You can delete it later if you want."
Then it pins it and sends it.
Simple as that. This is my personal content creator.
What I'm building:
- Works like a friend - Simple conversation, not complex commands
- Filters the noise - Only shows me stuff worth sharing
- Handles the heavy lifting - Research, writing, translation, posting
- Knows when to push - Auto-posts viral content if I'm slow
- Reminds me - Catches me when I miss good stuff
This isn't just automation. It's like having a smart content partner who knows what I like, does the work I hate, and keeps me in the game without burning me out.
# What It Will Do (When Done)
The Main Flow
Core Features
1. Smart RSS Monitoring (The Finder)
- Monitors up to 10 RSS feeds every hour
- Uses AI to score article quality (not just random stuff)
- Skips duplicates from the last 7 days
- Sends me a Telegram message: "Hey dude, found something good"
2. AI-Powered Content Creation (The Writer)
- Uses multiple AI models for different tasks
- Creates shorter, cleaner versions (not long boring articles)
- Generates catchy titles and click-baitable image captions
- Keeps tone simple and exciting (tech enthusiast style)
- Adapts structure based on topic type
3. Sinhala Translation (The Translator)
- Uses Gemini 3 Flash for high-quality translation
- Keeps technical terms in English (GPU, CPU, API, etc.)
- Maintains same exciting tone in Sinhala
- Asks me: "Bro, I translated it. What you think?"
4. Multi-Platform Posting (The Publisher)
- Posts to Facebook, Twitter/X, and LinkedIn
- Supports two channel sets: Sinhala and English markets
- Auto-generates relevant hashtags
- Tracks posting history with share links
- Says: "Nice dude, you nailed it. I'll post this now."
5. Smart Reminders (The Nudger)
- If I forget to share good stuff: "Hey boss, found this, looks good. Shall we send this?"
- For viral content: "Bro, this is on fire right now. This will go viral for sure."
- Auto-posts after 1 hour if I don't respond: "Where you been? I'm sharing this anyway."
- Pins important posts so I see them first
6. Easy Control via Telegram
- Simple conversation interface (no complex commands)
- Add/remove RSS feeds easily
- Review and edit articles inline
- Quick approve/reject buttons
- Manual backup and restore
# System Architecture
The system uses an agent-based architecture where each AI model has a specific job:
The Agent System
RSS Monitor Agent (Gemini 2.5 Flash Lite)
- Watches RSS feeds
- Scores articles for quality
- Checks for duplicates
- Finds good stuff
Search Agent (Brave Search + Gemini 2.5 Flash)
- Gathers information from multiple sources
- Validates sources
- Builds complete picture of topic
Content Generation Agent (Kimi K2 / GPT-OSS-120b)
- Creates English articles
- Adapts structure based on topic type
- Generates titles and captions
- Keeps it simple and exciting
Translation Agent (Gemini 3 Flash ONLY)
- Translates to Sinhala
- Keeps tech terms in English
- Maintains enthusiastic tone
Validation Agent (Gemini 2.5 Flash Lite)
- Checks information quality
- Validates sources
- Flags low-quality content
Image Processing Agent (Gemma 3 27b)
- Describes images to text
- Extracts key information
- Helps with "I Found Something" feature
Posting Agent (Gemma 3 27b)
- Formats content for each platform
- Generates hashtags
- Handles image uploads
- Tracks posting history
# The Problem It Solves
The Content Creation Bottleneck
Creating quality content is hard work. You have to:
- Find good articles (hours of scrolling)
- Research the topic (more hours)
- Write something people want to read (skill needed)
- Translate to another language (if you even can)
- Post to multiple platforms (copy-paste hell)
- Do this every single day (burnout guaranteed)
This bot automates all of that. I just approve the good stuff, and the bot does the rest.
The Local Market Gap
Sri Lanka has a growing tech community, but most content is in English. There's almost no good tech news in Sinhala that's:
- Actually accurate
- Written by someone who understands tech
- Updated regularly
- Posted to social media where people actually are
This bot fills that gap. It creates quality Sinhala content that tech enthusiasts can actually understand.
The API Limit Challenge
Most AI tools charge by usage. If you're not careful, you'll burn through your limits in a day. I designed this to work within free tiers by:
- Using the right model for each task
- Implementing smart rate limiting
- Tracking usage in real-time
- Sending alerts before hitting limits
This makes it sustainable without breaking the bank.
# Technical Stack
Backend
- Python 3.11+ - Core language
- FastAPI - Async web framework
- SQLite - Simple database (no server needed)
- python-telegram-bot - Telegram interface
- APScheduler - Task scheduling
AI Models & APIs
- Gemini 3 Flash - Best Option for Translation Work
- Gemini 2.5 Flash - Search & summarization
- Kimi K2 - Content generation
- Gemma 3 27b - Image processing & posting
- Brave Search - Web search API
Infrastructure
- Fernet Encryption - API key security
- Token Bucket Rate Limiting - API limit management
- 3-File Logging System - errors.log, debug.log, info.log
- Weekly Backups - Automatic database backups
- Docker Support - Easy deployment
# Current Progress
What's Done (26% Complete)
Phase 1: Project Setup & Infrastructure ✅
- Complete directory structure
- All 9 database models
- Encryption utility with Fernet
- Configuration management
Phase 2: Core Infrastructure ✅
- 3-file logging system (errors, debug, info)
- Error handling with retry logic (3 attempts, exponential backoff)
- Rate limiting for all APIs (Token Bucket algorithm)
- API usage tracking and daily reports
- Test mode (sandbox for testing)
- Debug mode (detailed troubleshooting)
- Weekly backup system (keeps last 4 backups)
Documentation ✅
- Complete project plan
- System architecture
- Database schema documentation
What's Next
Phase 3: RSS Feed System & Search Agents (In Progress)
- RSS feed parser
- RSS Monitor Agent implementation
- Search Agent with Brave Search integration
- Duplicate detection logic
Phase 4: Content Generation & Translation Agents
- Content Generation Agent implementation
- Translation Agent with Gemini 3 Flash
- System prompts for all agents
- Adaptive article structures
Phase 5: Telegram Bot & Control Panel
- Bot handlers and commands
- Inline buttons for approvals
- Settings management interface
- Article review workflow
Phase 6: Social Media Integration
- Facebook Graph API integration
- Twitter/X API integration
- LinkedIn API integration
- Webhook posting system
Phase 7-10: Testing & Deployment
- System prompts optimization
- End-to-end testing
- Docker deployment
- Monitoring and alerts
# What I'm Learning From This
This project is teaching me a lot more than just "how to build a bot."
1. Multi-Model AI Integration
I'm learning how to work with different AI models and pick the right one for each task. Each model has different strengths, limits, and costs. It's not just about "using AI" - it's about building a system that can switch between models intelligently.
2. Rate Limiting at Scale
Free APIs have strict limits. I'm learning how to:
- Design systems that work within constraints
- Implement token bucket rate limiting
- Track usage in real-time
- Send alerts before hitting limits
- Fall back to backup models when needed
3. Distributed System Design
This isn't a simple script. It's a distributed system with:
- Multiple AI agents running independently
- Async operations everywhere
- Database transactions
- Error recovery and retries
- Scheduled tasks and jobs
I'm learning how to design systems that can handle failures and keep running.
4. Security Best Practices
Handling API keys is serious business. I'm learning:
- Fernet encryption for sensitive data
- Master key management
- Never logging secrets
- Input validation
- Secure webhook handling
5. Content Strategy & Translation
I'm learning about:
- What makes a good tech article
- How to structure content for different topics
- The challenges of translation using AI
- Writing for different markets
6. Production-Grade Code
This isn't a weekend project. I'm learning:
- Comprehensive error handling
- Detailed logging
- Testing strategies (test mode, debug mode)
- Backup and recovery procedures
- Documentation that matters
7. Working Within Constraints
The biggest lesson: You don't need expensive tools to build something good. I'm learning how to:
- Use free APIs effectively
- Design systems that scale within limits
- Make smart trade-offs (which model for which task)
- Build something sustainable long-term
# Why This Project Matters
This isn't just another bot project. It's a real system that solves real problems:
For Me
- It's pushing my skills to the next level
- I'm learning production-grade engineering
- It's a portfolio piece that shows I can build complex systems
For the Tech Community
- Better tech news coverage
- Content in both English and Sinhala
- More consistent updates
- Higher quality content
As a Learning Experience
- Multi-model AI integration
- Distributed system design
- Rate limiting and API management
- Security and encryption
- Production deployment
The code is clean. The architecture is solid. The foundation is ready. Now I just need to build the agents and make it work.
# The Development Mindset
I'm not rushing this. Good engineering takes time. I'm building it right the first time:
- Clean code
- Comprehensive error handling
- Detailed logging
- Proper testing
- Good documentation
When this is done, it won't just be a bot. It'll be a system I can show to anyone and say "I built this, and it works."
The foundation is set. The agents are coming next. The future is looking good. 🚀
Leave a suggestion to improve!
Share your thoughts about this project