$ show run-llama/notebookllama
NotebookLlaMa is a full-stack, open-source alternative to Google's NotebookLM, built on LlamaCloud and the LlamaIndex ecosystem. It provides a Streamlit-based web interface for uploading PDF documents, processing them through a multi-step workflow (parsing, extraction, summarization, Q&A generation, mind map creation), and optionally generating a podcast conversation using ElevenLabs TTS. The system uses an MCP server (FastMCP) to expose tools for document processing, mind map generation, and index querying, orchestrated by a LlamaIndex Workflow. Observability is handled via OpenTelemetry with traces exported to Jaeger and stored in PostgreSQL, with an export-to-Parquet capability. The codebase is well-structured, async-first, and includes comprehensive tests, a CLI setup wizard for embedding providers, and Docker Compose for infrastructure dependencies. It is actively maintained and demonstrates strong engineering practices.
The LLM identified 3 files worth highlighting for reuse:
The PodcastGenerator class is a self-contained, async module for generating multi-turn podcast conversations from text transcripts. It uses a structured LLM (OpenAI) to produce a conversation script, then converts each turn to speech via ElevenLabs TTS and concatenates them into a single MP3 file. It features extensive configurability (style, tone, audience, focus topics, custom prompts, speaker roles) and proper error handling with custom exception classes. The design is clean, well-documented, and could be extracted into a standalone library with minimal changes.
The OtelTracesSqlEngine class provides a reusable utility to export OpenTelemetry traces from Jaeger into a SQL database (PostgreSQL or SQLite) and then to Parquet files. It implements a clean API for fetching traces, converting to pandas DataFrames, and persisting them with partitioning and compression options. The class is fully self-contained (only depends on requests, pandas, and sqlalchemy) and can be integrated into any project that needs to store and analyze distributed traces.
The DocumentManager class provides a generic, reusable pattern for managing documents in a SQL database using SQLAlchemy. It supports lazy table creation, insertion, retrieval by name, and listing of document names. The ManagedDocument dataclass is simple and extensible. This component could be extracted and reused in any application that needs to persist and retrieve structured document data with minimal coupling.