$ cat autoposter-ai-content-agent-telegram.jsonAutoPoster — An AI Content Agent for Telegram
An agent that plans, writes, illustrates and publishes a Telegram channel's content on its own, then learns from how each post performs; with fully automatic and semi-automatic modes.

Project Overview
A social-media services store needed steady, varied content for its Telegram channel without anyone spending time writing and designing posts every day. The result was not a simple posting bot but an AI agent that runs the whole content-marketing loop by itself: understand, plan, create, validate, publish, measure, analyze and learn.
From the brand profile and its target audiences, the agent builds a content strategy at several levels and keeps its short-term plan up to date. Every post is checked against brand rules and for repetition before publishing, and gets its own generated image when needed. After publishing, each post's performance is measured, and the agent adjusts topic weights, posting times and writing style based on that data.
The admin stays in control: the agent can run fully automatically, or every post can be approved, rejected or regenerated before it goes out. The agent learns from those decisions too, and remembers the admin's preferred style.
Key Highlights
- Full loop: plan, create, validate, publish, measure and learn
- Multi-level strategy based on the brand and its target audiences
- Fully automatic mode and approval-before-publishing mode
- Learns from post performance and from the admin's decisions
- Automatic prevention of repetitive content
- Automatic blurring of personal details with computer vision
Technical Implementation
Python and aiogram 3 with an async scheduler loop that coordinates planning, draft generation, publishing within allowed time slots and the analytics cycle. Data lives in MySQL: strategies, the content plan, posts, performance metrics, insights and learned rules. Text, image generation and image analysis use OpenAI model APIs with structured JSON output.
Repetition control scores each draft's similarity to recent posts by text, topic and call to action, with a recency penalty. Each post's engagement score is normalized by views, and topic-weight adjustments are capped per cycle so the strategy never swings abruptly. For before-and-after posts, customers' identifying details are located with computer vision and blurred before publishing. A full admin panel lives inside Telegram: plan, approval queue, schedule, focus and exclusion directives, footer and health check.




