> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myrouter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# DeepSearcher

DeepSearcher combines cutting-edge LLMs (OpenAI o1, o3-mini, DeepSeek, Grok 3, Claude 4 Sonnet, Llama 4, QwQ, etc.) with vector databases (Milvus, Zilliz Cloud, etc.) to perform search, evaluation, and reasoning on private data, delivering highly accurate answers and comprehensive reports.

**Ideal for:** Enterprise knowledge management, intelligent Q\&A systems, and information retrieval scenarios.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/deepsearch_1.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=d9ad288c35065841ddcac82bae1c7281" alt="Example Image1" width="1960" height="1636" data-path="images/deepsearch_1.png" />

## 1. Obtain Myrouter Configuration Information

### (1) Obtain an API Key

Register and log in to Myrouter. Enter invitation code \[YGHNZ0] during registration to receive a \$2 sign-up bonus.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/common_jiekou_homepage.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=55d0aff41db741a860b652379b3f23e5" alt="Example Image2" width="1920" height="816" data-path="images/common_jiekou_homepage.png" />

Open the \[API Key] management page, click the Add button, enter a custom key name, and generate an API key.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/common_apikey_menu.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=f541c7189280c823874bbae556cb5b0d" alt="Example Image3" width="1907" height="927" data-path="images/common_apikey_menu.png" />

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/deepsearch_4.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=3f26dd45a5f5c2d790dddedd1e23d47e" alt="Example Image4" width="1869" height="936" data-path="images/deepsearch_4.png" />

### (2) Generate and Save the API Key

Note: The key is stored encrypted on the server and cannot be viewed again after creation. Please save your key securely. If lost, you will need to delete it from the console and create a new one.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/common_apikey_save.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=cc3fe57ee498c2b651d6c081bd3fea67" alt="Example Image5" width="1909" height="906" data-path="images/common_apikey_save.png" />

### (3) Obtain the Model ID You Want to Use

Find the desired model in the Myrouter Model Hub and copy the model ID and base URL.

<img src="https://mintcdn.com/novita-3abec9fa/6X7voZXY7_xk3Ecs/images/common_model_square-gemini-3-pro.png?fit=max&auto=format&n=6X7voZXY7_xk3Ecs&q=85&s=3a232ef91b8f58b2d12414d83ec1a6e0" alt="Example Image6" width="1894" height="887" data-path="images/common_model_square-gemini-3-pro.png" />

* Gemini-3-pro-preview
* Gemini-2.5-pro
* Claude-sonnet-4-5
* Gpt-5.1
* Gpt-4o

For other model IDs, maximum context lengths, and pricing, refer to the [Model Hub](https://myrouter.ai/models-console/library?auth_res=success\&is_reg=false).

## 2. Install DeepSearcher

For detailed installation instructions, refer to: [https://github.com/zilliztech/deep-searcher](https://github.com/zilliztech/deep-searcher)

(1) Clone the repository

```
git clone https://github.com/zilliztech/deep-searcher.git
cd deep-searcher
```

(2) Create a virtual environment and activate it

```
#MAKE SURE the python version is greater than or equal to 3.10
python3 -m venv .venv
source .venv/bin/activate
```

(3) Install dependencies

```
pip install -e .
```

## 3. Modify the Example Code to Connect to Myrouter Models

The example code is located at `examples/basic_example.py`. You can use this example to run DeepSearcher.

(1) Configure the API Key

Set the API Key you just obtained as a local environment variable `MYROUTER_API_KEY`.

```
export MYROUTER_API_KEY="Your Myrouter API Key"
```

(2) Configure the LLM and Embedding Models

Add the following code after the `config = Configuration()` line in the example code:

```
config.set_provider_config("llm", "JiekouAI", {"model": "claude-sonnet-4-5-20250929"})
config.set_provider_config("embedding", "JiekouAIEmbedding", {"model": "qwen/qwen3-embedding-8b"})
```

(3) Configure the file paths and prompt for retrieval

Load files from a specified local path and store their contents in a collection. Modify the code where `load_from_local_files` is called. You can use the project-provided `examples/data/WhatisMilvus.pdf` file or your own files. To delete and recreate the collection each time, set `force_new_collection` to `True`.

```
load_from_local_files(
    paths_or_directory=os.path.join(current_dir, "data/WhatisMilvus.pdf"),
    collection_name="milvus_docs",
    collection_description="All Milvus Documents",
    force_new_collection=True, # If you want to drop origin collection and create a new collection every time,set force_new_collection to True
)
question="Write a report comparing Milvus with other vector databases."
```

(4) Run the example code from the project root directory:

```
python examples/basic_example.py
```
