Pratham13/research-paper-finder
Research Paper Finder
An agentic research workspace for finding related papers, research sources, GitHub repositories, and implementation references from a prompt, uploaded paper, or arXiv link.
The backend follows the Mem0 graph-memory pattern: each research run stores session memories and durable user memories keyed by the required username, embeds memories for semantic recall, and mirrors extracted entities and relations into a graph. Supabase is used as the database when credentials are configured; a local SQLite store remains available for development.
Stack
- Backend: FastAPI, LangGraph, Groq, LlamaIndex, Hugging Face sentence embeddings, Supabase client, SQLite
- Frontend: React, TypeScript, Vite, lucide icons, SVG knowledge graph
- Search agents: papers, blogs/web, GitHub repositories, document ingestion
Quick Start
cp .env.example .env
# Add GROQ_API_KEY and optional Supabase values.
cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000For local Hugging Face sentence-transformer embeddings instead of the lightweight fallback:
pip install -r backend/requirements-hf.txtcd frontend
npm install
npm run devOpen http://localhost:5173.
Production Deploy
The app can deploy as one Docker web service. The backend serves both /api/* and the built React app, so the public link is a single URL.
Required production environment variables:
GROQ_API_KEY=
GROQ_MODEL=llama-3.3-70b-versatile
SUPABASE_URL=
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
APP_DATABASE_PATH=/tmp/research_finder.dbFree Public Option: Hugging Face Spaces
Hugging Face Spaces Docker is the best free fit for a durable public link. The URL is stable and public, the app restarts after sleeps or crashes, and Supabase keeps durable user data. The tradeoff is cold starts after idle periods.
- Create a new Space on Hugging Face.
- Choose
Dockeras the Space SDK. - Push this repository to the Space.
- Add these Space secrets:
GROQ_API_KEY=
GROQ_MODEL=llama-3.3-70b-versatile
SUPABASE_URL=
SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
APP_DATABASE_PATH=/tmp/research_finder.dbThe Dockerfile listens on port 7860, which is the expected Spaces port. Supabase stores durable records, and the backend hydrates local graph memory from Supabase when a Space instance restarts.
Render is also preconfigured through render.yaml, but reliable always-on Render hosting generally requires a paid instance.
Supabase
The app does not require frontend Supabase sign-in. The required username is the identity key, and the backend writes profiles, sessions, memories, and graph data into Supabase using server-side credentials.
- Create a Supabase project.
- Run backend/supabase_schema.sql.
- Set
SUPABASE_URL,SUPABASE_ANON_KEY, andSUPABASE_SERVICE_ROLE_KEYin.env. The backend still treats SQLite as the operational graph store so graph memory queries work locally and during development, while Supabase receives mirrored durable records.
API
POST /api/research accepts multipart form data:
user_namerequiredpromptoptionalarxiv_urloptionalfileoptional PDF/text upload
At least one of prompt, arxiv_url, file, or bucket_papers must be present.
Optional:
bucket_papersJSON array of previously returned paper objects. These papers are treated as user-selected seeds for a wider but targeted follow-up search.
Paper results include confidence_score and confidence_reason, computed from semantic match to the prompt, selected bucket context, source evidence, abstract quality, and citation signal.
Memory Design
The implementation is inspired by Mem0 graph memory docs and paper:
- Mem0 graph memory docs: https://docs.mem0.ai/open-source/features/graph-memory
- Mem0 LangGraph integration: https://docs.mem0.ai/integrations/langgraph
- Mem0 paper: https://arxiv.org/abs/2504.19413
