← Back to projects

AI News, a daily news agent

An agent that reads the leading AI sources every morning and publishes a sourced, LLM-written edition in French.

View project

AI News home page showing today's edition and its articles

The idea

Keeping up with AI news means reading a dozen blogs and outlets every day. AI News does it for me: every morning at 7 a.m. (Montreal time), an agent collects what was published in the last 48 hours, picks the 3 to 5 most important stories and publishes an edition in French at louqman.dev/news.

How it works

  1. Collection: RSS feeds from 8 sources (OpenAI, Google DeepMind, Hugging Face, MIT Technology Review, VentureBeat, The Verge…) are read with feedparser, then the full text of each article is extracted with trafilatura.
  2. Writing: the numbered sources are sent to Gemini, which groups articles covering the same story and writes one article per story, with a summary, a “why it matters” line and tags.
  3. Publishing: the edition is saved as JSON and served by a static site on Cloudflare Workers, with a picker to browse previous editions.

Everything runs in a scheduled GitHub Actions workflow: no server to maintain, and close to zero cost.

Keeping it accurate

An LLM summarizing the news can make things up. Several safeguards limit that risk:

  • Structured output: Gemini’s response is validated against a Pydantic schema (title, summary, content, tags, sources) instead of free text that has to be parsed.
  • Verified sources: the model cites source numbers, never URLs. The script swaps those numbers for the real links and flags any source that doesn’t exist, so the model can’t invent a link.
  • Strict instructions: only use facts found in the sources, with no added figures, dates or names.
  • Controlled cost: at most 20 sources per edition, and token usage is logged on every run.