Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

MindSearch

> 数据库
Open source

An LLM-based Multi-agent Framework of Web Search Engine (like Perplexity.ai Pro and SearchGPT)

6.9K stars0 likes2 views
WebsiteGitHub

About

An LLM-based Multi-agent Framework of Web Search Engine (like Perplexity.ai Pro and SearchGPT)

✨ MindSearch: Mimicking Human Minds Elicits Deep AI Searcher

Changelog

  • 2024/11/05: MindSearch is now deployed on Puyu! Try it
    • Refactored the agent module based on Lagent v0.5 for better performance in concurrency.
    • Improved the UI to embody the simultaneous multi-query search.

⚽️ Build Your Own MindSearch

Step1: Dependencies Installation

bash
git clone https://github.com/InternLM/MindSearch
cd MindSearch
pip install -r requirements.txt

Step2: Setup Environment Variables

Before setting up the API, you need to configure environment variables. Rename the .env.example file to .env and fill in the required values.

bash
mv .env.example .env
# Open .env and add your keys and model configurations

Step3: Setup MindSearch API

Setup FastAPI Server.

bash
python -m mindsearch.app --lang en --model_format internlm_server --search_engine DuckDuckGoSearch --asy 
  • --lang: language of the model, en for English and cn for Chinese.

  • --model_format: format of the model.

    • internlm_server for InternLM2.5-7b-chat with local server. (InternLM2.5-7b-chat has been better optimized for Chinese.)
    • gpt4 for GPT4. if you want to use other models, please modify models
  • --search_engine: Search engine.

    • DuckDuckGoSearch for search engine for DuckDuckGo.
    • BingSearch for Bing search engine.
    • BraveSearch for Brave search web api engine.
    • GoogleSearch for Google Serper web search api engine.
    • TencentSearch for Tencent search api engine.

    Please set your Web Search engine API key as the WEB_SEARCH_API_KEY environment variable unless you are using DuckDuckGo, or TencentSearch that requires secret id as TENCENT_SEARCH_SECRET_ID and secret key as TENCENT_SEARCH_SECRET_KEY.

  • --asy: deploy asynchronous agents.

Step4: Setup MindSearch Frontend

Providing following frontend interfaces,

  • React

First configurate the backend URL for Vite proxy.

bash
HOST="127.0.0.1"  # modify as you need
PORT=8002
sed -i -r "s/target:\s*\"\"/target: \"${HOST}:${PORT}\"/" frontend/React/vite.config.ts
bash
# Install Node.js and npm
# for Ubuntu
sudo apt install nodejs npm

# for windows
# download from https://nodejs.org/zh-cn/download/prebuilt-installer

# Install dependencies

cd frontend/React
npm install
npm start

Details can be found in React

  • Gradio
bash
python frontend/mindsearch_gradio.py
  • Streamlit
bash
streamlit run frontend/mindsearch_streamlit.py

Change Web Search API

To use a different type of web search API, modify the searcher_type attribute in the searcher_cfg located in mindsearch/agent/__init__.py. Currently supported web search APIs include:

  • GoogleSearch
  • DuckDuckGoSearch
  • BraveSearch
  • BingSearch
  • TencentSearch

For example, to change to the Brave Search API, you would configure it as follows:

python
BingBrowser(
    searcher_type='BraveSearch',
    topk=2,
    api_key=os.environ.get('BRAVE_API_KEY', 'YOUR BRAVE API')
)

Using the Backend Without Frontend

For users who prefer to interact with the backend directly, use the backend_example.py script. This script demonstrates how to send a query to the backend and process the response.

bash
python backend_example.py

Make sure you have set up the environment variables and the backend is running before executing the script.

Debug Locally

bash
python -m mindsearch.terminal

License

This project is released under the Apache 2.0 license.

Citation

If you find this project useful in your research, please consider cite:

@article{chen2024mindsearch,
  title={MindSearch: Mimicking Human Minds Elicits Deep AI Searcher},
  author={Chen, Zehui and Liu, Kuikun and Wang, Qiuchen and Liu, Jiangning and Zhang, Wenwei and Chen, Kai and Zhao, Feng},
  journal={arXiv preprint arXiv:2407.20183},
  year={2024}
}

Our Projects

Explore our additional research on large language models, focusing on LLM agents.

  • Lagent: A lightweight framework for building LLM-based agents
  • AgentFLAN: An innovative approach for constructing and training with high-quality agent datasets (ACL 2024 Findings)
  • T-Eval: A Fine-grained tool utilization evaluation benchmark (ACL 2024)

Issues· 58 open

View all issuesOpen on GitHub
  • #322

    输出的机械审计层(开源)

    Updated Sep 12, 2026
  • #273

    `agent_memory` list index out of range

    Updated Aug 20, 2026
  • #315

    GNAP: git-native coordination for MindSearch's parallel web search agents

    Updated Mar 15, 2026
  • #312

    问答只回复一次,没有完整推理搜索回复

    Updated Feb 2, 2026
  • #306

    回复后卡住不创建节点了

    Updated Feb 2, 2026
  • #311

    Searcher Never gets trigger while using OpenAI API

    Updated Feb 2, 2026
  • #310

    OpenAI always returns choices as empty array on every input.

    Updated Jul 29, 2025
  • #309

    The ExecutionAction class doesn't take any plugins in its constructor

    Updated Jul 24, 2025
  • #308

    链接本地qwen32b大模型失败

    Updated Jul 16, 2025
  • #307

    使用qwen模型调api时报错,希望尽快得到您的回复

    Updated Jun 27, 2025

> Tags

JavaScriptai-search-enginegptllmllms

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 23, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库