π 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
MultiTurnConversationwithRssFeedTool,WebSearchTool, andDateTimeToolregistered. - 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:
- Select a model by typing 0-5, or paste a custom model URI.
- Choose RSS feeds to monitor (comma-separated numbers, or Enter for all).
- 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
SmtpToolfor email notifications. - Custom feed options: configure
RssFeedToolOptions.MaxEntriesandTimeoutSecondsfor fine-tuned control.