Skip to content
Agents tracked: 440 Downloads (7d): 202M down 19.5% GitHub stars: 10.4M Releases (7d): 607 Agent status: 1 with issuesSince last limit reset: Claude 28d · Codex 0d Updated Oct 21, 2026

Starter kit for a Telegram news digest bot

A recipe for a Telegram bot that follows RSS feeds and sends one digest a day at the time you set, with headlines only or short summaries. For Claude Code, Cursor, Codex or Copilot, with exact versions, a plan with checks and the traps a test build ran into.

New to kits? Read how to use a kit.

How the kit fits together

Your agent reads the brief, builds with these parts and checks its own work before you ship. Click a part to see why it was picked.

File for your agent

AGENTS.md

The plan your agent follows, a step at a time, with a check that must pass before the next step. It also holds the stack with exact versions, the licenses and the known traps.

File for your agent

first-prompt.txt

The first message you paste into your agent. It points the agent at AGENTS.md and tells it to stop after step 1 and report.

File for your agent

.mcp.json

The MCP servers the brief lists, set up for Claude Code. The kit builder writes the same setup for Cursor, Codex or Copilot.

File for your agent

CREDITS.md

The license record of every third-party file. The brief tells the agent to add a row for every file it brings in.

You bring this

Your coding agent

The kit works with any of these. Pick yours in the kit builder and the setup files change to match.

Library knowledge

Context7

4.3.0MIT

aiogram 3 rewrote the API of version 2, and models still write version 2 code from memory.

By Upstash · In 1,266 of 29,413 sampled repos · v4.3.0 on npm · Agent can use it through MCP

Tool and asset data

AgentGid

If the agent needs another library or API, it asks AgentGid for one that fits your constraints.

By AgentGid · Agent can use it through MCP

Runtime

Python 3.12

official source

One Python version has to satisfy every package below.

Nothing to install

Telegram library

aiogram

3.31.0MIT

Receives commands and sends messages through the Bot API. MIT, async from the ground up; its tests can replace the network layer with a fake session.

In 6 of 1,546 Python agent projects (0.4%) · #65 of 112 in SDKs for hosted services · v3.31.0 (pypi registry) · MIT · Installs from a package registry

1 other candidate also fits.

Feed reading

feedparser

6.0.14BSD-2-Clause

Reads RSS and Atom, including broken feeds, into one shape.

In 18 of 1,546 Python agent projects (1.2%) · #16 of 56 in scraping, browsers and parsing · v6.0.14 (pypi registry) · BSD-2-Clause · Installs from a package registry

Scheduling

APScheduler

3.11.3 up to 4MIT

Sends each chat's digest at its own local time.

In 42 of 1,546 Python agent projects (2.7%) · #1 of 10 in jobs, queues and workflows · v3.11.3, June 28, 2026 · MIT · Installs from a package registry

When the agent is done

9 checks

  • python -m newsbot digest --dry-run --feeds tests/fixtures/*.xml prints the digest that would be sent, with no token and no network.
  • Tests drive the bot through Dispatcher.feed_update with a fake session that records every Bot API call: /start, /add, /remove, /list, /time, /digest each produce the expected message, and a non-admin in a group cannot change the feeds.
  • A feed item is sent once per chat: a second digest with the same feeds sends nothing new, and that survives a restart (SQLite).
  • Every message is valid Telegram HTML: titles and text are escaped, tags from feed descriptions are stripped, and no message is longer than 4096 characters (long digests are split between items).
  • Broken feeds (malformed XML, 404, timeout) are reported in /list and skipped; the other feeds still go out.
  • Feeds are fetched at most every 15 minutes with ETag and Last-Modified, and a 304 answer costs no parsing.
  • Digests go out at each chat's own time in its own time zone (/time 09:00 Europe/Berlin); a test checks the next run time across a daylight-saving change in that zone.
  • The token comes from .env (BOT_TOKEN), .env.example lists it, .env is in .gitignore, and no log line contains it.
  • Tests pass with python -m pytest.
After the agent

Left to you

  • Create the bot with @BotFather, put the token into .env, start the bot and send /start to it once: only then can it write to you.
  • To post into a channel, add the bot to the channel as an administrator.
  • Choose where it runs: your own computer while it is on, or any small server; the bot uses long polling, so no public address is needed.
Files for your agentAgent tools (MCP)CodeArt, sound and contentChecksOptional, off by default

What you get

The result

A Python bot: in a chat, /add <feed URL> follows a feed, /time 09:00 sets the digest time, and every day the bot sends the new items since the last digest, grouped by feed, with links.

7 files
Ready for your agent
  • AGENTS.md: the plan, with a check after every step
  • first-prompt.txt, install.txt, .mcp.json
  • CREDITS.md, CLAUDE.md, kit.json
10 parts
Every part is free or has a free tier
  • Bot: MIT, BSD-2-Clause
  • Agent tools: MIT
0 of 0 asset sources allow commercial use with no credit needed.
9 / 9
Checks met in the last test build
  • Build 2, Oct 12, 2026
  • 11 things in the brief reported, 0 serious
  • Findings went back into recipe v0.3
The brief counts it as done when these 9 checks pass
  • python -m newsbot digest --dry-run --feeds tests/fixtures/*.xml prints the digest that would be sent, with no token and no network.
  • Tests drive the bot through Dispatcher.feed_update with a fake session that records every Bot API call: /start, /add, /remove, /list, /time, /digest each produce the expected message, and a non-admin in a group cannot change the feeds.
  • A feed item is sent once per chat: a second digest with the same feeds sends nothing new, and that survives a restart (SQLite).
  • Every message is valid Telegram HTML: titles and text are escaped, tags from feed descriptions are stripped, and no message is longer than 4096 characters (long digests are split between items).
  • Broken feeds (malformed XML, 404, timeout) are reported in /list and skipped; the other feeds still go out.
  • Feeds are fetched at most every 15 minutes with ETag and Last-Modified, and a 304 answer costs no parsing.
  • Digests go out at each chat's own time in its own time zone (/time 09:00 Europe/Berlin); a test checks the next run time across a daylight-saving change in that zone.
  • The token comes from .env (BOT_TOKEN), .env.example lists it, .env is in .gitignore, and no log line contains it.
  • Tests pass with python -m pytest.

Left to you, because no check can do it: Create the bot with @BotFather, put the token into .env, start the bot and send /start to it once: only then can it write to you. To post into a channel, add the bot to the channel as an administrator. Choose where it runs: your own computer while it is on, or any small server; the bot uses long polling, so no public address is needed.

The parts and why each was picked

Defaults for commercial use, free parts and Claude Code. Change them.

Bot

Runtime
Python 3.12 official source

One Python version has to satisfy every package below.

Nothing to install

Telegram library
aiogram 3.31.0

Receives commands and sends messages through the Bot API. MIT, async from the ground up; its tests can replace the network layer with a fake session.

In 6 of 1,546 Python agent projects (0.4%) · #65 of 112 in SDKs for hosted services · v3.31.0 (pypi registry) · MIT · Installs from a package registry

Also fits: python-telegram-bot.

Feed reading
feedparser 6.0.14

Reads RSS and Atom, including broken feeds, into one shape.

In 18 of 1,546 Python agent projects (1.2%) · #16 of 56 in scraping, browsers and parsing · v6.0.14 (pypi registry) · BSD-2-Clause · Installs from a package registry

Scheduling
APScheduler 3.11.3 up to 4

Sends each chat's digest at its own local time.

In 42 of 1,546 Python agent projects (2.7%) · #1 of 10 in jobs, queues and workflows · v3.11.3, June 28, 2026 · MIT · Installs from a package registry

Installed along with them: HTTPX 0.28.1, python-dotenv 1.2.4, tzdata 2026.5, pytest 9.1.1.

For your agent

Library knowledge
Context7 4.3.0

aiogram 3 rewrote the API of version 2, and models still write version 2 code from memory.

By Upstash · In 1,266 of 29,413 sampled repos · v4.3.0 on npm · Agent can use it through MCP

Tool and asset data

If the agent needs another library or API, it asks AgentGid for one that fits your constraints.

By AgentGid · Agent can use it through MCP

The plan your agent follows

The agent works one step at a time and does not start a step until the previous one meets its "Done when" lines. The full instructions, with code, are in AGENTS.md.

  1. Scaffold · done when:
    • python -m newsbot --help lists the commands and python -m pytest runs.
    • The kit files listed under "Before you start" are still there.
  2. Feeds · done when:
    • Tests parse the three fixtures, find the broken one, and return each item once across two runs.
  3. Digest text · done when:
    • Unit tests cover escaping, tag stripping, the 4096 limit with a digest of 60 items, and the "and N more" line.
  4. Bot commands · done when:
    • Every command has a test through feed_update with the fake session, including a refused change by a non-admin in a group.
  5. Schedule and storage · done when:
    • A test computes the next digest time for 09:00 Europe/Berlin on the day of a daylight-saving change and gets 09:00 local time.
  6. Verify · done when:
    • Every line under Definition of done is true, and anything that could not be verified is named in PROGRESS.md.

Known traps

What test builds and the official docs showed going wrong with these parts. Each one is in the brief, so the agent reads it before it gets there.

  • aiogram 3 is not aiogram 2: executor is gone, Dispatcher() takes no bot, handlers sit on a Router without the _handler suffix, and keyword filters became explicit filters. aiogram migration guide
  • A message may hold 1 to 4096 characters after entities are parsed. aiogram does not check that before sending: a 5,000-character text leaves the client and fails at Telegram. measured with aiogram 3.31.0 and feedparser 6.0.14, Oct 12, 2026
  • In HTML mode every <, > and & that is not part of a tag must be escaped, and only Telegram's short list of tags is accepted. feedparser hands descriptions over as HTML (<p>, <div>, <img>), which Telegram rejects. Bot API, and measured with aiogram 3.31.0 and feedparser 6.0.14, Oct 12, 2026
  • feedparser does not raise on malformed feeds: it sets bozo and stores the error. Code that only catches exceptions never notices a broken feed. feedparser docs
  • getUpdates (long polling) does not work while a webhook is set for the bot; delete the webhook before polling. Bot API
  • Telegram's limits: about one message a second per chat, 20 a minute per group, about 30 a second in total. Above that the API answers 429 with a wait time. Telegram bot FAQ
  • feedparser.parse() treats a str or bytes argument as a file name or URL first and reads it if it exists; only a file-like object such as io.BytesIO(content) is always parsed as the feed itself. feedparser 6.0.14 docstring, and measured with aiogram 3.31.0 and feedparser 6.0.14, Oct 12, 2026
  • APScheduler 3's AsyncIOScheduler awaits a job only when the job function is a coroutine function. A lambda that returns a coroutine runs in a thread pool; Python then warns "coroutine ... was never awaited" and nothing is sent. measured with APScheduler 3.11.3, Oct 12, 2026
  • There is no module aiogram.html: import aiogram.html fails with ModuleNotFoundError. Use from aiogram import html. Its quote() escapes <, > and & but not ". measured with aiogram 3.31.0 and feedparser 6.0.14, Oct 12, 2026
  • In APScheduler 3, jobs added before start() are pending. A second add_job with the same id and replace_existing=True queues a duplicate, and get_job returns the first one until the scheduler starts. measured with APScheduler 3.11.3, Oct 12, 2026
  • APScheduler's 4.0 series is a pre-release with a different API (data stores, event brokers); the Stack pins 3.x, which needs none of that. AgentGid rules for APScheduler

What happened when an agent built from it

The recipe was given to a fresh coding agent in a clean sandbox, twice. The agent got only the kit files. It had to build the project and write down everything in the brief that was wrong, missing or unclear.

Build 1 · brief v0.1 · Oct 12, 2026

9 of 9
lines of the definition of done met
13
things in the brief reported as wrong, missing or unclear
2
serious: would have shipped a security hole or a silent failure

Parsing feed bytes as the brief said lets a feed server make the bot read a local file, and scheduling the digest with a lambda means it is never sent. The brief also named a module that does not exist and left out how channels send commands.

Build 2 · brief v0.2 · Oct 12, 2026

9 of 9
lines of the definition of done met
11
things in the brief reported as wrong, missing or unclear
0
serious: stopped the build or shipped a flaw

No retries. Fixes: rebuild jobs from SQLite at start, remove a job before re-adding it (pending jobs duplicate), load .env from the working folder, a Router per Dispatcher, a fuller fake-session recipe and a pip that lands in the venv.

Result of the last build. A Telegram digest bot with /add, /remove, /list, /time and /digest, per-chat time zones and SQLite; 44 tests pass against a fake Telegram session and fixture feeds, offline, in a fresh clone set up from the README alone. Its findings went back into the recipe, which is now at v0.3. That version has not been built again as a whole.

Checked again on Oct 19, 2026. AgentGid checks every recipe each week, without a model: 6 pinned packages all still exist on their registries; the pip lines resolve together; 14 links in the brief: all open. npm lines are checked pin by pin, not installed.

Not checked by anyone yet

  • A live run with a real bot token: Telegram's API was not reachable from the test machine
  • Fetching real feeds over the internet
  • The summary-model variant, the Russian texts, macOS and Windows

The kit files

Put them in an empty project folder, open your coding agent there and paste the first prompt (Claude Code first asks you to approve the MCP servers in .mcp.json). These are the files for Claude Code with the default answers; the kit builder writes them for Cursor, Codex, Copilot or another agent, and for other choices. Full guide: how to use a kit.

FileWhat it isSize
AGENTS.mdThe brief: what to build, stack and versions, licenses, plan with checks, known traps217 lines
CREDITS.mdThe license record of every third-party file22 lines
first-prompt.txtYour first message to the agent8 lines
install.txtInstall commands with exact versions4 lines
CLAUDE.mdOne line that imports AGENTS.md for Claude Code1 lines
.mcp.jsonThe MCP servers the brief lists, for Claude Code15 lines
kit.jsonThe kit as data: parts, versions, checks185 lines

Download all (.zip)

first-prompt.txt the agent stops after each step and reports
Read AGENTS.md from top to bottom before you do anything else. The kit files it lists are already in this folder.

Then do step 1 of the plan and stop. Report back with:
1. the commands you ran,
2. what each "Done when" check showed (a screenshot or the output),
3. anything in AGENTS.md that turned out to be wrong, missing or out of date.

Do not start step 2 until I reply.
Or let it run the whole plan
Read AGENTS.md from top to bottom before you do anything else. The kit files it lists are already in this folder.

Then work through the plan in order. After each step, run its "Done when" checks yourself and write one line in PROGRESS.md: the step, what you checked, and the result.
You may install the packages and download the files that AGENTS.md lists without asking. Stop and ask me only for what its "Before you start" section says needs a person.
When a check fails, fix the cause and run it again. If it still fails after two real fixes, stop and tell me what you tried.
Keep a list in PROGRESS.md of anything in AGENTS.md that turned out to be wrong, missing or out of date.
When every line of the Definition of done is true, stop and show me how to run it.
install.txt
uv venv --seed --python 3.12 .venv && source .venv/bin/activate   # uv fetches Python 3.12 if it is missing; --seed puts pip into the venv, so the pip line below installs there and not into the system Python
# without uv: python3.12 -m venv .venv && source .venv/bin/activate
python --version   # must print 3.12.x
pip install aiogram==3.31.0 feedparser==6.0.14 "apscheduler>=3.11.3,<4" httpx==0.28.1 python-dotenv==1.2.4 tzdata==2026.5 pytest==9.1.1

Other versions of this kit

Summaries

Without a model the digest shows headlines and the first sentences each feed already provides. A model writes proper summaries and is paid per token.

Headlines and feed text (this page) Model summaries

Language of the bot's messages

English (this page) Russian

Other versions were not test-built as a whole: the kit says which parts differ from the tested one.

Ask for this kit from your agent

Agents connected to the AgentGid MCP server get the same kit without this page: list_recipes(), then plan_project({"recipe": "news-bot", "answers": {"agent": "cursor"}, "files": true}). Every brief also tells the agent to ask AgentGid before it adds a part that is not listed.

Recipe news-bot v0.3. Data snapshot Oct 12, 2026: versions, licenses and prices change, so check the linked pages before you ship.

Comments

  • Built something with this kit? Share what worked, what broke and what you changed.

Other kits