open-notebook
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpen Notebook
Open Notebook
Overview
概述
Open Notebook is an open-source, self-hosted alternative to Google's NotebookLM that enables researchers to organize materials, generate AI-powered insights, create podcasts, and have context-aware conversations with their documents — all while maintaining complete data privacy.
Unlike Google's Notebook LM, which has no publicly available API outside of the Enterprise version, Open Notebook provides a comprehensive REST API, supports 16+ AI providers, and runs entirely on your own infrastructure.
Key advantages over NotebookLM:
- Full REST API for programmatic access and automation
- Choice of 16+ AI providers (not locked to Google models)
- Multi-speaker podcast generation with 1-4 customizable speakers (vs. 2-speaker limit)
- Complete data sovereignty through self-hosting
- Open source and fully extensible (MIT license)
Repository: https://github.com/lfnovo/open-notebook
Open Notebook是一款开源、自托管的Google NotebookLM替代工具,研究人员可通过它整理材料、生成AI驱动的洞察、创建播客,并与文档进行上下文感知对话——同时保持完全的数据隐私。
与Google NotebookLM不同(除企业版外无公开API),Open Notebook提供完整的REST API,支持16+ AI提供商,且完全运行在您自己的基础设施上。
相对NotebookLM的核心优势:
- 完整的REST API,支持程序化访问和自动化
- 可选择16+ AI提供商(不局限于Google模型)
- 支持1-4个可自定义主播的多主播播客生成(对比NotebookLM的2主播限制)
- 通过自托管实现完全的数据主权
- 开源且可完全扩展(MIT许可证)
Quick Start
快速开始
Prerequisites
前置条件
- Docker Desktop installed
- API key for at least one AI provider (or local Ollama for free local inference)
- 已安装Docker Desktop
- 至少一个AI提供商的API密钥(或使用本地Ollama进行免费本地推理)
Installation
安装
Deploy Open Notebook using Docker Compose:
bash
undefined使用Docker Compose部署Open Notebook:
bash
undefinedDownload the docker-compose file
Download the docker-compose file
curl -o docker-compose.yml https://raw.githubusercontent.com/lfnovo/open-notebook/main/docker-compose.yml
curl -o docker-compose.yml https://raw.githubusercontent.com/lfnovo/open-notebook/main/docker-compose.yml
Set the required encryption key
Set the required encryption key
export OPEN_NOTEBOOK_ENCRYPTION_KEY="your-secret-key-here"
export OPEN_NOTEBOOK_ENCRYPTION_KEY="your-secret-key-here"
Launch the services
Launch the services
docker-compose up -d
Access the application:
- **Frontend UI:** http://localhost:8502
- **REST API:** http://localhost:5055
- **API Documentation:** http://localhost:5055/docsdocker-compose up -d
访问应用:
- **前端UI:** http://localhost:8502
- **REST API:** http://localhost:5055
- **API文档:** http://localhost:5055/docsConfigure AI Provider
配置AI提供商
After startup, configure at least one AI provider:
- Navigate to Settings > API Keys in the UI
- Add credentials for your preferred provider (OpenAI, Anthropic, etc.)
- Test the connection and discover available models
- Register models for use across the platform
Or configure via the REST API:
python
import requests
BASE_URL = "http://localhost:5055/api"启动后,至少配置一个AI提供商:
- 在UI中导航至设置 > API密钥
- 添加您偏好的提供商(OpenAI、Anthropic等)的凭证
- 测试连接并发现可用模型
- 注册模型以在全平台使用
或通过REST API配置:
python
import requests
BASE_URL = "http://localhost:5055/api"Add a credential for an AI provider
Add a credential for an AI provider
response = requests.post(f"{BASE_URL}/credentials", json={
"provider": "openai",
"name": "My OpenAI Key",
"api_key": "sk-..."
})
credential = response.json()
response = requests.post(f"{BASE_URL}/credentials", json={
"provider": "openai",
"name": "My OpenAI Key",
"api_key": "sk-..."
})
credential = response.json()
Discover available models
Discover available models
response = requests.post(
f"{BASE_URL}/credentials/{credential['id']}/discover"
)
discovered = response.json()
response = requests.post(
f"{BASE_URL}/credentials/{credential['id']}/discover"
)
discovered = response.json()
Register discovered models
Register discovered models
requests.post(
f"{BASE_URL}/credentials/{credential['id']}/register-models",
json={"model_ids": [m["id"] for m in discovered["models"]]}
)
undefinedrequests.post(
f"{BASE_URL}/credentials/{credential['id']}/register-models",
json={"model_ids": [m["id"] for m in discovered["models"]]}
)
undefinedCore Features
核心功能
Notebooks
笔记本
Organize research into separate notebooks, each containing sources, notes, and chat sessions.
python
import requests
BASE_URL = "http://localhost:5055/api"将研究内容整理到独立的笔记本中,每个笔记本包含来源、笔记和对话会话。
python
import requests
BASE_URL = "http://localhost:5055/api"Create a notebook
Create a notebook
response = requests.post(f"{BASE_URL}/notebooks", json={
"name": "Cancer Genomics Research",
"description": "Literature review on tumor mutational burden"
})
notebook = response.json()
notebook_id = notebook["id"]
undefinedresponse = requests.post(f"{BASE_URL}/notebooks", json={
"name": "Cancer Genomics Research",
"description": "Literature review on tumor mutational burden"
})
notebook = response.json()
notebook_id = notebook["id"]
undefinedSources
内容来源
Ingest diverse content types including PDFs, videos, audio files, web pages, and Office documents. Sources are processed for full-text and vector search.
python
undefined导入多样化内容类型,包括PDF、视频、音频文件、网页和Office文档。来源会经过处理以支持全文检索和向量搜索。
python
undefinedAdd a web URL source
Add a web URL source
response = requests.post(f"{BASE_URL}/sources", data={
"url": "https://arxiv.org/abs/2301.00001",
"notebook_id": notebook_id,
"process_async": "true"
})
source = response.json()
response = requests.post(f"{BASE_URL}/sources", data={
"url": "https://arxiv.org/abs/2301.00001",
"notebook_id": notebook_id,
"process_async": "true"
})
source = response.json()
Upload a PDF file
Upload a PDF file
with open("paper.pdf", "rb") as f:
response = requests.post(
f"{BASE_URL}/sources",
data={"notebook_id": notebook_id},
files={"file": ("paper.pdf", f, "application/pdf")}
)
undefinedwith open("paper.pdf", "rb") as f:
response = requests.post(
f"{BASE_URL}/sources",
data={"notebook_id": notebook_id},
files={"file": ("paper.pdf", f, "application/pdf")}
)
undefinedNotes
笔记
Create and manage notes (human or AI-generated) associated with notebooks.
python
undefined创建和管理与笔记本关联的笔记(人工或AI生成)。
python
undefinedCreate a human note
Create a human note
response = requests.post(f"{BASE_URL}/notes", json={
"title": "Key Findings",
"content": "TMB correlates with immunotherapy response in NSCLC...",
"note_type": "human",
"notebook_id": notebook_id
})
undefinedresponse = requests.post(f"{BASE_URL}/notes", json={
"title": "Key Findings",
"content": "TMB correlates with immunotherapy response in NSCLC...",
"note_type": "human",
"notebook_id": notebook_id
})
undefinedContext-Aware Chat
上下文感知对话
Chat with your research materials using AI that cites sources.
python
undefined使用可引用来源的AI与您的研究材料对话。
python
undefinedCreate a chat session
Create a chat session
session = requests.post(f"{BASE_URL}/chat/sessions", json={
"notebook_id": notebook_id,
"title": "TMB Discussion"
}).json()
session = requests.post(f"{BASE_URL}/chat/sessions", json={
"notebook_id": notebook_id,
"title": "TMB Discussion"
}).json()
Send a message with context from sources
Send a message with context from sources
response = requests.post(f"{BASE_URL}/chat/execute", json={
"session_id": session["id"],
"message": "What are the key biomarkers for immunotherapy response?",
"context": {"include_sources": True, "include_notes": True}
})
undefinedresponse = requests.post(f"{BASE_URL}/chat/execute", json={
"session_id": session["id"],
"message": "What are the key biomarkers for immunotherapy response?",
"context": {"include_sources": True, "include_notes": True}
})
undefinedSearch
搜索
Search across all materials using full-text or vector (semantic) search.
python
undefined通过全文检索或向量(语义)搜索跨所有材料进行查找。
python
undefinedVector search across the knowledge base
Vector search across the knowledge base
results = requests.post(f"{BASE_URL}/search", json={
"query": "tumor mutational burden immunotherapy",
"search_type": "vector",
"limit": 10
}).json()
results = requests.post(f"{BASE_URL}/search", json={
"query": "tumor mutational burden immunotherapy",
"search_type": "vector",
"limit": 10
}).json()
Ask a question with AI-powered answer
Ask a question with AI-powered answer
answer = requests.post(f"{BASE_URL}/search/ask/simple", json={
"query": "How does TMB predict checkpoint inhibitor response?"
}).json()
undefinedanswer = requests.post(f"{BASE_URL}/search/ask/simple", json={
"query": "How does TMB predict checkpoint inhibitor response?"
}).json()
undefinedPodcast Generation
播客生成
Generate professional multi-speaker podcasts from research materials with 1-4 customizable speakers.
python
undefined从研究材料生成专业的多主播播客,支持1-4个可自定义主播。
python
undefinedGenerate a podcast episode
Generate a podcast episode
job = requests.post(f"{BASE_URL}/podcasts/generate", json={
"notebook_id": notebook_id,
"episode_profile_id": episode_profile_id,
"speaker_profile_ids": [speaker1_id, speaker2_id]
}).json()
job = requests.post(f"{BASE_URL}/podcasts/generate", json={
"notebook_id": notebook_id,
"episode_profile_id": episode_profile_id,
"speaker_profile_ids": [speaker1_id, speaker2_id]
}).json()
Check generation status
Check generation status
status = requests.get(f"{BASE_URL}/podcasts/jobs/{job['job_id']}").json()
status = requests.get(f"{BASE_URL}/podcasts/jobs/{job['job_id']}").json()
Download audio when ready
Download audio when ready
audio = requests.get(
f"{BASE_URL}/podcasts/episodes/{status['episode_id']}/audio"
)
undefinedaudio = requests.get(
f"{BASE_URL}/podcasts/episodes/{status['episode_id']}/audio"
)
undefinedContent Transformations
内容转换
Apply custom AI-powered transformations to content for summarization, extraction, and analysis.
python
undefined应用自定义AI驱动的转换对内容进行摘要、提取和分析。
python
undefinedCreate a custom transformation
Create a custom transformation
transform = requests.post(f"{BASE_URL}/transformations", json={
"name": "extract_methods",
"title": "Extract Methods",
"description": "Extract methodology details from papers",
"prompt": "Extract and summarize the methodology section...",
"apply_default": False
}).json()
transform = requests.post(f"{BASE_URL}/transformations", json={
"name": "extract_methods",
"title": "Extract Methods",
"description": "Extract methodology details from papers",
"prompt": "Extract and summarize the methodology section...",
"apply_default": False
}).json()
Execute transformation on text
Execute transformation on text
result = requests.post(f"{BASE_URL}/transformations/execute", json={
"transformation_id": transform["id"],
"input_text": "...",
"model_id": "model_id_here"
}).json()
undefinedresult = requests.post(f"{BASE_URL}/transformations/execute", json={
"transformation_id": transform["id"],
"input_text": "...",
"model_id": "model_id_here"
}).json()
undefinedSupported AI Providers
支持的AI提供商
Open Notebook supports 16+ AI providers through the Esperanto library:
| Provider | LLM | Embedding | Speech-to-Text | Text-to-Speech |
|---|---|---|---|---|
| OpenAI | Yes | Yes | Yes | Yes |
| Anthropic | Yes | No | No | No |
| Google GenAI | Yes | Yes | No | Yes |
| Vertex AI | Yes | Yes | No | Yes |
| Ollama | Yes | Yes | No | No |
| Groq | Yes | No | Yes | No |
| Mistral | Yes | Yes | No | No |
| Azure OpenAI | Yes | Yes | No | No |
| DeepSeek | Yes | No | No | No |
| xAI | Yes | No | No | No |
| OpenRouter | Yes | No | No | No |
| ElevenLabs | No | No | Yes | Yes |
| Perplexity | Yes | No | No | No |
| Voyage | No | Yes | No | No |
Open Notebook通过Esperanto库支持16+ AI提供商:
| 提供商 | LLM | Embedding | Speech-to-Text | Text-to-Speech |
|---|---|---|---|---|
| OpenAI | 是 | 是 | 是 | 是 |
| Anthropic | 是 | 否 | 否 | 否 |
| Google GenAI | 是 | 是 | 否 | 是 |
| Vertex AI | 是 | 是 | 否 | 是 |
| Ollama | 是 | 是 | 否 | 否 |
| Groq | 是 | 否 | 是 | 否 |
| Mistral | 是 | 是 | 否 | 否 |
| Azure OpenAI | 是 | 是 | 否 | 否 |
| DeepSeek | 是 | 否 | 否 | 否 |
| xAI | 是 | 否 | 否 | 否 |
| OpenRouter | 是 | 否 | 否 | 否 |
| ElevenLabs | 否 | 否 | 是 | 是 |
| Perplexity | 是 | 否 | 否 | 否 |
| Voyage | 否 | 是 | 否 | 否 |
Environment Variables
环境变量
Key configuration variables for Docker deployment:
| Variable | Description | Default |
|---|---|---|
| Required. Secret key for encrypting stored credentials | None |
| SurrealDB connection URL | |
| Database namespace | |
| Database name | |
| Optional password protection for the UI | None |
Docker部署的关键配置变量:
| 变量 | 描述 | 默认值 |
|---|---|---|
| 必填项。用于加密存储凭证的密钥 | None |
| SurrealDB连接URL | |
| 数据库命名空间 | |
| 数据库名称 | |
| UI可选密码保护 | None |
API Reference
API参考
The REST API is available at with interactive documentation at .
http://localhost:5055/api/docsCore endpoint groups:
- - Notebook CRUD and source association
/api/notebooks - - Source ingestion, processing, and retrieval
/api/sources - - Note management
/api/notes - - Chat session management
/api/chat/sessions - - Chat message execution
/api/chat/execute - - Full-text and vector search
/api/search - - Podcast generation and management
/api/podcasts - - Content transformation pipelines
/api/transformations - - AI model configuration and discovery
/api/models - - Provider credential management
/api/credentials
For complete API reference with all endpoints and request/response formats, see .
references/api_reference.mdREST API可通过访问,交互式文档位于。
http://localhost:5055/api/docs核心端点组:
- - 笔记本CRUD操作及来源关联
/api/notebooks - - 来源导入、处理和检索
/api/sources - - 笔记管理
/api/notes - - 对话会话管理
/api/chat/sessions - - 对话消息执行
/api/chat/execute - - 全文检索和向量搜索
/api/search - - 播客生成和管理
/api/podcasts - - 内容转换流水线
/api/transformations - - AI模型配置和发现
/api/models - - 提供商凭证管理
/api/credentials
如需包含所有端点及请求/响应格式的完整API参考,请查看。
references/api_reference.mdArchitecture
架构
Open Notebook uses a modern stack:
- Backend: Python with FastAPI
- Database: SurrealDB (document + relational)
- AI Integration: LangChain with the Esperanto multi-provider library
- Frontend: Next.js with React
- Deployment: Docker Compose with persistent volumes
Open Notebook采用现代技术栈:
- 后端: Python + FastAPI
- 数据库: SurrealDB(文档+关系型)
- AI集成: LangChain + Esperanto多提供商库
- 前端: Next.js + React
- 部署: Docker Compose + 持久化卷
Important Notes
重要说明
- Open Notebook requires Docker for deployment
- At least one AI provider must be configured for AI features to work
- For free local inference without API costs, use Ollama
- The must be set before first launch and kept consistent across restarts
OPEN_NOTEBOOK_ENCRYPTION_KEY - All data is stored locally in Docker volumes for complete data sovereignty
- Open Notebook需要Docker进行部署
- 必须至少配置一个AI提供商才能使用AI功能
- 如需无API成本的免费本地推理,请使用Ollama
- 必须在首次启动前设置,且重启时需保持一致
OPEN_NOTEBOOK_ENCRYPTION_KEY - 所有数据存储在本地Docker卷中,实现完全的数据主权