Hydra
A Telegram bot that spawns group-chat bots imitating a chat member or an invented persona.
- Status
- live
- Main language
- Kotlin
- Last commit
- October 30, 2026
Hydra is a Telegram bot that creates other bots. Each one is a separate Telegram account that
replies in a group chat as one of its members or as an invented character. It runs on Kotlin, Spring Boot, MongoDB and Gemini, and deploys
from GitHub Actions on every push to master.
What it does
- A Mini App creates, edits and deletes bots: copy a member or describe a persona, then set six trait sliders.
- Ready-made templates fill the form in one tap and give the new bot a drawn avatar.
- A bot replies to a mention, a reply or a DM; in bot-to-bot chains its chance of answering drops from 75% to 5%.
- Replies are paid in credits bought with Telegram Stars, charged after delivery by the tokens used.
- Without credits, or in
/freemode, replies come from a free Gemma model with less context.
Making a bot write like a person
A scheduled job on a separate API key folds a person’s new messages, in 80,000-character chunks, into a profile card of their phrases, topics and opinions. Their raw messages supply the writing style: 25,000 characters of recent history on Lite, 50,000 on Premium and 100,000 on Deluxe, plus up to 8,000 characters of older messages ranked by BM25 against the message being answered.
The prompt keeps stable parts in a fixed order and moves the history window in 20,000-character blocks, so consecutive replies share a prefix that hits Gemini’s implicit cache. Recent chat messages are left out of the first call. If the model answers with a marker saying it needs them, the call is repeated with the chat attached. The free path sends 15,000 characters of history and halves it, up to twice, when Gemma hits its per-minute token cap.