Track ArXiv papers by topic and get AI-generated summaries. A FastAPI backend that fetches papers, generates concise summaries using Claude, and serves everything through a REST API.
- ArXiv integration: Fetch papers by search query with full metadata parsing
- AI summaries: Generate 2-3 sentence technical summaries via Claude
- Topic tracking: Save search queries and run automated digests
- REST API: Clean FastAPI endpoints with auto-generated OpenAPI docs
- SQLite storage: Lightweight persistence with upsert logic
- Tested: Unit tests for feed parsing and data models
# Clone
git clone https://github.com/zgroves24/papertrail.git
cd papertrail
# Set up environment
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -e ".[dev]"
# Configure
cp .env.example .env
# Add your Anthropic API key to .env
# Run
python -m src.mainAPI docs at localhost:8000/docs.
| Method | Path | Description |
|---|---|---|
| GET | /papers |
List tracked papers (paginated) |
| POST | /papers/fetch |
Fetch papers from ArXiv by query |
| POST | /papers/summarize |
Generate AI summaries for unsummarized papers |
| GET | /topics |
List tracked topics |
| POST | /topics |
Add a new topic to track |
| POST | /digest |
Run full digest: fetch + summarize for all topics |
# Fetch recent transformer papers
curl -X POST "localhost:8000/papers/fetch?query=transformer+attention&max_results=5"
# Add a topic to track
curl -X POST localhost:8000/topics \
-H 'Content-Type: application/json' \
-d '{"name": "LLM Agents", "query": "large language model agents"}'
# Run a full digest
curl -X POST localhost:8000/digestpytest- FastAPI for the REST API
- Anthropic SDK for AI summaries
- httpx for async HTTP
- SQLite for storage
- Pydantic for data validation
- ruff for linting
MIT