Gemini Notebook by Chryzalide (agy-gemini-notebook-plugin)
Provides tools for invoking and piloting Google Gemini Notebooks (NotebookLM) with personal Google accounts, including notebook CRUD, source management, grounded Q&A with citations, research, notes, and Studio artifact generation.
Integrates with the official Google Cloud Discovery Engine v1alpha API for NotebookLM Enterprise, enabling notebook CRUD, sharing, file uploads, URL/YouTube/Drive source ingestion, Audio Overview generation, and Enterprise grounded Q&A.
Supports source discovery and research across Google Drive and ingestion of Google Drive sources into notebooks.
Allows YouTube URLs to be ingested as sources into Gemini Notebooks for grounded querying and research.
📓 Gemini Notebook by Chryzalide (agy-gemini-notebook-plugin)
Invoke and pilot Gemini Notebooks (NotebookLM & NotebookLM Enterprise) from Google Antigravity 2, VS Code, Cursor, Claude Code, and the CLI.
In the Gemini web app, users can attach a Gemini Notebook (NotebookLM) to a conversation for grounded, source-backed context. Gemini Notebook by Chryzalide (agy-gemini-notebook-plugin) is an independent, open-source community plugin that brings first-class Gemini Notebook integration—plus autonomous notebook piloting, Fast & Deep Research, and Studio Artifact generation—directly into Google Antigravity 2, VS Code, and any MCP-compatible agent harness.
🎬 Visual Overview & Interactive Demo

1. Autonomous Deep Research $\rightarrow$ Local Project .md Synthesis (agy-gemini-notebook)

2. Google Antigravity 2 Auxiliary Pane Sidecar UI (sidecar://gemini-notebook/notebook_context_panel/ui.html)
Related MCP server: notebooklm-mcp
✨ Key Features
🎯 Invoke Notebooks by ID, Alias, or Fuzzy Title (
notebook_invoke¬ebook_query):Attach a default notebook (plus named aliases) to your repository via
.agents/notebook.json.Invoke any notebook on the fly by ID, workspace alias, or fuzzy title match—with optional one-step grounded Q&A and inline source citations.
🔬 Autonomous Fast & Deep Research (
notebook_research):Pilot NotebookLM's Fast Research (
mode="fast"), Deep Research (mode="deep"), and Source Discovery (mode="discover") across the Web or Google Drive, and automatically import verified sources into your notebook.
📝 Documentary Research $\rightarrow$ Local Markdown Synthesis:
Turn research findings and curated notebook Q&A directly into structured, source-cited
.mddecision records and technical briefs inside your local project workspace.
🏢 Engine 1 — Official Google Cloud API (
v1alphaDiscovery Engine):100% official OAuth 2.0 authentication via
gcloud auth print-access-token(no browser cookies required).Create/get/delete/share notebooks, upload local files (
sources:uploadFile), ingest URLs/YouTube/Drive (sources:batchCreate), generate Audio Overviews, and run Enterprise Grounded Q&A (servingConfigs:answer).
💬 Engine 2 — Full RPC Bridge (
notebooklm-pyfor Consumer & Enterprise):Automatic Dual-Engine fallback when
GCP_PROJECT_NUMBERis not set—giving personal Google accounts (notebooklm.google.com) full CRUD, file uploads, source search, grounded Q&A with inline citations, Deep Research, Notes, and Studio Artifacts (Audio Overviews, Briefing Docs, Study Guides, Mind Maps, Quizzes, Flashcards, Slide Decks).
🖥️ Multi-Environment Ready (Antigravity 2 + VS Code + Cursor + CLI):
Antigravity 2 Plugin: Native MCP Server + Skill + Grounding Rule + Auxiliary Pane Sidecar UI (Gemini Notebook by Chryzalide).
VS Code / Cursor / Claude Code: Portable
scripts/run_mcp.shwrapper + MCP Resources (notebook://active) & Prompts (invoke_notebook,deep_research_notebook) +--transport stdio|sse|streamable-http.Standalone CLI (
agy-gemini-notebook): Setup, authenticate, invoke, query, sync files, and launch Deep Research from any terminal or agent bash tool.
💡 Use Cases & Workflows
1. Documentary Research & Decision Support $\rightarrow$ Local Project .md Files (Primary Workflow)
When your project needs documentary research to support technical, architectural, or product decision-making, the coding agent pilots a complete end-to-end research-to-documentation loop:
flowchart LR
A["1. Decision Need in Project"] --> B["2. Invoke Existing or Create New Gemini Notebook"]
B --> C["3. Run Deep Research or Query Existing Sources"]
C --> D["4. Synthesize Findings with Citations"]
D --> E["5. Write Local .md Files in Repository (docs/research/, docs/adr/)"]Open or Create a Notebook: The agent either invokes an existing curated Gemini Notebook (
notebook_invoke(target="...")) or creates a dedicated notebook for the topic (notebook_create(title="...", attach_to_workspace=True)).Research or Query:
New Documentary Research: The agent launches
notebook_research(query="...", mode="deep", source="web", import_sources=True)to discover, verify, and ingest external web or Google Drive sources into the notebook.Existing Corpus Q&A: Or the agent queries documents already curated inside the notebook via
notebook_queryandnotebook_search_sources.
Generate Local Project Markdown Files: Using the grounded answers, synthesized research report, and source citations returned by the notebook, the agent writes structured
.mdfiles directly inside your local project (e.g.,docs/research/vector-db-benchmark.md,docs/adr/004-auth-architecture.md, comparative matrices, or implementation plans) that are directly tailored to your codebase.
Example Agent Prompt in Antigravity 2 / VS Code:
"We need to choose between WebSockets, SSE, and WebTransport for our real-time notification pipeline. Open our 'System Architecture' Gemini Notebook (or create a new one if needed), run a documentary research comparing latency, proxy compatibility, and scaling trade-offs, query the sources for our constraints, and create
docs/research/realtime-transport-decision.mdin the local project with your cited recommendations."
2. Persistent Domain & Specification Grounding Across Coding Sessions
Bind your project's canonical Gemini Notebook (containing PRDs, API specifications, regulatory PDFs, and design docs) once via .agents/notebook.json. Whenever you ask the agent to implement a feature or verify business rules, it automatically queries notebook_query or notebook_search_sources before writing code—eliminating hallucinations and keeping every answer grounded with explicit [Notebook Title — Source Name] citations.
3. Bi-Directional Knowledge Sync (Local Repo $\leftrightarrow$ Gemini Notebook)
Keep your shared Gemini Notebook synchronized with your repository's latest architecture docs (README.md, AGENTS.md, docs/*.md, PDFs) using notebook_sync_files. What your engineering agent documents locally becomes immediately queryable in NotebookLM by product managers, researchers, and teammates.
4. Automated Briefings, Study Guides & Podcast Audio Overviews
After ingesting technical documentation or completing a Deep Research session, use notebook_generate_artifact (study_guide, briefing_doc, mind_map, quiz, slide_deck) or notebook_create_audio (deep-dive, brief, critique, debate) to produce executive summaries and onboarding materials directly from your workspace.
🏗️ Dual-Engine Architecture
flowchart LR
subgraph Harnesses["Agent Harnesses & IDEs"]
AGY["Antigravity 2 (Plugin + Sidecar)"]
VSC["VS Code / Cursor / Claude Code"]
CLI["agy-gemini-notebook CLI"]
end
subgraph Server["Gemini Notebook by Chryzalide"]
MCP["FastMCP / MCPServer (21 Tools + Resources + Prompts)"]
end
subgraph GCP["Engine 1: Official GCP API (v1alpha REST)"]
REST["discoveryengine.googleapis.com/v1alpha/.../notebooks"]
end
subgraph RPC["Engine 2: RPC Bridge (notebooklm-py)"]
NLM["notebooklm.google.com (RAG, Deep Research, Studio)"]
end
AGY --> MCP
VSC --> MCP
CLI --> MCP
MCP -->|"CRUD, Upload, Share, Audio, Answer (gcloud OAuth2)"| REST
MCP -->|"Full CRUD, Grounded Q&A, Deep Research, Studio (RPC)"| NLM⚖️ Google Terms of Service, OAuth Policy & Dual-Engine Compliance
Because this plugin bridges both Google Cloud Enterprise APIs and consumer Google NotebookLM, it is designed around strict separation of credentials and transparent compliance boundaries:
Zero Gemini CLI / Antigravity OAuth Siphoning:
This plugin never reads, extracts, or repurposes internal OAuth tokens belonging to Google Antigravity 2, Gemini CLI, or Cloud Code (
cloudcode-pa.googleapis.com).
Zero Automated Browser Sign-In on
accounts.google.com:In accordance with Google Identity's OAuth 2.0 Policy ("Use Secure Browsers"), this plugin never launches a Playwright/Puppeteer/Selenium-controlled browser window on
accounts.google.comand never uses stealth flags such as--disable-blink-features=AutomationControlled.
Engine 1 — Official Google Cloud NotebookLM Enterprise (
v1alphaREST API) — 100% Official & Supported:Uses standard Google Cloud OAuth 2.0 Bearer tokens (
gcloud auth login/gcloud auth print-access-token) againsthttps://{ENDPOINT_LOCATION}-discoveryengine.googleapis.com/v1alpha/projects/{PROJECT_NUMBER}/locations/{LOCATION}/notebooks.Recommended for corporate, production, and strict-compliance environments.
Engine 2 (rpc_bridge.py / notebooklm-py) — Unofficial Web RPC Grey-Area Notice:
Consumer Google NotebookLM (notebooklm.google.com) does not yet offer a public OAuth 2.0 API. To support personal Google accounts, grounded conversational RAG, and Deep Research, Engine 2 imports cookies from a real system browser session where you are already signed in (--browser-cookies auto|chrome|brave|firefox|edge|chromium|...) and communicates with notebooklm.google.com's internal batchexecute RPC endpoints via notebooklm-py.
Because Google's Terms of Service generally restrict unauthorized automated access to non-public web endpoints, Engine 2 operates in a technical "grey area" (similar to community NotebookLM MCP clients):
Use Engine 2 at your own discretion for personal workflows, experimentation, and low-frequency interactive queries from your IDE.
Avoid high-volume automated scraping or bulk unattended polling on personal Google accounts.
For strict organizational compliance, configure Engine 1 (
GCP_PROJECT_NUMBER+gcloud auth login).
🚀 Installation & Setup Workflow
To make installation and first-time onboarding effortless across Antigravity 2, VS Code, Cursor, and the CLI, Gemini Notebook by Chryzalide ships with a 5-step Setup Workflow (./scripts/setup.sh and agy-gemini-notebook setup).
flowchart LR
S1["1. Clone & Python .venv"] --> S2["2. Cookie Reader Check (rookie-cookies)"]
S2 --> S3["3. Register Plugin in Antigravity 2"]
S3 --> S4["4. Connect Browser Session or gcloud OAuth"]
S4 --> S5["5. Reload IDE & Attach Notebook"]Option 1: Automated 1-Command Setup (Recommended)
Clone the repository and run ./scripts/setup.sh:
git clone https://github.com/Chryzalide/agy-gemini-notebook-plugin.git
cd agy-gemini-notebook-plugin
./scripts/setup.sh --loginWhat ./scripts/setup.sh does automatically:
[Step 1/5] Python Environment & Dependencies: Creates
.venv(viauvorpython3 -m venv) and installsagy-gemini-notebook-plugin[rpc,dev](includingnotebooklm-py[cookies]).[Step 2/5] Local Browser Session Reader Verification: Verifies
rookie-cookiesso the plugin can import your existing session in ~1 second without downloading a 300 MB Playwright Chromium binary or automatingaccounts.google.com.[Step 3/5] Antigravity 2 Plugin Registration: Creates
~/.gemini/config/plugins/gemini-notebookand enables Gemini Notebook by Chryzalide via the Antigravity 2 Language Server if running.[Step 4/5] 1-Second Session Connection:
Personal / Workspace Google Account (
notebooklm.google.com— Engine 2): Imports your existing authenticated session from Chrome, Brave, Firefox, Edge, Chromium, Vivaldi, Arc, or Safari (--browser-cookies auto). You only need to be logged intohttps://notebooklm.google.com/in your normal browser.Google Cloud NotebookLM Enterprise (
v1alphaREST — Engine 1): ChecksGCP_PROJECT_NUMBERandgcloud auth login.
[Step 5/5] Health Verification: Runs
agy-gemini-notebook statusto confirmsetup_ready: true.
Reload Antigravity 2 Once After Initial Installation: When a new plugin or sidecar is added to ~/.gemini/config/plugins/, reload or restart Antigravity 2 once so the IDE starts the Gemini Notebook by Chryzalide Sidecar HTTP server and MCP server.
Option 2: Step-by-Step Manual Setup Checklist
If you prefer to execute each setup action manually:
Install the Python environment:
uv sync --all-extrasRegister the plugin in Google Antigravity 2:
mkdir -p ~/.gemini/config/plugins ln -s "$(pwd)" ~/.gemini/config/plugins/gemini-notebookAuthenticate your preferred engine:
Engine 1 (Official Google Cloud NotebookLM Enterprise —
v1alphaREST API):export GCP_PROJECT_NUMBER="123456789012" export GCP_LOCATION="global" # global, us, or eu export GCP_ENDPOINT_LOCATION="global" # global, us, or eu .venv/bin/agy-gemini-notebook login --gcloudEngine 2 (Personal / Workspace Google Account —
notebooklm.google.com, Grey Area): Make sure you are signed in to https://notebooklm.google.com/ in your regular browser, then import the session in 1 second:.venv/bin/agy-gemini-notebook login --browser-cookies auto # Or specify a browser explicitly: chrome, brave, firefox, edge, chromium, vivaldi, arc, safari
Verify readiness:
.venv/bin/agy-gemini-notebook statusReload Antigravity 2 and open the Sidecar UI:
Open
Overview -> Plugins -> Gemini Notebook by Chryzalidein the top-right auxiliary pane menu, or click[Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html)in chat.
Option 3: In-IDE Agent-Guided or 1-Click Sidecar Setup
Once the plugin is linked and Antigravity 2 (or VS Code / Cursor) is running:
Via the Sidecar UI (Antigravity 2): Open the Gemini Notebook by Chryzalide panel, choose your browser (
Auto-detect/Chrome/Brave/Firefox/ etc.), and click "🔗 Connect Session from Browser" (or "☁️ Google Cloud Login (gcloud)" for Engine 1).Via Chat (Antigravity 2 / VS Code / Cursor): Ask the agent:
"Run the Gemini Notebook setup and connect my browser session for this workspace"
The agent will automatically:
Call
notebook_statusto inspect your environment.Call
notebook_login(browser_cookies="auto")to import your active browser session in 1 second (or openhttps://notebooklm.google.com/in your system browser if you aren't logged in yet) and display the Dual-Engine compliance notice.List your notebooks (
notebook_list) or create a new one (notebook_create) and bind it to.agents/notebook.json.Surface the clickable
[Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html)sidecar pill link.
🔌 Multi-IDE & CLI Usage
VS Code (GitHub Copilot MCP / Cline / Roo Code) & Cursor
Add the server to your workspace .vscode/mcp.json (or .cursor/mcp.json). Because authentication is stored centrally in ~/.notebooklm/storage_state.json (or via gcloud), connecting your session once works simultaneously across Antigravity 2, VS Code, Cursor, and the CLI:
{
"servers": {
"gemini_notebook_mcp": {
"type": "stdio",
"command": "/path/to/agy-gemini-notebook-plugin/scripts/run_mcp.sh",
"env": {
"AGY_WORKSPACE_DIR": "${workspaceFolder}"
}
}
}
}Standalone CLI (agy-gemini-notebook)
Use the CLI from any terminal or agent shell tool:
# Run the guided setup & health check workflow (imports existing browser session)
agy-gemini-notebook setup --login
# Check engine auth, active workspace binding, and compliance notice
agy-gemini-notebook status
# Import Google NotebookLM session from your normal browser (auto, chrome, brave, firefox, etc.)
agy-gemini-notebook login --browser-cookies auto
# Or authenticate Official Engine 1 via Google Cloud SDK
agy-gemini-notebook login --gcloud
# Invoke a notebook by fuzzy title or alias and ask a grounded question
agy-gemini-notebook invoke "System Architecture" -q "What are the latency SLAs?"
# Create a notebook and run autonomous Deep Research with source auto-import
agy-gemini-notebook create "WebGPU Compute Patterns" --attach --alias webgpu
agy-gemini-notebook research "WebGPU subgroup operations performance" --mode deep
# Sync local markdown/PDF specs into the active notebook
agy-gemini-notebook sync README.md docs/architecture.md🛠️ Exposed MCP Tools (gemini_notebook_mcp)
Category | MCP Tool | Engine | Description |
Workspace & Invocation |
| Local + Dual | Show active |
| Dual | Import an existing system browser session ( | |
| Local | Attach a default notebook (or register an | |
| Dual | Resolve a notebook by ID, alias, or fuzzy title, inspect sources, and optionally run a grounded query | |
Notebook CRUD & Sharing |
| Dual | List notebooks ( |
| Dual | Retrieve notebook metadata and normalized source list | |
| Dual | Create a new Gemini Notebook (and optionally bind it to the workspace) | |
| Dual | Delete one or more notebooks | |
| Engine 2 (RPC) | Rename an existing notebook | |
| Dual | Share a notebook with users or toggle public link sharing | |
Sources & Code Sync |
| Dual | Upload local workspace files ( |
| Dual | Ingest a web URL, raw text, YouTube video, or Google Drive document | |
| Dual | Delete specific sources from a notebook | |
| Engine 2 (RPC) | Keyword/semantic search across sources inside a notebook | |
| Engine 2 (RPC) | Extract the full indexed plain text of a specific source | |
Grounded Q&A & Research |
| Dual | Ask a grounded RAG question with inline citations (and optionally save as a note) |
| Engine 2 (RPC) | Launch Fast Research ( | |
| Engine 2 (RPC) | Poll or cancel an asynchronous research task and auto-import discovered sources | |
Studio Artifacts & Notes |
| Dual | Generate a podcast Audio Overview |
| Engine 2 (RPC) | Generate a Briefing Doc, Study Guide, Mind Map, Quiz, Flashcards, or Slide Deck | |
| Engine 2 (RPC) | List, create, update, or delete persistent notes inside a notebook |
📦 Versioning & Changelog
This project follows strict, transparent versioning. Every version update and change made to the repository must be documented, explained, and recorded in this section of README.md (and kept synchronized across pyproject.toml, plugin.json, and src/agy_gemini_notebook/__init__.py).
v1.0.7 (2026-11-07) — Comprehensive Security Hardening (Cloudflare 6-Phase Security Audit Remediation)
GCP Discovery Engine URL Authority & Path-Segment Allowlisting (
src/agy_gemini_notebook/config.py,src/agy_gemini_notebook/engines/gcp_enterprise_rest.py,src/agy_gemini_notebook/mcp_server.py):Why: Previously,
gcp_endpoint_location,gcp_location,gcp_project_number,gcp_engine_id,notebook_id, andsource_idread from.agents/notebook.jsonor tool arguments were interpolated directly intohttps://{endpoint_location}-discoveryengine.googleapis.com/v1alpha/projects/{project_number}/locations/{location}/notebooks/{notebook_id}. A malicious workspace binding settinggcp_endpoint_locationto an attacker domain (attacker.example.com/collect#) could hijack the URL authority and exfiltrate the user'sAuthorization: Bearer <gcloud_token>OAuth 2.0 token (SSRF/ credential exfiltration), while unencoded/or..segments in resource IDs allowed REST path traversal.How: Added strict allowlist and regex validators (
validate_gcp_endpoint_locationrestricted to{"us", "eu", "global"},validate_gcp_location,validate_gcp_project_number, andextract_and_validate_resource_id+_safe_segmentwithurllib.parse.quote(..., safe="")) enforced both on PydanticWorkspaceNotebookBindingdeserialization and insideGcpNotebookEnterpriseClient. Also stripped CR/LF control characters fromX-Goog-Upload-File-Name.
Untrusted Workspace Script Execution Prevention (
mcp_config.json,scripts/run_mcp.sh):Why:
mcp_config.jsonpreviously iterated over"$(pwd)"before"$HOME/.gemini/config/plugins/gemini-notebook", meaning opening an untrusted repository containing a maliciousscripts/run_mcp.shwould execute arbitrary shell commands on MCP server startup. In addition,scripts/run_mcp.shexportedPYTHONPATH="${PLUGIN_DIR}/src:${PYTHONPATH:-}", leaving a trailing colon (:) whenPYTHONPATHwas unset (which Python interprets as adding the current working directory tosys.path).How: Removed
"$(pwd)"frommcp_config.jsonso only trusted plugin installation directories ($HOME/.gemini/config/plugins/gemini-notebookand$HOME/.gemini/extensions/gemini-notebook) are searched, and updatedscripts/run_mcp.shto useexport PYTHONPATH="${PLUGIN_DIR}/src${PYTHONPATH:+:${PYTHONPATH}}".
Sidecar HTTP API Authentication, Loopback Origin Enforcement & Static File Lockdown (
sidecars/notebook_context_panel/server.py):Why:
SidecarRequestHandlerpreviously emittedAccess-Control-Allow-Origin: *, did not verifyX-Sidecar-Tokenon/api/*routes, accepted unboundedContent-Lengthbodies, fell back toSimpleHTTPRequestHandler.do_GET()(exposingSIDECAR_DIRfiles such as/server.pyand/sidecar.json), and allowed query/bodyworkspace_diroverrides to escape the server's bound workspace.How: Added constant-time
hmac.compare_digestverification ofX-Sidecar-Token/?token=(generating a 256-bitsecrets.token_urlsafe(32)token inmain()when not pre-set by the host IDE), restrictedOrigin/ CORS headers exclusively to local loopback/webview origins (403 Forbiddenon external cross-origin requests), addedX-Content-Type-Options: nosniff,X-Frame-Options: SAMEORIGIN, andContent-Security-Policyheaders, replaced thesuper().do_GET()fallback with an explicit404JSON response, bounded request bodies to1 MiB(MAX_BODY_BYTES) andpage_sizeto1..200, and pinned_resolve_allowed_workspace()to prevent escaping a boundworkspace_dir.
Workspace File Containment & Sensitive-File Blocklist (
src/agy_gemini_notebook/config.py,mcp_server.py,gcp_enterprise_rest.py,rpc_bridge.py,server.py):Why:
notebook_sync_filesandPOST /api/syncpreviously accepted arbitrary absolute paths (e.g./etc/passwd,~/.ssh/id_rsa) or../traversal sequences and read files of unbounded size into memory before uploading them to external NotebookLM notebooks.How: Added
validate_workspace_file_path()enforcingcandidate.resolve().is_relative_to(ws_root), blocking dot-directories and sensitive credential filenames (.env,.git,.ssh,.aws,.gnupg,.notebooklm,.notebooklm-auth,storage_state.json,server_info.json,id_rsa,id_ed25519), and enforcing a50 MiB(MAX_UPLOAD_BYTES) upload cap. Also hardenedresolve_workspace_dir()andget_binding_path()to stop parent traversal before$HOMEand/.
CLI Option Injection Prevention &
0600Session Cookie Permissions (src/agy_gemini_notebook/engines/rpc_bridge.py,scripts/setup.sh,rules/AGENTS.md,skills/gemini-notebook/SKILL.md):Why: In
notebooklm-py,--browser-cookiesuses Click'sis_flag=False, flag_value="auto"; passing abrowser_cookiesvalue starting with--(such as--storage=/tmp/hijack.json) caused Click to interpret the argument as a separate CLI flag. Furthermore,.notebooklm-auth/storage_state.jsonand.agents/notebook.jsonwere created with defaultumaskpermissions instead of owner-only0600.How: Restricted
browser_cookiestoALLOWED_COOKIE_BROWSERS(auto,chrome,brave,firefox,edge,chromium,vivaldi,arc,safari), rejected leading dashes or control characters inaccountandprofile, enforced0o700directory and0o600file permissions via_secure_storage_permissions()andsave_workspace_binding(), updatedscripts/setup.shto preferuv sync --locked --all-extras, and added explicit prompt-injection and cookie-import consent guardrails torules/AGENTS.mdandskills/gemini-notebook/SKILL.md.
v1.0.6 (2026-11-02) — Deep Research report_id Polling Fix & CLI --wait / --report-id Support
Fix Deep Research Polling, Waiting & Source Import Identifier (
src/agy_gemini_notebook/engines/rpc_bridge.py):Why: In NotebookLM's
START_DEEP_RESEARCHRPC response (client.research.start(..., mode="deep")), slot 0 (started.task_id) is a transient session ID (sessionId) that is never matched byPOLL_RESEARCH,wait_for_completion,IMPORT_RESEARCH, orCANCEL_RESEARCH, whereas slot 1 (started.report_id) is the actual pollable and importable task identifier. Previously,NotebookRpcBridge.run_research()passedstarted.task_idinstead ofstarted.report_idtoclient.research.wait_for_completion(), causingresearch --mode deep(withwait=True) to poll an unmatchable ID (NOT_FOUND) until the wait timeout always expired—even when the Deep Research run had completed in ~10 minutes. Similarly,research --no-waitreturned the non-pollablestarted.task_idintask_id, requiring users to manually pass--task-id <report_id>toresearch-status.How: Updated
NotebookRpcBridge.run_research()to selectpoll_task_id = report_id if (mode_norm == "deep" and report_id) else start_task_idand passpoll_task_idtoclient.research.wait_for_completion()and_import_task_sources(). Whenwait=False(--no-wait),task_idandpoll_task_idnow both expose the pollable identifier (report_idfor Deep Research,start_task_idfor Fast Research) alongsidereport_idandstart_task_id.
Explicit
--waitonresearchand--report-id/--poll-task-idonresearch-status(src/agy_gemini_notebook/cli.py,src/agy_gemini_notebook/mcp_server.py,tests/test_rpc_bridge_and_mcp.py):Why: Agent harnesses and CLI users frequently pass
--waitexplicitly toagy-gemini-notebook research(consistent withsync --wait,add-source --wait,research-status --wait,audio --wait, andgenerate --wait) or pass--report-id/--poll-task-idtoresearch-status/notebook_research_status.How: Added
--waitto theresearchCLI subparser, added--report-idand--poll-task-idoptions toresearch-statusandnotebook_research_status, and added regression tests intests/test_rpc_bridge_and_mcp.pyverifying that Deep Research fails if polled withstart_task_idand succeeds usingreport_id.
v1.0.5 (2026-10-22) — Visual Demonstration Suite (Animated Walkthrough GIF, Sidecar UI & CLI Deep Research Previews)
Animated 4-Step Walkthrough GIF & High-DPI Previews (
assets/demo.gif,assets/sidecar-preview.png,assets/cli-research-preview.png,README.md):Why: Visitors, contributors, and community listings (GitHub, Reddit, Hacker News, LinkedIn, X/Twitter, and MCP directories) need an immediate, visual demonstration of how the Antigravity 2 Sidecar UI (
sidecar://gemini-notebook/notebook_context_panel/ui.html) and theagy-gemini-notebookCLI work together across setup, grounded Q&A, autonomous Deep Research $\rightarrow$ local.mdsynthesis, and Studio artifact generation.How: Rendered a 4-step animated walkthrough (
assets/demo.gif) and standalone high-resolution previews (assets/sidecar-preview.pngandassets/cli-research-preview.png) directly from the live Dark Modesidecars/notebook_context_panel/ui.htmllayout and CLI output, and embedded them into a new## 🎬 Visual Overview & Interactive Demosection at the top ofREADME.md.
v1.0.4 (2026-10-22) — Google Sign-In Policy Compliance, 1-Click Local Browser Session Import & Explicit Grey-Area Alerts
Elimination of Automated Playwright Sign-In on
accounts.google.com(src/agy_gemini_notebook/engines/rpc_bridge.py,pyproject.toml,scripts/setup.sh):Why: Previously,
notebook_logininvokednotebooklm loginwithout--browser-cookies, which spawned a Playwright-controlled Chromium browser onaccounts.google.comusing--disable-blink-features=AutomationControlledandignore_default_args=["--enable-automation"]. Automating Google's sign-in page with stealth flags contravenes Google Identity's OAuth 2.0 "Use Secure Browsers" policy and required a 300 MB Playwright Chromium download.How: Switched
pyproject.tomlfromnotebooklm-py[browser]tonotebooklm-py[cookies](rookie-cookies) and refactoredNotebookRpcBridge.login()so it never launches Playwright againstaccounts.google.com. Instead, it imports existing authenticated cookies from the user's real OS browser (--browser-cookies auto|chrome|brave|firefox|edge|chromium|vivaldi|arc|safari) in ~1 second, supportsopen_system_browser=True(via Python'swebbrowser.open("https://notebooklm.google.com/")) so the user signs in exclusively inside their genuine system browser, and supportsgcloud=True(gcloud auth login) for Engine 1.
Explicit ToS & Grey-Area Compliance Notices Across UI, MCP, CLI & Docs (
rpc_bridge.py,mcp_server.py,sidecars/notebook_context_panel/ui.html,README.md,SKILL.md,rules/AGENTS.md):Why: While Engine 1 (
discoveryengine.googleapis.com/v1alpha) is 100% official Google Cloud OAuth 2.0, consumernotebooklm.google.comdoes not yet offer a public OAuth API and relies on internalbatchexecuteweb RPCs (a ToS grey area). Users need transparent, prominent warnings before choosing between Engine 1 and Engine 2.How: Added
COMPLIANCE_NOTICEtonotebook_status,notebook_login, andauth_requiredMCP responses; added a dedicated## ⚖️ Google Terms of Service, OAuth Policy & Dual-Engine Compliancesection toREADME.md; and added a visible ⚠️ Compliance & Grey-Area Notice banner plus browser selector (#cookie-browser-select), "🔗 Connect Session from Browser", "🌐 Open notebooklm.google.com", and "☁️ Google Cloud Login (gcloud)" buttons to the Sidecar UI (ui.html), along with semantic<header>/<main>landmarks, explicit<label for>associations, and IME-safeEnterhandling (!e.isComposing).
v1.0.3 (2026-10-22) — Sidecar Dark Mode Contrast Fix & Isolated .venv Sign-In Subprocess Resolution
High-Contrast Dark Mode & Namespaced CSS Tokens (
sidecars/notebook_context_panel/ui.html):Why: In Antigravity 2 Dark Mode on Linux, section headers (
h2) and secondary labels (color: var(--muted)) rendered as dark gray/black on dark#1e1f20cards for two reasons: (1) Antigravity 2's sidecar host bridge (/preload.js) injects shadcn-style inline CSS custom properties onto<html style="--muted: #18191b; --card: #1e1f20; ...">where--mutedis a dark surface background rather than a foreground text color, overriding:root { --muted: ... }, and (2)@media (prefers-color-scheme: light)could match inside the Linux Electron webview even when the IDE shell was dark.How: Replaced all generic CSS custom properties with collision-proof
--nb-*tokens (--nb-bg,--nb-card,--nb-card-elevated,--nb-border,--nb-text: #f3f4f6,--nb-text-secondary: #cbd5e1,--nb-heading: #d2e3fc,--nb-accent: #8ab4f8), removed the@media (prefers-color-scheme: light)media query override, made high-contrast Dark Mode the default (:root, [data-theme="dark"]), and addedsyncHostTheme()to inspect--backgroundluminance ondocument.documentElementwhen switching themes.
Isolated
.venvPython Resolution for Browser Sign-In (src/agy_gemini_notebook/engines/rpc_bridge.py,sidecars/notebook_context_panel/server.py,sidecars/notebook_context_panel/notebooklm.py):Why: Clicking "🔑 Sign In to Google NotebookLM" in the Sidecar UI failed with
/usr/bin/python3: No module named notebooklmbecausesidecar.jsonlaunchesserver.pyusing the systempython3(/usr/bin/python3). Althoughserver.pyadded.venv/lib/python*/site-packagestosys.pathin-memory,NotebookRpcBridge.login()spawned[sys.executable, "-m", "notebooklm", "login"]in a child process wheresys.executablewas still/usr/bin/python3.How: Added
NotebookRpcBridge._resolve_python_executable()to resolvePLUGIN_ROOT / ".venv" / "bin" / "python"(and inject.venvPYTHONPATH/PATH), updatedserver.pyto pointsys.executableto.venv/bin/python, and added asidecars/notebook_context_panel/notebooklm.pylauncher shim that transparentlyexecves.venv/bin/notebooklmeven if an already-runningserver.pyprocess invokes/usr/bin/python3 -m notebooklm.
v1.0.2 (2026-10-22) — Rebranding to "Gemini Notebook by Chryzalide", Antigravity 2 Sidecar SDK Protocol Fix & Automated 5-Step Setup Workflow
Rebranding to
Gemini Notebook by Chryzalide(plugin.json,sidecars/notebook_context_panel/sidecar.json,ui.html,README.md):Why: Using the bare name
"Gemini Notebook"in the Antigravity 2Overview -> Pluginsmenu and plugin manifest could cause ambiguity with official first-party Google plugins or branding.How: Renamed
displayNameinplugin.jsonanddisplay_name/ui_config.views[0].titleinsidecars/notebook_context_panel/sidecar.jsonandui.htmltoGemini Notebook by Chryzalide.
Antigravity 2 Sidecar SDK Protocol Compliance (
sidecars/notebook_context_panel/server.py,sidecar.json,ui.html):Why: Clicking the plugin inside
Overview -> Pluginsor clicking the sidecar pill link did nothing for three reasons: (1) Antigravity 2 assigns a dynamic port to sidecars viaANTIGRAVITY_SIDECAR_WEB_PORT, whereasserver.pyonly checkedPORT(defaulting to8765), (2) Antigravity 2 expects the sidecar to writeserver_info.json(host,port,token,pid) intoANTIGRAVITY_EXECUTABLE_DATA_DIR/~/.gemini/antigravity/sidecar_data/.../data/server_info.jsonand serve/preload.js, and (3) the sidecar pill link was missing/ui.html(sidecar://gemini-notebook/notebook_context_panel/ui.html).How: Updated
server.pyto bindANTIGRAVITY_SIDECAR_WEB_PORT(falling back toPORTor8000), write and clean upserver_info.json, serve/preload.jsand/shell.css, supportX-Sidecar-TokenCORS/query injection, and use"command": "python3", "args": ["server.py"]insidecar.json. Updated all sidecar pill links to[Gemini Notebook by Chryzalide](sidecar://gemini-notebook/notebook_context_panel/ui.html).
Automated 5-Step Setup & Onboarding Workflow (
scripts/setup.sh,src/agy_gemini_notebook/cli.py,skills/gemini-notebook/SKILL.md,README.md):Why & How: Added
./scripts/setup.shandagy-gemini-notebook setup [--login]plusWorkflow 0inSKILL.mdand a complete visual Installation & Setup Workflow guide inREADME.mdto walk users through environment creation, Playwright Chromium verification, Antigravity 2 plugin registration, Engine 1/2 authentication, and IDE reload verification.
v1.0.1 (2026-10-22) — Interactive Authentication, Graceful Auth Diagnostics & Cross-Workspace Plugin Launchers
Interactive Login Tool, CLI & Sidecar Sign-In (
mcp_server.py,rpc_bridge.py,cli.py,sidecars/notebook_context_panel/):Why: When calling
notebook_create(or any Engine 2 RPC tool) before authenticating a Google NotebookLM session or Google Cloudv1alphaproject,notebooklm-pyraised an unhandledFileNotFoundError: Storage file not found, which Antigravity 2's MCP client masked behind a genericEncountered error in tool execution: Error executing tool notebook_createmessage with no direct way to log in from the IDE.How: Added
NotebookAuthRequiredErrorand wrapped MCP tool handlers to return structured, actionable diagnostics (status: "auth_required") instead of crashing tool execution. Added thenotebook_loginMCP tool (21 tools total), theagy-gemini-notebook loginCLI subcommand, and a "🔑 Sign In to Google NotebookLM" button (POST /api/login) in the Sidecar UI panel. Also added automatic Playwright Chromium revision bridging (_prepare_playwright_browsers_env) and sandbox-compatible session storage fallback (.notebooklm-auth/storage_state.json).
Cross-Workspace Plugin Command Resolution (
mcp_config.json,sidecars/notebook_context_panel/sidecar.json):Why & How: Replaced relative command paths (
scripts/run_mcp.shandsidecars/notebook_context_panel/server.py) with dynamic$HOME/.gemini/config/plugins/gemini-notebookresolution while preservingAGY_WORKSPACE_DIR=$(pwd), ensuring the MCP server and Sidecar UI launch reliably from any workspace opened in Antigravity 2 without hardcoding machine-specific paths.
v1.0 (2026-10-22) — Initial Stable Release
Dual-Engine Architecture (
src/agy_gemini_notebook/engines/):Why & How: Unifies official Google Cloud Enterprise provisioning (
gcp_enterprise_rest.py, Discovery Enginev1alphaREST API authenticated viagcloud auth print-access-token) with the community RPC bridge (rpc_bridge.py, powered bynotebooklm-pyfor consumer and enterprisenotebooklm.google.comaccounts). Automatically falls back to Engine 2 whenGCP_PROJECT_NUMBERis not configured, ensuring zero-friction operation for both personal Google accounts and GCP organizations.
Complete 20-Tool MCP Server, Resources & Prompts (
src/agy_gemini_notebook/mcp_server.py):Why & How: Exposes the full lifecycle of a Gemini Notebook to any MCP client: workspace binding & invocation (
notebook_status,notebook_attach,notebook_invoke), CRUD & sharing (notebook_list,notebook_get,notebook_create,notebook_delete,notebook_rename,notebook_share), local file synchronization & source management (notebook_sync_files,notebook_add_source,notebook_delete_sources,notebook_search_sources,notebook_get_source_text), grounded Q&A & autonomous research (notebook_query,notebook_research,notebook_research_status), and Studio deliverables & persistent notes (notebook_create_audio,notebook_generate_artifact,notebook_notes). Also registers MCP resources (notebook://active,notebook://aliases) and reusable MCP prompts (invoke_notebook,deep_research_notebook,sync_workspace_docs).
Documentary Research for Decision Support $\rightarrow$ Local
.mdSynthesis (skills/gemini-notebook/SKILL.md,rules/AGENTS.md):Why & How: Enables the primary decision-support workflow where the agent opens an existing Gemini Notebook or creates a new one, runs documentary research (
notebook_research) or queries curated notebook sources (notebook_query), and synthesizes the source-cited findings into structured local Markdown files (docs/research/*.md, ADRs, decision matrices) inside the active project workspace.
Interactive Antigravity 2 Sidecar Panel (
sidecars/notebook_context_panel/):Why & How: Provides an Auxiliary Pane web UI (
ui.html) backed by a local HTTP server (server.py) with/api/status,/api/notebooks,/api/attach,/api/toggle_source, and/api/create_notebookendpoints—allowing 1-click notebook switching, source-level grounding filters, and inline notebook creation.
Standalone CLI & Multi-IDE Transport (
src/agy_gemini_notebook/cli.py,scripts/run_mcp.sh):Why & How: Adds the
agy-gemini-notebookCLI (status,list,invoke,attach,create,query,research,sync,audio,artifact) and a portable MCP launcher supportingstdio,sse, andstreamable-httptransports across Google Antigravity 2, VS Code, Cursor, and Claude Code.
Automated Test Suite (
tests/):Why & How: Includes 16 comprehensive unit, mocked Dual-Engine, Sidecar HTTP API, and live MCP stdio handshake test suites verified with
pytestandruff.
👤 Author
Souryan Augé
🌐 Website: https://souryan-auge.fr/
💻 GitHub: @Chryzalide
📄 License
Distributed under the MIT License. Contributions are welcome!
Available Tools
21 toolsnotebook_add_sourceA
Add a text, web URL, YouTube video, or Google Drive document to a Gemini Notebook (Dual-Engine).
Args:
source_type: One of 'text', 'web', 'youtube', or 'gdrive'.
value: Raw text content, URL, YouTube URL, or Google Drive documentId.
title: Display name for the source.
mime_type: Used only when `source_type == 'gdrive'`.
notebook_id: Target notebook ID or workspace alias (defaults to workspace-attached notebook).
wait: When using RPC bridge, whether to wait for source indexing to complete.
engine: 'auto', 'gcp_rest', or 'rpc_bridge'.
workspace_dir: Optional workspace directory override.
Inputs: value (required), source_type (required), wait, title, +4 more. Returns: object
notebook_attachC
Attach a Gemini Notebook to the active workspace (.agents/notebook.json).
Supports optional `alias` so multiple notebooks can be registered and invoked by short name
(e.g. `alias="architecture"` or `alias="research"`).
Inputs: notebook_id (required), alias, title, engine, +3 more. Returns: object
notebook_createC
Create a new Gemini Notebook via GCP v1alpha REST API or RPC bridge and optionally attach it.
Inputs: title (required), alias, emoji, engine, +2 more. Returns: object
notebook_create_audioC
Generate an Audio Overview podcast on the notebook via GCP v1alpha REST or RPC bridge.
Inputs: wait, engine, source_ids, notebook_id, +5 more. Returns: object
notebook_deleteC
Delete one or more Gemini Notebooks via GCP v1alpha batchDelete or RPC bridge.
Inputs: notebook_ids (required), engine, workspace_dir. Returns: object
notebook_delete_sourcesC
Delete one or more sources from a Gemini Notebook (Dual-Engine).
Inputs: source_ids (required), engine, notebook_id, workspace_dir. Returns: object
notebook_generate_artifactC
Generate a NotebookLM Studio Artifact (report, study_guide, briefing_doc, blog_post, mind_map, quiz, flashcards, slide_deck, data_table, infographic, video, audio).
Inputs: artifact_type (required), wait, timeout, source_ids, +5 more. Returns: object
notebook_getC
Get metadata, AI summary, and list of sources for a Gemini Notebook (Dual-Engine).
Inputs: engine, notebook_id, workspace_dir. Returns: object
notebook_get_source_textC
Fetch the full indexed text (and optional AI summary/keywords guide) of a specific source.
Inputs: source_id (required), notebook_id, include_guide, workspace_dir. Returns: object
notebook_invokeB
Invoke a Gemini Notebook by ID, workspace alias, or title to ground the current task.
- If `question` is provided: executes a grounded query against the target notebook and returns
the synthesized answer, inline citations, and follow-up suggestions.
- If `question` is omitted: fetches the notebook's metadata, AI summary, suggested topics,
and source list so the agent can immediately inspect and use the notebook context.
Inputs: engine, target, question, workspace_dir, +1 more. Returns: object
notebook_listC
List Gemini Notebooks via official GCP v1alpha REST API or RPC bridge, with optional title filter.
Inputs: query, engine, page_size, workspace_dir. Returns: object
notebook_loginA
Connect your Gemini Notebook session without Playwright sign-in automation on accounts.google.com.
- Default (`browser_cookies='auto'` or `'chrome'`, `'brave'`, `'firefox'`, `'edge'`, `'chromium'`):
Imports your already-signed-in `notebooklm.google.com` session directly from your installed
browser in ~1 second (Engine 2 — unofficial community RPC bridge).
- `gcloud=True`: Runs official `gcloud auth login` OAuth 2.0 flow for Google Cloud Discovery
Engine `v1alpha` (Engine 1 — 100% official Google Cloud API).
- `open_system_browser=True`: Opens `https://notebooklm.google.com/` in your genuine OS default
browser so you can verify you are signed in before connecting.
Inputs: fresh, gcloud, account, browser, +3 more. Returns: object
notebook_notesC
Manage persistent notes inside a Gemini Notebook (action: 'list', 'get', 'create', 'update', 'delete').
Inputs: title, action, content, note_id, +2 more. Returns: object
notebook_queryB
Ask a grounded question against a Gemini Notebook and receive answer + inline citations.
Automatically filters to `active_source_ids` in `.agents/notebook.json` if `source_ids`
is not explicitly passed. Supports multi-turn follow-ups via `conversation_id` and
persisting the cited answer as a notebook note via `save_as_note=True`.
Inputs: question (required), engine, note_title, source_ids, +4 more. Returns: object
notebook_renameC
Rename a Gemini Notebook via the RPC bridge and update .agents/notebook.json if attached.
Inputs: new_title (required), notebook_id, workspace_dir. Returns: object
notebook_researchA
Launch a Fast Research, Deep Research, or Source Discovery session on a Gemini Notebook.
Allows the agent harness to pilot NotebookLM as an autonomous research engine:
- Set `create_notebook_title` to spin up a brand-new notebook before launching research.
- Set `mode='fast'` for rapid web/Drive search (~10-30s).
- Set `mode='deep'` for exhaustive multi-step Deep Research with a synthesized Markdown report.
- Set `mode='discover'` (or `'curious'`) for instant synchronous web source discovery.
- Set `source='web'` or `source='drive'`.
- When `wait=True` and `import_sources=True`, discovered sources are automatically imported
into the notebook so you can immediately query or generate artifacts from them.
Inputs: query (required), mode, wait, source, +7 more. Returns: object
notebook_research_statusC
Check status, wait for completion, import sources from, or cancel a Fast/Deep Research run.
Inputs: wait, cancel, task_id, timeout, +5 more. Returns: object
notebook_search_sourcesC
Search indexed passages across a Gemini Notebook's sources and return ranked chunks.
Inputs: query (required), limit, source_ids, notebook_id, +1 more. Returns: object
notebook_statusB
Check current workspace Gemini Notebook binding and authentication status for both engines.
Inputs: workspace_dir. Returns: object
notebook_sync_filesC
Upload local workspace files (.md, .pdf, .txt, .docx, .pptx, .xlsx, audio, images) to a Gemini Notebook.
Inputs: file_paths (required), wait, engine, notebook_id, +1 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Several tools overlap in practice: `notebook_get` and `notebook_invoke` without a question both return metadata/summary, and `notebook_query` versus `notebook_invoke` with a question are functionally near-identical grounded Q&A paths. `notebook_add_source` and `notebook_sync_files` also both ingest content, and `notebook_notes` bundles five actions into one tool. Descriptions do disambiguate somewhat, but boundary choice requires careful reading.
All 21 tools use a consistent snake_case `notebook_*` prefix, which makes the family instantly recognizable. Minor deviation: some names are verb-first (create, delete, rename, list, query) while others are noun/state-like (`notebook_status`, `notebook_notes`, `notebook_research_status`), but the pattern remains readable and predictable.
21 tools is on the heavy side for a single-product integration, and the dual-engine (GCP REST vs RPC bridge) design is baked into tool parameters rather than split into separate surfaces. Most tools map to a real operation, but the set sits at the upper edge of what an agent can hold comfortably in one context.
Coverage is broad: notebook lifecycle, sources, notes, grounded search/query, research sessions, sharing, file sync, and artifact generation. Gaps exist around updating notebook metadata (only `notebook_rename`), editing/replacing sources, and retrieving or listing generated artifacts after creation. These are workarounds-able but notable.
Maintenance
Related MCP Connectors
Your Aurentia workspace — projects, CRM, tasks, deliverables — in Claude, Cursor or any MCP client.
Ask your own documents and get answers that cite the source passage. Workspace knowledge bases over MCP for Cursor, Claude and any MCP client.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes Google NotebookLM as MCP tools, enabling management of notebooks, sources, chat, artifacts, and research via natural language.2MIT
- AlicenseNot gradedqualityDmaintenanceBridges Claude Code/Cowork with Google NotebookLM for AI-powered research, source analysis, chat, and content generation through a structured tool interface.MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying Google NotebookLM notebooks directly from Claude Desktop (MCP) and Claude Code (CLI), providing citation-backed answers from Gemini.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to drive Google NotebookLM notebooks as a deep-research workspace: ingesting local PDFs and YouTube videos, cross-checking sources for contradictions, identifying knowledge gaps, generating audio overviews, and exporting Markdown dossiers with BibTeX and APA bibliographies. It operates over the Model Context Protocol inside Google Antigravity IDE, with browser-session authentication handled automatically.MIT