𝗖𝗼𝗱𝗶𝗻𝗴 𝗔𝗴𝗲𝗻𝘁𝘀 𝗼𝘃𝗲𝗿 𝗧𝗲𝗹𝗲𝗴𝗿𝗮𝗺: 𝗙𝗿𝗼𝗺 𝗭𝗲𝗿𝗼 𝘁𝗼 𝗔𝗻 𝗔𝗴𝗲𝗻𝘁 𝗧𝗵𝗮𝘁 𝗔𝗻𝘀𝘄𝗲𝗿𝘀
Stop reading and start doing.
By the end of this guide, you will have a Telegram topic where a coding agent answers your messages. This agent will drive a tmux pane on your own machine.
This is the core goal. You do not need memory, monitors, or tool servers yet. You only need to get the agent to answer you.
⏱️ Time Needed: 30–45 minutes.
🛠️ Prerequisites
Before you start, ensure you have these items ready:
- A machine with tmux and shell access.
- A working coding agent (like OpenCode or Claude Code) already running in a tmux pane.
- The exact tmux target for your agent (example: mybox:1.1).
- The exact command to launch your agent.
- The OpenClaw runtime installed.
- A Telegram account and the Telegram app.
📦 Required Versions
Do not skip these. Wrong versions cause silent failures.
• Node.js: 24.11.1 • Package Manager: pnpm 11.2.2 • OpenClaw: Pin to a specific commit.
🚀 Quick Setup Path
You can use these scripts to handle the local setup:
Download the scripts: curl -fsSL "https://gist.githubusercontent.com/jerilkuriakose/cd0f8353aac74e47c591111b758943e9/raw/setup-openclaw.sh" -o setup-openclaw.sh curl -fsSL "https://gist.githubusercontent.com/jerilkuriakose/7cf94af3e96526f9f14d0c28b6c26b69/raw/ready-check.sh" -o ready-check.sh chmod +x setup-openclaw.sh ready-check.sh
Run the setup with your bot token: OPENCLAW_BOT_TOKEN="
" OPENCLAW_BOT_ACCOUNT="my-bot" ./setup-openclaw.sh Verify the setup: AGENT_ID=my-agent PANE=mybox:1.1 ./ready-check.sh
📱 Telegram Configuration
Follow these steps in your Telegram app:
- Create a bot via @BotFather and save the token.
- Create a new group and add your bot.
- Make the bot an Administrator. This allows it to see your messages.
- Enable "Topics" in the group settings.
- Create a topic for your project.
- Send one message in that topic to generate a Topic ID in your logs.
⚙️ Wiring it Together
The gateway uses a JSON config at ~/.openclaw/openclaw.json.
Use Phase 1 to find your Chat ID and Topic ID by sending a message and checking the gateway logs.
Use Phase 2 to lock the group down. Change the policy to "allowlist" and add only your numeric Telegram User ID. Map your Topic ID to your specific Agent ID.
📝 The Agent Contract
Crea un archivo AGENTS.md en el espacio de trabajo de tu agente. Este archivo le indica al agente cómo comportarse. Debes definir:
- Cómo leer el panel (tmux capture-pane).
- Cómo escribir en el panel (tmux send-keys).
- Cómo manejar comandos específicos como "status", "send" o "restart".
✅ La prueba de preparación
Has terminado solo cuando superes estas cinco comprobaciones:
- El bot responde en tu tema de Telegram.
- Tu prompt llega al panel de tmux.
- El agente de programación comienza a trabajar en el prompt.
- Un archivo de registro demuestra que el agente gestionó tu tema.
- El grupo está restringido únicamente a tu ID de usuario.
Fuente: https://dev.to/jerilk/coding-agents-over-telegram-part-2-from-zero-to-an-agent-that-answers-2777
Comunidad de aprendizaje opcional: https://t.me/GyaanSetuAi