# Telegram AI Chatbot with OpenRouter

> Ready-to-run Telegram bot that chats through any OpenRouter model, with memory, commands and setup guide.

Telegram AI Chatbot with OpenRouter is a paid AI agent skill on Agensi by Okikiola Wilson, in Workflow Automation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $10 (one-time purchase)
- Creator: [Okikiola Wilson](https://www.agensi.io/creators/barley-gustavo-wilson)
- Category: [Workflow Automation](https://www.agensi.io/skills/workflow-automation)
- Version: 1.0
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/telegram-ai-chatbot-with-openrouter
- Tags: apis-backend, workflow-automation, agents-orchestration

## About this skill

Ships a working, bug-fixed Telegram bot (`scripts/bot.py`) and walks the user from zero to a running bot.

1. **Collect two secrets from the user** (never ask them to paste keys into files you commit or share):
   - Telegram bot token: message @BotFather on Telegram, send `/newbot`, copy the token.
   - OpenRouter API key: openrouter.ai/keys.
2. **Copy the bundled files** `scripts/bot.py` and `scripts/requirements.txt` into the user's project folder. Run the bundled script as shipped; only change it if the user asks for customization.
3. **Install dependencies:** `pip install -r requirements.txt` (Python 3.9+).
4. **Set environment variables, then run:**
   - macOS/Linux: `export TELEGRAM_TOKEN=... OPENROUTER_API_KEY=...` then `python bot.py`
   - Windows PowerShell: `$env:TELEGRAM_TOKEN="..."; $env:OPENROUTER_API_KEY="..."; python bot.py`
5. **Test:** open the bot in Telegram, send `/start`, then a normal message.

| Variable | Required | Default | Purpose |
|---|---|---|---|
| `TELEGRAM_TOKEN` | yes | none | Bot token from BotFather |
| `OPENROUTER_API_KEY` | yes | none | OpenRouter key |
| `OPENROUTER_MODEL` | no | `openrouter/auto` | Any model id from openrouter.ai/models |
| `MAX_HISTORY` | no | `20` | Messages remembered per user |
| `SYSTEM_PROMPT` | no | friendly concise assistant | Bot personality |

Free models: choose an id ending in `:free` from openrouter.ai/models. Note `openrouter/auto` routes to paid models and is not free.

## Requires

- Python 3.9+
- Telegram bot token
- OpenRouter API key

## Known limitations

Conversation memory is in-process and resets on restart. Text messages only (no images, voice or files). Polling mode, single instance.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Telegram AI Chatbot with OpenRouter skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does Telegram AI Chatbot with OpenRouter do?

Ready-to-run Telegram bot that chats through any OpenRouter model, with memory, commands and setup guide.

### Which AI agents support Telegram AI Chatbot with OpenRouter?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Telegram AI Chatbot with OpenRouter?

Connect your AI agent to Agensi through MCP, then ask it to use Telegram AI Chatbot with OpenRouter on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
