Autonomous Agent on Telegram
Wire a Claude Code agent to a Telegram bot — it runs while you sleep
See it work
Placeholder — real preview will be a screen recording of an agent replying in Telegram in real time.
Is this for me?
Yes, if you want an AI agent that runs 24/7, listens to your Telegram, and does work on its own — intel scans, content drafts, code commits, whatever you tell it. Once set up, you message it like a person. It replies like a person. Except it never sleeps.
What you need
- A Mac or PC
- Claude Code installed — Anthropic Pro or Max plan recommended, agents need long sessions (Module 01 walks you through install)
- A Telegram account
- 30 minutes of quiet setup time
- A project that would benefit from an autonomous helper (examples inside)
You'll paste commands but never write code. If 'terminal' scares you, finish module 01 first — it has a gentler terminal intro.
- →browser-harness★★★★★
The fastest way to let Claude drive your browser. Self-healing, works on any site.
- →Defuddle★★★★★
Any web page → clean markdown. No nav, no ads, no sidebar junk.
- →hermes-agent★★★★★
A personal AI agent that lives in your terminal. Memory + 40 tools out the box.
- →larry — TikTok slideshow skill★★★★★
Loya's own TikTok slideshow automation. 1M+ views, $670/mo MRR, running on an old gaming PC.
Do it
- step 1 / 6
Install the framework
Generate install command below → copy → Terminal → enter. The kit lands in
~/.claude/skills/autonomous-agent-telegram/and includes the bus scripts (send, receive, restart), the fast-checker daemon, a minimal agent config template, and a launchd plist for always-on operation. - step 2 / 6
Create a Telegram bot with @BotFather
Open Telegram. Search for
@BotFather. Send/newbot. Give it a name + username. BotFather returns a bot token (looks like8309826713:AAE...). Save this — you'll paste it next step.Also grab your personal chat ID: message
@userinfobotand send anything — it replies with your numeric ID. - step 3 / 6
Name your agent + wire the token
In Claude Code, type:
Use autonomous-agent-telegram to scaffold a new agent called [pick-a-name] for project [pick-a-project]Example:
scaffold a new agent called 'scout' for project 'my-newsletter'. The skill creates a folder, writes the CLAUDE.md instructions file, and prompts you for the bot token + chat ID. Paste them. Done. - step 4 / 6
Start the fast-checker daemon
This is the piece that makes the agent LIVE. The daemon polls Telegram every few seconds for new messages and funnels them into the agent's running session:
bash ~/.claude/skills/autonomous-agent-telegram/scripts/start-daemon.sh [your-agent-name]You'll see a console tail. Leave it running in a terminal window (or install the launchd plist to auto-start at login — instructions in the skill's README).
- step 5 / 6
Talk to your agent
Open Telegram. Find your bot (the username you gave BotFather). Send a message:
hey scout, what's up?Within 1-5 seconds, your agent responds. It has context of its project via the CLAUDE.md file. Talk to it like a person.Try:
summarize my latest git commits,pull the top 10 tweets from my X feed and tell me what matters,build me a landing page for [topic] and commit when done. - step 6 / 6
Give it crons (optional, transforms the agent from reactive to proactive)
Edit
~/your-project/agent-name/config.json→ add acronsarray:"crons": [ { "name": "morning-digest", "interval": "0 7 * * *", "prompt": "Scan my X feed, send me the top 5 signals by 7:15." }, { "name": "daily-build", "interval": "0 14 * * *", "prompt": "Pick the next task from TASKS.md, build it, commit, ping me." } ]Save. The agent auto-schedules at every fire. Now it's not just reactive — it initiates.
Make it yours
- Newsletter writer? Agent scans industry news daily, pulls top 5 signals, drafts a newsletter section you review+polish. Cuts 2 hours off your weekly writing.
- Indie hacker? Agent auto-commits small fixes from your TODO.md on a cron, pings you on Telegram with the diff. Sleep-shipping.
- Creator? Agent drafts 3 content ideas every morning based on yesterday's trending tweets. You pick one, it's executed by another agent (see module 12 — the build loop).
- Agency operator? One agent per client — each has its own CLAUDE.md with the client's brand voice + constraints. They handle routine Q&A + first drafts in the client's own Telegram.
Stuck?
- Bot doesn't respond when I message it.
Daemon isn't running. `bash ~/.claude/skills/autonomous-agent-telegram/scripts/start-daemon.sh [agent-name]` in a terminal. Leave the window open. If you want always-on, load the launchd plist from the skill's README.
- Agent responds but context-drifts — forgets what project it's on.
You didn't fill out the CLAUDE.md properly. Open it and write a clear 'who you are / what you work on / what's the priority' — 10 lines is enough. Agents without a clear CLAUDE.md wander.
- Token exposed in a public repo.
Rotate immediately. Go to @BotFather → `/revoke` → old token is dead, generate new one. The `.env` files with tokens should be in `.gitignore` from the start. Never check tokens into git.
- Crons fire at weird times / not at all.
Session-scoped crons only fire while the agent's session is open. For true always-on scheduling, use the bundled launchd plist (Mac) or crontab setup — both covered in the skill's README.
- Agent uses too many Claude credits.
Claude Pro plan has daily caps. For long-running agents use Max plan OR install RTK (Rust Token Killer — search GitHub for `rust-token-killer`) as a CLI proxy — 60-90% token reduction on common commands. Max plan + RTK = near-unlimited agent runtime.
💰 money moves that use this
all money moves →- ★ requiredAI agency generalist
Bespoke AI agents and automations for mid-size companies. Higher-touch, higher-ticket cousin of the local-biz play.
- ★ requiredAI companion / character-as-a-service
Niche AI companion w/ persistent memory + voice. Character.ai is saturated; specific niches still wide open.
- ★ requiredClaude Code for local businesses
Install Claude Code at a plumber, lawyer, or clinic. Build them custom workflows. Hourly retainer + monthly fee.
- ★ requiredContent-at-scale for founders
Ghostwrite + clip founders' content into a high-volume LinkedIn / X / podcast presence. Premium DFY play.
- ★ requiredCreator memberships / paid Telegram channels
Lock your most useful daily output behind $20-50/mo. Telegram + Skool + Whop are the cheapest delivery rails.
- ★ requiredFaceless SaaS micro-app
Find a sharp insecurity or repetitive pain. Wrap it in a single-purpose AI app. Charge weekly. Stack 5-10 of them.
Next up
Now that one agent works, the next module is the BOT LAYER on its own — how to wire messages, reactions, webhooks, agent-to-agent talk without a framework. Smaller surface, still useful for anyone building any Telegram bot project.