← All work

F04Personal project · 2026 · Runs on my server

AI Mohammed

A Telegram bot that replies in my own texting style. It reads photos, transcribes voice notes, answers with a voice note in my cloned voice when someone asks to hear me, and when one AI provider fails, the next one takes over.

My role
Designed, built and run it. AI-assisted build
Stack
Python, Flask, Telegram Bot API, several LLM providers, a vision model, a voice-cloning service
Hosting
My Oracle server, under its own Linux user. It started on PythonAnywhere
Running since
July 2026

How it works

  1. A message arrivesTelegram delivers it to the bot's webhook: text, a photo, a sticker or a voice note.
  2. ContextThe bot adds what it remembers about that person and a guide to how I text, so the reply sounds like me.
  3. The brain ladderIt asks the first AI provider. If that one errors out or hits a limit, the next one answers, then the next. It's the same idea as NetShield-E, applied to AI.
  4. MediaPhotos and stickers go to a vision model and voice notes are transcribed. Asked to "send a voice note", it answers in my cloned voice. If the voice service is down, the reply arrives as text instead, never as silence.
  5. Safety and backupsThe model bridge runs as its own Linux user that can't read the bot's chats or keys, with every tool switched off. A daily job copies the bot's memory and settings off-site and keeps the last 30.
How AI Mohammed answers a message Telegram sends each message to the bot over a webhook. The bot adds memory and a texting-style guide, then asks AI provider 1; if it fails, provider 2; if that fails, provider 3. Helpers handle vision, the cloned voice and daily off-site backups. Telegram text · photos · voice webhook AI Mohammed · Flask memory + how I text ask AI 1 first choice AI 2 if 1 fails AI 3 if 2 fails the first one that answers wins helpers Vision photos Voice cloned notes Backup daily copy voice falls back to text, never silence
The same failover idea as NetShield-E, applied to AI providers.

Talk to it

Message @MohammedPhase2bot on Telegram. It introduces itself as the AI version of me and answers in English or Egyptian Arabic. If every AI provider is busy, it tells you to try again later.

Conversations are logged on my server so I can improve it, so please don't send anything private.

Its sibling: Rafiq

Rafiq is a private assistant on n8n that handles my tasks, notes and expenses through Telegram. It only answers me, and it runs on the same server.

Live on Telegram

Text the AI version of me

Send it a message, a photo or a voice note. It answers in my style, through whichever AI provider is up.

Chat on Telegram ↗