Skip to content

Latest commit

 

History

History
303 lines (182 loc) · 7.31 KB

File metadata and controls

303 lines (182 loc) · 7.31 KB
image

NewsPulse AI Agent

Multi-Agent Personalized AI/ML Newsletter System (Powered by Google ADK)

NewsPulse AI is an autonomous, self-correcting multi-agent research and newsletter system. It profiles the user, retrieves fresh news, summarizes and verifies content, generates a beautiful HTML newsletter, evaluates quality with an LLM loop, learns from feedback, and continuously adapts over time.

Built using Google ADK’s LLM-powered multi-agent orchestration framework.

📘 1. Project Overview

Project Name: NewsPulse AI Agent

Platform: Google ADK (LLM-powered multi-agent orchestrator)

Team:

Shuai Tan — Product Manager

Andy Zhang — Developer

Vivien Li — Developer

Adelie Yang — Developer

⚠️ 2. Problem Statement

Executives and AI professionals are overwhelmed with information noise. They receive hundreds of generic alerts each day, yet:

  • Can't filter signal from noise

  • Lack personalized, domain-aware summaries

  • Face hallucination risks with most generative AI tools

  • Lose productivity searching for relevant insights

They need a personalized, accurate, and timely intelligence brief that is always verified.

🎯 3. Product Vision & Solution

Goal: Deliver the most relevant, timely, and trustworthy AI/ML news — with zero hallucinations.

Solution: NewsPulse is a multi-agent analyst with:

  • Sequential + loop agent patterns

  • Self-evaluation / self-correction

  • Personalized planning

  • Memory-enhanced learning

  • Fact verification

  • Email delivery with feedback adaptation

Value Proposition

✔ Personalized content ✔ Fully citation-verified ✔ AI-generated HTML newsletter ✔ Learns from feedback ✔ Low latency end-to-end

📈 4. Success Metrics

KPI Target

  • Relevance ≥80% match to user interests
  • Accuracy & Safety 100% citation-backed news
  • Latency < 4 minutes total
  • Satisfaction ≥80% positive feedback

👤 5. User Stories

Marketing Director: Wants daily competitor insights aligned with strategic focus.

CFO: Wants clear, factual regulatory & financial summaries.

Developer: Wants a personalized newsletter remembering their own keywords.

🧠 6. Multi-Agent Architecture (Unified System)

The system uses sequential and loop agent patterns.

Below merges both the PRD pipeline + your AI_Newsletter workflow.

1). UserProfilerAgent

Input: user self-description + email + request

Function: LLM interprets interests, technical level, preferred tone (casual vs technical), preferred length, detailed request for a newsletter

Output: user profile JSON


2). HistoricalRecomenderAgent

Slightly modify the user's requests to prevent stagnation and introduce related, novel concepts for current search.

Output: modified user profile JSON


3). PlannerAgent

Input: user profile + today’s date

Decides:

  • which topics to search
  • which sources to pull from
  • max number of articles
  • newsletter outline

4). GoogleSearchAgent

Function: Fetch new articles

Output: title, url, summary, published_time, uuid


5). FetchAgent

  • Fetch web page based on url from search agent

6). SummarizationAgent

For each article:

  • Extract key points
  • Condense technical content into the correct level for this user

7). WriterAgent

Input: user profile + summarized content Output: A fully drafted HTML newsletter:

  • Title
  • Section headers
  • Summaries
  • Tone adapted to user preferences

8). VerificationAgent

Checks the draft by comparing the summary against the related full text web page for:

  • Tone correctness
  • Accuracy of summaries
  • If inaccurate, modified version

If bad → returns feedback + rewrite prompt → WriterAgent rewrites → Evaluator re-checks This forms a loop agent pattern.


9). DeliveryAgent

Uses an email-sending API (OpenAPI tool) to send HTML newsletters. Logs:

  • send time
  • message_id
  • delivery status

10). FeedbackAgent

Parses user replies or click tracking:

  • updates user profile preferences
  • updates interest weights

This forms a continuous improvement loop driven by user behavior.


🏗️ 7. Architecture Diagram

image

ASCII Diagram
image

📁 8. Project Folder Structure

AI_Newsletter_Project/
├── .DS_Store
├── .gitignore
├── Dockerfile
├── pyproject.toml
├── requirements.txt
├── readme.md
├── readme_deployment_gcp.md
├── readme_setup_email_service.md
└── AI_Newsletter/
    ├── __init__.py
    ├── agent.py
    ├── logger_config.py
    ├── newsletter_agents.py
    ├── prompt.py
    ├── schema.py
    ├── utility.py
    └── vectors.py

⚙️ 9. Installation & Setup

➡️ Using uv (recommended)
  • Create virtual env uv venv --python 3.12 --seed source .venv/bin/activate

  • Install project uv pip install .

🌐 10. Test in Google ADK Dev UI

✔ AI_Newsletter (root agent) ✔ Run full agent workflow interactively

🔥 11. Test With FastAPI UI

  • Activate env: source .venv/bin/activate

  • Install (if not done): uv pip install .

  • Run FastAPI: uvicorn AI_Newsletter.main:app --reload

  • Open: ➡️ http://127.0.0.1:8000

✉️ 12. Deployment & Email Services

Please find:

  • readme_setup_email_service.md

  • readme_deployment_gcp.md

  • Supports deployment to GCP Cloud Run.

🧪 13. Sample Verification Agent Output

{ "VerificationOutput": [ { "sentence": "The latest AI advancements are democratizing coding...", "uuid": "short_blurb", "accuracy_or_not": true, "modified_version": "The latest AI advancements...", "justification": "Statement accurately reflects referenced content..." } ] }

🎓 14. How This Matches Multi-Agent System Concepts

✔ Sequential agents
✔ Loop agent pattern (Writer ↔ Verifier)
✔ Tools (Search, Crawler, Email Sender, Feedback Parser)
✔ Long-term memory (SQLite + ChromaDB)
✔ LLM Judge (VerificationAgent)
✔ Structured A2A messaging

📦 One-line Summary for Coursework

A fully personalized AI/ML newsletter generator using sequential, parallel, and loop agents, retrieval tools, long-term memory, structured A2A messaging, and LLM-based evaluation to generate, verify, and deliver daily intelligence briefs.