polygram weekly downloads statistics
By shumkov · npm · Claude Code
Telegram daemon for Claude Code that preserves the OpenClaw per-chat session model. Migration path for OpenClaw users moving to Claude Code.
polygram has 9,428 recorded weekly downloads on npm, an increase of 1517% over the past 30 days, ranking #1289 of 3,247 tracked listings.
About polygram
polygram
A Telegram daemon and Claude Code plugin that preserves the per-chat session model from OpenClaw. Intended primarily as a migration path for users moving their Telegram-based ops from OpenClaw to Claude Code, after OpenClaw dropped Claude support.
If you ran OpenClaw with multiple Telegram chats — each with its own context, its own memory, its own transcript — polygram gives you that shape back on top of
claudeCLI. Install as a daemon, a Claude plugin, or both.
Background
OpenClaw ran a Telegram agent with one conversation context per chat. Each chat had its own persistent memory; topics in a forum chat could optionally carry their own sub-context. The agent, cron scripts, and human operators all wrote into a shared transcript.
OpenClaw no longer supports Claude. Migrating to Claude Code loses that
model unless it's rebuilt. The official telegram@claude-plugins-official
plugin is single-session — one Claude Code process, one bot, one shared
context across all chats. Third-party Claude Code Telegram bots usually
share one session across all users of a given bot instance.
polygram is the shape that keeps OpenClaw's per-chat-session
ergonomics while running on top of claude CLI.
What it is
- One Node process per bot. Required
--bot <name>flag. N bots = N processes. No "one process hosts many bots" mode — crash isolation is the point. - Per-chat Claude sessions. Each chat has its own
claude_session_id, resumed viaclaude --resume. - Per-topic sessions — opt-in (
isolateTopics: truein chat config). Default is shared context across topics, since topics are usually organisational. OpenClaw migrators who used per-topic separation can keep it with one flag. - SQLite transcripts (WAL, FTS5, numbered migrations,
user_version). - Write-before-send atomicity. Outbound messages hit the DB as
pendingbefore the Telegram call, flip tosentorfailedafter. Boot sweep resolves stalependingrows from the last crash. - Unix-socket IPC per bot. Cron jobs and external scripts talk to the
bot process over
<data-dir>/.ipc/polygram-<bot>.sockinside an owner-only runtime directory. The bot is the only writer to its own DB. - Inline-keyboard approvals. Destructive tool calls gate on operator
click via Claude Code's
PreToolUsehook; 5-minute auto-deny. - Voice transcription. OpenAI (
gpt-transcribeby default) or localwhisper.cpp, selectable per bot. Transcriptions land inmessages.textso FTS finds them; a failed one reaches the agent as<voice-transcription-failed reason="…">with a closed reason code. - Voice-note replies (opt-in per chat). A turn started by a voice note gets its text reply as usual, then the same answer read aloud as a voice note (code, tables and links are left to the text). Spoken by ElevenLabs; needs a dedicated ElevenLabs key.
- Per-attachment table (
attachments, since 0.6.0) with download lifecycle (pending→downloaded|failed), per-attachment transcription, andchat_id/kind/statusindexes for ops queries. Replaces the olderattachments_jsonblob — query "all PDFs Maria sent last week" without scanning every message. Failed downloads surface to Claude as<attachment-failed reason="..." />so the user gets a real explanation, not silence. - Content-addressed attachment storage via Telegram's
file_unique_id. Same photo forwarded twice = one file on disk. Multi-photo albums (Telegram delivers each photo as a separate message sharingmedia_group_id) coalesce into one logical turn so Claude sees the whole album, not just the first photo. - Prompt-injection hardening. User text wrapped in
<untrusted-input>with xml-escape; attributes use". A partner typing</channel><system>...sees it as literal text in the prompt. - Pairing codes for guest onboarding without polygram restart
(
/pair-code,/pair <CODE>,/pairings,/unpair). - Step-level streaming replies (optional per bot). Telegram message edits on each assistant step as Claude works through tool calls and reasoning.
- Crash-resilient handler lifecycle. Inbound rows track a
handler_status(received → dispatched → replied | failed | replay-pending). On graceful shutdown, in-flight turns are marked for replay; on next boot the daemon re-dispatches anything within a 3-minute window, deduped against already-sent outbound replies. One-shot guard prevents replay loops. - Contextual error replies. Idle timeouts, wall-clock ceilings, and process crashes each get a distinct user-facing message with a recovery hint, not a generic "something went wrong." Restarts and user-issued aborts don't fire the apology at all.
- Abort detection in natural language (
stop,cancel,wait,стоп,отмена,хватит, ...) plus the slash forms (/stop,/abort,/cancel). First-sentence match catches "Stop. I'll ask in another session." too. Scoped to the user's own session, so an abort in one topic never disturbs sibling topics underisolateTopics.
Relation to existing projects…
Description from the npm listing.
- telegram
- openclaw
- openclaw-migration
- claude-code
- claude
- per-chat-session
- bot
- daemon
- multi-bot
- sqlite
- transcript
- history
- telegram-agent
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (121)Similar npm Claude Code plugins
All 20 polygram alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/polygram. First seen Dec 4, 2026; last successful collection Dec 6, 2026. See the methodology.