Chat with a Vercel πx coding agent from Telegram. Works with your locally installed πx and supports as many of the latest Telegram features as possible.
Most Telegram adapters for popular harnesses only scratch the surface of what Telegram can do. Not ππ(πx): the aim is chatting with your agent from Telegram the way you would from its TUI.
- Rich replies: markdown, tables, code blocks, spoilers, TeX math
- Live streaming while the agent works, renders tool calls nicely
- Three reply styles (
/format), from a quiet final answer to a live draft with tool activity - Can work in DMs and groups
- Can send stickers and react to messages
- Interactive model picker with reasoning effort and Regular / Fast / Ultrafast speed controls (
/model, when supported by the model) - Conversation compaction (
/compact) and fresh starts (/clear), with inline confirmation buttons - Cost reports (
/cost) - Approval cards for destructive actions
- Bots can be group admins: pin messages, moderate, and more
- Custom emoji icons for tool calls and popular MCPs (see below)
- The agent can see and send files, images, location pins, polls, voice messages and even video messages
-
soonTalking to other bots
You need an authenticated fx 0.0.15+ and a bot
token from @BotFather.
Install πx and sign in with fx login (Vercel),
fx login codex (ChatGPT), or fx login grok (Grok):
# 0. Ensure fx is installed and authenticated
curl -fsSL https://fx.sh/setup.sh | bash
fx login
# 1. Install the package (recommended, macOS and Linux)
curl -fsSL https://raw.githubusercontent.com/molefrog/tgfx/main/scripts/install-release.sh | sh
# 2. Grab a bot token from @BotFather, then run tgfx in your project folder.
# It walks you through authorization on the first run.
tgfxOr install with Cargo (requires Rust and a C compiler):
cargo install --locked --git https://github.com/molefrog/tgfx.gitSet TELEGRAM_BOT_TOKEN to override the saved token.
That's it. tgfx starts an fx acp process in that folder, with your current
πx provider and model, and bridges it to your Telegram bot. Pass --yolo to
skip πx's permission checks.
On the first run it asks for your bot token and pairs you as the owner: scan a
QR code or tap a link. To change or remove the token later, run tgfx auth.
Everything tgfx remembers about a folder lives under ~/.fx/telegram/; nothing
is written into the project.
When MEMORY.md exists in your project, TGFX loads it into the bot's context
and refreshes it before new turns. This gives your assistant shared memory
across chats. You or the bot can update the file.
To turn it off, set "memory": { "enabled": false } in the project's TGFX config.
Your bot can react to things outside Telegram: incoming emails, scheduled
checks, or updates from other apps. Call tgfx emit from the project folder
while ππ(πx) is running:
# Handle a new email in the background
tgfx emit email.received --payload '{"message_id":"123"}'
# Ask for an update in a Telegram chat
tgfx emit daily.check --chat -1001234567890 --prompt "Review today's tasks and send a summary."Use --chat to choose where the bot replies. Without it, the bot works in the
background. Events wait their turn if it's busy; add --steer to update its
current task instead.
By default, bots only respond in groups when mentioned or replied to. To reply to every message, allow the group using its chat ID:
tgfx allow -1001234567890 --reply allTo let it see the whole discussion, make it a group admin, or disable Group
Privacy in @BotFather (/setprivacy β Disable),
then remove and re-add it to the group. Keep tgfx running to collect messages
as context for later requests; it cannot fetch messages from before it joined.
ππ(πx) has three reply styles, depending on whether you want the answer streamed and whether you want to see the full history of tool calls.
By default, it streams the text using Telegram's new live message drafts. In Detailed, tool calls are rendered as collapsible groups, in the order they happen.
Groups always get one message in Final. Changing a chat's style affects new turns.
How to pick a reply style:
- Start ππ(πx) with
--output <mode>to set the default for one run - Send
/formatto the bot in a DM and tap a button to save a choice for that chat - Set a machine-wide default in
~/.fx/telegram/config.json:
{ "defaults": { "output": "live" } }The bot renders tool calls nicely with the tgfx icons premium custom emoji pack: every πx tool gets its own icon, and so do 100+ popular MCP servers (GitHub, Notion, Slack, Figma, and friends). The model picker uses provider logos (OpenAI, Anthropic, etc.) from the same pack.
To turn it off, start with tgfx --no-icons.
The agent uses Telegram actions, such as reactions and sending stickers, through the Telegram MCP that ππ(πx) injects.
tgfx run fx in this folder (sets up on first run)
tgfx --yolo same, without fx permission checks
tgfx --output final Β· live Β· detailed (DM default)
tgfx allow let more users or chats talk to the bot (no id: pair by QR code)
tgfx auth add, rotate, or remove the bot token
tgfx doctor diagnostics: token, chats, rights, fx
Run tgfx --help for all commands and options.



