A powerful AI-powered newsletter generator that researches, analyzes, and creates professional newsletters on any topic using Nebius AI, Agno, and Firecrawl. This application leverages advanced AI models to deliver well-structured, up-to-date newsletters with the latest information from the web.
- Real-time web research using Firecrawl
- AI-powered content generation with Nebius AI (Llama-3.1-70B-Instruct)
- Professional newsletter formatting in markdown
- Customizable search parameters (number of articles, time range)
- Download newsletters in markdown format
- Secure API key management
- Example topics for quick starts
- Streamlit-based modern web interface
- Topic Research: The agent uses Firecrawl to search for recent, authoritative articles and sources on the chosen topic.
- Content Analysis: Extracts key insights, trends, and expert opinions from the gathered articles.
- Newsletter Generation: Synthesizes the information into a well-structured newsletter using Nebius AI, following a professional template.
- Download & Share: Users can download the generated newsletter in markdown format for easy sharing or publishing.
- Python 3.10 or higher
- Nebius AI API key
- Firecrawl API key
newsletter_agent/
├── app.py # Streamlit web interface
├── main.py # Core agent workflow and newsletter generation logic
├── requirements.txt # Python dependencies
├── demo.gif # Demo animation
├── tmp/
│ └── newsletter_agent.db # Local database for agent storage
└── README.md # This file
- Clone the repository:
git clone https://github.com/Arindam200/awesome-ai-apps.git
cd simple_ai_agents/newsletter_agent- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate- Install dependencies:
# Using pip
pip install -r requirements.txt
# Or using uv (recommended)
uv sync- Create a
.envfile in the project root with your API keys:
FIRECRAWL_API_KEY=your_firecrawl_api_key
NEBIUS_API_KEY=your_nebius_api_key- Start the application:
streamlit run app.py-
Open your browser at http://localhost:8501
-
Enter your API keys in the sidebar (or set them in the .env file)
-
Enter a topic or select from example topics
-
Configure search parameters (number of articles, time range)
-
Click "Generate Newsletter" and wait for results
-
Download the generated newsletter in markdown format
- Initial Research: The agent uses Firecrawl to find recent, relevant articles and sources on the chosen topic.
- Content Analysis: Extracts key insights, trends, and expert opinions from the gathered articles.
- Newsletter Generation: Synthesizes the information into a well-structured newsletter using Nebius AI, following a professional template.
- Download & Share: Users can download the generated newsletter in markdown format for easy sharing or publishing.
- Uses Streamlit for the web interface
- Implements Agno agent framework for workflow orchestration
- Integrates Firecrawl for real-time web research
- Utilizes Nebius AI (Llama-3.1-70B-Instruct) for content generation
- Stores agent data in a local SQLite database (
tmp/newsletter_agent.db) - Supports secure API key management via
.envor sidebar input - Implements proper error handling and logging
The generated newsletters follow this structure:
- Compelling Subject Line
- Welcome section with context
- Main Story with key insights
- Featured Content
- Quick Updates
- This Week's Highlights
- Sources & Further Reading
- Firecrawl API Key: Get your API key from https://firecrawl.dev
- Nebius API Key: Your Nebius AI API key from https://tokenfactory.nebius.com
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Streamlit
- Powered by Nebius AI
- Web research powered by Firecrawl
- Agent framework by Agno
