Skip to content
Back to search

NanoResearch

🦞+🔬 NanoResearch: The Autonomous AI Research Assistant

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/openraiser-nanoresearch/badge.svg)](/listings/openraiser-nanoresearch)

HTML

<a href="/listings/openraiser-nanoresearch"><img src="/api/listings/openraiser-nanoresearch/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 872 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <a id="top"></a>
  2. <div align="center">
  3. <div style="margin: 20px 0;">
  4. <img src="imgs/logo.png" alt="NanoResearch Logo" width="500" style="border-radius: 20px;">
  5. </div>
  6. # NanoResearch
  7. <p>
  8. <a href="README.md"><img src="https://img.shields.io/badge/🇨🇳_中文-1a1a2e?style=for-the-badge" alt="中文"></a>
  9. <a href="README_en.md"><img src="https://img.shields.io/badge/🇺🇸_English-1a1a2e?style=for-the-badge" alt="English"></a>
  10. </p>
  11. **端到端自主 AI 科研引擎 — 从研究想法到完整论文,全程自动化**
  12. <p>
  13. <a href="https://github.com/OpenRaiser/NanoResearch"><img src="https://img.shields.io/badge/🔥_Project-Page-00d9ff?style=for-the-badge&logo=github&logoColor=white&labelColor=1a1a2e" alt="Project"></a>
  14. <a href="https://github.com/OpenRaiser/NanoResearch/stargazers"><img src="https://img.shields.io/github/stars/OpenRaiser/NanoResearch?color=00d9ff&style=for-the-badge&logo=star&logoColor=white&labelColor=1a1a2e" alt="Stars"></a>
  15. <a href="https://github.com/OpenRaiser/NanoResearch/issues"><img src="https://img.shields.io/badge/🐛_Issues-ff6b6b?style=for-the-badge&logo=github&logoColor=white&labelColor=1a1a2e" alt="Issues"></a>
  16. </p>
  17. <p>
  18. <img src="https://img.shields.io/badge/Python-3.10%2B-4ecdc4?style=for-the-badge&logo=python&logoColor=white&labelColor=1a1a2e" alt="Python">
  19. <img src="https://img.shields.io/badge/License-MIT-16A34A?style=for-the-badge&labelColor=1a1a2e" alt="License">
  20. <img src="https://img.shields.io/badge/Pipeline-9_Stage_Deep-7C3AED?style=for-the-badge&labelColor=1a1a2e" alt="Pipeline">
  21. <img src="https://img.shields.io/badge/Execution-Local_|_SLURM-0EA5E9?style=for-the-badge&labelColor=1a1a2e" alt="Execution">
  22. </p>
  23. <p>
  24. <a href="#快速开始"><b>快速开始</b></a> ·
  25. <a href="#效果展示"><b>效果展示</b></a> ·
  26. <a href="#流水线"><b>流水线</b></a> ·
  27. <a href="#claude-code-模式"><b>Claude Code</b></a> ·
  28. <a href="#飞书机器人"><b>飞书机器人</b></a>
  29. </p>
  30. </div>
  31. ---
  32. > 🔬 NanoResearch **真正运行计算实验**——它不仅生成代码,还能将代码提交到 GPU 集群执行训练,收集真实实验结果,生成论文配图,最终输出一篇有实验数据支撑的完整 LaTeX 论文。论文中的每一个数据、表格、图表都来自实际运行的实验结果,**而非 LLM 编造**。
  33. ---
  34. ## 📖 目录
  35. - [📊 论文实测展示](#-论文实测展示)
  36. - [⚡ CLI 演示](#cli-demo)
  37. - [📢 最新动态](#-最新动态)
  38. - [✨ 核心特性](#-核心特性)
  39. - [🆚 为何选择 NanoResearch](#-为何选择-nanoresearch)
  40. - [🎯 应用场景](#-应用场景)
  41. - [🖼️ 效果展示](#️-效果展示)
  42. - [CLI:标准输出与 TUI 对比](#cli-tui-vs-plain)
  43. - [🔬 流水线](#-流水线)
  44. - [📦 快速开始](#-快速开始)
  45. - [🧬 Evo 自进化流水线](#-evo-自进化流水线)
  46. - [🧩 Claude Code 模式](#-claude-code-模式)
  47. - [⚙️ 配置](#️-配置)
  48. - [💻 CLI 参考](#-cli-参考)
  49. - [🍪 示例与 Demo](#-示例与-demo)
  50. - [📂 输出结构](#-输出结构)
  51. - [💬 飞书机器人](#-飞书机器人)
  52. - [🏗️ 项目结构](#-项目结构)
  53. - [❓ 常见问题](#-常见问题)
  54. - [🎯 路线图](#-路线图)
  55. - [📋 环境要求](#-环境要求)
  56. - [🙏 致谢](#-致谢)
  57. - [🤝 贡献](#-贡献)
  58. - [📝 引用](#-引用)
  59. - [📄 许可证](#-许可证)
  60. <p align="right"><a href="#top">🔝 返回顶部</a></p>
  61. ---
  62. ## 📊 论文实测展示
  63. 以下为 NanoResearch 自动生成论文中的**真实配图**,所有数据、曲线、表格均来自实际运行的实验结果,**非 LLM 虚构**。
  64. <table>
  65. <tr>
  66. <td align="center" valign="top" width="33%">
  67. <img src="imgs/recognition_1.jpg" height="200" alt="实验结果"/>
  68. <br />
  69. <sub><b>实验结果展示</b></sub>
  70. </td>
  71. <td align="center" valign="top" width="33%">
  72. <img src="imgs/recognition_2.jpg" height="200" alt="主结果对比"/>
  73. <br />
  74. <sub><b>方法对比 / 主结果</b></sub>
  75. </td>
  76. <td align="center" valign="top" width="33%">
  77. <img src="imgs/recognition_3.jpg" height="200" alt="消融与可视化"/>
  78. <br />
  79. <sub><b>消融与可视化</b></sub>
  80. </td>
  81. </tr>
  82. </table>
  83. > 以上配图均为流水线自动生成,数据来源于真实训练日志与实验结果。
  84. ---
  85. <a id="cli-demo"></a>
  86. ## ⚡ CLI 演示
  87. NanoResearch **命令行(CLI)** 提供 **TUI 全屏界面** 与 **传统流式日志** 两种呈现方式。下方为 CLI 端 **TUI 主题与界面** 演示视频(配色切换与布局优化)。其他入口(如 Claude Code、飞书机器人)见文档对应章节。
  88. <table>
  89. <tr>
  90. <th><p align="center">🖥️ CLI / TUI</p></th>
  91. </tr>
  92. <tr>
  93. <td align="center">
  94. <video src="https://github.com/user-attachments/assets/008911c6-b015-47ff-a286-1d8c22f5817e" autoplay loop muted playsinline width="100%" style="max-width: 100%; border-radius: 8px;">
  95. <a href="https://github.com/user-attachments/assets/008911c6-b015-47ff-a286-1d8c22f5817e">下载 / 播放 CLI 演示视频</a>
  96. </video>
  97. </td>
  98. </tr>
  99. </table>
  100. <sub><i>演示:TUI 界面、配色主题切换与信息布局优化</i></sub>
  101. <p align="right"><a href="#top">🔝 返回顶部</a></p>
  102. ---
  103. ## Why NanoResearch
  104. | 特性 | 传统 AI 写作工具 | NanoResearch |
  105. |------|-----------------|-------------|
  106. | 文献检索 | 部分支持 | ✅ OpenAlex + Semantic Scholar 自动检索 |
  107. | 实验设计 | ❌ | ✅ 自动生成实验方案 |
  108. | 代码生成 | 部分支持 | ✅ 完整可运行的实验代码 |
  109. | **GPU 实验执行** | ❌ | ✅ **本地 / SLURM 自动训练** |
  110. | 结果分析 | ❌ | ✅ 解析真实训练日志 |
  111. | 论文配图 | ❌ | ✅ 基于真实数据 |
  112. | 论文撰写 | 大纲/草稿 | ✅ 完整 LaTeX 论文 |
  113. | 断点续跑 | ❌ | ✅ 任意阶段可恢复 |
  114. | 多模型协作 | 单一模型 | ✅ 按阶段路由 |
  115. ---
  116. ## 🎯 应用场景
  117. - **科研原型验证** — 快速将研究想法变成完整的实验 + 论文工作空间
  118. - **自主实验** — 系统自动生成代码、提交 GPU 训练、分析结果
  119. - **Benchmark 批量生成** — 对多个课题批量运行,生成可复现的实验结果
  120. - **论文初稿辅助** — 基于真实实验数据产出 LaTeX 草稿,加速写作
  121. - **科研流程审计** — 完整工作空间、中间产物和日志,可追溯每一步
  122. ---
  123. ## 🖼️ 效果展示
  124. <div align="center">
  125. <img src="imgs/before_after.png" alt="告别手动科研" width="90%" />
  126. <p><b>告别手动科研的痛苦循环</b></p>
  127. <p>不再反复调试失败的实验、手动整理数据、从零写论文——<br/>NanoResearch 将完整科研流程自动化,让你专注于真正的研究创新。</p>
  128. </div>
  129. <a id="cli-tui-vs-plain"></a>
  130. ### CLI:标准输出与 TUI 模式对比
  131. CLI 支持 **传统流式日志(非 TUI)** 与 **全屏 TUI 面板** 两种呈现方式,可按习惯切换。
  132. <div align="center" style="max-width: 720px; margin: 0 auto;">
  133. <p><b>标准输出(非 TUI)</b></p>
  134. <img src="imgs/demo_no_tui_mode.png" width="100%" alt="NanoResearch CLI 标准输出模式" style="max-width: 100%; border-radius: 8px;" />
  135. <p><sub><b>非 TUI</b>:经典终端日志流,便于重定向与脚本集成</sub></p>
  136. </div>
  137. <div align="center" style="max-width: 720px; margin: 0 auto; margin-top: 1.5em;">
  138. <p><b>TUI 模式</b></p>
  139. <img src="imgs/demo_tui_mode.png" width="100%" alt="NanoResearch CLI TUI 模式" style="max-width: 100%; border-radius: 8px;" />
  140. <p><sub><b>TUI</b>:结构化面板与状态分区,适合交互式监控</sub></p>
  141. </div>
  142. ### 示例输出
  143. <table>
  144. <tr>
  145. <td align="center" width="50%">
  146. <img src="imgs/framework_overview.png" alt="框架概览" width="95%" />
  147. <br />
  148. <sub><b>框架概览</b></sub>
  149. </td>
  150. <td align="center" width="50%">
  151. <img src="imgs/examples.png" alt="生成论文示例" width="95%" />
  152. <br />
  153. <sub><b>生成论文示例</b></sub>
  154. </td>
  155. </tr>
  156. <tr>
  157. <td align="center" width="50%">
  158. <img src="imgs/main_results.png" alt="主结果" width="95%" />
  159. <br />
  160. <sub><b>主结果(真实实验数据)</b></sub>
  161. </td>
  162. <td align="center" width="50%">
  163. <img src="imgs/ablation.png" alt="消融实验" width="95%" />
  164. <br />
  165. <sub><b>消融实验</b></sub>
  166. </td>
  167. </tr>
  168. </table>
  169. ---
  170. ## 🔬 流水线
  171. ```text
  172. Research Topic
  173. ↓
  174. IDEATION → PLANNING → SETUP → CODING → EXECUTION → ANALYSIS → FIGURE_GEN → WRITING → REVIEW
  175. ↓
  176. Exported: paper.pdf / paper.tex / references.bib / figures / code / data
  177. ```
  178. <details>
  179. <summary><b>📋 各阶段详细说明</b></summary>
  180. | Stage | 功能 | 说明 |
  181. |-------|------|------|
  182. | `IDEATION` | 文献检索与创意生成 | 搜索学术文献、发现研究空白、提出假说、收集必引文献 |
  183. | `PLANNING` | 实验方案设计 | 将研究想法转化为详细的实验蓝图(数据集、基线、指标、消融) |
  184. | `SETUP` | 环境准备 | 准备代码仓库、依赖环境、模型和数据集 |
  185. | `CODING` | 代码生成 | 生成完整可运行的实验项目(含训练脚本、数据处理、模型定义) |
  186. | `EXECUTION` | **实验执行** | **在本地 GPU 或 SLURM 集群上运行训练,支持自动重试和调试** |
  187. | `ANALYSIS` | 结果分析 | 解析训练日志和指标,生成结构化实验证据 |
  188. | `FIGURE_GEN` | 图表生成 | 创建架构图、结果对比图、消融实验图 |
  189. | `WRITING` | 论文撰写 | 基于实验证据和引用撰写 LaTeX 论文 |
  190. | `REVIEW` | 审稿与修订 | 自动审阅各章节,检测问题并修订 |
  191. </details>
  192. <details>
  193. <summary><b>🚀 EXECUTION 阶段核心能力</b></summary>
  194. `EXECUTION` 阶段是 NanoResearch 的核心差异化能力:
  195. - **自动提交 SLURM 作业** — 生成 sbatch 脚本,提交到集群,监控作业状态
  196. - **本地 GPU 执行** — 自动检测可用 GPU,管理训练进程
  197. - **自动调试与重试** — 训练失败时自动分析错误日志,修复代码并重新执行
  198. - **实时日志监控** — 追踪训练进度和指标变化
  199. - **混合执行模式** — 可根据任务复杂度在本地和集群之间自动切换
  200. </details>
  201. ---
  202. ## 📦 快速开始
  203. 遵循以下步骤,约 5 分钟即可完成从安装到首次运行的完整流程。
  204. ### 步骤一:安装
  205. ```bash
  206. git clone https://github.com/OpenRaiser/NanoResearch.git
  207. cd NanoResearch
  208. pip install -e ".[dev]"
  209. ```
  210. ### 步骤二:配置
  211. > [!TIP]
  212. > 创建 `~/.nanoresearch/config.json`,替换 `base_url` 和 `api_key` 为你自己的 OpenAI 兼容 API 端点。
  213. <details>
  214. <summary><b>查看完整配置示例</b></summary>
  215. ```json
  216. {
  217. "research": {
  218. "base_url": "https://your-openai-compatible-endpoint/v1/",
  219. "api_key": "your-api-key",
  220. "template_format": "neurips2025",
  221. "execution_profile": "local_quick",
  222. "writing_mode": "hybrid",
  223. "max_retries": 2,
  224. "auto_create_env": true,
  225. "auto_download_resources": true,
  226. "ideation": { "model": "your-model", "temperature": 0.5, "max_tokens": 16384, "timeout": 600.0 },
  227. "planning": { "model": "your-model", "temperature": 0.2, "max_tokens": 16384, "timeout": 600.0 },
  228. "code_gen": { "model": "your-model", "temperature": 0.1, "max_tokens": 16384, "timeout": 600.0 },
  229. "writing": { "model": "your-model", "temperature": 0.4, "max_tokens": 16384, "timeout": 600.0 },
  230. "figure_prompt": { "model": "pro/gpt-5.5", "temperature": 0.5, "max_tokens": 4096, "timeout": 300.0 },
  231. "figure_code": { "model": "pro/gpt-5.5", "temperature": 0.1, "max_tokens": 16384, "timeout": 600.0 },
  232. "figure_gen": {
  233. "model": "gpt-image-2",
  234. "image_backend": "openai",
  235. "base_url": "https://your-image-endpoint/v1/",
  236. "api_key": "your-image-api-key",
  237. "temperature": null,
  238. "timeout": 600.0
  239. },
  240. "review": { "model": "your-model", "temperature": 0.3, "max_tokens": 16384, "timeout": 300.0 }
  241. }
  242. }
  243. ```
  244. </details>
  245. 环境变量覆盖:`NANORESEARCH_BASE_URL` / `NANORESEARCH_API_KEY` / `NANORESEARCH_TIMEOUT`
  246. ### 步骤三:验证与运行
  247. ```bash
  248. # 验证配置
  249. nanoresearch run --topic "Adaptive Sparse Attention Mechanisms" --dry-run
  250. # 启动完整流水线
  251. nanoresearch run --topic "Adaptive Sparse Attention Mechanisms" --format neurips2025 --verbose
  252. # 从断点恢复(若某阶段失败)
  253. nanoresearch resume --workspace ~/.nanoresearch/workspace/research/{session_id} --verbose
  254. # 导出论文
  255. nanoresearch export --workspace ~/.nanoresearch/workspace/research/{session_id} --output ./my_paper
  256. ```
  257. ### 步骤四:预期输出
  258. 完成流水线后,你将得到包含真实实验数据的论文配图与 LaTeX 源码。
  259. ---
  260. ## 🧬 Evo 自进化流水线
  261. `evo` 是 NanoResearch 的自进化流水线,面向个性化科研自动化。它围绕技能演化、记忆演化和反馈驱动的 planner / router 适配运行,让系统在多轮研究中复用经验并逐步贴合用户偏好。
  262. ### 什么时候使用 `evo`
  263. - 希望系统跨多轮研究积累可复用技能和项目记忆。
  264. - 希望根据个人偏好、算力约束、目标 venue 和反馈逐步调整研究计划。
  265. - 希望规划阶段明确生成 proposed method、baseline、ablation、optimization/history 和 complexity 相关实验,并让论文只基于真实 artifact 写作。
  266. ### 从用户初始化到论文产出
  267. ```bash
  268. # 1. 初始化或更新用户画像、偏好和运行配置
  269. nanoresearch init
  270. # 2. 启动自进化完整流水线
  271. nanoresearch run --pipeline evo --topic "your research topic" --format neurips2025 --verbose
  272. # 3. 中途失败或断开后恢复
  273. nanoresearch resume --workspace ~/.nanoresearch/workspace/research/{session_id} --verbose
  274. # 4. 查看阶段状态和产物
  275. nanoresearch status --workspace ~/.nanoresearch/workspace/research/{session_id}
  276. nanoresearch inspect --workspace ~/.nanoresearch/workspace/research/{session_id}
  277. # 5. 导出最终论文包
  278. nanoresearch export --workspace ~/.nanoresearch/workspace/research/{session_id} --output ./paper_export
  279. ```
  280. ### Evo 模式会产出什么
  281. `evo` 仍然运行 9 个阶段:`IDEATION -> PLANNING -> SETUP -> CODING -> EXECUTION -> ANALYSIS -> FIGURE_GEN -> WRITING -> REVIEW`。区别在于它会在这些阶段之间持续更新和复用用户画像、技能库、项目记忆和反馈路由。
  282. 关键机器可检查 artifact 通常位于:
  283. ```text
  284. ~/.nanoresearch/workspace/research/{session_id}/experiment/configs/experiment_matrix.json
  285. ~/.nanoresearch/workspace/research/{session_id}/experiment/results/metrics.json
  286. ~/.nanoresearch/workspace/research/{session_id}/experiment/results/run_manifest.json
  287. ~/.nanoresearch/workspace/research/{session_id}/experiment/results/final_metrics.json
  288. ~/.nanoresearch/workspace/research/{session_id}/experiment/results/optimization_history.csv
  289. ~/.nanoresearch/workspace/research/{session_id}/experiment/results/pareto_front.json
  290. ```
  291. 写作阶段只读取真实执行结果、分析报告和图表 artifact。若某类实验或指标没有真实产物,系统会降低证据范围或写入 limitation / future work,不会补 synthetic 数值。文献检索可匿名使用 OpenAlex;如需更高速率,可自行配置 `OPENALEX_API_KEY`。
  292. ### SDPO adapter 训练
  293. Evo/RAM 运行产生的完整 `(x, y, feedback)` 三元组会保存在 `~/.nanoresearch/ram_data/`。安装可选训练依赖后,可训练或续训 RAM LoRA adapter:
  294. ```bash
  295. pip install -e ".[sdpo]"
  296. nanoresearch ram-train \
  297. --model Qwen/Qwen2.5-7B-Instruct \
  298. --data-root ~/.nanoresearch/ram_data \
  299. --output ~/.nanoresearch/adapters/ram-sdpo
  300. ```
  301. 训练完成后,将配置中的 `ram_checkpoint_path` 指向输出目录即可在后续 Evo 运行中加载该 adapter。
  302. ---
  303. ## 🤖 推荐模型
  304. | Stage | 任务 | 推荐模型 | 经济型 |
  305. |-------|------|---------|-------|
  306. | `ideation` | 文献检索 + 假说生成 | DeepSeek-V3.2 | DeepSeek-V3.2 |
  307. | `planning` | 实验设计 | Claude Sonnet 4.6 | DeepSeek-V3.2 |
  308. | `code_gen` | 代码生成 | pro/gpt-5.5 | DeepSeek-V3.2 |
  309. | `writing` | 论文撰写 | pro/gpt-5.5 / Claude Sonnet 4.6 | DeepSeek-V3.2 |
  310. | `figure_prompt` | 图表描述 | pro/gpt-5.5 | DeepSeek-V3.2 |
  311. | `figure_code` | 图表绘制代码 | pro/gpt-5.5 | DeepSeek-V3.2 |
  312. | `figure_gen` | AI 架构图生成 | gpt-image-2(OpenAI-compatible image API) | gpt-image-2 |
  313. | `review` | 审稿 + 修订 | DeepSeek-V3.2 / pro/gpt-5.5 | DeepSeek-V3.2 |
  314. ---
  315. ## 🧩 Claude Code 模式
  316. 除了 Python CLI,NanoResearch 还支持通过 **[Claude Code](https://docs.anthropic.com/en/docs/claude-code)** 直接驱动研究流水线——**无需配置任何 API Key**。
  317. <details>
  318. <summary><b>工作原理</b></summary>
  319. 在 Claude Code 集成模式下,Claude Code 本身就是研究引擎:
  320. - **WebSearch** 替代外部 API 进行文献检索(arXiv、Semantic Scholar、Google Scholar)
  321. - **Bash** 执行实验代码、提交 SLURM 作业、编译 LaTeX
  322. - **文件读写** 生成实验代码、论文和结构化产物
  323. </details>
  324. ### 快速开始
  325. ```bash
  326. git clone https://github.com/OpenRaiser/NanoResearch.git
  327. cd NanoResearch
  328. claude
  329. /project:research "你的研究课题"
  330. ```
  331. ### 可用命令
  332. | 命令 | 功能 |
  333. |---------|------|
  334. | `/project:research <课题>` | 运行完整 9 阶段流水线 |
  335. | `/project:ideation <topic>` | Stage 1: 文献检索 + 假说生成 |
  336. | `/project:planning` | Stage 2: 实验方案设计 |
  337. | `/project:experiment` | Stages 3-5: 环境准备 + 代码生成 + 实验执行 |
  338. | `/project:analysis` | Stage 6: 实验结果分析 |
  339. | `/project:writing` | Stages 7-8: 图表生成 + 论文撰写 |
  340. | `/project:review` | Stage 9: 多视角审稿 + 修订 |
  341. | `/project:status` | 查看当前流水线状态 |
  342. | `/project:resume` | 从断点恢复流水线 |
  343. <details>
  344. <summary><b>💡 Tips</b></summary>
  345. - **架构图生成**:推荐使用 Nano Banana 系列图像模型生成高质量架构图。Claude Code 模式下可在 `figure_gen` 阶段通过 Bash 调用图像生成 API。
  346. - **LaTeX 编译**:推荐使用 `tectonic` 替代 `pdflatex`。安装:`conda install -c conda-forge tectonic`。
  347. - **断点续跑**:所有阶段的产物保存在 `manifest.json` 中,支持任意阶段恢复。
  348. - **与 Python CLI 兼容**:Claude Code 模式生成的工作空间与 Python CLI 完全兼容,可混合使用两种模式。
  349. </details>
  350. ---
  351. ## Codex Integration
  352. 除了 Claude Code,NanoResearch 现在也提供了面向 **Codex** 的项目级入口。Codex 不需要第二套 pipeline 或额外的 `--mode codex` 参数;它应直接复用仓库现有的 CLI、workspace、manifest 和 `PaperMode` 逻辑。
  353. ### 如何使用
  354. ```bash
  355. # 1. Clone 项目
  356. git clone https://github.com/OpenRaiser/NanoResearch.git
  357. cd NanoResearch
  358. # 2. 在 Codex 中打开仓库
  359. # 3. 让 Codex 先读取 AGENTS.md
  360. ```
  361. Codex 入口文档:`AGENTS.md`
  362. ### Codex 会如何理解这个仓库
  363. - 将仓库视为一个端到端自主科研流水线,而不是普通代码仓库
  364. - 优先走已有的 `nanoresearch` CLI / workspace / orchestrator 行为
  365. - 将用户意图映射到现有的 `research`、`ideation`、`planning`、`experiment`、`analysis`、`writing`、`review`、`status`、`resume` 流程
  366. - 保持与现有工作空间和 `manifest.json` 兼容
  367. ### Survey / Original 模式
  368. Codex 使用与 CLI 相同的 topic 前缀约定:
  369. - `original: Topic`
  370. - `survey:short: Topic`
  371. - `survey:standard: Topic`
  372. - `survey:long: Topic`
  373. 这些前缀会进入仓库现有的 `PaperMode` 解析逻辑;Codex 只需要遵循这一约定,而不需要发明新的接口。
  374. ## Execution Profiles
  375. | Profile | 说明 |
  376. |---------|------|
  377. | `fast_draft` | 轻量级草稿模式,快速迭代 |
  378. | `local_quick` | 优先本地执行,需要时可升级到 SLURM |
  379. | `cluster_full` | 集群优先,适合重量级实验 |
  380. ### 模型路由
  381. NanoResearch 通过统一配置层将不同阶段路由到不同模型,让你按任务特性混合搭配,而非强制所有阶段使用同一模型。
  382. <details>
  383. <summary><b>可路由的阶段</b></summary>
  384. - `ideation` — 文献检索与创意
  385. - `planning` — 实验设计
  386. - `experiment` — 实验相关
  387. - `code_gen` — 代码生成
  388. - `writing` — 论文撰写
  389. - `figure_prompt` — 图表描述
  390. - `figure_code` — 图表代码
  391. - `figure_gen` — 图像生成
  392. - `review` — 审稿
  393. - `revision` — 修订
  394. 系统基于 **OpenAI 兼容端点**构建,支持按阶段覆盖配置。
  395. </details>
  396. ### 文献检索 API Keys(可选)
  397. IDEATION 阶段使用 OpenAlex 和 Semantic Scholar 检索学术文献。不配置也能运行(匿名访问),但速率限制较低。
  398. | Service | 获取方式 | Config key | Env variable |
  399. |---------|---------|------------|--------------|
  400. | [OpenAlex](https://developers.openalex.org/) | 免费 | `openalex_api_key` | `OPENALEX_API_KEY` |
  401. | [Semantic Scholar](https://www.semanticscholar.org/product/api#api-key) | 免费 | `s2_api_key` | `S2_API_KEY` |
  402. ### 论文格式
  403. 模板从 `nanoresearch/templates/` 自动发现。内置模板:
  404. | Format | 用途 |
  405. |--------|------|
  406. | `arxiv` | arXiv 预印本 |
  407. | `icml` | ICML 会议 |
  408. | `neurips` | NeurIPS 会议 |
  409. | `neurips2025` | NeurIPS 2025 |
  410. ```bash
  411. nanoresearch run --topic "Graph Foundation Models for Biology" --format neurips2025
  412. ```
  413. ---
  414. ## 💻 CLI 参考
  415. | 命令 | 用途 |
  416. |---------|------|
  417. | `nanoresearch run --topic "..."` | 启动新的流水线运行 |
  418. | `nanoresearch resume --workspace ...` | 从上次断点恢复 |
  419. | `nanoresearch status --workspace ...` | 查看各阶段状态和产物 |
  420. | `nanoresearch list` | 列出已保存的研究会话 |
  421. | `nanoresearch export --workspace ...` | 导出论文打包 |
  422. | `nanoresearch config` | 打印当前配置(密钥已屏蔽) |
  423. | `nanoresearch inspect --workspace ...` | 检查工作空间产物 |
  424. | `nanoresearch health` | 运行环境/配置健康检查 |
  425. | `nanoresearch ram-train` | 使用已收集的反馈训练或续训 RAM LoRA adapter |
  426. | `nanoresearch delete <session_id>` | 删除指定会话 |
  427. ```bash
  428. nanoresearch --help
  429. ```
  430. <p align="right"><a href="#top">🔝 返回顶部</a></p>
  431. ---
  432. ## 🍪 示例与 Demo
  433. 官方示例与进阶用法,助你快速上手 NanoResearch:
  434. 👉 **[浏览示例与 Demo](https://github.com/OpenRaiser/NanoResearch)** <!-- TODO: 若有 docs/ 或 examples/ 目录,请替换为具体路径,如 .../blob/main/docs/README.md -->
  435. <details>
  436. <summary><b>快速示例命令</b></summary>
  437. ```bash
  438. # 完整流水线 + 详细日志
  439. nanoresearch run --topic "Adaptive Sparse Attention" --format neurips2025 --verbose
  440. # 导出并查看
  441. nanoresearch export --workspace ~/.nanoresearch/workspace/research/{session_id} --output ./paper_out
  442. ```
  443. > 仅生成论文(跳过实验):在 config 中设置 `"skip_stages": ["SETUP", "CODING", "EXECUTION", "ANALYSIS"]`
  444. </details>
  445. <p align="right"><a href="#top">🔝 返回顶部</a></p>
  446. ---
  447. ## 📂 输出结构
  448. <details>
  449. <summary><b>导出的论文目录</b></summary>
  450. ```text
  451. my_paper/
  452. ├── paper.pdf
  453. ├── paper.tex
  454. ├── references.bib
  455. ├── figures/
  456. ├── code/
  457. ├── data/
  458. └── manifest.json
  459. ```
  460. </details>
  461. <details>
  462. <summary><b>完整工作空间(含中间产物)</b></summary>
  463. ```text
  464. ~/.nanoresearch/workspace/research/{session_id}/
  465. ├── manifest.json # 流水线状态追踪
  466. ├── papers/ # 文献检索产物
  467. ├── plans/ # 实验方案和分析
  468. ├── experiment/ # 生成的实验代码 + 结果
  469. ├── figures/ # 生成的论文配图
  470. ├── drafts/ # 论文草稿和审稿意见
  471. ├── output/ # 最终导出(main.tex / main.pdf)
  472. └── logs/ # 运行日志
  473. ```
  474. </details>
  475. ---
  476. ## 💬 飞书机器人
  477. NanoResearch 内置飞书(Lark)机器人,可直接在飞书聊天中触发流水线、查看进度、接收论文——无需打开终端。
  478. <details>
  479. <summary><b>配置与启动</b></summary>
  480. **1. 安装依赖**
  481. ```bash
  482. pip install lark-oapi
  483. ```
  484. **2. 配置**
  485. 在 [open.feishu.cn](https://open.feishu.cn) 创建自定义应用并获取 App ID 和 App Secret:
  486. ```bash
  487. export FEISHU_APP_ID="cli_xxx"
  488. export FEISHU_APP_SECRET="xxx"
  489. ```
  490. 或写入 `~/.nanoresearch/config.json`:
  491. ```json
  492. {
  493. "feishu": {
  494. "app_id": "cli_xxx",
  495. "app_secret": "xxx"
  496. }
  497. }
  498. ```
  499. **3. 启动**
  500. ```bash
  501. nanoresearch feishu # 启动机器人
  502. nanoresearch feishu -v # 详细日志模式
  503. ```
  504. 机器人通过 WebSocket 长连接通信(无需公网服务器或 Webhook URL)。按 `Ctrl+C` 停止。
  505. </details>
  506. ### 支持的命令
  507. | 命令 | 描述 |
  508. |---------|------|
  509. | `/run <课题>` | 对指定课题启动研究流水线 |
  510. | `/status` | 查看当前任务进度 |
  511. | `/list` | 列出所有历史研究会话 |
  512. | `/stop` | 停止当前运行的流水线 |
  513. | `/export` | 重新导出最近完成的研究 |
  514. | `/new` | 清除对话记忆,重新开始 |
  515. | `/help` | 显示帮助信息 |
  516. 也可以直接自然语言聊天——机器人充当 AI 科研助手,支持对话记忆,流水线完成后自动发送 `paper.pdf`。
  517. ---
  518. ## 🏗️ 项目结构
  519. ```text
  520. nanoresearch/
  521. ├── nanoresearch/
  522. │ ├── cli.py # 🖥️ CLI 入口
  523. │ ├── config.py # ⚙️ 配置管理
  524. │ ├── agents/ # 🧠 各阶段 Agent
  525. │ │ ├── ideation.py # 文献检索与假说
  526. │ │ ├── planning.py # 实验方案设计
  527. │ │ ├── coding.py # 代码生成
  528. │ │ ├── execution/ # 本地/集群执行
  529. │ │ ├── analysis/ # 结果分析
  530. │ │ ├── figure_gen/ # 图表生成
  531. │ │ ├── writing/ # 论文撰写
  532. │ │ └── review/ # 审稿与修订
  533. │ ├── pipeline/ # 🔄 编排器 & 状态机
  534. │ ├── schemas/ # 📋 Pydantic 数据模型
  535. │ ├── prompts/ # 💬 YAML 提示词模板
  536. │ ├── templates/ # 📄 LaTeX Jinja2 模板
  537. │ └── latex/ # 🔧 LaTeX 自动修复
  538. ├── mcp_server/ # 🔌 MCP 工具服务
  539. ├── skills/ # 🎯 Claude Code 技能
  540. └── pyproject.toml
  541. ```
  542. ---
  543. ## ❓ 常见问题
  544. <details>
  545. <summary><b>NanoResearch 真的会运行实验吗?</b></summary>
  546. 是的。流水线会生成可运行的代码,在本地 GPU 或 SLURM 集群上执行,并将实验产物传递给后续的分析、配图和写作阶段。**论文中的数据来自真实实验,而非模型编造。**
  547. </details>
  548. <details>
  549. <summary><b>可以断点续跑吗?</b></summary>
  550. 可以。工作空间按阶段保存检查点,`nanoresearch resume --workspace ...` 会从上次未完成或失败的阶段继续。
  551. </details>
  552. <details>
  553. <summary><b>每个阶段都需要配置模型吗?</b></summary>
  554. 不需要。NanoResearch 支持按阶段配置模型路由,也可以全部使用同一个模型。
  555. </details>
  556. <details>
  557. <summary><b>生成的论文可以直接投稿吗?</b></summary>
  558. 建议将其视为高质量初稿,而非最终投稿版本。系统可以生成完整的论文工作空间和编译好的 PDF,但人工审阅和修订仍然必要。
  559. </details>
  560. <details>
  561. <summary><b>LaTeX 编译推荐什么工具?</b></summary>
  562. 推荐使用 `tectonic`。Conda 安装的 texlive 可能缺少 `pdflatex.fmt`,导致编译失败且修复困难。`tectonic` 会自动下载所需的 TeX 包,无需额外配置。
  563. ```bash
  564. conda install -c conda-forge tectonic
  565. ```
  566. </details>
  567. ---
  568. ## 🎯 路线图
  569. - [x] 9 阶段统一流水线
  570. - [x] 本地 GPU + SLURM 集群执行
  571. - [x] Claude Code 集成模式
  572. - [x] 飞书机器人
  573. - [x] 多会议论文模板(NeurIPS / ICML / arXiv)
  574. - [x] 断点续跑与多模型路由
  575. - [ ] 更多 Demo 与教程
  576. - [ ] Benchmark 评估套件
  577. - [ ] Web 端工作空间 UI
  578. - [ ] 更多论文格式支持
  579. <p align="right"><a href="#top">🔝 返回顶部</a></p>
  580. ---
  581. ## 🤝 贡献
  582. 欢迎开发者、研究者贡献代码与创意。
  583. ### 👥 社区与交流
  584. 加入微信群交流、答疑、协作。扫码加入:
  585. <p align="center">
  586. <img src="imgs/wechat_group.png" alt="WeChat Group QR Code" width="220"/>
  587. </p>
  588. <table align="center">
  589. <tr>
  590. <td align="center"><a href="https://github.com/jhxu003" title="jhxu003"><img src="https://avatars.githubusercontent.com/u/144009546?v=4" width="48" height="48" alt="jhxu003" /></a></td>
  591. <td align="center"><a href="https://github.com/YujunWu03" title="YujunWu03"><img src="https://avatars.githubusercontent.com/u/150153034?v=4" width="48" height="48" alt="YujunWu03" /></a></td>
  592. <td align="center"><a href="https://github.com/01Elaine" title="01Elaine"><img src="https://avatars.githubusercontent.com/u/149477111?v=4" width="48" height="48" alt="01Elaine" /></a></td>
  593. <td align="center"><a href="https://github.com/DongXu-Zhang" title="DongXu-Zhang"><img src="https://avatars.githubusercontent.com/u/132906734?v=4" width="48" height="48" alt="DongXu-Zhang" /></a></td>
  594. <td align="center"><a href="https://github.com/chengtan9907" title="chengtan9907"><img src="https://avatars.githubusercontent.com/u/34480960?v=4" width="48" height="48" alt="chengtan9907" /></a></td>
  595. <td align="center"><a href="https://github.com/Auranj" title="Auranj"><img src="https://avatars.githubusercontent.com/u/192096664?v=4" width="48" height="48" alt="Auranj" /></a></td>
  596. </tr>
  597. </table>
  598. <p align="right"><a href="#top">🔝 返回顶部</a></p>
  599. ---
  600. ## 📋 环境要求
  601. - Python **3.10+**
  602. - **OpenAI 兼容 API 端点**(用于文本模型阶段)
  603. - 可选:图像模型访问权限(用于部分配图)
  604. - `tectonic` 或 `pdflatex`(用于 PDF 编译)
  605. ---
  606. ## 🙏 致谢
  607. - [claude-scholar](https://github.com/Galaxy-Dawn/claude-scholar) — Claude Code 的科研技能扩展
  608. - [saadmsft/nanoresearch](https://github.com/saadmsft/nanoresearch) — 感谢其开源工作与社区贡献
  609. ---
  610. ## ⭐ Star History
  611. <div align="center">
  612. <a href="https://star-history.com/#OpenRaiser/NanoResearch&Date">
  613. <picture>
  614. <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=OpenRaiser/NanoResearch&type=Date&theme=dark" />
  615. <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=OpenRaiser/NanoResearch&type=Date" />
  616. <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=OpenRaiser/NanoResearch&type=Date" width="100%" />
  617. </picture>
  618. </a>
  619. </div>
  620. ---
  621. ## 📝 引用
  622. 如有帮助,请引用:
  623. ```bibtex
  624. @article{xu2026nanoresearch,
  625. title={NanoResearch: Co-Evolving Skills, Memory, and Policy for Personalized Research Automation},
  626. author={Xu, Jinhang and Zhu, Qiyuan and Wu, Yujun and Wang, Zirui and Zhang, Dongxu and Tang, Jianxin and Tian, Marcia and Duan, Yiling and Li, Siyuan and Wei, Jingxuan and others},
  627. journal={arXiv preprint arXiv:2605.10813},
  628. year={2026}
  629. }
  630. ```
  631. ---
  632. ## 📄 许可证
  633. MIT
  634. <p align="right"><a href="#top">🔝 返回顶部</a></p>
  635. ---
  636. <div align="center">
  637. <p>
  638. <a href="https://github.com/OpenRaiser/NanoResearch"><img src="https://img.shields.io/badge/⭐_Star_us_on_GitHub-1a1a2e?style=for-the-badge&logo=github&logoColor=white" alt="Star"></a>
  639. <a href="https://github.com/OpenRaiser/NanoResearch/issues"><img src="https://img.shields.io/badge/🐛_Report_Issues-ff6b6b?style=for-the-badge&logo=github&logoColor=white" alt="Issues"></a>
  640. <a href="https://github.com/OpenRaiser/NanoResearch/discussions"><img src="https://img.shields.io/badge/💬_Discussions-4ecdc4?style=for-the-badge&logo=github&logoColor=white" alt="Discussions"></a>
  641. </p>
  642. <sub>NanoResearch 仅供教育、研究及技术交流使用。</sub>
  643. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.