notebooklm-py AGENTS.md

notebooklm-py AGENTS.md is an instructions file for Codex, OpenCode from teng-lin/notebooklm-py. It costs 768 tokens per session, scanned A, original, MIT.

Repository instructions for coding agents working on the notebooklm-py Python project. They cover its folders, coding conventions, build tools, tests, and checks.

In plain words
What is it for?
Navigating the source and test directories, running tests and quality checks, and following the project’s naming and organization rules.
Why use it?
They reduce guesswork about where code belongs and which checks should run before changes are accepted.

Instructions file for CodexOpenCode

About the project

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.

teng-lin/notebooklm-py · 19,149 stars · on GitHub

Install

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.

agentmods
npx agentmods add instructions/teng-lin/notebooklm-py/agents-md
Clone the repo
git clone --depth 1 https://github.com/teng-lin/notebooklm-py

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for notebooklm-py AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/teng-lin/notebooklm-py/agents-md.svg)](https://agentmods.dev/instructions/teng-lin/notebooklm-py/agents-md)
Your own site
<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>
Per session 768 This file is loaded in full into every session.
When invoked 768 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured yesterday against content hash 5aa2e743940f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

AGENTS.md · 45 lines

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.

Read the full file on GitHub · 45 lines

Changes

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.

  1. yesterday Changed · +24 tokens per session 5aa2e743940f
  2. 5d ago First seen · 45 lines · 744 tokens per session scan A 9397c617b105

Subscribe to this mod's changes

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.