# How to Configure the Web Search Tool in Deep Code

> Configure the web search tool in Deep Code by setting "webSearchTool": true in settings.json. Get real-time web retrieval for coding assistance.

- Repository: [DeepSeek/awesome-deepseek-agent](https://github.com/deepseek-ai/awesome-deepseek-agent)
- Tags: how-to-guide
- Published: 2026-08-15

---

**Set `"webSearchTool": true` in your `~/.deepcode/settings.json` file and restart Deep Code to enable real-time web retrieval for up-to-date coding assistance.**

Deep Code is a terminal-based AI coding assistant built on the DeepSeek-V4 family of models and distributed through the `deepseek-ai/awesome-deepseek-agent` repository. It exposes a JSON-based configuration system that controls model behavior, reasoning effort, and optional tools. Enabling the web search capability allows the agent to query the internet and parse fresh results when static training data is insufficient.

## Locating the Configuration File

Deep Code reads user preferences from `~/.deepcode/settings.json` on every launch. If this file does not exist, you must create it manually.

According to the Deep Code integration guide at line 53 of [`docs/deepcode.md`](https://github.com/deepseek-ai/awesome-deepseek-agent/blob/main/docs/deepcode.md), this file stores the `webSearchTool` flag alongside environment variables and runtime options. The path is hard-coded relative to your home directory, so ensure the directory exists before writing the file:

```bash
mkdir -p ~/.deepcode

```

## Enabling the Web Search Tool

The **web search tool** is controlled by the `webSearchTool` boolean field. When set to `true`, Deep Code invokes its built-in search module before generating a response, feeding retrieved web data back into the DeepSeek-V4 context window.

### Basic Configuration Example

A minimal configuration requires your API credentials and the explicit toggle:

```json
{
  "env": {
    "MODEL": "deepseek-v4-pro",
    "BASE_URL": "https://api.deepseek.com",
    "API_KEY": "sk-..."
  },
  "thinkingEnabled": true,
  "reasoningEffort": "max",
  "webSearchTool": true
}

```

Save this to `~/.deepcode/settings.json` to activate web retrieval.

### Advanced Configuration with Notifications

You can combine web search with notification hooks and alternative model variants. The following example enables web search for the faster `deepseek-v4-flash` model while triggering a shell script on completion:

```json
{
  "env": {
    "MODEL": "deepseek-v4-flash",
    "BASE_URL": "https://api.deepseek.com",
    "API_KEY": "sk-..."
  },
  "thinkingEnabled": true,
  "reasoningEffort": "high",
  "notify": "/usr/local/bin/deepcode-notify.sh",
  "webSearchTool": true
}

```

## Applying Changes and Verification

Deep Code only reads [`settings.json`](https://github.com/deepseek-ai/awesome-deepseek-agent/blob/main/settings.json) at startup. After modifying the file, fully terminate any running Deep Code session and relaunch:

```bash
deepcode

```

To verify the configuration loaded correctly, query the agent for real-time information (e.g., current package versions). If web search is active, Deep Code will indicate that it is retrieving external data before synthesizing an answer.

## Summary

- **Configuration location**: `~/.deepcode/settings.json` stores all Deep Code preferences.
- **Key field**: Set `"webSearchTool": true` to enable internet retrieval.
- **Documentation**: The official guide in [`docs/deepcode.md`](https://github.com/deepseek-ai/awesome-deepseek-agent/blob/main/docs/deepcode.md) at line 53 documents this setting.
- **Dependencies**: Requires valid `env` credentials (`MODEL`, `BASE_URL`, `API_KEY`) and a restart to take effect.

## Frequently Asked Questions

### Where is the web search option documented in the source repository?

The `webSearchTool` field is documented in the Deep Code integration guide at line 53 of [`docs/deepcode.md`](https://github.com/deepseek-ai/awesome-deepseek-agent/blob/main/docs/deepcode.md). This file outlines all supported runtime flags and their default behaviors.

### Do I need to restart Deep Code after editing settings.json?

Yes. Deep Code parses `~/.deepcode/settings.json` only during initialization. Changes made while the agent is running are ignored until you restart the executable.

### Can I use the web search tool with any DeepSeek model?

Yes, the tool is model-agnostic within the DeepSeek-V4 family. You can pair `webSearchTool: true` with any `MODEL` value defined in your `env` block, such as `deepseek-v4-pro` or `deepseek-v4-flash`.

### Does enabling web search affect response latency?

Enabling web search increases per-turn latency because Deep Code must query external search APIs, parse results, and feed them into the context window before the LLM generates a response. Adjust `reasoningEffort` alongside this setting to balance speed and accuracy.