Terminal News Agent is the ultimate tool for reading, analyzing, and "dissecting" Google News headlines directly from your terminal.
Not only can you browse the latest news, but you can launch multiple AI agents to generate summaries, analyze implications, and build complex scenarios—all with support for local (Ollama) and cloud (OpenAI, Claude) AI providers.
- Real news from Google News in real-time (via RSS, no sketchy scraping)
- Interactive terminal table with keyboard navigation, Rich styling, and focus highlight
- Multiple AI Providers: Support for Ollama (local), OpenAI, and Claude
- Chained LLM agents:
- Summary Agent: concise, factual abstract
- Implications Agent: in-depth analysis of consequences
- Theory Agent: connects dots and builds scenarios
- Universal Analysis Agent: multi-thematic framework for complex topics
- (All agents can be triggered from the terminal UI!)
- 🔍 Advanced News Verification System (with SerpAPI):
- Verify selected articles or custom text
- Three verification modes: Fast, Medium, Comprehensive
- Standard and Advanced verification with step-by-step reasoning
- Fact-checking search results with full content scraping
- Bilingual search (Italian + English sources)
- Reliable sources cross-reference
- AI-powered truth analysis with critical skepticism
- Direct truth validation with clear verdicts (VERA/FALSA/DUBBIA)
- ⚙️ Built-in Settings Manager: Modify all configuration directly from UI
- Full article content scraping for comprehensive analysis
- Open article in browser with one key
- Multi-language and Google News topic filtering (configurable in settings)
- No cloud required:
- 100% local processing with Ollama, no external APIs needed
- Cloud options available for higher quality analysis
- Designed for hacking/extending: config/code separation, easy to customize
- Works on Linux, macOS, WSL, Windows Terminal
Clone the repo and install locally:
git clone https://github.com/Pinperepette/news_agent.git
cd news_agent
pip install .
news-agent- Get your Claude API key from console.anthropic.com
- Edit
news_agent/settings.ini:provider = claude claude_api_key = sk-ant-your-key-here
- Run:
python -m news_agent.main
- Install Ollama
- Run:
ollama pull qwen2:7b-instruct - Edit
news_agent/settings.ini:provider = ollama model = qwen2:7b-instruct
- Run:
python -m news_agent.main
NEW: You can now modify all settings directly from the UI!
- Press
cin the main menu to open the configuration panel - Select what to modify:
- Provider AI (ollama/openai/claude)
- AI models for each provider
- API keys (OpenAI, Claude, SerpAPI)
- General settings (language, RSS feed, articles per page)
- View current configuration
No more manual file editing required! 🎉
Edit news_agent/settings.ini:
[DEFAULT]
lang = it
topic = https://www.ansa.it/sito/ansait_rss.xml
articles_per_page = 15
provider = ollama
model = qwen2:7b-instruct
ollama_url = http://localhost:11434/api/generate
serpapi_key =
openai_api_key =
claude_api_key =
openai_model = gpt-4
claude_model = claude-3-5-sonnet-20241022The system uses a factory pattern that allows you to easily switch between different AI providers by changing just one line in the configuration.
Simply change the provider = line in settings.ini:
# For Ollama (local, free)
provider = ollama
# For OpenAI (cloud, paid)
provider = openai
# For Claude (cloud, paid)
provider = claudeprovider = claude
claude_api_key = sk-ant-your-claude-key-here
claude_model = claude-3-5-sonnet-20241022Available Claude Models:
-
claude-3-opus-20240229- Most powerful (expensive) -
claude-3-5-sonnet-20241022- Balanced (recommended) -
claude-3-5-sonnet-20240926- Alternative Sonnet -
claude-3-5-haiku-20241022- Fastest (cheapest) -
Pros: Excellent reasoning, high quality responses, best for complex analysis
-
Cons: Requires API key, costs money (~$0.003/1K tokens)
-
Setup: Get API key from Anthropic Console
provider = ollama
model = qwen2:7b-instruct
ollama_url = http://localhost:11434/api/generateRecommended Models:
-
qwen2:7b-instruct- Good balance of speed and quality -
llama3.2:3b- Fast and lightweight -
mistral:7b- High quality for size -
codellama:7b- Good for technical topics -
Pros: Free, private, no internet required, no API limits
-
Cons: Requires local setup, slower than cloud options
-
Setup: Install Ollama and run
ollama pull qwen2:7b-instruct
provider = openai
openai_api_key = sk-your-openai-key-here
openai_model = gpt-4Available Models:
-
gpt-4- Most powerful (expensive) -
gpt-3.5-turbo- Good balance (cheaper) -
gpt-4-turbo- Latest GPT-4 version -
Pros: High quality, reliable, excellent for creative tasks
-
Cons: Requires API key, costs money
-
Setup: Get API key from OpenAI Platform
| Provider | Cost | Privacy | Quality | Speed | Setup |
|---|---|---|---|---|---|
| Claude | Pay-per-use | Cloud | Excellent | Fast | API key |
| Ollama | Free | 100% Private | Good | Medium | Local install |
| OpenAI | Pay-per-use | Cloud | Excellent | Fast | API key |
- Configuration Reading: The program reads
provider =fromsettings.ini - Provider Creation: Creates the appropriate AI provider using
create_ai_provider() - Fallback System: If multiple providers are configured, automatically tries alternatives if one fails
- Unified Interface: All agents use the same provider for:
- 📰 Article summarization (
s) - 🤖 LLM agents (
a) - 🔍 News verification (
v)
- 📰 Article summarization (
- Model Name Display: Shows which model is being used in response titles
If you have multiple AI providers configured, the system will:
- Try the primary provider first
- Automatically switch to the next available provider if one fails
- Show feedback about which provider is being used
- Ensure continuity even with temporary server errors
Example: If Claude returns a 529 error, the system automatically switches to OpenAI or Ollama.
To enable the news verification feature:
- Get a free API key from SerpAPI
- Add your key to
settings.ini:serpapi_key = your_serpapi_key_here - The verification option (
v) will appear in the menu
Verification Features:
- Three search modes: Fast (quick), Medium (balanced), Comprehensive (thorough)
- Searches for fact-checking information in both Italian and English
- Cross-references with reliable sources
- Scrapes full content of verification articles
- Uses AI to analyze truthfulness with critical skepticism
- Provides detailed verification report
- Advanced verification with step-by-step reasoning (Chain-of-Thought)
- ↑↓ Arrow keys: Navigate between articles
- w/z: Alternative navigation keys
- Enter: Open selected article details
- f: Move to next article (auto-advance)
- n/p: Next/Previous page
- Number: Select specific article by number
- o: Open article in browser
- s: Generate article summary (with full content scraping)
- a: Run LLM agents on selected article
- v: Verify news (if SerpAPI configured)
- c: NEW - Open configuration settings menu
- q: Quit
- Summary: Quick factual summary using full article content
- Implications: Social, economic, political consequences
- Theory/Scenario: Complex scenarios and connections
- Universal Analysis: Multi-thematic framework for complex topics
- All Agents: Run all agents in sequence
NEW: Multi-agent verification system with specialized agents!
- Standard Verification: Basic critical analysis of selected article
- Standard Truth Validation: Direct truth validation with confidence level
- Multi-Agent System 🤖: NEW - Complete analysis with 6 specialized agents
- Standard Verification: Basic critical analysis of custom text
- Advanced Verification (Step-by-Step): Detailed analysis with structured reasoning
- Advanced Truth Validation: Advanced truth validation with complex analysis
The most comprehensive verification system using 6 specialized agents:
- 🔍 Investigator Agent: Finds and collects key information
- 📊 Methodological Analyst Agent: Evaluates scientific studies
- 🎯 Verifier Agent: Checks specific facts
- ⚖️ Judge Agent: Analyzes bias and conflicts of interest
- 🌐 Consensus Agent: Analyzes scientific consensus
- 🧠 Synthesizer Agent: Combines all results for final verdict
- Fast (~30 sec): Quick fact-checking, basic sources, Italian only
- Medium (~2 min): Balanced approach, bilingual sources, full scraping
- Comprehensive (~5 min): Comprehensive analysis, complete bilingual sources
| Type | Use Case | Time | Complexity |
|---|---|---|---|
| Standard | Quick verification | ~1-2 min | Medium |
| Multi-Agent | Complex/controversial news | ~3-5 min | High |
| Step-by-Step | Detailed analysis | ~2-3 min | High |
| Truth Validation | Direct true/false assessment | ~1-2 min | Medium |
The verification system:
- Bilingual search (Italian + English sources)
- Searches for fact-checking information
- Cross-references with reliable sources
- Scrapes full content of verification articles
- Uses AI to analyze truthfulness with critical analysis
- Provides detailed verification report with content status
- Advanced agents use Chain-of-Thought reasoning for complex analysis
NEW: Built-in settings manager!
- Modify AI Provider: Switch between ollama/openai/claude
- Modify AI Model: Change AI models for each provider
- Modify API Keys: Add/update API keys
- Modify General Settings: Language, RSS feed, articles per page
- View Current Configuration: See all current settings
The system includes five specialized agents that work with any AI provider:
- Summary Agent: Creates concise, factual summaries using full article content
- Implications Agent: Analyzes social, economic, and political consequences
- Theory Agent: Builds complex scenarios and connections
- Universal Analysis Agent: Multi-thematic framework for complex topics
- Verification Agent: Evaluates news truthfulness using multiple sources
- Truth Validation Agent: Provides direct verdict (VERA/FALSA/DUBBIA) with confidence level
NEW: Multi-agent verification system with specialized roles!
The most comprehensive verification system using 6 specialized agents that work together:
-
🔍 Investigator Agent
- Finds and collects key information from sources
- Identifies scientific studies mentioned
- Detects specific claims to verify
- Identifies potential biased sources
-
📊 Methodological Analyst Agent
- Evaluates methodology of each scientific study
- Checks journal quality and peer review process
- Identifies methodological criticisms
- Analyzes statistical robustness
- Distinguishes between high-quality studies and predatory journals
-
🎯 Verifier Agent
- Checks veracity of specific claims
- Looks for contradictions between sources
- Identifies temporal inconsistencies
- Detects data manipulations
- Finds unverifiable statements
-
⚖️ Judge Agent
- Analyzes conflicts of interest
- Identifies funding sources
- Detects selection bias, confirmation bias
- Finds cherry-picking of data
- Evaluates source reliability
-
🌐 Consensus Agent
- Analyzes scientific consensus on the topic
- Evaluates quality of consensus
- Identifies outlier studies and their quality
- Determines if consensus is strong (90%+) or weak (60-90%)
-
🧠 Synthesizer Agent
- Combines all agent results
- Weighs evidence based on quality
- Considers scientific consensus
- Evaluates conflicts of interest
- Reaches final verdict
- Basic fact-checking and source analysis
- Suitable for most verification needs
- Faster processing (~1-2 minutes)
- Chain-of-Thought reasoning: 6-step structured analysis
- Critical analysis: Evaluates each study individually
- Methodology assessment: Checks study quality and peer review
- Consensus analysis: Verifies scientific agreement
- Comprehensive investigation: Deeper analysis of complex topics
Advanced agents are specifically designed to:
- Evaluate each scientific study individually (methodology, quality, consensus)
- Check funding sources and conflicts of interest
- Verify if criticisms or replications of specific studies exist
- Distinguish between objective facts and subjective interpretations
- Provide evidence-based analysis of controversial topics
The Universal Analysis Agent uses a structured methodology for analyzing complex topics:
- Factual Analysis: Identifies verifiable facts and context
- Multi-dimensional Analysis: Social, economic, political, technological, environmental dimensions
- Critical Analysis: Bias identification, credibility assessment, interest analysis
- Forward-looking Analysis: Probable scenarios, strategic implications, open questions
- Methodological Synthesis: Confidence levels and recommendations
This framework works on any complex topic and provides systematic, evidence-based analysis.
The Truth Validation Agent provides a direct and clear assessment of news truthfulness:
- 🎯 Direct Verdict: [TRUE] / [FALSE] / [DOUBTFUL] / [INSUFFICIENT DATA]
- 📊 Confidence Level: [HIGH] / [MEDIUM] / [LOW]
- 🔍 Red Flags: Identifies bias, suspicious sources, contradictions
- ✅ Confirmations: Lists sources that support or contradict the news
- 📝 Clear Reasoning: Explains the verdict with evidence
This agent is specifically designed to give users a clear, actionable assessment of whether a news item is true or false.
All agents now use full article content:
- Articles are automatically scraped for complete text
- Fallback to RSS summary if scraping fails
- Google News links are properly resolved
- Content is cleaned and optimized for AI analysis
You can use direct RSS feeds instead of Google News:
# Direct RSS feed (recommended for better scraping)
topic = https://www.ansa.it/sito/ansait_rss.xml
# Or Google News topic ID
topic = CAAqJggKIiBDQkFTRWdvSUwyMHZNRFZxYUdjU0FtbDBHZ0pKVkNnQVABlang = it # Language code (it, en, es, fr, de, etc.)
articles_per_page = 15 # Number of articles per pageEach provider supports different models. Experiment to find the best for your use case:
# Ollama models
model = qwen2:7b-instruct
model = llama3.2:3b
model = mistral:7b
# OpenAI models
openai_model = gpt-4
openai_model = gpt-3.5-turbo
# Claude models
claude_model = claude-3-5-sonnet-20241022
claude_model = claude-3-5-haiku-20241022provider = claude
claude_api_key = sk-ant-your-key-here
claude_model = claude-3-5-sonnet-20241022provider = ollama
model = qwen2:7b-instructprovider = openai
openai_api_key = sk-your-key-here
openai_model = gpt-4provider = claude
claude_api_key = sk-ant-your-key-here
claude_model = claude-3-5-sonnet-20241022
serpapi_key = your_serpapi_key_here
topic = https://www.ansa.it/sito/ansait_rss.xmlAll agents work with any provider - choose based on your needs for privacy, cost, and quality!
- ⚙️ Built-in Settings Manager: Modify all configuration from UI (press
c) - 🤖 Multi-Agent Verification System: 6 specialized agents working together
- 🔍 Advanced Verification Modes: Fast/Medium/Comprehensive search modes
- 🧠 Chain-of-Thought Reasoning: Step-by-step analysis for complex verification
- 🌍 Bilingual Search: Italian + English sources for comprehensive fact-checking
- 📊 Critical Analysis: Individual evaluation of scientific studies
- 📈 Consensus Analysis: Scientific consensus verification
- 🎯 Specialized Agent Roles: Investigator, Methodologist, Verifier, Judge, Consensus, Synthesizer
- Multi-agent system with 6 specialized agents for comprehensive analysis
- Three search modes for different needs and time constraints
- Advanced agents with structured reasoning for complex topics
- Critical analysis that evaluates each study individually
- Consensus analysis to verify scientific agreement
- Bilingual search capabilities for comprehensive fact-checking
- Specialized agent workflow for systematic verification

