notebooklm
Skill20k starsChanged 3 months agoMITView on GitHub
Install, authenticate, troubleshoot, and operate Gemini Notebook through the notebooklm-py CLI or typed async Python API. Use for notebook and source management, grounded chat and research, and artifact generation or download when the user mentions Gemini Notebook, notebooklm-py, the notebooklm CLI, or its Python API. Do not use for the generic Gemini API or unrelated content creation.
- Installs packages
47 other projects use a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- delorenj/skillstheir own version, first seen Oct 2, 2026
- ArtemXTech/personal-os-skillstheir own version, first seen Sep 22, 2026
- tiangong-ai/agent-skillstheir own version, first seen Sep 13, 2026
- roomi-fields/notebooklm-mcptheir own version, first seen Sep 4, 2026
- proyecto26/notebooklm-ai-plugintheir own version, first seen Aug 28, 2026
- artemnovitckii/notebooklm-coachtheir own version, first seen Aug 17, 2026
Who's talking about teng-lin/notebooklm-py
- A Hacker News story“notebooklm-py makes Claude interact with NotebookLM”Hacker News · May 6, 2026 · 4 points
- A Hacker News story“Show HN: Notebooklm-Py – Unofficial Python API for Google NotebookLM”Hacker News · Jan 12, 2026 · 2 points
- @githubfeed.bsky.social“🚀 GitHub Intelligence Drop omlx (Python • 🟢) ⭐ 16.5K → https://github.com/jundot/omlx notebooklm-py …”Bluesky · Jun 13, 2026 · 1 likes
- @github-trending.bsky.social“🔥 Hot Repo! 🔥 (100+ new stars) 📦 teng-lin / notebooklm-py ⭐ 3,514 (+190) 🗒 Python Unofficial Python API …”Bluesky · Mar 8, 2026 · 1 likes
- kanta13jp1/my_web_app“deps: bump the python-dependencies group across 1 directory with 13 updates”GitHub · Nov 2, 2026
The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 54
Talked about on GitHub, Hacker News and Bluesky (54 times).
On GitHub · 50
- Nov 2, 2026deps: bump the python-dependencies group across 1 directory with 13 updates — kanta13jp1/my_web_app0 reactions · 3 comments
- Nov 1, 2026chore(deps): Bump notebooklm-py from 0.8.4 to 0.8.6 — inoueUJ/notebooklm-radio0 reactions
- Oct 31, 2026[Z.AI] Billing für literature-review: API-Schlüssel belegt, 24 stumme Seiten gelesen — Doebele/agents0 reactions
- Oct 29, 2026agent-skills.github.teng-lin.notebooklm-py: 0.8.5 → 0.8.6 — sudosubin/agents.nix0 reactions
- Oct 26, 2026deps: bump the python-dependencies group across 1 directory with 12 updates — kanta13jp1/my_web_app0 reactions · 5 comments
45 more on GitHub
- Oct 19, 2026fix(cli): stop selector-loop uploads on Windows from losing data (`#2485`) — sjmaple/cr-notebooklm-py0 reactions
- Oct 18, 2026chore(deps): Bump notebooklm-py from 0.8.4 to 0.8.5 — inoueUJ/notebooklm-radio0 reactions · 1 comment
- Oct 18, 2026Update notebooklm-py requirement from <0.4,>=0.3.4 to >=0.3.4,<0.9 — kuanysh228/autoy0 reactions · 1 comment
- Oct 17, 2026Bump the minor-and-patch group with 12 updates — sh-nakama/Remote-JEMA0 reactions
- Oct 15, 2026chore(deps): bump the uv-minor-and-patch group with 3 updates — qiaoqiao2521/google2api-cli0 reactions
- Oct 13, 2026Add notebooklm skill — Nozmun/family0 reactions
- Oct 13, 2026agent-skills.github.teng-lin.notebooklm-py: 0.8.4 → 0.8.5 — sudosubin/agents.nix0 reactions
- Oct 12, 2026deps: bump the python-dependencies group across 1 directory with 13 updates — kanta13jp1/my_web_app0 reactions · 14 comments
- Oct 10, 2026Bump the minor-and-patch group with 16 updates — sh-nakama/Remote-JEMA0 reactions
- Oct 10, 2026[Inhalt] Rotation 2026-10-10: 28 von 30 Steckbriefen geprüft, keine Textänderung — Doebele/agents0 reactions
- Oct 8, 2026ci: Bump notebooklm-py[browser] from 0.8.3 to 0.8.4 in /tools/notebooklm — irisTa56/k-boat0 reactions
- Oct 5, 2026deps: bump the python-dependencies group across 1 directory with 11 updates — kanta13jp1/my_web_app0 reactions · 3 comments
- Oct 4, 2026agent-skills.github.teng-lin.notebooklm-py: 0.8.2 → 0.8.4 — sudosubin/agents.nix0 reactions
- Oct 3, 2026Bump the minor-and-patch group with 6 updates — sh-nakama/Remote-JEMA0 reactions
- Oct 3, 2026agent-skills.github.teng-lin.notebooklm-py: init at 0.8.2 — sudosubin/agents.nix0 reactions
- Oct 1, 2026ci: Bump notebooklm-py[browser] from 0.8.2 to 0.8.3 in /tools/notebooklm — irisTa56/k-boat0 reactions
- Sep 20, 2026[Z.AI] Zehn Skill- und Plugin-Steckbriefe aus dem Skills-Video von Julian Ivanov — Doebele/agents0 reactions
- Sep 7, 2026deps: bump the python-dependencies group with 8 updates — kanta13jp1/my_web_app0 reactions · 4 comments
- Sep 4, 2026Audit 2026-09-04: make the kit work against notebooklm-py 0.8.2, fix docs, add tests — ferinazumaDEV/notebooklm-kb-system0 reactions
- Aug 31, 2026Capability Onboarding UX:零 schema 输入、旧项目迁移与 host-scoped Skill invocation — carllx/matt-browser-workflow0 reactions · 10 comments
- Aug 29, 2026feat: Codex × NotebookLM 連携キット — myoneda22/job0 reactions
- Aug 24, 2026Bump notebooklm-py from 0.8.0 to 0.8.1 in the runtime-dependencies group — Mathewweiss02/codex-notebooklm-thread-rag0 reactions
- Aug 19, 2026setup_auth never detects successful login since Google's notebook.google.com rebrand — PleasePrompto/notebooklm-mcp0 reactions · 2 comments
- Aug 17, 2026deps: bump the python-dependencies group across 1 directory with 3 updates — kanta13jp1/my_web_app0 reactions · 5 comments
- Aug 16, 2026Update notebooklm-py requirement from <0.8,>=0.7.3 to >=0.7.3,<0.9 — langrenlibai/notebooklm-skill-zh-cn0 reactions · 2 comments
- Aug 15, 2026handle multi-profile session persistence and anti-dormancy — Expert-Vision-Software/gemini-web-sdk0 reactions
- Aug 10, 2026chore(deps): update notebooklm-py requirement from <0.8,>=0.7.3 to >=0.7.3,<0.9 — cmlonder/notebooklm-chunker0 reactions · 2 comments
- Aug 10, 2026deps: bump the python-dependencies group across 1 directory with 2 updates — kanta13jp1/my_web_app0 reactions · 3 comments
- Jul 13, 2026deps: bump the python-dependencies group across 1 directory with 2 updates — kanta13jp1/my_web_app0 reactions · 3 comments
- Jul 6, 2026deps: update notebooklm-py requirement from >=0.7.2 to >=0.7.3 in the python-dependencies group — kanta13jp1/my_web_app0 reactions · 3 comments
- Jul 3, 2026chore(deps): update notebooklm-py requirement from >=0.3.4 to >=0.7.3 — prantikmedhi/lore0 reactions
- Jun 27, 2026Add NotebookLM ↔ Claude setup (teng-lin/notebooklm-py via MCP) — nigelguy007/main0 reactions
- Jun 19, 2026chore(deps): update notebooklm-py requirement from >=0.3.4 to >=0.7.2 — prantikmedhi/lore0 reactions · 1 comment
- Jun 17, 2026Audit candidate: teng-lin/notebooklm-py — xiaolai/nlpm0 reactions · 6 comments
- Jun 12, 2026chore(deps): update notebooklm-py requirement from >=0.3.4 to >=0.7.1 — prantikmedhi/lore0 reactions · 1 comment
- Jun 5, 2026chore(deps): update notebooklm-py requirement from >=0.3.4 to >=0.7.0 — prantikmedhi/lore0 reactions · 1 comment
- Jun 1, 2026deps: bump the python-dependencies group across 1 directory with 3 updates — kanta13jp1/my_web_app0 reactions · 3 comments
- May 31, 2026🔴 Gemini Key Leak in commit: teng-lin/notebooklm-py/commit/ba8ef23b51a68371d67278898db... — Colorful-glassblock/Dont-Be-Stupid-Leaker0 reactions · 1 comment
- May 31, 2026Add teng-lin/notebooklm-py — open-gitagent/registry0 reactions
- May 31, 2026chore(deps): update notebooklm-py requirement from <0.5.0,>=0.4.1 to >=0.4.1,<0.7.0 — WenyuChiou/research-hub0 reactions · 3 comments
- May 24, 2026chore(deps): update notebooklm-py requirement from >=0.3.4 to >=0.5.0 in /backend — thrtysxty/copernicus0 reactions · 1 comment
- May 24, 2026chore(deps): update notebooklm-py requirement from >=0.3.4 to >=0.5.0 — thrtysxty/copernicus0 reactions · 1 comment
- May 24, 2026build(deps): Update notebooklm-py requirement from <0.5.0,>=0.4.1 to >=0.4.1,<0.6.0 — WenyuChiou/research-hub0 reactions · 2 comments
- May 11, 2026Add notebooklm skill from teng-lin/notebooklm-py@1bc6960 — aibrain71-art/Skills0 reactions
- May 10, 2026notebooklm-py の_is_media_ready を利用する — catdance124/salon-report-bot0 reactions
On Hacker News · 2
- May 6, 2026notebooklm-py makes Claude interact with NotebookLM4 points
- Jan 12, 2026Show HN: Notebooklm-Py – Unofficial Python API for Google NotebookLM2 points
On Bluesky · 2
- Jun 13, 2026🚀 GitHub Intelligence Drop omlx (Python • 🟢) ⭐ 16.5K → https://github.com/jundot/omlx notebooklm-py (Python • 🟢) ⭐ 16.3K →… — @githubfeed.bsky.social1 likes and repost
- Mar 8, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 teng-lin / notebooklm-py ⭐ 3,514 (+190) 🗒 Python Unofficial Python API for Google NotebookLM — @github-trending.bsky.social1 likes and repost
Used with
Projects with it also use claudeception, remotion-best-practices and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
chipoto69Skillclaudeception
Claudeception is a continuous learning system that extracts reusable knowledge from work sessions. Triggers: (1) /claudeception command to review session learnings, (2) "save this as a skill" or "extract a skill from this", (3) "what did we learn?", (4) After any task involving non-obvious debugging, workarounds, or trial-and-error discovery. Creates new Claude Code skills when valuable, reusable knowledge is identified.
Also in 3 projects that use this
VercelSkillremotion-best-practices
Best practices for Remotion - Video creation in React
Also in 5 projects that use this
dandacompanySkillyoutube-transcript
Extract YouTube video transcripts/subtitles using yt-dlp. Handles rate limiting, auto-generated captions, multiple languages, and VTT parsing.
Also in 3 projects that use this
StrayDragonSkillui-ux-pro-max
UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.
Also in 7 projects that use this
VercelSkillfind-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Also in 5 projects that use this
VercelSkillvercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Also in 3 projects that use this
- +1 more from vercel
Other versions47 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 47
- ArtemXTech/personal-os-skills★ 539same name
- sanjay3290/ai-skills★ 429same name
- roomi-fields/notebooklm-mcp★ 188same name
- CommandCodeAI/agent-skills★ 131same name
- chendongqi/OPB-Skills★ 125same name
- walidboulanouar/Ay-Skills★ 91same name
- jmagar/claude-homelab★ 81same name
- artemnovitckii/notebooklm-coach★ 67same name
- proyecto26/notebooklm-ai-plugin★ 65same name
- rainday/smart-blog-skills★ 35same name
37 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 11 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 47 edited versions we read keep these.
11
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 8
Use the notebooklm CLI for agent workflows.
- Very specific: line 23
If system pip reports externally-managed-environment, do not use --break-system-packages.
- Distinctive: line 41
Use PyPI or a release tag, not an unreleased main checkout.
- Distinctive: line 44
Before a workflow, verify real authentication rather than merely parsing the cookie file:
- Very specific: line 56
If previously valid cookies became stale, try notebooklm auth refresh.
- Distinctive: line 64
Treat both auth files as bearer credentials: never print, log, or commit them.
- Very specific: line 70
Use --json for discovery and mutations, then retain the returned full UUIDs.
- Very specific: line 75
Do not rely on notebooklm use.
- Very specific: line 78
Never share one writable storage_state.json across agents.
- Very specific: line 79
After adding sources, retain every .source.id, then run source wait for each before chat or generation.
- Very specific: line 82
After an asynchronous generator returns a task/artifact ID, pass it positionally to artifact wait with -n <notebook_id>.
- Distinctive: line 87
Use a host's background facility only when it actually exists.
- Distinctive: line 117
Use the installed CLI's help as the version-matched source of truth instead of guessing flags:
- Very specific: line 152
Keep {notebook_id}, every {source_id}, and {artifact_id} from JSON output:
- Distinctive: line 185
Import only after explicit authorization, pinning both IDs:
- Distinctive: line 200
When the full API guide is unavailable, use the installed typed API and its docstrings.
- Distinctive: line 248
Keep these non-obvious distinctions:
- Distinctive: line 267
Use JSON structurally rather than parsing human output.
- Distinctive: line 307
Keep progress updates brief and include the relevant returned ID.
- Distinctive: line 311
If this file is already inside an agent skill directory, the skill itself is installed.
“Common” is measured: kept by at least 6 in 10 of the 47 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gemini Notebook Automation
Use the notebooklm CLI for agent workflows. Prefer --json and explicit IDs so every
operation is inspectable and safe under concurrency. Use the typed async Python API only when the
user requests application code or the CLI cannot express the workflow. The readiness, identity,
authorization, and credential-handling rules below apply to both interfaces.
Setup and Authentication
Requires Python 3.10+. Install the package in the user's existing environment; do not create a separate environment unless requested:
pip install "notebooklm-py[browser]"
pip install "notebooklm-py[cookies]" # optional browser-cookie extractionIf system pip reports externally-managed-environment, do not use --break-system-packages.
For CLI-only use, offer uv tool install "notebooklm-py[browser]" or the equivalent pipx
command; for application code, use the user's active project environment.
For unattended or headless work, prefer durable profile-backed master-token auth over a copied
cookie snapshot. Install pip install "notebooklm-py[headless]"; the one-time automatic OAuth
capture also needs [browser]. On a trusted workstation run
notebooklm login --master-token --account <email>, then deploy master_token.json, not
storage_state.json, to the selected profile. NOTEBOOKLM_HOME selects the private base directory
and NOTEBOOKLM_PROFILE selects its profile; defaults resolve to
~/.notebooklm/profiles/default/master_token.json.
In CI, NOTEBOOKLM_MASTER_TOKEN_JSON is a secret-transport convention, not an environment variable
the package reads directly. Write its exact value to the selected profile's master_token.json
with mode 0600, unset it, then run notebooklm auth refresh to mint storage_state.json. A
sibling master token can automatically re-mint expired file-backed cookies. Inline
NOTEBOOKLM_AUTH_JSON is only a short-lived fallback; it bypasses this recovery path.
Use PyPI or a release tag, not an unreleased main checkout. When available, consult the
installation guide.
Before a workflow, verify real authentication rather than merely parsing the cookie file:
notebooklm auth check --test --jsonRequire .status == "ok" and .checks.token_fetch == true. If validation fails:
- With a display, run
notebooklm loginand validate again. - In a headless environment, install
[cookies]and usenotebooklm login --browser-cookies <browser>. Usenotebooklm auth inspect --browser <browser>first when account selection is unclear. - If previously valid cookies became stale, try
notebooklm auth refresh; usenotebooklm auth refresh --browser-cookies <browser>after signing back into the browser.
The normal --test preflight may heal and persist refreshed cookies. Add --passive when the
check must be strictly read-only, including the failure-diagnosis workflow below.
notebooklm status reports selected-notebook context, not authentication.
Treat both auth files as bearer credentials: never print, log, or commit them. A master token is a
durable full-account credential that survives password changes; use a dedicated account, protect
it in a secret store and as 0600 on disk, and explicitly revoke it if exposed.
Operating Invariants
- Use
--jsonfor discovery and mutations, then retain the returned full UUIDs. Important envelopes are.notebook.idfromcreate,.source.idfromsource add, and.task_idfrom asynchronous generators.generate mind-mapinstead returnsmind_map,note_id, andkind; both kinds return a finished result with no task ID or separateartifact waitstep. - Pass
-n/--notebook <id>on every notebook-scoped command in automation or concurrent work. Do not rely onnotebooklm use. For every concurrent run, also set a uniqueNOTEBOOKLM_PROFILE=agent-<id>so context and profile writes are isolated. A new profile has no credentials: put amaster_token.jsoncopy in that profile and mint its storage before use. Never share one writablestorage_state.jsonacross agents. - After adding sources, retain every
.source.id, then runsource waitfor each before chat or generation. The add envelope has no status. Require wait exit 0 andstatus == "ready"; let the waiter handle media-specific transienterrorrows. - After an asynchronous generator returns a task/artifact ID, pass it positionally to
artifact waitwith-n <notebook_id>. Download that exact artifact with-a <artifact_id> -n <notebook_id>; never select the latest visible artifact. Mind-map generation returns its completed result directly and does not needartifact wait. - For overlapping research runs, always pass
--run-id <research_run_id>. - Use a host's background facility only when it actually exists. Keep wait and dependent download commands in one sequential job, and download only after the wait exits 0. Otherwise run in the foreground or return exact ID-pinned commands to the user.
Authorization Boundaries
Safe inspection and explicitly requested creation, source addition, chat, and prompt suggestion can run directly. Diagnose failures with read-only commands before attempting recovery.
Obtain confirmation immediately before an action when it was not already clearly authorized:
- destructive commands such as notebook/source/note/artifact/label/profile deletion, sharing
removal, logout, clear, research cancellation, and
ask --new; language set, because the default mode changes the account-global output language (prefer a generation command's--languageoverride);- generation or long foreground waits, which can take minutes and be rate-limited;
- downloads, which write files;
research wait --import-all, which imports sources;ask --save-as-noteandhistory --save, which create notes.
User intent, not the presence of a CLI prompt, is the authorization boundary. After authorization,
pass --yes/-y where supported. Most destructive JSON commands refuse to prompt without it, but
some, including ask --new --json and share remove --json, execute without prompting. Never
treat prompt absence as consent.
research cancel is fire-and-forget. After an authorized cancellation, verify the exact run with
notebooklm research status -n <notebook_id> --run-id <research_run_id> --json.
Command Discovery
Use the installed CLI's help as the version-matched source of truth instead of guessing flags:
notebooklm --help
notebooklm source --help
notebooklm research --help
notebooklm generate --help
notebooklm artifact --help
notebooklm download --helpAlso inspect notebooklm --version and drill down to the exact command, such as
notebooklm generate audio --help, whenever its help differs from this skill.
Common operations:
| Goal | Command |
| Check compute usage | notebooklm usage --json; notebooklm usage --categories for category availability and estimated costs |
| List or create notebooks | notebooklm list --json; notebooklm create "Title" --json |
| Add and wait for a source | notebooklm source add <input> -n <nb> --json; notebooklm source wait <src> -n <nb> |
| URL recovery | notebooklm source add <url> --fallback-fetch |
| Chat | notebooklm ask "question" -n <nb> --json |
| Research | notebooklm source add-research "query" -n <nb> --mode fast --json (deep is also supported) |
| List or wait for artifacts | notebooklm artifact list -n <nb> --json; notebooklm artifact wait <id> -n <nb> |
| Generate | notebooklm generate <type> ... -n <nb> --json |
| Download | notebooklm download <type> <path> -n <nb> -a <artifact> |
For the full surface, consult the installed command help or, when available, the CLI reference. For application code, use the baseline below and, when available, the Python API guide.
Canonical Source-to-Artifact Workflow
Keep {notebook_id}, every {source_id}, and {artifact_id} from JSON output:
An explicit request for this completed workflow authorizes its normal prerequisite waits, requested generation, and requested output file. Confirm only work not already authorized by that request.
notebooklm create "Research: topic" --jsonnotebooklm source add <input> -n {notebook_id} --jsonfor each input.- Once the foreground wait is authorized, run
notebooklm source wait {source_id} -n {notebook_id} --timeout 600for every captured source. - Once generation is authorized, generate the requested type. For audio:
notebooklm generate audio "instructions" -n {notebook_id} -s {source_id} --json. Repeat-sfor each selected source and capture.task_idas{artifact_id}. - Once the foreground wait is authorized, run
notebooklm artifact wait {artifact_id} -n {notebook_id} --timeout 1200. - Once the output write is authorized, run
notebooklm download audio ./podcast.m4a -a {artifact_id} -n {notebook_id}.
For analysis without generation, replace steps 4-6 with an ID-pinned chat command only after every source is ready:
notebooklm ask "Summarize the key arguments" -n {notebook_id} --jsonDeep Research
Deep research can take 15-30+ minutes. Start it non-blocking and retain
.poll_task_id // .task_id as {research_run_id}:
notebooklm source add-research "query" -n {notebook_id} --mode deep --no-wait --jsonImport only after explicit authorization, pinning both IDs:
notebooklm research wait -n {notebook_id} --run-id {research_run_id} \
--import-all --timeout 1800 --jsonWith --import-all, --timeout is a per-phase budget for polling and import retry, so this example
can consume roughly 3600 seconds of host wall time.
Retain newly created source IDs from .imported_sources[].id and wait for readiness before later
chat or generation.
Python API Baseline
When the full API guide is unavailable, use the installed typed API and its docstrings; do not guess method names. Keep the same IDs and readiness gates as the CLI workflow:
import asyncio
from notebooklm import NotebookLMClient
async def main(url: str) -> None:
async with NotebookLMClient.from_storage() as client:
notebook = await client.notebooks.create("Research: topic")
source = await client.sources.add_url(notebook.id, url)
await client.sources.wait_until_ready(notebook.id, source.id, timeout=600)
answer = await client.chat.ask(
notebook.id, "Summarize the key arguments", source_ids=[source.id]
)
print(answer.answer)
task = await client.artifacts.generate_audio(
notebook.id,
source_ids=[source.id],
instructions="Focus on the key arguments",
)
final = await client.artifacts.wait_for_completion(notebook.id, task.task_id, timeout=1200)
if not final.is_complete:
raise RuntimeError(f"Generation ended with {final.status}: {final.error}")
await client.artifacts.download_audio(
notebook.id, "./podcast.m4a", artifact_id=task.task_id
)
asyncio.run(main("https://example.com"))NotebookLMClient.from_storage() is an async context manager and is not awaited. A client is
re-entrant on one event loop but is not thread-safe; create one client per loop. Public namespaces
include notebooks, sources, chat, research, artifacts, mind_maps, notes, settings,
sharing, labels, and collections. Apply the authorization boundaries above before running
state-changing, long-running, or file-writing calls.
Generation Notes
Available generators include audio, video, slide-deck, infographic, report, mind-map,
data-table, quiz, and flashcards. Inspect notebooklm generate <type> --help because formats,
styles, source selection, language, and retry support vary by type.
Keep these non-obvious distinctions:
- Mind map (
--kind interactive, default) is an asynchronous studio artifact internally, but the CLI polls it to completion and returns{mind_map, note_id, kind}; do not runartifact wait. - Mind map (
--kind note-backed) is server-synchronous. Both kinds accept--instructions; interactive applies it reliably, while the server may ignore it for note-backed maps. generate video --format cinematicignores--style, requires Google AI Ultra, and can take roughly 30-40 minutes.- Slide-deck has no orientation flag. Request portrait output in the description (for example,
9:16 portrait); slide revision cannot change the deck's orientation. - For a custom report, pass the prompt as the positional description with
--format custom;--appendapplies only to built-in report formats.
For prompts too long or awkward for shell quoting, use --prompt-file PATH on ask,
source add-research, and supported generators. It contains prompt text; upload source documents
with source add instead.
Output and Citations
Use JSON structurally rather than parsing human output. Common lifecycle values are:
- sources:
unknown/preparing/processing->readyorerror; proceed only onready; - artifacts:
pending/in_progress->completed,failed, orremoved;not_foundmay be a brief listing lag. Proceed or download only oncompleted.
Chat JSON includes answer, conversation_id, and references[].source_id. A reference's
start_char/end_char are UTF-16 offsets into the structured source document, not flat
SourceFulltext.content. In Python, use
from notebooklm import resolve_chat_reference_passage, then call
await resolve_chat_reference_passage(client, notebook_id, reference); it uses the exact document
range and falls back to find_citation_context() when necessary.
Failure Handling
On failure, run safe read-only diagnosis first:
notebooklm auth check --test --passive --json
notebooklm list --json
notebooklm source list -n {notebook_id} --json
notebooklm artifact list -n {notebook_id} --json
notebooklm research status -n {notebook_id} --run-id {research_run_id} --jsonInspect only the commands relevant to the failed workflow. Do not mutate state during diagnosis.
- Exit 0 means success. Expected command failures use exit 1. A
source waittimeout uses exit 2;artifact waitandresearch waittimeouts use exit 1. - Branch on exit code first. Ordinary handled JSON failures use
{error, code, message}, while wait commands return domain envelopes such as{"status": "timeout", "error": "..."}. - On auth failure, revalidate
checks.token_fetch; log in only if it is nottrue. - On a wait timeout, report it and inspect the exact source, artifact, or research run.
- Generation is rate-limited by Google. Preserve the task ID, inspect status, and retry only when the
user authorizes it; do not loop indefinitely. For an existing failed Studio artifact, inspect
notebooklm artifact retry <artifact_id> -n {notebook_id} --helpbefore retrying in place. - On a protocol error, record the installed version, exact command, relevant IDs, and redacted error. Check the project's issue tracker when network access exists; do not invent a workaround when it does not.
Keep progress updates brief and include the relevant returned ID. Never expose credential contents.
Skill Installation
If this file is already inside an agent skill directory, the skill itself is installed. Otherwise:
notebooklm skill installinstalls or updates supported local skill targets.notebooklm skill packagebuilds an uploadable archive for sandboxed agent environments.notebooklm skill status --jsonreports installed versions andcontent_mismatch.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

