Background
I was already getting a daily AI news briefing from Horizon, an open-source program written by another developer that I had set up on my PC. I built Briefing Engine because when Horizon went wrong I had to dig through someone else's code to find out why, and I wanted a briefing I understood well enough to fix myself, one that showed what each request to Claude cost and could serve more than one reader.
What Horizon is
Horizon is an open-source Python program that collects posts from news sources, asks an AI model to judge and summarise them, and sends the best ones as a daily briefing. Another developer wrote it and publishes it on GitHub as Thysrael/Horizon, under the MIT licence.
I copied Horizon to my own GitHub account and set it up on my Windows PC. My copy reads 19 RSS feeds plus Hacker News and OSS Insight, uses Claude Sonnet as its AI model and emails the briefing to me through Gmail. Windows Task Scheduler starts it at 06:30 every morning.
How Horizon works
Horizon is one program that runs from start to finish and then stops. Each morning's run goes through these steps in order:
- It fetches everything the sources have published in the last 24 hours.
- It merges items that arrived from more than one source with the same link.
- It sends each item to Claude Sonnet in a request of its own, and Claude returns a score and a short analysis.
- It keeps the items that score above its threshold, asks Claude in one further request to merge items about the same story, and balances the mix of sources.
- It asks Claude for background on each item it has chosen.
- It writes the briefing as a Markdown file in its data folder.
- It emails the briefing through Gmail.
Horizon has no database. Its settings are in a JSON file and each day's briefing is in a Markdown file, and everything in between exists only while the program is running. If a run fails halfway through, that run's work is lost, and running it again starts from the beginning, including every request to Claude.
Why I built Briefing Engine
Horizon went wrong three times while I was getting it running. Anthropic's API rejected its requests because they included a temperature setting, which current Claude models no longer accept. Reddit refused requests when Horizon fetched two of its feeds within the same minute. Punctuation in the email also turned into visible HTML codes. Each problem showed up only at run time, as a failed run or a broken email, and fixing it meant learning how that part of someone else's program worked.
Briefing Engine has an answer for each of those. It never sends temperature or similar settings, and a test fails if one is added back. Requests to the same website are spaced out through a shared record in the database, with ten seconds between requests to Reddit. A test compares the email with a known-good copy, so punctuation can't turn into codes without the test failing.
How Briefing Engine works
Briefing Engine splits the work into four kinds of job: fetch a feed, score the new articles, build the briefing and send it. Each job is a row in a PostgreSQL table. A worker process takes jobs from that table and carries them out, and when a job finishes, the worker saves its result together with the job that comes next:
- A fetch job downloads a feed and saves the new articles and queues a job to score them.
- A score job sends up to ten articles at a time to Claude Haiku, a cheaper model, which scores each one against the reader's interests. The scores are saved with the cost of the request.
- A build job picks the best-scoring articles and asks Claude Sonnet to write a headline, an introduction and a short paragraph about each one. The finished briefing is saved with a send job.
- A send job emails the briefing. On my PC the email goes to Mailpit, a test inbox; on AWS it goes through Amazon SES to a real inbox.
Because every result is in the database, a run that stops halfway keeps every step it finished: the next worker finds the unfinished jobs and carries on, and only the job that was in progress is done again. The same records stop Briefing Engine paying twice for a score it already has, and show what each request to Claude cost.
Something has to create the first jobs. On my PC, a daily command queues them and works through them in one go. As a service, a scheduler queues each reader's jobs ahead of the time they want their email, and an API lets readers change their preferences and feeds.
How I built it
I built Briefing Engine one working email at a time. I started with a single daily command on my PC, made it safe to rerun, then turned it into a service that could keep running on AWS. I wrote it from scratch; Horizon was the working example, not the code I started from.
- I started with one feed and one email. The first version read Simon Willison's feed, asked Claude Haiku to score the articles against my preferences and sent a briefing to Mailpit, a local test inbox. That gave me a complete run to inspect before adding more feeds, readers or schedules.
- I made the daily run recoverable. If the program saved an article and then stopped before recording that it needed a score, the next run could miss it. So I put the job queue in PostgreSQL alongside the articles. The article and its scoring job are saved together, and a worker can pick up unfinished work after a restart.
- I split the daily command into an API and a worker. On my PC, the command finished fetching and scoring before it built a briefing. As a service, the API takes readers' requests at any time, the worker handles jobs in the background, and a scheduler queues each reader's work. That exposed a bug: the scheduler could queue a new reader's first fetch and first briefing at the same time, so the briefing could be built before any articles arrived. Because a reader gets only one briefing a day, the empty one couldn't be replaced. I fixed it in the builder, so every briefing now waits up to ten minutes for articles that are still being fetched and scored.
- I took the same application to AWS. The API and the worker run as separate services from one Docker image, with PostgreSQL on Amazon RDS and email through Amazon SES. Terraform lets me take the demo down rather than pay to leave it running.
Side by side
| Horizon | Briefing Engine | |
|---|---|---|
| Who wrote it | Another developer, as open source | Me |
| How it runs | One program, once each morning | A worker and an API that keep running, or one daily command on my PC |
| Where results are kept | Files on disk | A PostgreSQL database |
| How it uses Claude | Sonnet reads every item | Haiku scores every article; Sonnet writes only about the chosen ones |
| If a run stops halfway | The work is lost and a rerun starts again | The next worker carries on from the saved jobs |
| Readers | One | Several, each with their own preferences (the AWS demo used one) |
| Where it runs | My Windows PC | My PC, or AWS |
Where it stands
Briefing Engine works on my PC, and on 16 November 2026 it ran on AWS for the first time. A new reader set up two feeds through the API. Scoring 21 articles with Claude Haiku cost $0.0022 in total, and a briefing of eight articles arrived in Gmail. GitHub Actions now tests every change to the main branch and, once I approve the deploy, publishes a new image of the application. The same workflow can roll that image out to the running API and worker, but the demo has been down at every deploy so far, so that step hasn't run yet. The code is public on GitHub as simonoconnordev/briefing-engine.
The comparison that matters most hasn't been done yet: a week of running both programs side by side to see which briefing is more useful to read. Until then, Horizon still sends my daily briefing.