Skip to content
BT. Open to select work
← All case studies02 / 12 · Editorial automation

Editorial automation

Newsclaw

A newsroom pipeline that remembers what it has already covered.

Newsclaw public product page introducing its Telegram news automation pipeline
Newsclaw public product page · October 2026

Case 02 / 03

Multi-channel news automation

Newsclaw

A news channel that runs itself. It watches a spread of sources, picks what its audience should see, researches the story before writing it, and posts on schedule. The owner sets the whole thing up by chatting with a bot.

Built solo · 2024—2026 · LangGraph · MongoDB · Azure + Groq

The build

Writing copy with a chatbot is the first step. Newsclaw asks the next question: why not automate the newsroom around it? An owner sets a channel up once, then it monitors selected sources, filters candidates, researches a story, writes in the channel's voice, and posts on schedule. Every channel keeps its own audience, sources, instructions, format, and delivery settings, and its owner can change any of them later by chat.

01 / onboarding chat

Describe the channel

Coverage, audience, tone, topics to avoid, sources, delivery mode, schedule, and timezone are collected through a guided conversation.

02 / saved channel profile

Turn the brief into settings

The chat creates the editorial profile, stage instructions, source mix, delivery target, and posting schedule the newsroom uses.

03 / control after launch

Keep managing it by chat

Inspect coverage, adjust settings, run a post now, research a link, or send a supplied story straight to the reporter without opening a config file.

3independent gates
before anything posts
17agent tools for
conversational control
10ingestion source
types, one path
“The whole chain has to hold, from picking a story to how it finally reads.”

Newsclaw / engineering breakdown

A newsroom
nobody staffs.

Setup starts as a guided conversation. The onboarding bot asks what the channel covers, who it is for, how it should sound, what to avoid, which sources to watch, when to post, and whether delivery goes to a public channel or a private feed. From that chat it saves an editorial profile, schedule, source configuration, timezone, and delivery target. Once the channel is running, the same chat can inspect recent posts, change sources or prompts, alter the length and schedule, run a post now, research a link, or send a supplied story directly to the reporter.

Newsclaw run, from configured sources to a published post and its saved history Configured sources feed one normalised candidate list. Identity de-duplication removes repeats, the picker chooses a story using the channel's past coverage, the reporter researches it, the writer applies the channel voice, a length gate loops through the shortener only when the draft is too long, and the post publishes to Telegram. The published post is saved to history, which returns on later runs as evidence for the picker and related coverage for the reporter. 01 · sources this channel watches GNews RSS feeds YouTube · Reddit Substack · Medium GitHub · HN Telegram · Web NORMALISE one shape canonical url · event id DE-DUPE past coverage + judgment PICKER research · relate · veto REPORTER channel voice + rules WRITER char limit FITS? too long recheck fits SHORTEN POST Telegram HISTORY post · id · embedding saved posts come back on the next run similarity evidence → picker · related coverage → reporter
One run, end to end · the loop back into the picker and reporter is what stops the channel repeating itself
01

Repetition, or a real development?

Early on the channel kept posting the same story on a loop. Rejecting anything too similar is the obvious fix, and it breaks follow-ups immediately, because a sequel scores high against the story it follows.

Gate 01
Exact matching

URLs get canonicalized and tracking parameters stripped, so one article arriving through several aggregators collapses into a single identity. An event id catches the rest. No model runs at this stage, which means obvious repeats cost nothing to reject.

no model needed
Gate 02
Semantic recall

Gemini embeddings keep a searchable representation of posts for each channel. Similarity search brings back potentially related coverage with scores, giving the picker evidence rather than an automatic answer.

retrieves evidence
Gate 03
The model decides

The scores go to the picker as context rather than acting as a cutoff. It reads the actual content and answers with publish, reject, or treat this as a continuation of something earlier.

editorial judgment
Instruction at this band

Very likely a duplicate. The picker is told to avoid it unless comparing the two texts shows a real difference, which is the clause that lets a genuine development survive a high score.

Anything above 0.4 forces a content comparison. A threshold on its own was too blunt, and sending everything to a model was expensive and gave different answers on different runs.

Second veto: the reporter can still drop a story after researching it by returning ///REJECT_DUPLICATE///. If every candidate is stale, the picker returns ///ALL_DUPLICATES/// and nothing gets posted that run. I would rather a channel go quiet for a cycle than repeat itself.

02

The channel remembers what it covered

The useful case is not just avoiding a duplicate. When new coverage genuinely builds on a story the channel has already published, the follow-up should give readers a direct way to catch up.

What it took: similarity alone made the model see relationships where there were only shared words. It would connect unrelated news just because both stories mentioned the same company or topic. The hard part was teaching it the editorial common sense to distinguish a real development from a loose association, using tighter prompts and examples of both links that belong and links that do not.

03

Three roles, three separate prompts

Asking one prompt to select, verify and write gave mediocre results at all three. Splitting them meant each stage could be tuned against the specific way it failed.

news_picker.md

Picker

Works out what is worth covering for this channel and audience, reads the similarity evidence, and rules on duplicates.

  • newsworthiness
  • duplicate adjudication
  • audience fit
report_preparer.md

Reporter

Researches before writing anything. Checks the facts, decides whether older coverage is actually related, and can veto the story.

  • research + grounding
  • is this related?
  • says when it is unsure
news_formatter.md

Writer

Owns the voice. Turns a checked report into Telegram-safe HTML with a media plan and a length that fits.

  • tone + structure
  • HTML safety
  • length compliance

Why files and not string literals: I spent far more time on prompts than on application code. Keeping them as Markdown with named sections and a cache I can clear made that iteration bearable, and it lets a channel layer its own wording on top without touching the pipeline.

04

Models and tools, each with a job

One model does not need to carry the entire newsroom. Gemini supplies built-in URL context and Google Search for reporting, while separate model roles handle selection, writing, and shortening. The pipeline stays flexible without making every stage do the same work.

  1. Research tools Gemini URL context + Google Search The reporter can read the source page and search for corroborating context before it writes.
  2. Website reader Website scraper For pages that need a direct read, the same website-scraping capability can pull the article body. It is also one of the sources a channel owner can configure below.
  3. Pipeline roles Separate models, separate jobs Selection, research, writing, and shortening are isolated so each stage can be tuned for the job it actually has.
Picker · ReporterConfigurable modelsSelection and research are provider-configured, so the model can be adjusted without changing the pipeline around it.
Writer · ShortenerKimi K2on Groq for the final writing pass, with the shortener running at a lower temperature.
Research · recallGeminiURL context and Google Search for reporting, plus embeddings to surface related channel coverage.

The split matters: tools bring source material into the reporting stage, while the individual model roles select, verify, write, and shorten. Keeping those jobs distinct makes the newsroom easier to tune without disturbing the rest of a run.

05

Making it fit

Telegram will reject a caption beyond 1,024 characters. That is the absolute platform ceiling. Each channel can also save its own lower character limit, and that is the limit Newsclaw normally targets. The system measures the final output instead of trusting a model to stay inside either boundary.

  1. attempt 1 to 2excess × 1.5overshoot the target on purpose
  2. attempt 3 to 4excess × 1.25refine
  3. attempt 5 to 8excess + 20close the gap
  • 150character floor, so it never trims a post into nonsense
  • 0%if a pass does not shorten anything, stop rather than loop forever
  • <5%barely any progress means cut harder next pass instead of burning calls

Sending is guarded too: five attempts with backoff up to twenty seconds, and if Telegram rejects the HTML the post goes out as plain text rather than disappearing. Length is counted without the markup, since the markup is not what a reader sees.

06

Control changed the architecture

The chat interface became a product surface, not just a settings shortcut. Someone should be able to run the whole newsroom, change its behavior, or send one story directly to research without opening a dashboard. That meant the pipeline could no longer be one opaque function on a timer.

Inspect
  • list_user_channels
  • get_channel_info
  • get_channel_full_info
  • inspect_channel_posts
Configure
  • update_channel_settings
  • update_prompt_customization
Run
  • post_now
  • send_to_reporter
  • get_current_message_attachments
Research
  • google_research
  • scrape_webpage
  • fetch_x_status
Remember
  • save_to_memory
  • search_memories
  • update_memory_content
  • delete_from_memory
  • update_pinned_context
What the user says

“Ethiopian tech and startup news, for founders. Post in the morning and again after work.”

What gets written
posting_schedule: 08:00, 18:30
timezone:         Africa/Addis_Ababa
topics:           tech, startups, funding
audience:         founders and operators
channel_name:     inferred
description:      inferred

Constraints that make it finish: onboarding aims for three to five turns and stops at a hard ceiling, settling for the best data it has rather than interrogating someone. It infers real clock times from vague phrasing instead of using a fixed mapping. It also only offers the source types that person's plan allows, so onboarding cannot set up something the plan will reject afterwards.

Before the chat
one function, start to finish

A scheduled run worked, but the only available request was the entire job.

After the chat
  1. fetch_and_pick
  2. prepare_report
  3. format_and_validate
  4. deliver_and_save

The normal scheduled run still follows this order. The difference is that each step now has a name and an entry point the assistant can use.

  • “post something now” post_now runs the full chain immediately, with an optional note for what the picker should favour
  • “write this up for me” send_to_reporter skips fetching and picking, then enters at research with the user's own link and instructions

The resulting shape: chat control did not sit beside the pipeline; it changed the pipeline. A normal run is still linear, while the assistant can now start the whole job or use the right entry point for one specific request.

What it proves

  • Multi-stage agent design where each role is tuned separately
  • Retrieval feeding a judgment call rather than a threshold
  • Vector search in production, including what to do when it is down
  • Guardrails written on the assumption that models ignore instructions
  • Multi-tenant scheduling and per-channel configuration
  • Conversational configuration built as a real product surface
  • Restructuring a working system when the product outgrew its shape

Where it stands

Newsclaw is live but throttled on purpose. What stops it running at full speed is the cost of the model calls, not broken code, and it starts posting again once the API keys are switched. The Stripe integration is finished, webhook signatures and all seven lifecycle events included, but I never switched it on commercially. There are no paying users and the prices were guesses.

“Changing how a channel writes by texting a bot is still the part people react to.”
Open the bot

Keep exploring

Voice agents

Next case study →Ask about this work ↗