notebooklm
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNotebookLM CLI Wrapper (Python)
NotebookLM CLI Wrapper (Python)
Required parameters
必要参数
- available.
python3 - installed (CLI binary:
notebooklm-py).notebooklm - NotebookLM authenticated ().
login
- 需安装。
python3 - 已安装(CLI二进制文件:
notebooklm-py)。notebooklm - 已完成NotebookLM身份验证(执行命令)。
login
Quick start
快速开始
- Wrapper script: .
scripts/notebooklm.py - Command form: .
python3 {baseDir}/scripts/notebooklm.py <command> [args...]
bash
python3 {baseDir}/scripts/notebooklm.py login
python3 {baseDir}/scripts/notebooklm.py list
python3 {baseDir}/scripts/notebooklm.py use <notebook_id>
python3 {baseDir}/scripts/notebooklm.py status
python3 {baseDir}/scripts/notebooklm.py ask "Summarize the key takeaways" --notebook <notebook_id>- 封装脚本路径:。
scripts/notebooklm.py - 命令格式:。
python3 {baseDir}/scripts/notebooklm.py <command> [args...]
bash
python3 {baseDir}/scripts/notebooklm.py login
python3 {baseDir}/scripts/notebooklm.py list
python3 {baseDir}/scripts/notebooklm.py use <notebook_id>
python3 {baseDir}/scripts/notebooklm.py status
python3 {baseDir}/scripts/notebooklm.py ask "Summarize the key takeaways" --notebook <notebook_id>Output guidance
输出指南
- Prefer for machine-readable output where supported.
--json - Long-running waits are handled by native commands like:
source waitartifact waitresearch wait
- 支持的情况下优先使用参数以获得机器可读的输出。
--json - 长时间等待操作由原生命令处理,例如:
source waitartifact waitresearch wait
⚡ Sub-Agent Delegation (Anti-Blocking)
⚡ 子Agent委托(防阻塞)
Problem
问题
NotebookLM operations like , , , , and can take minutes to complete. Running them in the main session blocks the conversation.
source waitartifact waitresearch waitgenerate slide-decksource add-researchNotebookLM的部分操作,如、、、和,可能需要数分钟才能完成。在主会话中运行这些操作会阻塞对话流程。
source waitartifact waitresearch waitgenerate slide-decksource add-researchStrategy
解决策略
For any operation expected to take >30 seconds, delegate to a sub-agent via :
sessions_spawn- Main session: Acknowledge the user's request, then spawn a sub-agent with a clear task description.
- Sub-agent: Executes the long-running NotebookLM commands, waits for completion, and reports back.
- Main session: Remains responsive. The sub-agent auto-announces completion.
对于任何预计耗时超过30秒的操作,通过委托给子Agent处理:
sessions_spawn- 主会话:确认用户请求,然后生成一个带有明确任务描述的子Agent。
- 子Agent:执行耗时的NotebookLM命令,等待操作完成后反馈结果。
- 主会话:保持响应状态,子Agent会自动通知任务完成。
Which operations to delegate
哪些操作需要委托
| Operation | Delegate? | Reason |
|---|---|---|
| ❌ No | Fast (<5s) |
| ❌ No | Usually fast (~10s) |
| ❌ No | Fast reads |
| ⚠️ Maybe | Fast to submit, but |
| ✅ Yes | Deep research can take 2-5 min |
| ✅ Yes | Polling wait, unpredictable duration |
| ✅ Yes | Generation takes 1-5 min |
| ✅ Yes | Can take several minutes |
| ⚠️ Maybe | Usually fast, but can be slow for large files |
| Multi-step workflows (add sources → wait → generate → wait → download) | ✅ Yes | Compound long tasks |
| 操作 | 是否委托 | 原因 |
|---|---|---|
| ❌ 不需要 | 速度快(<5秒) |
| ❌ 不需要 | 通常速度快(约10秒) |
| ❌ 不需要 | 快速读取操作 |
| ⚠️ 视情况而定 | 提交速度快,但后续的 |
| ✅ 需要 | 深度研究可能耗时2-5分钟 |
| ✅ 需要 | 轮询等待,时长不可预测 |
| ✅ 需要 | 生成过程耗时1-5分钟 |
| ✅ 需要 | 可能耗时数分钟 |
| ⚠️ 视情况而定 | 通常速度快,但大文件可能较慢 |
| 多步骤工作流(添加源→等待→生成→等待→下载) | ✅ 需要 | 复合式长耗时任务 |
How to spawn
如何生成子Agent
sessions_spawn:
task: |
You are a NotebookLM task runner. Execute the following NotebookLM operations
and report results when done.
Notebook ID: <notebook_id>
Commands to run (in order):
1. <command 1>
2. <command 2>
...
Use the CLI wrapper: python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py
Prefer --json output where supported.
If any step fails, report the error and stop.
When complete, summarize what was accomplished and any output files created.
mode: run
label: notebooklm-<short-description>sessions_spawn:
task: |
You are a NotebookLM task runner. Execute the following NotebookLM operations
and report results when done.
Notebook ID: <notebook_id>
Commands to run (in order):
1. <command 1>
2. <command 2>
...
Use the CLI wrapper: python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py
Prefer --json output where supported.
If any step fails, report the error and stop.
When complete, summarize what was accomplished and any output files created.
mode: run
label: notebooklm-<short-description>Example: Generate slide deck
示例:生成幻灯片
User: "帮我用 notebook X 生成一个 PPT"
Main session response:
好的,我派了一个后台任务去生成 PPT,完成后会通知你 ✧
Spawn:
sessions_spawn:
task: |
NotebookLM task: Generate a slide deck from notebook.
Steps:
1. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py generate slide-deck "Create a comprehensive slide deck" --notebook <id>
2. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py artifact wait <artifact_id> --notebook <id> --timeout 600 --json
3. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py download slide-deck ./output.pptx --notebook <id> --latest --format pptx
Report: artifact details, file path, any errors.
mode: run
label: notebooklm-slide-deck用户:"帮我用 notebook X 生成一个 PPT"
主会话回复:
好的,我派了一个后台任务去生成 PPT,完成后会通知你 ✧
生成子Agent:
sessions_spawn:
task: |
NotebookLM task: Generate a slide deck from notebook.
Steps:
1. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py generate slide-deck "Create a comprehensive slide deck" --notebook <id>
2. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py artifact wait <artifact_id> --notebook <id> --timeout 600 --json
3. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py download slide-deck ./output.pptx --notebook <id> --latest --format pptx
Report: artifact details, file path, any errors.
mode: run
label: notebooklm-slide-deckExample: Add research source
示例:添加研究源
User: "在 notebook Y 里加一个关于碳足迹的深度研究"
Spawn:
sessions_spawn:
task: |
NotebookLM task: Add deep research source.
Steps:
1. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py source add-research "碳足迹最新研究进展" --mode deep --notebook <id>
2. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py research wait --notebook <id> --timeout 600
3. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py source list --notebook <id> --json
Report: research status, new sources added, any errors.
mode: run
label: notebooklm-research用户:"在 notebook Y 里加一个关于碳足迹的深度研究"
生成子Agent:
sessions_spawn:
task: |
NotebookLM task: Add deep research source.
Steps:
1. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py source add-research "碳足迹最新研究进展" --mode deep --notebook <id>
2. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py research wait --notebook <id> --timeout 600
3. python3 ~/.openclaw/skills/notebooklm-Invoke/scripts/notebooklm.py source list --notebook <id> --json
Report: research status, new sources added, any errors.
mode: run
label: notebooklm-researchGuidelines
注意事项
- Always tell the user you're delegating to a background task before spawning.
- Use (one-shot) — no need for persistent sessions.
mode: run - Use descriptive labels like ,
notebooklm-slide-deckfor easy tracking.notebooklm-research-carbon - Include all context in the task — the sub-agent has no conversation history.
- Error handling: Instruct the sub-agent to report errors clearly so you can relay them.
- File paths: Use absolute paths for output files so the main session can find them.
- Compound workflows: Bundle related steps (add → wait → generate → wait → download) into a single sub-agent task rather than spawning multiple.
- 务必告知用户在生成子Agent前,你将把任务委托给后台处理。
- 使用(一次性任务)——无需持久会话。
mode: run - 使用描述性标签,如、
notebooklm-slide-deck,以便追踪。notebooklm-research-carbon - 在任务中包含所有上下文信息——子Agent无对话历史。
- 错误处理:指示子Agent清晰报告错误,以便你转达给用户。
- 文件路径:使用绝对路径保存输出文件,以便主会话能找到。
- 复合工作流:将相关步骤(添加→等待→生成→等待→下载)打包为单个子Agent任务,而非生成多个子Agent。
PPT generation policy
PPT生成规则
- A single generated slide deck should target at most 15 pages.
- If user requirements exceed 15 pages, split into multiple decks (e.g., Part 1/2/3) and generate separately.
- After generation, provide downloadable output when possible:
.pptxdownload slide-deck ... --format pptx
- 单次生成的幻灯片最多不超过15页。
- 如果用户需求超过15页,需拆分为多个幻灯片(如第1/2/3部分)分别生成。
- 生成完成后,尽可能提供可下载的格式文件:
.pptx- 使用命令
download slide-deck ... --format pptx
- 使用命令
References
参考文档
- (installation, requirements, troubleshooting)
README.md - (中文快速上手)
QUICKSTART_CN.md references/cli-commands.md
- (安装、需求、故障排查)
README.md - (中文快速上手)
QUICKSTART_CN.md references/cli-commands.md
Assets
资源
- None.
- 无。