DEV Community

Azamat Safarov
Azamat Safarov

Posted on

Automating NotebookLM with Hermes Agent: From Research to Multi-Platform Content

Automating NotebookLM with Hermes Agent: From Research to Multi-Platform Content


NotebookLM made the writing smarter — analyzing sources, generating podcasts, building visuals. But getting those artifacts out of Google and into my publishing pipeline still took 30 minutes of manual clicking and downloading. I fixed that by wiring NotebookLM directly into Hermes Agent. Now research turns into publish-ready content in about two minutes.

The Problem Was Mechanical Work

I would finish an article, open NotebookLM, upload sources, wait for generation, then manually download each artifact. Podcast for Telegram. Infographic for cover image. Mind map for architecture section. Each download meant clicking through Google UI, renaming files, moving to assets folder, compressing for platform limits. Half an hour of file management for every article. The AI did the creative work; I did the clicks.

Worse, browser automation failed. Google detects headless Chromium instantly. The login page throws "browser not secure" and blocks every script. Puppeteer, Playwright, Selenium — all detected. I needed a way to run NotebookLM from code without fighting Google's bot detection.

The Solution: Cookie Export

The breakthrough was cookie export. Real Chrome session, real cookies, no headless browser. I log into notebooklm.google.com normally, export cookies as Netscape format using a Chrome extension, convert to Playwright storage state with a Python script. The notebooklm-py wrapper reads that state and gets a valid token. Twenty-three cookies are enough for full API access.

Architecture Diagram

The CLI Workflow

Once authenticated, the CLI exposes clean Python API:

from notebooklm_cli import NotebookLMClient
client = NotebookLMClient(storage_state_path)
notebook = client.create("Research Topic")
client.source_add(notebook.id, "sources/my-article.md")
client.generate_infographic("Cinematic visualization")
Enter fullscreen mode Exit fullscreen mode

The gotcha is timing. Audio generation takes five to ten minutes. The positional argument syntax matters — infographic and slide-deck take prompts as positionals, mind-map only accepts --instructions, audio builds from sources directly.

Key commands that work:

# Create and use notebook
notebooklm create "My Research" --json
notebooklm use <id>

# Add sources
notebooklm source add article.md

# Generate artifacts (positional args)
notebooklm generate infographic "Visual description" --wait
notebooklm generate audio "Podcast" --format deep-dive

# Poll manually for audio
notebooklm artifact poll <task_id>
notebooklm download artifact.mp3 --latest
Enter fullscreen mode Exit fullscreen mode

Integration with Hermes Agent

The full pipeline is one command:

# Hermes Agent skill calls
hermes notebooklm-bridge create-research \
  --sources "articles/*.md" \
  --outputs "cover,podcast,mindmap" \
  --compress-for-platforms
Enter fullscreen mode Exit fullscreen mode

Behind the scenes it runs: create notebook, add sources, generate cover infographic, poll for completion, download, compress audio for Telegram's 20MB limit, write platform drafts in parallel.

What Broke Along The Way

Playwright login is dead for NotebookLM — every Chromium instance detected by Google's bot protection.

Wrong prompt syntax cost an hour debugging --prompt before realizing positional arguments only for most commands.

Audio timing taught me to poll separately instead of waiting — --wait times out after 60 seconds.

Image size limits for Bluesky's 2MB meant ffmpeg compression before upload.

Results

Content production dropped from research plus 30 minutes manual to research plus 2 minutes automated. NotebookLM handles visuals and audio. Hermes handles routing and platform formatting. I handle ideas. The bottleneck is no longer tooling — it is deciding what to write.

Resources

The full pipeline is open source: https://github.com/AzamatSafarov/hermes-notebooklm-bridge

This pipeline runs on the LLM Wiki pattern by Andrej Karpathy — persistent wiki maintained by the LLM as you go, instead of RAG that re-discovers everything from scratch on every query.

Reference: https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f


Tags: #python #automation #notebooklm #hermes #content-pipeline #ai-tools

Top comments (0)