How do I feed RSS feeds to an AI agent?
Feed RSS feeds to an AI agent by calling fetch_url on the feed URL — AgentFetch auto-detects RSS/Atom XML, parses it into a structured array of items (title, link, summary, published_date, author), and returns JSON the model can iterate over. Example: fetch_url("https://news.ycombinator.com/rss") returns ~30 items as a compact JSON array (~3KB) instead of raw XML (~25KB). The agent can then call fetch_url on individual story links to drill into specific items. This pattern is the backbone of automated news, monitoring, and competitive-intel agents — feed the agent a list of 10 RSS sources every morning and it produces a 200-word digest for $0.02-$0.05 in token cost. For sources without RSS (most modern sites), use extract_json with a schema like {"items": [{"title": "string", "url": "string", "published": "string"}]} against the listing page — works ~80% of the time. Common feed gotchas the AgentFetch parser handles: malformed dates, mixed RSS 2.0 / Atom / RSS 1.0 dialects, HTML-encoded summaries, and feeds that return 304 Not Modified instead of full XML. For high-frequency polling, set conditional GET headers via the if_modified_since parameter — saves bandwidth and respects publisher infrastructure.