Last month I turned a Telegram bot into a team of 18 AI employees — content writers, market watchers, outreach agents, QA testers — all working 24/7. The fun part? The entire API bill is under $10/month.
Here's the architecture, the prompt design, and the cost tricks that made it work.
The architecture (keep it boring)
Telegram Bot (single process)
└── Router: classify intent → pick role
└── 18 role modules (sales, support, translation, QA, writer...)
└── Shared: memory store + task queue + cost ledger
One process, one message queue, one cost ledger. No microservices, no Kubernetes. A small VPS runs it fine.
The 3 cost tricks that matter most
1. Route every request to the cheapest model that can do the job.
Classification and extraction → DeepSeek V4 Flash (~$0.14/M input). Long-form writing → a mid-tier model. Only the rare hard reasoning task touches a flagship model. A simple routing table cut our bill ~70%.
2. Cache the repeated 90%.
System prompts, common templates, product descriptions — they don't change. We hit a cache layer first and only miss to the LLM when content actually changes. That alone was ~20% of the savings.
3. Batch and compress context.
Instead of sending the full conversation history every time, we send a compressed summary + the last 3 messages. Long-running customer chats stopped costing 10x the short ones.
The prompt design that stopped "role bleed"
Run 18 roles in one bot and they start answering each other's questions. Fixes that worked:
- Per-role system prompt with hard boundaries ("You are the SALES agent. Never answer logistics questions; hand off to ORDER_MANAGER.")
- A router that classifies intent first — the role never guesses.
- Regression tests on prompts — we froze 20 canonical Q&A pairs and re-run them after any prompt edit. Prompt rot is real.
What it costs
| Component | Monthly |
|---|---|
| Small VPS | ~$5 |
| API usage (routed) | ~$3–5 |
| Total | ~$8–10 |
vs. a human part-timer at $500+/mo, or even a single always-on GPT subscription tier.
Want to try it?
The bot runs live on Telegram: @ai_staff_xiaochen_bot — 300 free messages, no credit card.
The API layer behind it: ModelHub gives one key for 40+ models (DeepSeek, Qwen, GLM...) with $5 free credit — no Chinese phone number needed, international cards accepted.
18 employees, one $10 bill. The cheapest headcount you'll ever hire.
Top comments (0)