This is an AI-powered Flask application that:
llama-3.3-70b-versatile
) and Tavily Search to research any topic.output/
directory).git clone https://github.com/sudarshanmestha/autonomous-research-ai.git cd autonomous-research-ai
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
GROQ_API_KEY=gsk_your_groq_key
TAVILY_API_KEY=tvly_your_tavily_key
NOTION_API_KEY=...
NOTION_DB_ID=...
š Usage Examples
The run_researcher_agent function fetches and summarizes research:
from agents.researcher_agent import run_researcher_agent
research = run_researcher_agent("AI in 2025")
print(research) # Outputs summarized research content
Uses Tavily Search for web data and Groq LLM for summarization.
The generate_blog function creates an article:
from agents.writer_agent import generate_blog
article = generate_blog(research)
print(article) # Outputs a formatted blog (e.g., # Title, ## Section)
Generated articles are saved as .md and .pdf files in the output/ directory.
Example filename: output/AI_in_2025_20250930_1910.md.
Check this folder after generating to access your files.
Port Conflict (8080): If "Address already in use", kill the process:
sudo lsof -i :8080 sudo kill -9 <PID>
API Errors: Ensure GROQ_API_KEY and TAVILY_API_KEY are valid; check quotas at console.groq.com and tavily.com.
PDF Issues: Verify wkhtmltopdf is installed (wkhtmltopdf --version).