MindSearch is an LLM-based multi-agent web search engine framework designed to simulate the human thought process and enable deep AI search. Its design goals are similar to Perplexity.ai Pro and SearchGPT, accomplishing complex web search tasks through multi-agent collaboration.
Main capabilities:
- Multi-agent framework: Built on LLMs, it simulates human search thinking and supports deep search.
- Multi-query concurrent search: The UI reflects simultaneous multi-query search, improving search efficiency.
- Configurable models and search engines: Supports multiple model formats and search engines.
Usage:
- Dependency installation: Install dependencies according to the repository instructions.
- Environment variable configuration: Rename .env.example to .env and fill in the required values.
- Set up the MindSearch API: Start the FastAPI server, and you can specify parameters:
- --lang: Model language, en for English, cn for Chinese.
- --model_format: Model format. internlm_server means using InternLM2.5-7b-chat on a local server (better optimized for Chinese); gpt4 means using GPT-4; if you need other models, please modify models.
- --search_engine: Search engine. Options include DuckDuckGoSearch, BingSearch, BraveSearch, GoogleSearch (Google Serper web search api), TencentSearch. Except for DuckDuckGo, you need to set the Web search API key as the environment variable WEB_SEARCH_API_KEY; TencentSearch requires TENCENT_SEARCH_SECRET_ID and TENCENT_SEARCH_SECRET_KEY.
- --asy: Deploy asynchronous agents.
- Set up the MindSearch frontend: A frontend interface is provided, and you need to configure the backend URL for the Vite proxy. For details, see the React section.
- Change the Web search API: Modify the searcher_type attribute of searcher_cfg in mindsearch/agent/init.py. Currently supported Web search APIs include DuckDuckGoSearch and others. For example, changing to the Brave Search API requires corresponding configuration.
- Use the backend without the frontend: You can use the backend_example.py script to interact directly with the backend, send queries, and process responses. Before execution, make sure the environment variables are set and the backend is running.
- Local debugging: The project provides a local debugging method.
Applicable scenarios:
- Building AI search applications similar to Perplexity.ai Pro or SearchGPT.
- Researching multi-agent collaboration and LLM agents.
- Scenarios that require deep web search and integration of information from multiple sources.
Limitations:
- The project uses the Apache 2.0 license.
- Specific details such as performance, fees, pricing, and platform support are not yet provided.
- Using search engines other than DuckDuckGo requires configuring API keys yourself.
- Model support needs to be modified according to the code; by default, InternLM2.5-7b-chat and GPT-4 are supported.