|
| 1 | +# SciNet Client |
| 2 | + |
| 3 | +A lightweight pip-installable client and CLI for the hosted SciNet / KG2API service. |
| 4 | + |
| 5 | +SciNet provides scientific knowledge-graph retrieval for paper search, related-author discovery, author-paper lookup, literature review, idea grounding/evaluation, idea generation, trend analysis, and researcher review. |
| 6 | + |
| 7 | +## Installation |
| 8 | + |
| 9 | +Install directly from GitHub: |
| 10 | + |
| 11 | +```bash |
| 12 | +pip install git+https://github.com/zjunlp/SciNet.git |
| 13 | +``` |
| 14 | + |
| 15 | +For isolated CLI usage: |
| 16 | + |
| 17 | +```bash |
| 18 | +pipx install git+https://github.com/zjunlp/SciNet.git |
| 19 | +``` |
| 20 | + |
| 21 | +After installation: |
| 22 | + |
| 23 | +```bash |
| 24 | +scinet -h |
| 25 | +``` |
| 26 | + |
| 27 | +## Get an API Token |
| 28 | + |
| 29 | +Open: |
| 30 | + |
| 31 | +```text |
| 32 | +http://scinet.openkg.cn/register |
| 33 | +``` |
| 34 | + |
| 35 | +Complete email verification and copy your personal token. |
| 36 | + |
| 37 | +Then configure: |
| 38 | + |
| 39 | +```bash |
| 40 | +export SCINET_API_BASE_URL="http://scinet.openkg.cn" |
| 41 | +export SCINET_API_KEY="your-personal-scinet-token" |
| 42 | +``` |
| 43 | + |
| 44 | +You can also create a local `.env` from `.env.example`, although the CLI reads environment variables directly. |
| 45 | + |
| 46 | +## Quick Start |
| 47 | + |
| 48 | +```bash |
| 49 | +scinet health |
| 50 | +scinet config |
| 51 | +``` |
| 52 | + |
| 53 | +Search papers: |
| 54 | + |
| 55 | +```bash |
| 56 | +scinet --timeout 900 search-papers \ |
| 57 | + --query "open world agent" \ |
| 58 | + --domain "artificial intelligence" \ |
| 59 | + --time-range 2020-2024 \ |
| 60 | + --keyword "high:open world agent" \ |
| 61 | + --top-k 3 \ |
| 62 | + --top-keywords 0 \ |
| 63 | + --max-titles 0 \ |
| 64 | + --max-refs 0 \ |
| 65 | + --report-max-items 3 |
| 66 | +``` |
| 67 | + |
| 68 | +Literature review: |
| 69 | + |
| 70 | +```bash |
| 71 | +scinet --timeout 900 literature-review \ |
| 72 | + --query "retrieval augmented generation" \ |
| 73 | + --domain "artificial intelligence" \ |
| 74 | + --time-range 2020-2025 \ |
| 75 | + --keyword "high:retrieval augmented generation" \ |
| 76 | + --top-k 5 |
| 77 | +``` |
| 78 | + |
| 79 | +Idea evaluation: |
| 80 | + |
| 81 | +```bash |
| 82 | +scinet --timeout 900 idea-evaluate \ |
| 83 | + --idea "LLM-based multi-perspective evaluation for scientific research ideas" \ |
| 84 | + --keyword "high:idea evaluation" \ |
| 85 | + --top-k 3 |
| 86 | +``` |
| 87 | + |
| 88 | +Researcher review: |
| 89 | + |
| 90 | +```bash |
| 91 | +scinet --timeout 900 researcher-review \ |
| 92 | + --author "Yoshua Bengio" \ |
| 93 | + --limit 10 \ |
| 94 | + --no-abstract |
| 95 | +``` |
| 96 | + |
| 97 | +## Python SDK |
| 98 | + |
| 99 | +```python |
| 100 | +from scinet import SciNetClient |
| 101 | + |
| 102 | +client = SciNetClient() |
| 103 | +print(client.health()) |
| 104 | + |
| 105 | +result = client.search_papers( |
| 106 | + query="open world agent", |
| 107 | + keywords=[{"text": "open world agent", "score": 10}], |
| 108 | + top_k=3, |
| 109 | +) |
| 110 | + |
| 111 | +print(result) |
| 112 | +``` |
| 113 | + |
| 114 | +## Commands |
| 115 | + |
| 116 | +| Command | Purpose | |
| 117 | +|---|---| |
| 118 | +| `health` | Check backend health | |
| 119 | +| `config` | Show configuration | |
| 120 | +| `build-plan` | Build a structured plan without calling backend | |
| 121 | +| `search-papers` | Search related papers | |
| 122 | +| `related-authors` | Retrieve related authors | |
| 123 | +| `author-papers` | Query papers by author | |
| 124 | +| `support-papers` | Retrieve support papers | |
| 125 | +| `paper-search` | Lightweight low-level paper search | |
| 126 | +| `literature-review` | Review-oriented paper retrieval | |
| 127 | +| `idea-grounding` | Ground a research idea against literature | |
| 128 | +| `idea-evaluate` | Collect evidence for idea evaluation | |
| 129 | +| `idea-generate` | Discover idea seeds | |
| 130 | +| `trend-report` | Research trend analysis | |
| 131 | +| `researcher-review` | Researcher background review | |
| 132 | +| `make-report` | Regenerate Markdown report from saved artifacts | |
| 133 | + |
| 134 | +## Outputs |
| 135 | + |
| 136 | +Each run saves artifacts under: |
| 137 | + |
| 138 | +```text |
| 139 | +runs/<run_id>/ |
| 140 | + plan.json |
| 141 | + request.json |
| 142 | + response.json |
| 143 | + summary.txt |
| 144 | + report.md |
| 145 | + metadata.json |
| 146 | +``` |
| 147 | + |
| 148 | +## Development |
| 149 | + |
| 150 | +Install editable mode: |
| 151 | + |
| 152 | +```bash |
| 153 | +pip install -e . |
| 154 | +scinet -h |
| 155 | +``` |
| 156 | + |
| 157 | +Build package: |
| 158 | + |
| 159 | +```bash |
| 160 | +python -m pip install build twine |
| 161 | +python -m build |
| 162 | +twine check dist/* |
| 163 | +``` |
| 164 | + |
| 165 | +## Security |
| 166 | + |
| 167 | +Do not commit `.env`, API tokens, SMTP credentials, `.cache/`, or `runs/`. |
| 168 | + |
| 169 | +## License |
| 170 | + |
| 171 | +MIT. |
0 commit comments