NotebookLM, Rewired: How `proyecto26/notebooklm-ai-plugin` Turns Google’s Research App into an Agent Skill
A TypeScript CLI and Claude Code plugin that uses browser-auth plus reverse-engineered RPC calls to let AI agents create NotebookLM artifacts, run deep research, and manage sources without a public API.
- `proyecto26/notebooklm-ai-plugin` matters because it moves NotebookLM out of the browser and into an agent workflow.
- Its real differentiator is not a public API wrapper, but a skill layer that teaches Claude Code when and how to act.
- The repo’s technical trick is a one-time browser-auth flow followed by reverse-engineered RPC calls against Google’s internal backend.
- Its broader lesson is that web apps with hidden surfaces can become machine-readable capabilities long before they become official platforms.
NotebookLM as a Skill, Not a Destination
Most NotebookLM tutorials start with the app. This repo starts with a different premise: NotebookLM can be a capability inside an AI loop, not a tab you open and babysit. That shift matters because it changes the unit of work from clicks to delegated tasks.
Bring the full Google NotebookLM experience to Claude Code.
That line from the README is the entire thesis in one sentence. The plugin is not trying to outdo NotebookLM. It is trying to make NotebookLM reachable from the same place an agent already plans, writes, and executes.
The Three-Layer Trick Behind the Plugin
At a high level, the architecture is clean. `SKILL.md` gives the model instructions. `main.ts` turns intent into commands. The lower layer handles NotebookLM itself, using browser authentication and private RPC calls instead of an official API.
// Simplified flow
const session = await loginWithCDP();
await saveCookies(session.cookies);
const rpc = new RPCClient(session);
const artifact = await generateArtifact({ type: 'mind_map', sourceId });
That division is the repo’s real design choice. It treats the model, the CLI, and the backend as separate layers, which makes the whole thing easier to reason about and easier for an agent to use repeatedly.
Why the Auth Flow Matters More Than It Looks
The authentication flow is not a convenience feature. It is the enabling constraint. By using Chrome DevTools Protocol to authenticate a real Google session and persist cookies locally, the plugin avoids the need for a special partner key or a separate NotebookLM account model.
That matters for one reason: accessibility. An individual developer can use the same Google session they already have, then hand off the rest to the agent. The system is less elegant than a clean OAuth API, but far more practical for a single-user tool.
Inside the Shadow API
This is where the project stops looking like a wrapper and starts looking like reverse engineering. The repo parses NotebookLM’s internal `batchexecute` responses, strips the anti-XSSI prefix, extracts CSRF and session tokens, and walks through nested JSON structures that are intentionally not friendly to outsiders.
// Shape, not exact implementation
const body = await response.text();
const cleaned = body.replace(/^\)\]\}'\n/, '');
const parsed = JSON.parse(cleaned);
const url = findUrlInNested(parsed);
The most interesting part is not that this works. It is that the code is built to survive Google’s peculiar response shapes. The repo does not assume a polite API. It hunts for the useful field inside the mess.
Artifacts, Not Just Outputs
NotebookLM does not only make one thing. It can produce multiple artifact types, and the repo treats that as the product layer. `artifact-generator.ts` maps user intent to the exact backend shape each output needs, including the special path for mind maps.
| Artifact type | What the repo is doing | Why it matters |
|---|---|---|
| Audio overview | Builds a payload that requests a podcast-style output | Turns research into something you can listen to |
| Video | Uses a backend-specific payload shape | Shows that the plugin understands Google’s internal expectations |
| Briefing | Selects a compact summary artifact | Makes NotebookLM useful for quick review |
| Mind map | Uses a distinct RPC path and structure | Proves the tool handles nonstandard artifact logic |
| Source handling | Adds and manages inputs before generation | Keeps the workflow anchored in evidence |
That table points to the important distinction: the repo is not just calling NotebookLM. It is negotiating with NotebookLM’s artifact system. The work is in matching intent to the backend’s idea of a valid request.
Why This Feels Native to Claude Code
The skill model changes the user experience. A human does not have to remember a command reference and operate every step manually. Claude Code can decide when the skill should run, pass the right parameters, and keep the workflow moving as part of a broader task.
That makes the plugin feel less like a utility script and more like an extension of the agent’s memory. The user asks for research. The model knows when NotebookLM is the right instrument. The repo turns that judgment into action.
How It Compares to notebooklm-py and Other Alternatives
The competition is not really about features. It is about posture. Some tools offer generic programmatic access. This one offers agent-native integration, which is a narrower claim and a stronger one for Claude users.
| Project | Interface | Main strength | Main tradeoff |
|---|---|---|---|
| `proyecto26/notebooklm-ai-plugin` | Claude Code skill plus CLI | Native agent workflow | Tied closely to Claude and NotebookLM internals |
| `notebooklm-py` | Python CLI and API | Broad programmability | Less opinionated about agent orchestration |
| `notebooklm-sdk` | SDK | Useful protocol reference | Closer to a library than a workflow layer |
| `notebooklm-oss` | Local service | Privacy and local control | Different product goal entirely |
This is why the plugin stands out. It is not trying to be the most portable NotebookLM tool. It is trying to be the most natural one inside Claude Code, and that is a different kind of value.
What This Repo Suggests About the Future of AI Tools
The larger pattern is bigger than NotebookLM. Any web app with a hidden RPC surface, session-based auth, and consistent output structure can become a machine-readable capability. Open-source developers will keep finding these seams, because agents reward tools that can be invoked, not just visited.
That is the real story here. The repo is not just a clever bridge to a Google product. It is a preview of a software world where the most useful tools are the ones an agent can quietly call in the background.





