Table of Contents

πŸ‘‰ Try the demo: https://github.com/LM-Kit/lm-kit-net-samples/tree/main/console_net/agents/news_monitoring_agent

News Monitoring Agent for C# .NET Applications


🎯 Purpose of the Sample

The News Monitoring Agent demo shows how to use LM-Kit.NET to build an AI-powered news assistant that fetches, searches, and summarizes RSS/Atom feeds using the built-in RssFeedTool and WebSearchTool.

The sample shows how to:

  • Register built-in tools (RssFeedTool, WebSearchTool, DateTimeTool) with a conversation.
  • Let an LLM autonomously fetch and parse RSS and Atom feeds.
  • Search feed entries by keyword and date range.
  • Supplement RSS results with live web search for broader context.
  • Generate concise news briefings from multiple sources.

πŸ‘₯ Industry Target Audience

  • Media and Publishing: automate news monitoring and topic tracking across multiple sources.
  • Market Intelligence: track industry news and competitor mentions in real time.
  • Research Teams: monitor academic, scientific, and regulatory feeds for relevant updates.
  • DevOps and SRE: watch status feeds, release notes, and security advisories.
  • Content Creators: stay on top of trending topics for content planning.

πŸš€ Problem Solved

Manually checking multiple news sources is time-consuming and easy to miss. This demo automates the process: an AI agent fetches feeds, filters by topic, and provides concise summaries with source attribution. Combined with web search, it fills gaps that RSS alone cannot cover.


πŸ’» Sample Application Description

Console app that:

  • Lets you select a language model and RSS feeds to monitor.
  • Creates a MultiTurnConversation with RssFeedTool, WebSearchTool, and DateTimeTool registered.
  • Enters an interactive chat loop where you can:
    • Ask for a news briefing across all feeds.
    • Search by topic across feeds and the web.
    • Compare coverage of a story across different sources.
    • Request detailed analysis of specific articles or trends.

✨ Key Features

  • RssFeedTool: fetch, parse, and search RSS 2.0, Atom, and RSS 1.0 feeds.
  • WebSearchTool: DuckDuckGo web search for supplemental context (no API key required).
  • DateTimeTool: current date/time awareness for relative date queries.
  • Multi-feed monitoring: select from preset feeds or add custom URLs.
  • Source attribution: summaries always cite the source name and publication date.

Built-In Feeds

# Feed Focus
0 Hacker News Technology, startups
1 TechCrunch Technology industry
2 Ars Technica Tech, science, culture
3 The Verge Tech, entertainment
4 BBC News - World Global news
5 Reuters - World International wire
6 Custom Any RSS/Atom feed URL

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Input    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   News Agent    β”‚
β”‚  (MultiTurn     β”‚
β”‚   Conversation) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”
    β”‚  Tools  β”‚
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚ RssFeed │──── Fetch / Search / Parse RSS & Atom feeds
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚WebSearch│──── DuckDuckGo web search for additional context
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚DateTime │──── Current date/time for relative date queries
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tool Registration

using LMKit.Agents.Tools.BuiltIn;

MultiTurnConversation chat = new(model);

// Register built-in tools
chat.Tools.Register(BuiltInTools.RssFeed);
chat.Tools.Register(BuiltInTools.WebSearch);
chat.Tools.Register(BuiltInTools.DateTime);

βš™οΈ Getting Started

Prerequisites

  • .NET 8.0 or later
  • Sufficient VRAM for the selected model (3-18 GB)
  • Internet connectivity for RSS feeds and web search

Download

git clone https://github.com/LM-Kit/lm-kit-net-samples
cd lm-kit-net-samples/console_net/agents/news_monitoring_agent

Run

dotnet build
dotnet run

Then:

  1. Select a model by typing 0-5, or paste a custom model URI.
  2. Choose RSS feeds to monitor (comma-separated numbers, or Enter for all).
  3. Ask questions, request briefings, or search for specific topics.

πŸ”§ Troubleshooting

  • Feed fetch fails: some feeds may be behind CDNs or require specific User-Agent headers. Try a different feed.
  • Slow responses: fetching multiple feeds takes time. Use fewer feeds or ask about a specific feed.
  • Stale results: RSS feeds are cached by their publishers. Recent events may not appear immediately.
  • Web search rate limits: DuckDuckGo may throttle frequent requests. Space out queries.

πŸš€ Extend the Demo

  • Scheduled monitoring: add a timer to fetch feeds periodically and alert on new entries.
  • Premium search: switch to Brave, Tavily, or Serper for higher quality web search results.
  • Sentiment analysis: combine with LM-Kit.NET's sentiment analysis to gauge article tone.
  • Email alerts: pipe important results through SmtpTool for email notifications.
  • Custom feed options: configure RssFeedToolOptions.MaxEntries and TimeoutSeconds for fine-tuned control.

πŸ“š Additional Resources