Telegram AI bot with memory — full setup guide
Most Telegram bots are stateless — they forget you between messages. Hermes on Karp remembers every conversation, stores key facts as long-term memories, and builds a deeper understanding of you over time. This guide shows you how to set it up in minutes.
Why Telegram?
Telegram is perfect for AI assistants: it works on every platform, has no message limits, supports file sharing, and doesn't throttle bots. You can access your agent from your phone, desktop, or watch without opening a browser.
Step 1: Create a Telegram bot token
- Open Telegram and search for @BotFather
- Send
/newbot - Choose a name (e.g. "My Hermes Agent") and a username (must end in
bot) - BotFather will give you a token like
123456:ABC-DEF… - Copy that token — you'll paste it into Karp in the next step
Step 2: Connect to Karp
- Go to your agent's Settings → Channels
- Paste your bot token in the Telegram field
- Click Save + Bootstrap — Karp registers the webhook with Telegram automatically
- Scan the QR code on the success screen to open your bot
Tip: Use your agent's Telegram username as your bot name for easy recall.
Step 3: Enable long-term memory
Hermes uses a two-layer memory system:
- Short-term: the last N messages in the current conversation
- Long-term: structured facts the agent extracts and stores (e.g. "user prefers Python", "current project is X")
In Settings → Agent Behavior, enable Memory. The agent will now consolidate its short-term context into long-term facts after each conversation.
Step 4: Customize the soul
The soul.md file is your agent's system prompt — it defines personality, skills, and constraints. Edit it in Settings → Soul. A good starting prompt:
You are my personal AI assistant. You have memory of all our past conversations. You prefer concise, actionable answers. When I ask for code, default to TypeScript. You help me with: planning, coding, research, writing.
What the memory looks like
After a few conversations, your agent's memory might contain facts like:
- user prefers TypeScript over JavaScript
- current project: karp — AI agent hosting platform
- user works in HKT (UTC+8), usually active 9am–11pm
- prefers concise answers, dislikes preamble
You can view and edit these in Dashboard → Memory.