AI News Capsule
Inspiration
The inspiration for AI News Capsule began with curiosity, the kind of curiosity that questions how a world full of advanced technology and intelligent systems can still struggle to predict something as important as the economic direction of a country.
When we look at the U.S. economy today, we see constant uncertainty. Markets shift, policies change, and global events create ripple effects that are hard to foresee. But one thing stays consistent, whenever something truly impactful happens, it’s in the news first.
That realization sparked a simple but powerful idea:
“What if we could use AI to analyze real news in real time and forecast what might happen next?”
Human decisions are unpredictable, but patterns always exist in the stories we tell, the actions governments take, and the trends that appear across industries.
AI, especially with its ability to detect subtle connections and trends, could turn those stories into predictions and insights about the future.
So instead of reading endless articles and trying to connect the dots ourselves, what if an AI could do it for us, summarizing, reasoning, and suggesting what might come next based on real information already out there?
That curiosity became the driving force behind AI News Capsule , a smart browser companion that doesn’t just summarize the news but helps you see today, understand tomorrow, and build the future.
What it does
AI News Capsule is a smart Chrome extension that uses Google Chrome’s built-in AI (Gemini Nano) to analyze and forecast world events from real-time news.
It brings intelligence directly into your browser, turning daily headlines into actionable insights, completely client-side, with no external servers.
Here’s how it works:
- Real-time News Feed: Fetches verified headlines from Google News RSS and displays top stories for today, yesterday, and two days ago.
- Summarizer API: Each article’s text is summarized locally using Chrome’s Summarizer API, which condenses long articles into 7–9 clear sentences highlighting key context and meaning.
- Prompt API: The summarized result is then passed into Chrome’s Prompt API, powered by Gemini Nano, to perform predictive reasoning : identifying potential outcomes, risks, and trends that might follow from each event.
- Ask AI Mode: Users can highlight text or click “Ask AI” to open an on-the-fly Prompt API session that allows conversational exploration: e.g., “What might this mean for inflation?” or “Could this affect the tech market?”
- Recommendations Engine: The same Prompt API session provides 7–9 sentence actionable insights under “What can be done,” giving readers reasoned forecasts and possible responses.
- Transparency: Each capsule includes its source URL, date, and outlet, keeping users connected to the verified origin of the news.
Everything happens locally inside Chrome, thanks to the new built-in AI APIs, providing a network-resilient, privacy-preserving, and cost-free AI experience.
How we built it
AI News Capsule is built as a Manifest V3 Chrome Extension using Google’s new built-in AI APIs, the Prompt API and Summarizer API, integrated with standard web technologies (HTML, CSS, and JavaScript modules).
Architecture Overview
Frontend / Popup UI
- Built in HTML + CSS + JavaScript.
- Includes a minimalist news dashboard with category filters (business, health, technology, etc.).
- The popup design ensures users can read summaries, predictions, and recommendations without leaving the browser tab.
- Built in HTML + CSS + JavaScript.
Data Retrieval
- News headlines are fetched from Google News RSS feeds (to ensure reliable, real-world data).
- Articles are sorted into a 3-day timeline (today, yesterday, 2 days ago).
- News headlines are fetched from Google News RSS feeds (to ensure reliable, real-world data).
AI Integration (Core Logic)
- Summarizer API:
Each news article’s content is passed to the built-in Summarizer API via
js const summary = await chrome.ai.summarizer.summarizeText(articleText);
The summary is concise and runs locally on the user’s device, powered by Gemini Nano. - Prompt API:
The generated summary is then extended using the Prompt API for predictive and “what-if” analysis:
js const session = await ai.createTextSession(); const prediction = await session.prompt(`Based on this summary, what future trends or outcomes might occur?`);
This step enables reasoning and recommendation generation, all happening client-side for privacy and performance.
- Summarizer API:
Hybrid AI Capability
- When internet connectivity is available, the extension can optionally call OpenAI GPT-4o-mini for richer, cloud-level reasoning.
- When offline, Chrome’s Gemini Nano automatically handles all AI tasks through the Prompt and Summarizer APIs, maintaining a seamless experience.
- When internet connectivity is available, the extension can optionally call OpenAI GPT-4o-mini for richer, cloud-level reasoning.
Privacy & Performance
- No user data leaves the browser.
- No external database, cloud storage, or analytics used.
- Processing is done locally, offering a secure and resilient UX.
- No user data leaves the browser.
Frontend (Popup UI)
- Built using HTML, CSS, and JavaScript (modules).
- Designed a clean, minimal popup window that feels like a natural part of Chrome.
- Integrated category filters for Business, Health, Technology, Science, Sports, and Entertainment.
- Added “Read More” modal windows for deeper AI analysis.
- Implemented scroll detection for automatic loading of news from earlier days.
Data Layer (Real News Feeds)
- Uses Google News RSS, which provides real, trustworthy headlines without CORS issues.
- Extracts title, summary, source, publication date, and link, then filters by date to form a 3-day timeline: Today, Yesterday, and Two Days Ago.
AI Layer (OpenAI GPT-4o-mini)
- Each article is processed through OpenAI’s GPT-4o-mini model.
- The model produces:
- A factual summary (7–9 sentences).
- A predictive analysis (7–9 sentences) with reasoning and foresight.
- A factual summary (7–9 sentences).
- Prompts are carefully tuned for clarity, length, and consistency.
Architecture & Security
- Manifest V3 compliant (no inline scripts, strict CSP).
- Uses Chrome Storage API to safely handle API keys.
- Timeout and retry logic prevent network or API crashes.
- Everything runs on-device, no personal data leaves the user’s browser.
Challenges we ran into
- Connecting to Live Data: CORS restrictions from APIs like NewsAPI and GNews. Solved using Google News RSS.
- AI Length Control: Refined prompts for consistent summary and prediction length.
- Performance: Managed multiple async summaries using batching and progress rendering.
- Manifest V3 Security: Rebuilt logic into external modules to avoid inline scripting.
- Prediction Quality: Added reasoning structure to make predictions more context-aware.
Accomplishments we’re proud of
- Built a working Chrome extension that transforms real news into meaningful AI insights.
- Stable performance even when processing multiple stories.
- Simple yet professional UI/UX for smooth, readable summaries.
- 100% privacy-safe — no server, no tracking, no data storage.
- Successfully combined real data and AI foresight to predict global trends.
What we learned
- AI is most accurate when grounded in real, verified data.
- Prompt structure is key to quality, good design yields clear and consistent results.
- Simplicity in UI improves trust and usability.
- Error handling and resilience are vital for reliability.
- AI doesn’t predict the future perfectly, but it can identify early signals and possible outcomes.
What’s next for AI News Capsule
- Voice Summaries: Add text-to-speech for accessible listening.
- Multi-language Support: Use Gemini Translator API for global reach.
- Personalized Feeds: Let users follow favorite topics or industries.
- What-If Simulator: Let users explore hypothetical “what-if” scenarios.
- Offline AI Mode: Integrate Gemini Nano for on-device summarization.
- Trend Graphs: Show evolving storylines and compare AI predictions over time.
- Bias Checker: Analyze multiple sources for transparency and reliability.
- Community Mode: Share or export personalized capsule reports.
AI News Capsule bridges the gap between real information and predictive understanding.
It’s more than a news reader, it’s a daily AI partner that helps you see what’s happening, understand why, and anticipate what’s next. spiration
Built With
- gemininano
- openai
- promptapi
Log in or sign up for Devpost to join the conversation.