Integration guide

OpenClaw AI agent — Telegram integration

OpenClaw is the open-source AI agent framework that powers every Hiregents deployment. Here's how the Telegram integration works and how to ship one in 5 minutes.

OpenClaw is an open-source agent runtime that connects a language model to messaging channels (Telegram, Discord, Slack, WhatsApp, Lark, WeCom) via a single configuration file. The agent reads SKILL.md files for behavior, calls tools through a sandboxed exec layer, and persists context across sessions.

Native Telegram support is built in: you set `channels.telegram.enabled: true` in `openclaw.json`, drop in a bot token, and OpenClaw handles polling, message routing, pairing codes for unknown senders, and reply formatting. The agent runs as a long-lived process that stays connected to Telegram 24/7.

The setup itself is straightforward — what's harder is everything around it: provisioning a server, securing it (fail2ban, UFW, encrypted secrets), keeping the container updated, backing up state, and monitoring usage.

Native Telegram support — honest assessment

Native Telegram

First-class. OpenClaw ships with a Telegram channel adapter, pairing-code DM policy, and elevated tool permissions configurable per chat.

Gaps

OpenClaw is just the runtime — you still need to provision a VPS, install Docker, configure firewalls, set up auto-restart, manage updates, and rotate secrets yourself.

What Hiregents adds

Hiregents runs OpenClaw on a private VPS per agent. Cloud-init handles the security hardening (fail2ban, UFW, AES-256 encrypted keys, 7-day backups), and the agent goes live in about 5 minutes from a 4-step wizard.

Setup guide — 5 steps

  1. 1

    Get a Telegram bot token

    Open Telegram, message @BotFather, send /newbot, choose a name and username, and copy the API token. Keep it private — anyone with the token can control your bot.

  2. 2

    Get an OpenRouter API key

    Sign up at openrouter.ai, add a payment method, and create an API key. OpenClaw reads this from /root/.openclaw/.env at startup.

  3. 3

    Pick or write your SKILL.md

    SKILL.md defines what the agent does, what tools it can use, and how it behaves. You can browse pre-built agents on Hiregents, write your own, or convert documentation using the free Skill Creator.

  4. 4

    Configure OpenClaw

    Set channels.telegram.enabled: true, paste your bot token, set gateway.bind: loopback for security, and disable bundled skills you don't need to keep tokens lean.

  5. 5

    Deploy

    Run docker compose up -d with the official ghcr.io/openclaw/openclaw:latest image. Or skip steps 4-5 entirely and deploy via Hiregents — it handles the server, security, and updates automatically.

Skip the setup — deploy in 5 minutes

Hiregents handles the server, security, encryption, and updates. You bring a bot token and an OpenRouter key.

Deploy on Hiregents

Self-host vs Hiregents

FeatureSelf-host OpenClawHiregents
Server provisioningYou buy and configure your own VPSIncluded — private VPS per agent
Security hardeningYou install fail2ban, configure UFW, lock down SSHPre-configured in cloud-init
Secret encryptionManual — store tokens in plain .envAES-256 encrypted at rest
Auto-restart on crashConfigure systemd or Docker restart policiesBuilt in
Daily backupsWrite your own cron + retentionBuilt in, 7-day retention
Container updatesManual docker pull + restartAuto-update on stable channel
Usage dashboardBuild it yourselfTokens, sessions, cache hit rate, model
Setup time1-3 hours if you know Linux5 minutes
Cost$5-20/mo VPS + your time$29-49/mo flat

FAQ

What is OpenClaw and how does its Telegram integration work?

OpenClaw is an open-source AI agent framework that connects a language model to messaging channels. Its Telegram integration uses the official Bot API: you provide a bot token, OpenClaw maintains a long-running connection, polls for messages, routes them to the configured agent, and posts replies. By default, unknown senders get a pairing code prompt before they can chat with the agent.

Can I self-host OpenClaw with Telegram instead of using Hiregents?

Yes. OpenClaw is open source. Hiregents handles the production parts most people don't want to build: server provisioning, security hardening, encrypted secrets, auto-restart, daily backups, container auto-updates, and a usage dashboard. The agent files (SKILL.md) are portable — you can move them anywhere.

What's the cheapest way to run an OpenClaw agent on Telegram?

Self-host on a $5/mo VPS if you're comfortable with Linux administration. For most people, the Hiregents Hobby plan at $29/mo (annual) is cheaper once you factor in the time to set up security, backups, and monitoring properly.

Does OpenClaw support models other than Claude?

Yes. OpenClaw routes through OpenRouter, so any model OpenRouter supports works: Claude, GPT, Gemini, Llama, Mistral, DeepSeek, and more. You bring your own OpenRouter key.