NotebookLM Python Automation
Automate Gemini Notebook research, generation, and exports through Python, CLI, or coding agents.
- Source repo
- teng-lin/notebooklm-py
- Stars
- ★ 20k
- Last updated
- today v0.8.6
- FARS reviewed
- Nov 07, 2026
- License
- MIT
- Primary language
- Python
- FA score
- 76/100 · Good
At a glance
- How it runs
- Works with
- Platform-specificCodex · Claude Code · Claude.aiChatGPT (Partial support)
- Cost
- Free software; you pay for model usage
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- A researcher imports a large collection of webpages, PDFs, YouTube material, and Drive documents, delegates synthesis to Gemini Notebook, and collects the results with a repeatable script.
- Not a fit if
- Production systems needing a stable SLA from an unofficial, undocumented API
- Users without an eligible Google account or in orgs blocking Google services
- Maintenance
- Commits in the last 30 dayslast commit 2026-12-02latest release v0.8.6 (2026-10-29)+13.7 ★/day over 7 days
- Source review
- 76/100 · Good
What does this agent do, and when should you use it?
notebooklm-py is an unofficial Python API and agent skill for Google Gemini Notebook, formerly NotebookLM. It packages an asynchronous Python SDK, a CLI, an MCP server, an experimental local REST server, and integration paths for Claude Code, Codex, and OpenClaw. Using undocumented Google APIs, it manages notebooks and sources, runs cited question answering, and requests server-side generation of audio, video, slides, quizzes, flashcards, reports, infographics, data tables, and mind maps. Depending on the artifact, outputs can be downloaded in MP3, MP4, PDF, PPTX, PNG, CSV, JSON, Markdown, or HTML, including batch exports not offered by the web workflow. It fits teams that need repeatable research pipelines or agent-accessible knowledge bases, provided they accept Google account dependencies, quotas, and the breakage risk of an unofficial interface.
A typical workflow authenticates a Google session with notebooklm login, creates a notebook through notebooklm create, and ingests URLs, YouTube pages, PDFs, text, Markdown, Word, EPUB, audio, video, images, Google Drive items, or pasted text with notebooklm source add. notebooklm ask then returns answers grounded in the imported sources with citations, while source add-research can run fast or deep web and Drive research and import its findings. The notebooklm generate command creates audio overviews, videos, slide decks, quizzes, flashcards, reports, infographics, data tables, and interactive or note-backed mind maps. notebooklm download saves those artifacts locally and can retrieve every artifact of a selected type. Python applications use the asynchronous NotebookLMClient.from_storage() client and its notebooks, sources, chat, artifacts, and mind_maps interfaces. Agent deployments can expose the same service through stdio MCP, a self-hosted remote MCP connector, or an experimental localhost FastAPI REST server.
- A researcher imports a large collection of webpages, PDFs, YouTube material, and Drive documents, delegates synthesis to Gemini Notebook, and collects the results with a repeatable script.
- A Claude Code or Codex user exposes internal documentation, RFCs, and architecture notes as a cited project knowledge base that the coding agent can query before making changes.
- A content team turns one curated source set into podcasts, videos, slide decks, blog drafts, quizzes, and flashcards, then downloads each deliverable in bulk.
- An instructor or learner builds notebooks by subject and generates study guides, audio lessons, quizzes, flashcards, and mind maps for each topic.
- An operations team assembles relevant documentation after an alert, asks targeted diagnostic questions, and generates a downloadable briefing document as an incident runbook.
- A user combines master-token authentication,
auth refresh --quiet, and a scheduler to produce recurring personalized audio briefings without an interactive browser session.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
uv tool install "notebooklm-py[browser]"pipx install "notebooklm-py[browser]"uv add notebooklm-pynpx skills add teng-lin/notebooklm-py
- Runtime
- Python 3.10
How do you install or deploy this agent?
Use Python 3.10–3.14 and a Google account that can access Gemini Notebook. For the CLI and agent workflows, install an isolated tool environment and authenticate:
uv tool install "notebooklm-py[browser]"
notebooklm login
notebooklm auth check --test --jsonpipx install "notebooklm-py[browser]" is also documented. The default login downloads roughly 170 MB of Chromium and opens Google sign-in; alternatively, import cookies from an authenticated Chrome profile or configure a master token. For library-only use without Playwright or Chromium, run uv add notebooklm-py. Install the bundled agent skill with notebooklm skill install, or fetch the canonical skill with npx skills add teng-lin/notebooklm-py.
How do you use this agent?
After authentication, this is a minimal CLI workflow:
notebooklm create "My Research"
notebooklm use <notebook_id>
notebooklm source add "https://en.wikipedia.org/wiki/Artificial_intelligence"
notebooklm source add "./paper.pdf"
notebooklm ask "What are the key themes?"
notebooklm generate audio "make it engaging" --wait
notebooklm download audio ./podcast.m4aIn Python, open async with NotebookLMClient.from_storage() as client, then call methods such as client.notebooks.create(), client.sources.add_url(), client.chat.ask(), and client.artifacts.generate_audio(). For remote agent access, self-host the MCP connector behind a Cloudflare or Tailscale tunnel. ChatGPT requires its web-based Developer Mode for this connector, while Claude.ai can also reach a configured connector from its mobile application.
Safety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
FARS trust-control audit
- data-flow disclosure
- sensitive-data handling
What are this agent's strengths and limitations?
- It covers the documented notebook, source, chat, note, research, sharing, and Studio artifact operations through Python, CLI, MCP, and REST entry points.
- It adds automation-oriented operations beyond ordinary web interaction, including batch artifact downloads, source full-text retrieval, programmatic permissions, and saving an entire conversation as a note.
- Exports are unusually broad: quizzes and flashcards in JSON, Markdown, or HTML; data tables in CSV; mind maps in JSON; and slide decks in PDF or PPTX.
- Interactive browser login, existing-browser cookies, durable master tokens, and multiple account profiles support both desktop and unattended deployments.
- The repository documents direct workflows for Claude Code, Codex, OpenClaw, Claude.ai, and ChatGPT connectors.
- It is an unofficial client built on undocumented Google APIs, so endpoint changes can break it without notice.
- The core research, Q&A, and generation functions remain tied to Google Gemini Notebook, an eligible Google account, and network availability.
- Google rate limits and account-tier quotas constrain heavy automation and per-notebook source counts; large jobs may need pacing and notebook partitioning.
- The default authentication path adds Playwright and an approximately 170 MB Chromium download; headless systems require master-token or cookie-management setup.
- Remote MCP access requires operators to host and secure a connector through infrastructure such as a Cloudflare or Tailscale tunnel, and ChatGPT connectors are web-only.
How does this agent compare with similar options?
Compared with the Gemini Notebook web interface, notebooklm-py emphasizes scripted control and local extraction. It supports batch downloads, structured quiz and flashcard exports, mind-map JSON, CSV data tables, source full text, individual slide revision, and programmatic sharing. That additional reach comes with greater maintenance risk because the client relies on undocumented endpoints rather than an official Google SDK.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| NotebookLM Python Automation This agent | 76 · Good | CLIFree + model costs | ★ 20k | today | Python | Codex · Claude Code · Claude.ai |
| Synth Swarms Python Toolkit | 63 · Some gaps | Library / SDK | ★ 81 | today | Python | — |
| mcp-agent | 60 · Some gaps | FrameworkFree + model costs | ★ 8.6k | 10mo ago | Python | Claude.ai · OpenAI API · Claude API |
| Synap — Memory Layer for Production AI Agents | 50 · Major gaps | — | ★ 83 | 1d ago | Python | Codex · Claude Code · OpenAI API · Claude API |
How does FollowAgents rate this agent?
Why each dimension lost points
The security material treats cookies, master tokens, and OAuth state as account-equivalent credentials and documents storage, rotation, and exposure response. MCP/REST default to loopback, require authentication for hosted access, and disclose local-file and external-service flows, supporting stronger scores for least privilege, sensitive data handling, and data-flow transparency. Deductions: the CLI/API expose consequential actions such as deletion, sharing, and upload, but the packet does not show per-action user confirmation throughout; cancellation is not always rollback; and dependency security is mostly guidance, with no dependency-audit evidence in the packet. The project says it is unofficial and points to source, but publisher identity is unverified, so attribution is only partial.
AGENTS, README, and development guidance describe architecture, test categories, and a coverage threshold; the security policy also makes clear that static evidence cannot establish executed test results. The docs acknowledge undocumented APIs that may change. Deductions: AGENTS/CLAUDE are contributor guidance rather than runtime guarantees, some referenced implementation evidence is outside this packet, and the sampled files do not establish the stated project behaviors end to end. Availability depends on Google's undocumented interfaces and optional extras, which static review cannot substantiate. Failure messages are described concretely for authentication, port configuration, and server startup.
The SKILL precisely targets Gemini Notebook, notebooklm-py, and its CLI/Python API, while excluding the generic Gemini API and unrelated content creation. Documentation addresses agents, researchers, library users, CI/headless setups, multiple accounts, and backend choices, with explicit credential, concurrency, profile, and access boundaries. Deduction: setup still spans several environments, extras, and credential paths, which raises the configuration burden for newcomers.
The README provides an overview and entry points; installation, CLI, API, security, configuration, troubleshooting, and ADR materials are separated clearly. Installation commands, platform differences, examples, limitations, MIT licensing, and a security contact process are documented. Deductions: historical compatibility layers and specialized terminology impose naming and maintenance costs; supported-version information and update dates exist, but ownership and release cadence are not fully established.
The product exposes NotebookLM research, chat, generation, and download capabilities through CLI, Python, and MCP/REST, with structured JSON, batch exports, and multiple artifact types. The packet shows concrete scripting value beyond the web UI. Deduction: that value depends on undocumented Google interfaces, credential setup, and quotas, adding operational and maintenance costs.
README examples and installation claims are corroborated in several places by the SKILL, installation guide, and security material; many boundaries and limitations point to specific commands, settings, or files. Deductions: this is a sample packet, and several cited implementations, tests, and release records are absent, so badges, empirical claims, and some security or performance statements cannot be independently checked here. Facts and recommendations are usually distinguishable, but promotional use cases are not verified by this evidence.
- This is a low-confidence static review of a sampled packet; no code, tests, dependencies, or remote API behavior were executed or independently verified.
- The library uses undocumented Google interfaces that may change or be rate-limited; protect master tokens and cookies as account-equivalent credentials.
- Publisher identity is unverified, which means unknown and is not adverse evidence.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
Added - Deferred audio generation (#2506). Queue audio overviews with later=True in Python or --later in the CLI on Web and Android. - Deferred Studio generation (#2519). Queue videos, reports (including study guides), quizzes, flashcards, infographics and slide decks with later=True in Python or --later in the CLI on Web and Android. Scheduled jobs return scheduled; combining --later with --wait is rejected. Cinematic video remains unsupported for deferred generation. - Experimental Android Live Voice (#2509). Android clients can open …View on GitHub ↗ -
Release notes excerpt
[0.8.5] - 2026-10-12 Added - Python 3.15 support (#2480). Add Python 3.15 classifier, documentation, and testing across CI matrices. Fixed - Expired cold-start authentication (#2461, #2464). Exhausted login-redirect recovery raises AuthError, so Python callers can catch it, CLI commands return AUTH_ERROR with exit 1, and MCP tools preserve the re-login hint. Read-only Android auth loading reports the same error without running Web recovery or persisting cookies. - Signed-out sessions misreported as a page-structure change (#2479, #2481). …View on GitHub ↗ -
Release notes excerpt
Added - Android multi-profile REST and MCP serving (#1901). Serve several Android accounts with --profiles, route each request by profile, and isolate profile startup failures and recovery. - Web multi-profile REST and MCP serving (#1901). `notebooklm-server --profiles work,personal and notebooklm-mcp --profiles work,personal` now serve several profiles on the default Web backend, with the same X-NotebookLM-Profile / per-tool profile routing, per-profile isolation, 503 profile_unavailable …View on GitHub ↗
FAQ
Is this an official Google SDK?
What credentials are required?
Can it run fully offline or independently of Google?
What happens when authentication expires or requests are throttled?
notebooklm auth check --test and auth refresh --quiet for diagnosis and cookie maintenance. The project also warns that heavy usage may be throttled, so automated workloads may require slower pacing or multiple notebooks.Is MCP required?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.