An agent that retrieves, screens, and summarizes research papers using OpenAI and LangChain.
Explore the Docs »
Report Bug
·
Request Feature
Table of Contents
Summarizing scientific literature is time-consuming. Research Agent automates this process:
- 🔍 Retrieves papers from PubMed Central
- 📄 Screens abstracts using your review objective
- 📊 Performs structured meta-analysis or systematic review
- 💾 Outputs clean JSON with summaries and metadata
- Python 3.10 or higher
- An OpenAI API key Get the key!
- A NCBI API key Get the key!
git clone https://github.com/MakanFar/research-agent.git
cd research-agent
pip install .Edit or create config.yaml in the root directory:
- you can add your API keys to the config:
OPENAI_API_KEY: sk-...
NCBI_API_KEY: ...Alternatively, you can export them as environment variables:
export OPENAI_API_KEY=sk-...
export NCBI_API_KEY=...Specify a PubMed Central query:
search_query: ("Artificial intelligence"[Title/Abstract] AND "Protein-protein interaction")You can also provide the query directly via the CLI at runtime.
Customize fields to extract during meta-analysis or systematic review:
meta_data:
- data_type: Type of data used in the study such as radiology, clinicopathologic, or text
- species_breed: Target species
- ml_algorithm: Types Model used in the study
- ai_goal: Clinical objective of the study
- performance_results: Key final performance resultsNote: The agent always extracts the following by default:
- Year
- First Author
- Title
- Journal
- PMCID
- URL
Optional deep extraction from full papers:
in_depth:
- small_dataset: Short explanation if fewer than ~1000 samples OR authors mention limited data.research_agent analyzeYou will be prompted to:
- Select a review type:
metaorsystematic - Enter a search query (or load from config.yaml)
- Provide a screening objective (if filtering is enabled)
research_agent analyze \
--task meta \
--objective "AI for diagnosing UTIs in dogs" \
--filter-papers True \
--max-results 100 \
--output-dir ./outputpaper_screenings.json: Results of the screening step
{
"relevant": false,
"reason": "The study does not involve the application of AI techniques such as machine learning or deep learning",
"confidence": "High",
"pmc": "PMC9554590",
"url": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC9554590/",
"title": "Contrast-enhanced ultrasound features of focal pancreatic lesions in cats",
"Author": "Silvia Burti",
"year": "2022",
"journal": "Frontiers in Veterinary Science"
}paper_summaries.json: Meta-analysis or systematic review output
{
"meta_data": {
"pmc": "PMC11271534",
"url": "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11271534/",
"title": "Exploring deep learning strategies for intervertebral disc herniation detection on veterinary MRI",
"journal": "Scientific Reports",
"first_author": "Shoujin Huang",
"year": "2024"
},
"body_data": {
"small_dataset": "The study used 487 MRI images from 213 dogs, which is relatively small for deep learning applications.",
}
}- Paper screening and summarization
- Configurable metadata fields
- Support local PDFs
- Interactive Q&A over papers
- Semantic Scholar and ArXiv support
Distributed under the MIT License. See LICENSE for details.