Auto-Briefing-Agent is a Dockerized FastAPI service that scrapes headlines from Hacker News, deduplicates them, and prepares them for a newsletter/LLM-powered briefing pipeline.
It supports scheduled scraping and sending daily briefings via email using LLMs (e.g., Gemini) and Gmail credentials.
- Scrapes top stories from Hacker News
- Deduplicates articles using a SQLite database
- Prepares content for LLM-based summarization
- Sends briefings via email using Gmail SMTP
- Fully containerized with Docker
.
├── app/
│ ├── main.py # FastAPI application
│ ├── scraper.py # Hacker News scrapers
│ ├── models.py # DB models
│ └── database.py # DB setup
├── tests/ # API & logic tests
├── Dockerfile
├── docker-compose.yml
├── requirements.txt
└── README.md
Before running the application, ensure you have the following:
- A Google Gemini API key
- Gmail credentials
git clone https://github.com/MANDRW/Auto-Briefing-Agent.git
cd Auto-Briefing-Agent
Build and start the services:
docker compose up --build
Open n8n in your browser:
http://localhost:5678/workflow/
- Open the n8n UI
- Click Import Workflow
- Import the provided
workflow.jsonfile - Configure the required credentials:
- Gemini API credentials
- Gmail credentials
- Set the recipient email address
- Save and activate the workflow
Scrapes the top 5 articles from Hacker News and returns only new articles (deduplicated by URL).
Request:
curl -X POST http://localhost:8000/scrapeResponse:
[
{
"id": 1,
"title": "Article Title",
"url": "https://example.com/article",
"created_at": "2024-01-01T12:00:00",
"is_processed": false
}
]Health check endpoint.
Response:
{
"status": "healthy"
}Root endpoint with API information.
The Article table contains:
id: Primary key (auto-increment)title: Article title (indexed)url: Article URL (unique, indexed)created_at: Timestamp of when the article was scrapedis_processed: Boolean flag for LLM pipeline processing status