Skip to content

dev-ahmadbilal/ai-bulletin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“° AI Bulletin

Let the AI read the news β€” You read the bulletin.

A fully autonomous, AI-powered weekly tech newsletter that summarizes the top stories, dives deep into trends, and delivers beautifully formatted content straight to your inbox.


πŸš€ Overview

AI Bulletin is a self-operating newsletter system designed to:

  • 🧠 Use CrewAI agents to generate insightful, structured content
  • πŸ“¨ Deliver formatted newsletters via SendGrid
  • ⚑ Run on a lightweight FastAPI backend
  • πŸ—“οΈ Schedule and automate weekly generation and delivery using APScheduler

Built for AI-curious hackers who want to stay informed.

πŸ“Š Ai Bulletin - Week 2025-W23

Ai Bulletin - Week 2025-W23


🎯 Project Goal

To automate every part of a newsletter workflow:

  1. ✍️ Curate and plan relevant content
  2. πŸ” Summarize and analyze top stories
  3. πŸ–‹οΈ Format a professional-grade newsletter
  4. πŸ“€ Email it to all subscribers

Without any human in the loop. Just subscribe and enjoy.


🧠 Agents & Responsibilities

Agent Responsibility
TopicPlannerAgent Plans weekly theme and outlines subtopics
TopStoriesAgent Summarizes the top 3 tech/AI stories
DeepDiveAgent Provides in-depth analysis on a major topic
ToolOfTheWeekAgent Recommends trending AI tool with summary
QuoteAgent Picks a relevant quote or tweet
AIInTheWildAgent Highlights a real-world AI use case
HotTakesAgent Adds quick, opinionated commentary
EditorsNoteAgent Writes a personalized closing note
NewsletterEditorAgent Edits and compiles all section drafts
HTMLFormatterAgent Styles and formats final HTML for email delivery

🧱 Architecture

πŸ” System Flow

  1. PlanTopicsTask ← Done by TopicPlannerAgent
  2. [Parallel] TopStoriesTask, DeepDiveTask, ToolTask, QuoteTask, AIWildTask, HotTakesTask, EditorsNoteTask
  3. EditNewsletterTask ← NewsletterEditorAgent
  4. FormatHTMLTask ← HTMLFormatterAgent
  5. πŸš€ Email is sent via SendGrid

πŸ“Š Architectural Diagram (Textual)

CrewManagerAgent
  β”‚
  β–Ό
TopicPlannerAgent
       β”‚
       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    Runs in Parallel                                β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚TopStories  β”‚ DeepDive   β”‚ ToolOfWeek β”‚ Quote   β”‚ β”‚
β”‚ β”‚Agent       β”‚ Agent      β”‚ Agent      β”‚ Agent   β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                        β”‚
β”‚ β”‚ AIWild     β”‚ HotTakes   β”‚                        β”‚
β”‚ β”‚ Agent      β”‚ Agent      β”‚                        β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚
       β–Ό
NewsletterEditorAgent
       β”‚
       β–Ό
HTMLFormatterAgent

🧩 Tech Stack

  • Language: Python 3.12+
  • Framework: FastAPI + Jinja2 templates
  • Task Automation: APScheduler
  • Agents & LLM: CrewAI (GPT-4 or Deepseek)
  • Database: SQLite (via SQLAlchemy ORM)
  • Email Services: SendGrid or any other service (configurable)

πŸ“ Folder Structure

ai-bulletin/
β”œβ”€β”€ main.py              # FastAPI app entry point
β”œβ”€β”€ database.py          # SQLite engine + session config
β”œβ”€β”€ models.py            # SQLAlchemy models
β”œβ”€β”€ schemas.py           # Pydantic schemas for validation
β”œβ”€β”€ admin.py             # Admin interface or manual overrides
β”œβ”€β”€ newsletter/          # CrewAI agents, tasks, orchestration
β”œβ”€β”€ crew/                # Crew definitions and configuration
β”œβ”€β”€ jobs/                # APScheduler jobs (weekly trigger)
β”œβ”€β”€ utils/               # Email sender wrappers
β”œβ”€β”€ templates/           # HTML pages for subscription/unsubscribe
β”œβ”€β”€ requirements.txt     # Project dependencies
└── subscribers.db       # SQLite DB (auto-created)

βš™οΈ Getting Started

πŸ“¦ Prerequisites

  • Python 3.10+
  • uv: ultra-fast package manager
curl -Ls https://astral.sh/uv/install.sh | bash

πŸ› οΈ Setup & Installation

# Clone the repo
$ git clone https://github.com/dev-ahmadbilal/ai-bulletin.git
$ cd ai-bulletin

# Create virtual environment
$ uv venv .venv
$ source .venv/bin/activate

# Install dependencies
$ uv pip install -r requirements.txt

πŸš€ Run Locally

uvicorn main:app --reload

🌐 Test Email Subscription

curl -X POST http://localhost:8000/subscribe \
  -H "Content-Type: application/json" \
  -d '{"email": "example@domain.com"}'

πŸ“¬ API Endpoints

Method Route Description
POST /subscribe Subscribe a new email
GET /health Check API health status
GET /unsubscribe Show unsubscribe form
POST /unsubscribe Unsubscribe from list

πŸ—“οΈ Automation with APScheduler

  • The newsletter_job is triggered every Sunday at 10 AM:
CronTrigger(day_of_week="sun", hour=10, minute=0)
  • You can change the schedule in jobs/newsletter_job.py

🧹 How It Works for Subscribers

  • βœ‰οΈ When a new user subscribes, they instantly receive the latest edition of the newsletter.
  • πŸ“« We recommend checking your spam or junk folder if you don't see the email.
  • πŸ—“οΈ After that, new editions are delivered to all subscribers automatically every week.

🎁 Sponsors

AI Bulletin is currently looking for sponsors!

If you're a company or individual who believes in the power of open-source, agentic AI systems, and automated media β€” let's collaborate.

Want to sponsor AI Bulletin?
➑️ ahmadbilal.3491@gmail.com


β˜• Support Ahmad

If you enjoy AI Bulletin, consider buying me a coffee:

➑️ https://buymeacoffee.com/ahmad.bilal


πŸ“„ License

This project is licensed under the MIT License


🀝 Contributing

Feel free to fork and submit PRs for enhancements, fixes, or new agent ideas.


πŸ™Œ Acknowledgements

  • Shoutout to Ed Donner for an amazing Agentic ai course.
  • CrewAI by Vercel & LangChain community
  • APScheduler for painless job scheduling
  • SendGrid for simple transactional email delivery

About

Let the ai read the news - You read the bulletin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors