mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-02 00:35:46 +08:00
## Summary Adds a first-class **BGPT** Agent tool (backend + UI) in response to [#15997](https://github.com/infiniflow/ragflow/issues/15997#issuecomment-4703864227). BGPT calls `POST https://bgpt.pro/api/mcp-search` and returns structured study evidence from full-text papers — not just titles/abstracts. Each result is formatted for RAGFlow citations with: - methods - sample size / population - results - limitations - conflicts of interest - data availability - study blind spots - `how_to_falsify` ## Why this shape - Mirrors existing literature tools (`PubMed`, `ArXiv`) and HTTP tools (`SearXNG`). - Works on the free tier (no API key required for first 50 results). - Optional `api_key` and `days_back` in the node/tool config. - Surfaces both `formalized_content` and raw `json` outputs (like SearXNG). ## Files - `agent/tools/bgpt.py` — REST client + evidence formatter - Frontend: Operator enum, forms, tool picker, canvas accordion, en/zh locales, icon ## Demo / docs Runnable claim-interrogation demo: https://github.com/connerlambden/bgpt-mcp/blob/main/EVIDENCE_DEMO.md ## Test plan - [ ] Add BGPT node on Agent canvas, run query `GLP-1 alcohol craving`, verify `formalized_content` includes limitations/COI fields - [ ] Add BGPT as Agent sub-tool under Search, verify tool-calling works - [ ] Confirm empty query / try-run returns gracefully - [ ] Optional: paid-tier `api_key` path --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Zhichang Yu <yuzhichang@gmail.com>
Install front-end dependencies
npm install
Launch front-end
npm run dev
The following output confirms a successful launch of the system:
Login to RAGFlow web UI
Open your browser and navigate to:
http://localhost:9222 or http://[YOUR_MACHINE_IP]:9222
Replace [YOUR_MACHINE_IP] with your actual machine IP address (e.g., http://192.168.1.49:9222).
Login to RAGFlow web admin UI
Open your browser and navigate to:
http://localhost:9222/admin or http://[YOUR_MACHINE_IP]:9222/admin
Replace [YOUR_MACHINE_IP] with your actual machine IP address (e.g., http://192.168.1.49:9222/admin).
Shutdown front-end
Ctrl + C or
kill -f "umi dev"