Metra AI: a production SaaS for automating Telegram content
We built a SaaS platform end to end, with multi-agent LLM orchestration. From architecture to launch in 3 months.

Metra AI: a platform for automating content and leads in Telegram
The business problem
Telegram channel owners and content teams spend huge amounts of time creating posts by hand. Standard tools either don't fit Telegram's specifics (Buffer and Hootsuite are built for Instagram/Twitter) or rely on raw ChatGPT output, which produces generic, low-quality content that needs long manual editing.
The main pain: content teams spend 60–80% of their time on production instead of strategy, and quality suffers because AI-generated content usually lacks brand voice, channel context, and real-time relevance.
What we built
A full SaaS platform that automates the whole content workflow in Telegram:
- AI post generation that keeps the brand voice and channel lore
- A scheduling system with reusable weekly presets
- Real-time data integration for news content
- A built-in Telegram CRM for working with leads without exposing the owner's account data
- Multi-account infrastructure with several operators, for agencies running many channels
Architecture: why multi-agent instead of a single LLM call
The key technical innovation is a multi-step LLM orchestration pipeline instead of single API calls. It's a deliberate architectural choice based on an important insight:
The solution: break post generation into specialized stages, each with one clear area of responsibility.
Standard posting pipeline
- Structure parser: extracts the post's anatomy and keeps links (which premium LLMs strip out by default)
- Content rewriter: processes each paragraph in isolated calls, preserving structural integrity
- Styling: adds emoji and formatting to match the channel persona
- Rule validator: applies the specific channel's rules (for example, strip punctuation, cap length)
Extended pipeline (generation from scratch)
- Archetype selector: picks the post structure by content type and length parameters
- Block-by-block generator: writes each section with focused context
- Style and formatting applied
- Validation against auto-rules
This architecture removes the typical AI failures that single LLM calls produce: mid-text hallucinations, structure drift, overuse of lore, and broken formatting.
Key technical findings
1. Prompt normalization layer
The image model rejected legitimate prompts too often, with false positives on ordinary requests like generating people. Instead of switching to a pricier model, we built a prompt normalization layer that rephrases harmless user input so it isn't blocked by mistake, while keeping the original meaning. This kept quality high without hosting more expensive alternatives.
2. Lore compression and translation
The user's channel lore (often 3,000+ tokens of unstructured text) is compressed and translated into the channel's posting language at upload time. The AI gets structured text in exactly the right language instead of raw lore, which sharply improves content relevance and cuts token costs.
3. Lore as context, not a constraint
Through iteration we found that the AI overuses lore when it's given as a direct instruction. We designed lore as soft context that influences generation without dominating it, so content comes out more natural.
4. Premium LLM selection strategy
We chose specific LLMs for specific tasks:
- Fewer false refusals on legitimate edge cases
- Better real-time news integration through a Perplexity-style API
- Cost optimization at scale
Infrastructure
- Several Ubuntu servers in production (main service, CRM, staging)
- 16 Docker containers with a clean separation of concerns
- The backend as the single source of truth: all client requests go through the backend, never directly to AI providers or the database
- Monitoring stack: Prometheus, Grafana, Sentry for errors, Uptime Kuma for service health
- Encryption: all sensitive data (phone numbers, messages, passwords) is encrypted with proper salt+pepper and GPU-resistant hashing. Decryption keys are stored off the server.
- Security: 2FA, JWT rotation, session fingerprinting, domain proxying
Result
Launched to production within the 3-month development window. The multi-account CRM lets agencies manage operators without exposing the channel owner's data. Strong early traction with a growing user base.
Tech stack
| Backend | FastAPI · Python · Celery |
| Frontend | React · TypeScript · Next.js |
| Database | PostgreSQL · Redis |
| Infrastructure | Docker · Nginx · Multiple Ubuntu servers |
| Monitoring | Prometheus · Grafana · Sentry · Uptime Kuma |
| AI / LLM | Multi-provider stack (proprietary + open source) |
What this demonstrates
- The ability to design and build a production SaaS end to end
- Deep understanding of LLM limits and how to work around them with architecture
- Production-grade security and infrastructure
- Pragmatic cost optimization at the architecture level
- End-to-end product thinking: business problem → technical solution → deployment → operations