A CrewAI-based News AI Agent that leverages Google Gemini Pro for advanced language understanding and SerperAPI for real-time search results. This project fetches breaking news articles, summarizes them, and answers user queries about current events.
- Real-time news search via SerperAPI (Google Search)
- Contextual understanding & summarization using Google Gemini Pro
- Customizable agent workflows powered by CrewAI
- easy-to-extend architecture for adding new data sources or LLM integrations
- Authentication & rate-limit handling for all APIs
- User UI (CLI / Web) sends a query to the CrewAI Agent.
- CrewAI Agent orchestrates:
- Calls SerperAPI for up-to-date search results.
- Feeds raw content to Google Gemini Pro for summarization, Q&A, or classification.
- CrewAI Agent returns processed answers or summaries back to the user.
- Python 3.10+
pip
for dependency management- Valid API keys for:
- Clone the repo
git clone https://github.com/your-username/news-ai-agent.git cd news-ai-agent
- Create & activate a virtual environment
python3 -m venv .venv source .venv/bin/activate # Linux / macOS .venv\Scripts\activate # Windows
- Install dependencies
python3 -m venv .venv
⚙️ Configuration Create a .env file in the project root with the following variables:
GOOGLE_API_KEY=your_gcp_api_key
SERPER_API_KEY=your_serper_api_key
⚡ Usage
- Run as a CLI
python crew.py