u14app/deep-research

★ 4,688⑂ 1,062

Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server.

About u14app/deep-research

u14app/deep-research is an open-source project on GitHub, mainly written in JavaScript. Use any LLMs (Large Language Models) for Deep Research. Support SSE API and MCP server. It currently holds 4,688 stars and 1,062 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Local & On-Device AI board.

GitHub Repository Details

Repository u14app/deep-research · default branch - · size 0 KB · watchers 0 · source: GitHub REST API and repository README

README

Deep Research

GitHub deployments GitHub Release Docker Image Size Docker Pulls License: MIT

Gemini Next Tailwind CSS shadcn/ui

Vercel Cloudflare PWA

Ask DeepWiki

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

🎯 Roadmap

🚀 Getting Started

Use Free Gemini (recommend)

1. Get Gemini API Key 2. One-click deployment of the project, you can choose to deploy to Vercel or Cloudflare

Deploy with Vercel

Currently the project supports deployment to Cloudflare, but you need to follow How to deploy to Cloudflare Pages to do it.

3. Start using

Use Other LLM

1. Deploy the project to Vercel or Cloudflare 2. Set the LLM API key 3. Set the LLM API base URL (optional) 4. Start using

⌨️ Development

Follow these steps to get Deep Research up and running on your local browser.

Prerequisites

Installation

1. Clone the repository:

   git clone https://github.com/u14app/deep-research.git
   cd deep-research
   

2. Install dependencies:

   pnpm install  # or npm install or yarn install
   

3. Set up Environment Variables:

You need to modify the file env.tpl to .env, or create a .env file and write the variables to this file.

   # For Development
   cp env.tpl .env.local
   # For Production
   cp env.tpl .env
   

4. Run the development server:

   pnpm dev  # or npm run dev or yarn dev
   

Open 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

Deploy with 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:

📄 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

1. Research topic

2. Propose your ideas 3. Information collection 4. Generate Final Report
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

🤝 Contributing

We welcome contributions to Deep Research! If you have ideas for improvements, bug fixes, or new features, please feel free to:

1. Fork the repository. 2. Create a new branch for your feature or bug fix. 3. Make your changes and commit them. 4. 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.

GitHub Stars & Activity

4,688Stars
1,062Forks
0Open issues
JavaScriptLanguage

GitHub Popularity

GitHub stars4,688
Forks1,062
Open issues0
Primary languageJavaScript
License-
Stars gained today0
Created-
Last pushed-

Trending History

Trending statusnot on today's boards

Related AI Projects

1

reorproject / reor

JavaScript★ 8,552⑂ 528
2

mnfst / awesome-free-llm-apis

JavaScript★ 7,887⑂ 753
3

clusterzx / paperless-ai

JavaScript★ 5,950⑂ 331
4

SharpAI / DeepCamera

JavaScript★ 3,066⑂ 480
5

xyproto / algernon

JavaScript★ 3,027⑂ 149
6

ollama / ollama

Go★ 181,296⑂ 17,941
7

open-webui / open-webui

Python★ 152,601⑂ 22,332
8

ChatGPTNextWeb / NextChat

TypeScript★ 88,790⑂ 59,030

More AI Rankings