notebooklm-py is an unofficial Python library and command-line interface that lets programs and AI agents use Google Gemini Notebook, including features unavailable in its web interface. It supports automated research and content workflows for developers, researchers, and personal projects. The catalogue entries provide agent skills and instructions for operating NotebookLM through coding agents.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/teng-lin/notebooklm-py/agents-mdgit clone --depth 1 https://github.com/teng-lin/notebooklm-pyWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/teng-lin/notebooklm-py/agents-md)<a href="https://agentmods.dev/instructions/teng-lin/notebooklm-py/agents-md"><img src="https://agentmods.dev/badge/instructions/teng-lin/notebooklm-py/agents-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00768 | $0.00768 |
| Opus 5 | $0.00384 | $0.00384 |
| Sonnet 5 | $0.00154 | $0.00154 |
| Haiku 4.5 | $0.00077 | $0.00077 |
Grade A, and why
notebooklm-py AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Repository Guidelines
Status: Active Last Updated: 2026-06-11
Project Structure & Module Organization
src/notebooklm/ contains the async client and typed APIs. Internal feature modules use _ prefixes such as _sources.py, _artifacts.py, _app/, and _runtime/; src/notebooklm/cli/ holds Click adapters, src/notebooklm/mcp/ and src/notebooklm/server/ hold the opt-in MCP and REST adapters, and src/notebooklm/rpc/ handles protocol encoding and decoding. Tests are split by scope: tests/unit/, tests/integration/, tests/server/, and tests/e2e/. Recorded HTTP fixtures live in tests/cassettes/, split by client tier (web/ for batchexecute YAML, android/ for gRPC JSON). Examples are in examples/, and diagnostics live in scripts/.
Build, Test, and Development Commands
Canonical contributor install (full guide: docs/installation.md):
uv sync --frozen --extra browser --extra dev --extra markdown
source .venv/bin/activate
uv run playwright install chromium
uv run pytest
uv run pytest -n auto --dist=worksteal # optional faster local run
uv run ruff check .
uv run ruff format .
uv run mypy src/notebooklm
uv run pre-commit run --all-files
Run uv run pytest tests/e2e -m readonly only after notebooklm login and setting test notebook env vars.
Coding Style & Naming Conventions
Target Python 3.10+, 4-space indentation, and double quotes. Ruff enforces formatting and import order with a 100-character line length. Keep module and test file names in snake_case; prefer descriptive Click command names that match existing groups such as source, label, artifact, and research. Preserve the internal/public split: _*.py and _*/ for implementation, exported types in src/notebooklm/__init__.py.
Testing Guidelines
Put pure logic in tests/unit/, REST adapter coverage in tests/server/, VCR-backed flows in tests/integration/, and authenticated NotebookLM coverage in tests/e2e/. Name tests test_<behavior>.py and record cassettes with NOTEBOOKLM_VCR_RECORD=1 uv run pytest tests/integration/ -v (the integration suite uses vcrpy throughout — there is no test_vcr_*.py glob). Coverage is expected to stay at or above the configured 90% threshold.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +24 tokens per session 5aa2e743940f
- 5d ago First seen · 45 lines · 744 tokens per session scan A 9397c617b105
notebooklm-py AGENTS.md is an instructions file published in the GitHub repository teng-lin/notebooklm-py (19,149 stars, last pushed today), licensed MIT. It adds 768 tokens to every session, about $0.0038 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
ai-toolkit AGENTS.md
AGENTS.md instructions for pipefy/ai-toolkit, covering repository guidelines, documentation map, project structure, import namespace migration: pipefysdk → pipefy and src/pipefysdk/init.py (transitional shim).
atlan-python AGENTS.md
AGENTS.md instructions for atlanhq/atlan-python, covering security, contact, quickstart for agents, security invariants and data classification.
atlan-python CLAUDE.md
Claude Code instructions for atlanhq/atlan-python, covering security, contact, quickstart for agents, security invariants and review checklist.
mailrith-agent-platform GEMINI.md
Gemini CLI instructions for anrawool/mailrith-agent-platform: Use the Mailrith MCP server and the mailrith-email-marketing skill for Mailrith email marketing work.
Copilot-Skills fastapi.instructions.md
Instructions for TheSethRose/Copilot-Skills, covering fastapi instructions, default behaviors, common workflows, basic api endpoint and with database (prisma/sqlalchemy).
dify-workflow-cli AGENTS.md
AGENTS.md instructions for Akabane71/dify-workflow-cli, covering agents.md, 目标, 技术栈约束, python 版本 and 总体编码原则.