Skip to content

Commit 8738b08

Browse files
committed
Update documentation and configuration for AWS credentials required for bioRxiv/medRxiv PDF downloads
1 parent ce457bc commit 8738b08

4 files changed

Lines changed: 46 additions & 0 deletions

File tree

.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
LLM_API_KEY=[YOUR_LLM_API_KEY]
22
SEMANTIC_SCHOLAR_API_KEY=[YOUR_SEMANTIC_SCHOLAR_API_KEY]
33
openalex_mailto=[YOUR_EMAIL; OPTIONAL_BUT RECOMMENDED]
4+
5+
# AWS credentials — required for biorxiv / medrxiv full-text PDF download.
6+
# Since May 2025 biorxiv is protected by Cloudflare; paperscraper works around
7+
# this via the biorxiv TDM (Text & Data Mining) API backed by AWS S3.
8+
# Create a key in AWS IAM with the AmazonS3ReadOnlyAccess permission policy.
9+
# Without these keys the domain-expert full-text step will fail for biorxiv papers.
410
AWS_ACCESS_KEY_ID=[YOUR_AWS_ACCESS_KEY_ID]
511
AWS_SECRET_ACCESS_KEY=[YOUR_AWS_SECRET_ACCESS_KEY]

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,33 @@ python -m swarm_notes.main
9494

9595
Use the example in configs folder to create your own version.
9696

97+
#### bioRxiv / medRxiv: AWS credentials for full-text PDF download
98+
99+
Since May 2025 **biorxiv.org is protected by Cloudflare**, which blocks direct PDF
100+
downloads. When `paper_source` is `biorxiv` or `medrxiv` and `enable_domain_expert`
101+
is `true`, the pipeline uses the
102+
[paperscraper](https://github.com/jannisborn/paperscraper) library to fall back to the
103+
**biorxiv TDM (Text & Data Mining) API**, which serves PDFs from an AWS S3 bucket.
104+
105+
This requires an AWS IAM key with **read-only S3 access**:
106+
107+
1. Log in to the [AWS IAM console](https://console.aws.amazon.com/iam/).
108+
2. Create a new user (or access key for an existing user).
109+
3. Attach the `AmazonS3ReadOnlyAccess` managed policy.
110+
4. Generate an **Access Key ID** and **Secret Access Key**.
111+
5. Add them to your `.env` file (see `.env.example`):
112+
113+
```bash
114+
AWS_ACCESS_KEY_ID=AKIA...
115+
AWS_SECRET_ACCESS_KEY=...
116+
```
117+
118+
Without these credentials the domain-expert full-text step will be silently skipped
119+
for biorxiv/medrxiv papers.
120+
121+
For CI/CD, add `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` as repository secrets
122+
(same place as `LLM_API_KEY`).
123+
97124
## CI/CD Setup
98125

99126
### Add the required secret

configs/config.example.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,10 @@ site_description: "Automated research paper tracking and knowledge synthesis."
2121
# skills_dir: "skills" # Root directory for skills
2222

2323
# Experimental domain expert agent (crawls HTML, consumes token quotas)
24+
# NOTE: when paper_source is "biorxiv" or "medrxiv", full-text PDF download
25+
# requires AWS credentials because biorxiv is Cloudflare-protected (since
26+
# May 2025). Set in your .env file:
27+
# AWS_ACCESS_KEY_ID=... # IAM key with AmazonS3ReadOnlyAccess
28+
# AWS_SECRET_ACCESS_KEY=...
29+
# Without these the domain-expert step is skipped for biorxiv/medrxiv papers.
2430
enable_domain_expert: true

configs/config.neuro.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@ active_skills:
2323
# skills_dir: "skills" # Root directory for skills
2424

2525
# Experimental domain expert agent (crawls HTML, consumes token quotas)
26+
# NOTE: biorxiv PDFs are Cloudflare-protected (since May 2025). Full-text
27+
# analysis requires AWS credentials in your .env file so that paperscraper
28+
# can retrieve PDFs via the biorxiv TDM/S3 API:
29+
# AWS_ACCESS_KEY_ID=...
30+
# AWS_SECRET_ACCESS_KEY=...
31+
# Create an IAM key with AmazonS3ReadOnlyAccess. Without it the domain-expert
32+
# step will silently skip full-text analysis for biorxiv papers.
2633
enable_domain_expert: true

0 commit comments

Comments
 (0)