A production-ready agent that monitors fintech news and sends curated daily briefings to C-suite executives.
- Automated Daily Briefings - Scheduled to run at 9:00 AM every day
- Multi-Source News Fetching - RSS feeds from 4 major fintech news sources
- Intelligent Curation - Gemini-powered filtering and summarization
- Smart Learning - Learns from past articles to avoid duplicates and spot trends
- Executive-Focused - Concise 1-2 line synopses, max 10 stories per email
- Professional Email - HTML + plain text formatted emails
- Comprehensive Tests - 34 unit and integration tests included
Coding-Assignment/
├── src/ # Core source code
│ ├── agent.py # LangGraph agent orchestration
│ ├── news_fetcher.py # RSS feed fetching & filtering
│ ├── summarizer.py # Gemini-based curation
│ └── emailer.py # Email formatting & sending
├── config/ # Configuration
│ ├── __init__.py
│ └── settings.py # Centralized settings
├── tests/ # Test suite (34 tests)
│ ├── test_fetcher.py # 5 fetcher tests
│ ├── test_summarizer.py # 7 summarizer tests
│ ├── test_emailer.py # 13 emailer tests
│ └── test_agent.py # 9 agent tests
├── agent.py # Main entry point
├── run_tests.py # Test runner
├── quickstart.py # Interactive guide
├── TESTING.md # Testing documentation
├── REFACTORING.md # Refactoring details
└── .env-example # Environment template
# Copy environment template
cp .env-example .env
# Edit .env with your credentials
GOOGLE_API_KEY=your_gemini_api_key
GMAIL_SENDER=your_email@gmail.com
GMAIL_APP_PASSWORD=your_app_specific_password
GMAIL_RECIPIENT=recipient@example.com# All tests
python run_tests.py
# Specific test suite
python run_tests.py fetcher
python run_tests.py summarizer
python run_tests.py emailer
python run_tests.py agent# Test run (immediate execution)
python agent.py --now
# Scheduler mode (runs daily at 9:00 AM)
python agent.py| Suite | Tests | Focus | Runtime |
|---|---|---|---|
| test_fetcher.py | 5 | RSS feed fetching & filtering | ~5s |
| test_summarizer.py | 7 | Article curation logic | <1s |
| test_emailer.py | 13 | Email formatting & structure | <1s |
| test_agent.py | 9 | State management & workflows | <1s |
| Total | 34 | All components | ~10s |
All settings are centralized in config/settings.py. Modify without touching code:
# News sources
FEEDS = ["https://www.finextra.com/rss/headlines.aspx", ...]
# Keyword exclusions
EXCLUDE_KEYWORDS = ["stock price", "share price", ...]
# Lookback window
LOOKBACK_HOURS = 48
# Max stories per email
MAX_STORIES = 10
# LLM Model
GEMINI_MODEL = "gemini-1.5-pro"
# Summarization system prompt
SYSTEM_PROMPT = """..."""The agent uses LangGraph to orchestrate a three-stage pipeline:
┌─────────────┐ ┌──────────────┐ ┌──────────┐
│ FETCH │─────▶│ SUMMARIZE │─────▶│ EMAIL │
│ Articles │ │ w/ Gemini │ │ Send │
└─────────────┘ └──────────────┘ └──────────┘
Run all tests:
python run_tests.pyTests cover:
- RSS feed fetching & filtering
- Article curation logic
- Email formatting (plain & HTML)
- Agent state management
- History persistence
See TESTING.md for detailed testing information.
- README.md (this file) - Project overview
- TESTING.md - Comprehensive testing guide
- REFACTORING.md - Refactoring details
- .env-example - Environment variable template
# Test run
python agent.py --now
# Production (runs daily at 9:00 AM)
python agent.pySee documentation files for detailed information about testing, configuration, and troubleshooting.