需 Node.js 18.18.0 或更高版本;使用服务端 API 模式要配置 API Key 并重新部署才生效;Docker 版本需 20 以上,且镜像通常比最新版滞后 1~2 天。
deep-research
u14appMIT更新放缓用任意大模型(OpenAI、Claude、Gemini、DeepSeek、Ollama 等)搭建深度研究流程,提供 SSE API 和 MCP server,方便接入 Agent 或自建研究助手。
Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.
git clone https://github.com/u14app/deep-research.git && cd deep-research
pnpm install
cp env.tpl .env.local
pnpm devREADME 未说明显存或 GPU 要求;项目为 Next.js 应用,可部署到 Vercel、Cloudflare 或本地运行,也可用 Docker 部署。
用任意 LLM 在几分钟内生成深度研究报告,数据本地存储,支持 SSE API 与 MCP
用任意大模型(OpenAI、Claude、Gemini、DeepSeek、Ollama 等)搭建深度研究流程,提供 SSE API 和 MCP server,方便接入 Agent 或自建研究助手。
核心能力
- Thinking 与 Task 双模型分工,兼顾深度与速度
- 支持 Gemini、OpenAI、Anthropic、Ollama 等多家 LLM
- 接入 Searxng、Tavily、Firecrawl、Exa 等搜索引擎
- 上传文本、Office、PDF 构建本地知识库
- 提供 SSE API 与 MCP server,可当 SaaS 调用
容易踩的坑
- v0.11.0v0.11.x最新正式版2026-02-10 · 2026-02-10 09:20 UTC
Project Release Notes
📢 Summary
This update brings significant functional enhancements, focusing on the high customization capabilities of the Deep Research API, session management optimization, and a comprehensive upgrade of the user interaction experience. By introducing a custom prompt mechanism, developers and advanced users can now deeply customize the AI's generation logic. Additionally, the inclusion of session import/export and global shortcut support significantly improves workflow efficiency.
🚀 New Features
1. Deep Research Prompt Customization (Prompt Overrides)
This is the core feature of this update, giving users full control over AI-generated content.
- Configuration Interface: Introduced
promptOverridesin theConfiginterface, allowing users to override built-in prompt templates. - API Support: The SSE API routes now support parsing prompt override parameters, integrated with strict validation and error-handling mechanisms.
- Full-Chain Integration:
KnowledgeGraph,FinalReport, and theuseDeepResearchhook have all been adapted to support custom prompts. - Dynamic Generation: Enhanced prompt generation functions to support dynamic content construction based on user-defined templates.
- Settings Interface: Added a JSON input area in the settings panel, featuring real-time validation and error feedback for prompt configurations.
2. Session and Data Management
- Topic Management Optimization: Introduced the
maxCollectionTopicssetting, allowing users to customize the maximum number of topics per collection to better organize long-term research.
3. Search and Preferences
- Domain Filters: Added domain filtering options to the search functionality for more precise source screening.
- Report Preferences: Added new report preference options in settings to meet diverse report generation requirements.
4. Interaction Experience Enhancements
- Workflow Progress Bar: Implemented a brand-new Workflow Progress component to display the execution status of research tasks in real-time.
- Global Shortcuts: Implemented "Submit" shortcuts (e.g., Ctrl/Cmd + Enter) across core components to accelerate the operational flow.
- Multi-language Support: Updated localization files with new strings related to prompt customization.
🛠 Technical Optimizations and Refactoring
1. Development Standards and Documentation
- Added
AGENTS.md: Clearly defined the project's coding practices and development guidelines to improve team collaboration efficiency and code quality.
2. Component Refactoring
- Topic Component Refactoring: Optimized form structures and resource handling logic, making topic editing and management more fluid.
- Hydration Optimization: Added
suppressHydrationWarningto thebodyelement to resolve common client-server hydration mismatch warnings in Next.js/React environments.
3. Shortcut Management
- Optimized shortcut management logic in the Header and search result components to ensure interaction consistency.
📦 Impact Scope
- API Endpoints: Added the optional
promptOverridesparameter todeep-researchrelated APIs. - UI Interface: New "Prompt Customization" and "Max Topics" configuration items in the settings page; added import/export buttons to the top navigation bar.
- Configuration: Developers are encouraged to refer to
AGENTS.mdwhen updating their local development environments.
Thanks to @jamesbmour for contributing code to this project! Please provide feedback in the Issues list if you have any questions or suggestions.
项目版本更新说明
📢 版本摘要
本次更新带来了重大的功能增强,核心聚焦于 Deep Research API 的高度自定义能力、会话管理优化以及用户交互体验的全面提升。通过引入自定义提示词机制,开发者和高级用户现在可以深度定制 AI 的生成逻辑;同时,新增的会话导入导出与快捷键支持,显著提升了工作流效率。
🚀 新增特性
1. Deep Rese
- Configuration Interface: Introduced
- v0.10.0v0.10.xpre-release2025-09-11 · 2025-09-11 15:02 UTC
查看更新说明
feat: Using file attachment to resolve file context exceeding model limit (Need to be manually enabled in experimental mode)
feat: 使用文件附件突破模型上下文限制(需要在实验性中手动开启)
- v0.9.20v0.9.x Support API and MCP2025-05-20 · 2025-05-20 06:50 UTC
查看更新说明
Key updates in this release focus on API, MCP services, knowledge graphs, search functionality, and PWA support:
-
API Support:
- In-Depth Research API: The In-Depth Research API has been developed, supporting SSE requests and Live mode. Live mode allows for a direct experience of the entire in-depth research process.
- MCP Service Support: An In-Depth Research MCP service has been built, supporting the individual execution of each research step.
-
Smart Image Referencing: Research reports now support smart image referencing from source materials.
-
New Knowledge Graph: Knowledge graph generation is now supported, visualizing your research findings.
-
PWA Support: Added support for PWA, enabling installation as a Web App.
-
Knowledge Base File Chunk Upload: Knowledge base file uploads now support chunk processing, preventing data loss.
-
Enhanced Search Functionality:
- Image Search Support: Search now supports returning image results (excluding model-built-in and Firecrawl).
- SearXNG Optimization: SearXNG search results now support reordering.
-
Interface and Experience Enhancements:
- Experimental Features Settings Page: A new experimental features settings page has been added.
- Optimized Markdown Output: Optimized Markdown text output with added text display animation effects.
- Optimized Markdown Image Layout: Optimized image layout within Markdown.
- Image Viewer: Added a Lightbox component for easy image viewing.
- Optimized Settings Interface Layout: Optimized the layout of the settings interface.
-
Bug Fixes:
- Fixed SearXNG Issue: Fixed an issue that prevented SearXNG from making requests correctly on the front-end page.
This update is dedicated to providing a more powerful and intelligent research and knowledge management experience. Thank you for your support!
本次更新重点围绕 API、 MCP 服务、知识图谱、搜索功能和 PWA 支持:
-
支持 API:
- 深度研究 API: 完成了深度研究 API 的开发,支持 SSE 请求和 Live 模式,Live 模式可以直观体验的深度研究的全过程。
- 支持 MCP 服务: 构建深度研究 MCP 服务,并支持单独执行每个研究步骤。
-
智能引用图片: 研究报告目前支持从资料中智能引用图片。
-
新增知识图谱: 支持知识图谱生成,可视化您的研究成果。
-
支持 PWA: 增加对 PWA 支持,可作为 Web App 安装使用。
-
知识库文件分块上传: 知识库文件上传现在支持分块处理,避免文件数据丢失。
-
搜索功能增强:
- 图片搜索支持: 搜索现在支持返回图片结果(除模型内置和 Firecrawl 外)。
- SearXNG 优化: SearXNG 搜索结果支持重新排序。
-
界面和体验优化:
- 试验性功能设置页面: 新增试验性功能设置页面。
- 优化 Markdown 输出: 优化了 Markdown 文本输出,并增加文本显示动画效果。
- Markdown 图片布局优化: 优化了 Markdown 中图片的布局。
- 图片查看器: 新增 Lightbox 组件,方便查看图片。
- 设置界面布局优化: 优化了设置界面的布局。
-
Bug修复:
- 修复 SearXNG 问题: 修复了 SearXNG 在前端页面无法正常请求的问题。
本次更新致力于提供更强大、更智能的研究和知识管理体验,感谢您的支持!
Supports the generation of research reports with both pictures and texts
Supports the generation of knowledge graphs and visualization of research results
-
- v0.8.2v0.8.x Major Upgrade2025-05-05 · 2025-05-05 03:19 UTC
查看更新说明
This update brings significant enhancements to the Magicdown editor, along with comprehensive upgrades to research, knowledge base, and resource management functionalities!
-
Magicdown Editor Unleashed!
- Effortless Editing: Supports plugins like tooltips and slash commands, making content editing easier than ever.
- Real-time Preview: Supports real-time preview of editing results, offering a WYSIWYG (What You See Is What You Get) experience.
- Enhanced Code Blocks: Magicdown code blocks now support copy functionality.
-
In-Depth Optimization of Research Functionality!
- Scheme-Based Data Collection: Added report schemes before data collection, enabling data gathering based on these schemes.
- Source Citation Marking: Supports marking citation sources, enhancing report credibility.
- Report Optimization: Optimized the prompts for final reports and reduced the number of citations.
- Data Collection Process Supports Re-Research: Data collection process now supports re-research, providing greater flexibility.
- Research History and Knowledge Base Search: Research history and knowledge base now support keyword search.
- History Record Import and Export: Supports history record import and export functions.
-
Knowledge Base & Resource Management Upgrade!
- Local Resource Upload: Supports uploading local resources to the knowledge base.
- Information Gathering and Reports Added to Knowledge Base: Information gathering results and final reports can now be added to the knowledge base.
- Knowledge Base Page: Added a new knowledge base page for unified knowledge management.
- Web Crawler Component: Added a new web crawler component to facilitate grabbing web content.
-
Experience Optimization & Bug Fixes!
- Interface Optimization: Page adaptation for large screen sizes, optimizing the project layout experience. Optimized the experience of using the toolbar on desktop browsers.
- Scroll Optimization: Optimized the page scrolling experience for research history and knowledge base.
- History Record UI Optimization: Optimized the UI of history records.
-
Technical Adjustments:
- Temporary Replacement of Milkdown Editor: Due to serious rendering performance issues with MilkdownEditor, this component has been temporarily removed and replaced with the Magicdown component.
This update is dedicated to providing a more powerful, easier-to-use, and more stable research and knowledge management experience. Thank you for your support!
本次更新带来了 Magicdown 编辑器的大幅增强,以及研究、知识库和资源管理功能的全面升级!
-
Magicdown 编辑器大爆发!
- 便捷编辑: 支持 tooltip 和 slash 等插件,内容编辑更加轻松。
- 实时预览: 支持实时预览编辑结果,所见即所得。
- 代码块增强: Magicdown 代码块支持复制功能。
-
研究功能深度优化!
- 基于方案的数据收集: 在收集数据之前增加报告方案,并基于方案进行数据收集。
- 引用来源标记: 支持标记引用来源,增强报告可信度。
- 报告优化: 优化了最终报告的提示,并减少引用数量。
- 数据收集流程支持重新研究: 数据收集过程支持重新研究,更灵活。
- 研究历史和知识库搜索: 研究历史和知识库现在支持关键词搜索。
- 历史记录导入导出: 支持历史记录导入和导出功能。
-
知识库 & 资源管理升级!
- 本地资源上传: 支持上传本地资源到知识库。
- 信息收集和报告添加到知识库: 信息收集结果和最终报告都支持添加到知识库。
- 知识库页面: 新增知识库页面,统一管理知识。
- 网页爬虫组件: 新增网页爬虫组件,方便抓取网页内容。
-
体验优化 & Bug 修复!
- 界面优化: 针对大屏幕尺寸进行了页面适配,优化了项目布局体验。优化了桌面浏览器上使用工具栏的体验。
- 滚动优化: 优化了研究历史和知识库的页面滚动体验。
- 历史记录 UI 优化: 优化了历史记录的 UI。
-
技术调整:
- Milkdown 编辑器临时替换: 由于 MilkdownEditor 存在严重的渲染性能问题,暂时移除该组件,并替换为 Magicdown 组件。
本次更新致力于提供更强大、更易用、更稳定的研究和知识管理体验,感谢您的支持!
-
- v0.7.12v0.7.x Major Updates2025-04-11 · 2025-04-11 03:01 UTC
查看更新说明
This update brings massive model support, powerful search functionality, and more flexible configuration options!
-
Model Selection Explosion!
- New Model Support: Supports more mainstream large models such as OpenAI, Anthropic, DeepSeek, Grok, as well as platforms such as OpenRouter and Ollama.
- Custom Model List: Supports custom model lists to create your own exclusive model library.
-
Search Functionality Upgrade!
- Support network search: Support search engines such as Tavily, Firecrawl, Bocha, Searxng, etc., so that LLMs that do not support search can use the network search function more conveniently.
- Server Proxy Search API: Supports server proxy search API to improve search stability.
- Multi-Key Polling: Search API now supports multi-key polling to improve availability.
-
Writing Experience Optimization!
- Write Requirements First, Then Write: Supports writing requirements first and then writing, which is more in line with the creative process.
- Continue Writing Function: Added a continue writing function to keep creation uninterrupted.
-
More Flexible Configuration!
- Independent Settings: Set up each model and search engine separately for fine-grained configuration.
- Disable Options: Supports server-side disabling of AI Providers and search Providers for flexible control of functions.
- Support no password mode: Support server-side support for password-free mode (not recommended).
- Reset Settings Button: Added a reset settings button to restore default configurations with one click.
-
Interface and Performance Optimization:
- Report Layout Hint Optimization: Optimized report layout hints.
- Mermaid Rendering Hints: Added Mermaid rendering rule hints.
-
Underlying Architecture Upgrade:
- Server Proxy Reconstructed: Reconstructed server proxy forwarding mode, using middleware to rewrite Headers.
- API Adjustments: Removed all files under the
apidirectory, usingrewritesto replace the API.
-
Other Improvements:
- Improved i18n Translation
- Added 404 Page (Not Found Page)
- Improved Project Documentation
This update is dedicated to providing a more powerful, more flexible, and more stable user experience. Thank you for your support!
本次更新带来了海量模型支持、强大的搜索功能、以及更灵活的配置选项!
-
模型选择大爆炸!
- 新增模型支持: 支持 OpenAI、Anthropic、DeepSeek、Grok 等更多主流大模型,以及 OpenRouter、Ollama 等平台。
- 自定义模型列表: 支持自定义模型列表,打造专属模型库。
-
搜索功能再升级!
- 网络搜索: 支持 Tavily、Firecrawl、Bocha、Searxng 等搜索引擎,可以让不支持搜索的 LLM 可以更便捷地使用网络搜索功能。
- 服务器代理搜索 API: 支持服务器代理搜索 API,提升搜索稳定性。
- 多 Key 轮询: 搜索 API 现在支持多 Key 轮询,提高可用性。
-
写作体验优化!
- 先写需求再写作: 支持先写需求再进行写作,更符合创作流程。
- 继续写作功能: 新增继续写作功能,让创作不间断。
-
配置更灵活!
- 独立设置: 为每个模型和搜索引擎单独设置,实现精细化配置。
- 禁用选项: 支持服务端禁用 AI Provider 和搜索 Provider,灵活控制功能。
- 支持无密码模式: 支持服务器端无访问密码模式(不推荐)。
- 重置设置按钮: 增加重置设置按钮,一键恢复默认配置。
-
界面与性能优化:
- 报告排版提示优化: 优化报告排版提示。
- Mermaid 渲染提示: 增加 Mermaid 渲染规则提示。
-
底层架构升级:
- 服务器代理重构: 重构服务器代理转发模式,使用中间件重写 Headers。
- API 调整: 移除
api目录下所有文件,使用rewrites代替 API。
-
其他改进:
- 改进 i18n 翻译
- 新增 404 页面 (Not Found Page)
- 改进项目文档
本次更新致力于提供更强大、更灵活、更稳定的使用体验,感谢您的支持!
-
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Lightning-Fast Deep Research Report
Deep Research uses a variety of powerful AI models to generate in-depth research reports in just a few minutes. It leverages advanced "Thinking" and "Task" models, combined with an internet connection, to provide fast and insightful analysis on a variety of topics. Your privacy is paramount - all data is processed and stored locally.
✨ Features
- Rapid Deep Research: Generates comprehensive research reports in about 2 minutes, significantly accelerating your research process.
- Multi-platform Support: Supports rapid deployment to Vercel, Cloudflare and other platforms.
- Powered by AI: Utilizes the advanced AI models for accurate and insightful analysis.
- Privacy-Focused: Your data remains private and secure, as all data is stored locally on your browser.
- Support for Multi-LLM: Supports a variety of mainstream large language models, including Gemini, OpenAI, Anthropic, Deepseek, Atlas Cloud, Grok, Mistral, Azure OpenAI, any OpenAI Compatible LLMs, OpenRouter, Ollama, etc.
- Support Web Search: Supports search engines such as Searxng, Tavily, Firecrawl, fastCRW, Exa, Bocha, Brave, etc., allowing LLMs that do not support search to use the web search function more conveniently.
- Thinking & Task Models: Employs sophisticated "Thinking" and "Task" models to balance depth and speed, ensuring high-quality results quickly. Support switching research models.
- Support Further Research: You can refine or adjust the research content at any stage of the project and support re-research from that stage.
- Local Knowledge Base: Supports uploading and processing text, Office, PDF and other resource files to generate local knowledge base.
- Artifact: Supports editing of research content, with two editing modes: WYSIWYM and Markdown. It is possible to adjust the reading level, article length and full text translation.
- Knowledge Graph: It supports one-click generation of knowledge graph, allowing you to have a systematic understanding of the report content.
- Research History: Support preservation of research history, you can review previous research results at any time and conduct in-depth research again.
- Local & Server API Support: Offers flexibility with both local and server-side API calling options to suit your needs.
- Support for SaaS and MCP: You can use this project as a deep research service (SaaS) through the SSE API, or use it in other AI services through MCP service.
- Support PWA: With Progressive Web App (PWA) technology, you can use the project like a software.
- Support Multi-Key payload: Support Multi-Key payload to improve API response efficiency.
- Multi-language Support: English, 简体中文, Español.
- Built with Modern Technologies: Developed using Next.js 15 and Shadcn UI, ensuring a modern, performant, and visually appealing user experience.
- MIT Licensed: Open-source and freely available for personal and commercial use under the MIT License.
🎯 Roadmap
- Support preservation of research history
- Support editing final report and search results
- Support for other LLM models
- Support file upload and local knowledge base
- Support SSE API and MCP server
🚀 Getting Started
Use Free Gemini (recommend)
-
Get Gemini API Key
-
One-click deployment of the project, you can choose to deploy to Vercel or Cloudflare
Currently the project supports deployment to Cloudflare, but you need to follow How to deploy to Cloudflare Pages to do it.
-
Start using
Use Other LLM
- Deploy the project to Vercel or Cloudflare
- Set the LLM API key
- Set the LLM API base URL (optional)
- Start using
⌨️ Development
Follow these steps to get Deep Research up and running on your local browser.
Prerequisites
Installation
-
Clone the repository:
git clone https://github.com/u14app/deep-research.git cd deep-research -
Install dependencies:
pnpm install # or npm install or yarn install -
Set up Environment Variables:
You need to modify the file
env.tplto.env, or create a.envfile and write the variables to this file.# For Development cp env.tpl .env.local # For Production cp env.tpl .env -
Run the development server:
pnpm dev # or npm run dev or yarn devOpen your browser and visit http://localhost:3000 to access Deep Research.
Custom Model List
The project allow custom model list, but only works in proxy mode. Please add an environment variable named NEXT_PUBLIC_MODEL_LIST in the .env file or environment variables page.
Custom model lists use , to separate multiple models. If you want to disable a model, use the - symbol followed by the model name, i.e. -existing-model-name. To only allow the specified model to be available, use -all,+new-model-name.
🚢 Deployment
Vercel
Cloudflare
Currently the project supports deployment to Cloudflare, but you need to follow How to deploy to Cloudflare Pages to do it.
Docker
The Docker version needs to be 20 or above, otherwise it will prompt that the image cannot be found.
⚠️ Note: Most of the time, the docker version will lag behind the latest version by 1 to 2 days, so the "update exists" prompt will continue to appear after deployment, which is normal.
docker pull xiangfa/deep-research:latest
docker run -d --name deep-research -p 3333:3000 xiangfa/deep-research
You can also specify additional environment variables:
docker run -d --name deep-research \
-p 3333:3000 \
-e ACCESS_PASSWORD=your-password \
-e GOOGLE_GENERATIVE_AI_API_KEY=AIzaSy... \
xiangfa/deep-research
or build your own docker image:
docker build -t deep-research .
docker run -d --name deep-research -p 3333:3000 deep-research
If you need to specify other environment variables, please add -e key=value to the above command to specify it.
Deploy using docker-compose.yml:
version: '3.9'
services:
deep-research:
image: xiangfa/deep-research
container_name: deep-research
environment:
- ACCESS_PASSWORD=your-password
- GOOGLE_GENERATIVE_AI_API_KEY=AIzaSy...
ports:
- 3333:3000
or build your own docker compose:
docker compose -f docker-compose.yml build
Static Deployment
You can also build a static page version directly, and then upload all files in the out directory to any website service that supports static pages, such as Github Page, Cloudflare, Vercel, etc..
pnpm build:export
⚙️ Configuration
As mentioned in the "Getting Started" section, Deep Research utilizes the following environment variables for server-side API configurations:
Please refer to the file env.tpl for all available environment variables.
Important Notes on Environment Variables:
-
Privacy Reminder: These environment variables are primarily used for server-side API calls. When using the local API mode, no API keys or server-side configurations are needed, further enhancing your privacy.
-
Multi-key Support: Supports multiple keys, each key is separated by
,, i.e.key1,key2,key3. -
Security Setting: By setting
ACCESS_PASSWORD, you can better protect the security of the server API. -
Make variables effective: After adding or modifying this environment variable, please redeploy the project for the changes to take effect.
📄 API documentation
Currently the project supports two forms of API: Server-Sent Events (SSE) and Model Context Protocol (MCP).
Server-Sent Events API
The Deep Research API provides a real-time interface for initiating and monitoring complex research tasks.
Recommended to use the API via @microsoft/fetch-event-source, to get the final report, you need to listen to the message event, the data will be returned in the form of a text stream.
POST method
Endpoint: /api/sse
Method: POST
Body:
interface SSEConfig {
// Research topic
query: string;
// AI provider, Possible values include: google, openai, anthropic, deepseek, atlascloud, xai, mistral, azure, openrouter, openaicompatible, pollinations, ollama
provider: string;
// Thinking model id
thinkingModel: string;
// Task model id
taskModel: string;
// Search provider, Possible values include: model, tavily, firecrawl, crw, exa, bocha, searxng
searchProvider: string;
// Response Language, also affects the search language. (optional)
language?: string;
// Maximum number of search results. Default, `5` (optional)
maxResult?: number;
// Whether to include content-related images in the final report. Default, `true`. (optional)
enableCitationImage?: boolean;
// Whether to include citation links in search results and final reports. Default, `true`. (optional)
enableReferences?: boolean;
}
Headers:
interface Headers {
"Content-Type": "application/json";
// If you set an access password
// Authorization: "Bearer YOUR_ACCESS_PASSWORD";
}
See the detailed API documentation.
GET method
This is an interesting implementation. You can watch the whole process of deep research directly through the URL just like watching a video.
You can access the deep research report via the following link:
http://localhost:3000/api/sse/live?query=AI+trends+for+this+year&provider=pollinations&thinkingModel=openai&taskModel=openai-fast&searchProvider=searxng
Query Params:
// The parameters are the same as POST parameters
interface QueryParams extends SSEConfig {
// If you set the `ACCESS_PASSWORD` environment variable, this parameter is required
password?: string;
}
Model Context Protocol (MCP) Server
Currently supports StreamableHTTP and SSE Server Transport.
StreamableHTTP server endpoint: /api/mcp, transport type: streamable-http
SSE server endpoint: /api/mcp/sse, transport type: sse
{
"mcpServers": {
"deep-research": {
"url": "http://127.0.0.1:3000/api/mcp",
"transportType": "streamable-http",
"timeout": 600
}
}
}
Note: Since deep research take a long time to execute, you need to set a longer timeout to avoid interrupting the study.
If your server sets ACCESS_PASSWORD, the MCP service will be protected and you need to add additional headers parameters:
{
"mcpServers": {
"deep-research": {
"url": "http://127.0.0.1:3000/api/mcp",
"transportType": "streamable-http",
"timeout": 600,
"headers": {
"Authorization": "Bearer YOUR_ACCESS_PASSWORD"
}
}
}
}
Enabling MCP service requires setting global environment variables:
# MCP Server AI provider
# Possible values include: google, openai, anthropic, deepseek, atlascloud, xai, mistral, azure, openrouter, openaicompatible, pollinations, ollama
MCP_AI_PROVIDER=google
# MCP Server search provider. Default, `model`
# Possible values include: model, tavily, firecrawl, crw, exa, bocha, searxng
MCP_SEARCH_PROVIDER=tavily
# MCP Server thinking model id, the core model used in deep research.
MCP_THINKING_MODEL=gemini-2.0-flash-thinking-exp
# MCP Server task model id, used for secondary tasks, high output models are recommended.
MCP_TASK_MODEL=gemini-2.0-flash-exp
Note: To ensure that the MCP service can be used normally, you need to set the environment variables of the corresponding model and search engine. For specific environment variable parameters, please refer to env.tpl.
🪄 How it works
-
Research topic
- Input research topic
- Use local research resources (optional)
- Start thinking (or rethinking)
-
Propose your ideas
- The system asks questions
- Answer system questions (optional)
- Write a research plan (or rewrite the research plan)
- The system outputs the research plan
- Start in-depth research (or re-research)
- The system generates SERP queries
- The system asks questions
-
Information collection
- Initial research
- Retrieve local research resources based on SERP queries
- Collect information from the Internet based on SERP queries
- In-depth research (this process can be repeated)
- Propose research suggestions (optional)
- Start a new round of information collection (the process is the same as the initial research)
- Initial research
-
Generate Final Report
- Make a writing request (optional)
- Summarize all research materials into a comprehensive Markdown report
- Regenerate research report (optional)
flowchart TB
A[Research Topic]:::start
subgraph Propose[Propose your ideas]
B1[System asks questions]:::process
B2[System outputs the research plan]:::process
B3[System generates SERP queries]:::process
B1 --> B2
B2 --> B3
end
subgraph Collect[Information collection]
C1[Initial research]:::collection
C1a[Retrieve local research resources based on SERP queries]:::collection
C1b[Collect information from the Internet based on SERP queries]:::collection
C2[In-depth research]:::recursive
Refine{More in-depth research needed?}:::decision
C1 --> C1a
C1 --> C1b
C1a --> C2
C1b --> C2
C2 --> Refine
Refine -->|Yes| C2
end
Report[Generate Final Report]:::output
A --> Propose
B3 --> C1
%% Connect the exit from the loop/subgraph to the final report
Refine -->|No| Report
%% Styling
classDef start fill:#7bed9f,stroke:#2ed573,color:black
classDef process fill:#70a1ff,stroke:#1e90ff,color:black
classDef recursive fill:#ffa502,stroke:#ff7f50,color:black
classDef output fill:#ff4757,stroke:#ff6b81,color:black
classDef collection fill:#a8e6cf,stroke:#3b7a57,color:black
classDef decision fill:#c8d6e5,stroke:#8395a7,color:black
class A start
class B1,B2,B3 process
class C1,C1a,C1b collection
class C2 recursive
class Refine decision
class Report output
🙋 FAQs
Why does my Ollama or SearXNG not work properly and displays the error TypeError: Failed to fetch?
If your request generates CORS due to browser security restrictions, you need to configure parameters for Ollama or SearXNG to allow cross-domain requests. You can also consider using the server proxy mode, which is a backend server that makes requests, which can effectively avoid cross-domain issues.
🛡️ Privacy
Deep Research is designed with your privacy in mind. All research data and generated reports are stored locally on your machine. We do not collect or transmit any of your research data to external servers (unless you are explicitly using server-side API calls, in which case data is sent to API through your configured proxy if any). Your privacy is our priority.
🙏 Acknowledgements
- Next.js - The React framework for building performant web applications.
- Shadcn UI - Beautifully designed components that helped streamline the UI development.
- AI SDKs - Powering the intelligent research capabilities of Deep Research.
- Deep Research - Thanks to the project
dzhng/deep-researchfor inspiration.
🤝 Contributing
We welcome contributions to Deep Research! If you have ideas for improvements, bug fixes, or new features, please feel free to:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Submit a pull request.
For major changes, please open an issue first to discuss your proposed changes.
✉️ Contact
If you have any questions, suggestions, or feedback, please create a new issue.
📝 License
Deep Research is released under the MIT License. This license allows for free use, modification, and distribution for both commercial and non-commercial purposes.