Skip to main content
AI agent that searches and summarizes latest news on any topic.

Code

File Setup

Create news-summarizer.py with the code below, or save it directly from your editor.

Skill Configuration

Create skills/news-summarization/skill.yaml:

How It Works

News Research
  • DuckDuckGoTools(): Real-time web search for latest news
  • Searches for current events on any topic
  • Retrieves multiple news sources for comprehensive coverage
Local Processing
  • Ollama(id="llama3.2"): Local LLM for private processing
  • No API keys required - runs completely locally
  • Cost-effective and privacy-preserving
Structured Output
  • Top 3 headlines from search results
  • Brief summary of each news item
  • Overall sentiment analysis (positive/negative/neutral)
Agent Capabilities
  • News research assistant persona
  • Multi-topic support (sports, tech, finance, politics)
  • Structured summary generation
  • Real-time information gathering

Dependencies

Environment Setup

Create .env file:

Run

Examples:
  • “Give me latest cricket news”
  • “What’s happening in AI today?”
  • “Summarize recent Tesla news”

Example API Calls

Frontend Setup

Open http://localhost:5173 and try to chat with the news summarizer