Skip to content

NotebookLM integration: one notebook per hierarchy level #38

Description

@itdove

Summary

Optional integration with NotebookLM MCP to enrich Lore's knowledge system with semantic search, LLM synthesis, and audio/visual artifacts — without requiring local Ollama or embeddings.

Each hierarchy level maps to a NotebookLM notebook.

Architecture

lore sync
    ↓ entries per level
NotebookLMAdapter
    ↓ source_add(source_type="text") per entry
NotebookLM notebooks (one per level)
    ↓ notebook_query via MCP
Claude Code gets semantically-rich answers

Configuration

{
  "lore": {
    "integrations": {
      "notebooklm": {
        "enabled": true,
        "sync_on_lore_sync": true,
        "notebooks": {
          "0": "notebook-uuid-project",
          "1": "notebook-uuid-team",
          "2": "notebook-uuid-org"
        }
      }
    }
  }
}

Sync: Lore → NotebookLM

On lore sync, push changes to corresponding notebooks:

  • New entries → source_add(source_type="text")
  • Updated entries → source_delete + source_add
  • Deleted entries → source_delete
  • Track source ID mapping in sync state

Query: NotebookLM → Lore

New MCP tool or query option:

query_knowledge(topic="...", use_notebooklm=True)
  • Queries NotebookLM notebooks via notebook_query
  • Falls back to local FTS5/embeddings if NotebookLM unavailable
  • Respects hierarchy priority (query project notebook first, then team, then org)

Bonus Artifacts

NotebookLM provides these for free per level:

  • Audio overviews (podcast-style summaries of team knowledge)
  • Mind maps of org standards
  • Study guides for onboarding
  • Flashcards for learning team conventions

Known Limitations

Limitation Mitigation
~50 sources per notebook Split by domain: "Team - Auth", "Team - Deploy"
Data hosted by Google Make integration optional, disabled by default
Requires Google auth nlm login handles auth
Network latency Cache NotebookLM responses locally
Not air-gap compatible Local SQLite + Ollama remains primary path

CLI

# Initial setup: create notebooks for each level
lore notebooklm init

# Manual sync to NotebookLM
lore notebooklm sync

# Generate audio overview for a level
lore notebooklm audio --level 1

Acceptance Criteria

  • lore notebooklm init creates one notebook per hierarchy level
  • lore sync pushes changes to NotebookLM when integration enabled
  • Source ID mapping tracked in sync state
  • query_knowledge(use_notebooklm=True) queries notebooks with priority
  • Graceful fallback when NotebookLM unavailable
  • Integration disabled by default
  • Works with NotebookLM MCP tools (source_add, source_delete, notebook_query)

Dependencies

  • MVP complete
  • NotebookLM MCP server available and authenticated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions