Automatically syncs NotebookLM notebooks into structured Obsidian notes via a multi-agent LLM pipeline.
Fetches all your NotebookLM notebooks and their sources, runs them through an agent pipeline that cleans, summarizes, clusters, and formats the content, then writes the result as structured markdown notes directly into your Obsidian vault.
No copying. No pasting. No manual formatting.
flowchart TD
A["notebooklm-py\npulls notebooks + sources"] --> B["Cleaner\nremoves noise from raw content"]
B --> C["Summarizer\ngenerates a lightweight summary per source"]
C --> D["Clusterizer\ngroups sources by topic"]
D --> E["Orchestrator\ndecides which clusters become files"]
E --> F["Formatter\nwrites structured markdown per file"]
F --> G["Obsidian Local REST API\nsaves notes to vault"]
G --> H["NotebookLM/{notebook}/{topic}.md ✓"]
Each notebook becomes a folder in your vault. Each topic cluster becomes a .md file inside it.
## 📋 Resumo
## 📚 Conteúdo
### 🔹 [Topic]
...nb2ob/
├── main.py # CLI entry point (typer)
│
├── agent/
│ ├── graph.py # builds and compiles the LangGraph pipeline
│ ├── state.py # PipelineState and TypedDicts
│ ├── nodes/ # one file per agent (cleaner, summarizer, etc.)
│ └── prompts/ # one file per agent + base.py
│
├── api/
│ ├── __init__.py
│ ├── notebooklm.py # NotebookLM unofficial API wrapper
│ └── obsidian.py # Obsidian Local REST API wrapper
│
├── config/
│ ├── settings.py # Config dataclass with env var validation
│ └── models.py # Model enum
│
├── infrastructure/
│ ├── config.py # logger setup
│ └── decorators.py # log_call decorator
│
└── docs/ # images used in this README
- Python 3.11+
- uv
- Obsidian with the Local REST API plugin installed and active
- A Google account with access to NotebookLM
- API key from at least one supported provider (Groq, Gemini, or Anthropic)
git clone https://github.com/DaviAlcanfor/nb2ob.git
cd nb2obuv sync
playwright install chromiumOpen Obsidian and go to Settings → Community Plugins.
Click Browse and search for Local REST API with MCP.
Install and enable it. Then go to Settings → Local REST API & MCP Server to find your bearer token.
Copy the token — you'll need it in the next step.
notebooklm loginThis opens a browser for you to sign in with your Google account. Credentials are stored locally and reused on subsequent runs. If the session expires, run it again.
cp .env.example .env# Obsidian Local REST API
OBSIDIAN_TOKEN=<your_bearer_token> # from Settings > Local REST API & MCP Server
OBSIDIAN_HOST=https://127.0.0.1 # change only if you modified the plugin settings
OBSIDIAN_PORT=27124 # change only if you modified the plugin settings
OBSIDIAN_FOLDER=NotebookLM # root folder in your vault where notes will be saved
# LLM Provider (at least one required)
GROQ_API_KEY=<your_groq_api_key> # https://console.groq.com/keys
GEMINI_API_KEY=<your_gemini_api_key> # https://aistudio.google.com/apikey
ANTHROPIC_API_KEY=<your_anthropic_key> # https://console.anthropic.com/keysuv run main.pyAt least one API key is required. The pipeline currently uses Groq by default.
| Provider | Model | Get key |
|---|---|---|
| Groq | llama-3.3-70b-versatile |
console.groq.com |
| Gemini | gemini-2.0-flash |
aistudio.google.com |
| Anthropic | claude-sonnet-4-20250514 |
console.anthropic.com |
- notebooklm-py — unofficial NotebookLM Python API
- LangChain + LangGraph — agent pipeline orchestration
- langchain-groq — Groq LLM integration
- typer — CLI
- requests — Obsidian API communication
- python-dotenv — environment variables
notebooklm-py is an unofficial library that uses undocumented Google APIs. It is not affiliated with Google and may break without notice. Use at your own risk.
MIT



