How sakshamagarwalm2/reasearchpaperagent works
Project type and purpose
• This is a single-page, Streamlit-based full-stack web application (“AI Research Paper Companion”) that serves as a research assistant.
• It orchestrates a multi-agent AI framework (CrewAI) to explain topics, fetch literature from arXiv, and analyze research gaps using OpenAI and Groq models.
File structure
• Top-level files only:
• research_companion.py (the Streamlit app entry point)
• requirements.txt (Python dependencies, including Streamlit, python-dotenv, CrewAI framework, OpenAI, Groq clients)
• .gitignore, README, demo video.
• No separate “frontend” or “backend” folders—UI and orchestration logic are co-located in one Python module.
• Configuration via a .env file (loaded by python-dotenv) supplies API keys.
README for insights
• Technologies: Python 3.8+, Streamlit, CrewAI, OpenAI API, Groq API, arXiv API.
• Agents: Topic Explainer, Literature Finder, Gap Analyzer.
• Runtime flow: user selects model and options in the sidebar → starts analysis → CrewAI spawns agents → agents call external services → results returned to the UI.
Main components & interactions
• User’s Web Browser (Client)
• Streamlit Application (research_companion.py)
• CrewAI Orchestrator / Agent Manager
– Topic Explainer Agent
– Literature Finder Agent
– Gap Analyzer Agent
• External AI Model Providers
– OpenAI API
– Groq API
• External Data Source
– arXiv API
• Configuration Store
– .env file via python-dotenv
1. Browser → Streamlit App: HTTP/WebSocket request when user clicks “Start Analysis.”
2. Streamlit App → CrewAI Orchestrator: invoke multi-agent workflow.
3. Orchestrator → Agents: dispatch tasks (Explain, Find Papers, Find Gaps).
4. Agents → OpenAI/Groq API: send prompts and receive completions.
5. Literature Finder Agent → arXiv API: execute search queries, retrieve paper metadata/abstracts.
6. Agents → Orchestrator: return processed results.
7. Orchestrator → Streamlit App: aggregate agent outputs.
8. Streamlit App → Browser: update UI with explanations, paper summaries, gap analysis.
c. Architectural patterns & principles
• Multi-Agent Orchestration Pattern: decouple responsibilities into specialized agents under a central manager.
• MVC-ish separation: Streamlit UI (View/Controller) vs. Agent logic (Model/Service).
• API Integration Pattern for external services (OpenAI, Groq, arXiv).
• Configuration isolation via environment variables.
d. Key technologies & libraries
• Streamlit (UI layer)
• CrewAI framework (agent orchestration)
• python-dotenv (configuration)
• OpenAI & Groq Python SDKs (LLM providers)
• HTTP client for arXiv (e.g., requests)
• Core language: Python 3.8+