Web Search
Gives the agent a web_search tool. Simple mode returns titles, URLs, and snippets. Research mode (agentic_research=true) has a subagent search, open pages, and synthesize an answer.
Module: codumentor.plugins.websearch.
Users can turn the tool off for themselves in Settings → Extensions → Web Search.
Personal providers and API keys
When administrator policy permits it, users can also select a Personal search provider there. Deployment default keeps the administrator-configured provider and credentials. A personal selection uses the user's own configuration, never the deployment's API key.
- Save the provider API key in Settings → User Secrets, preferably with Host-only enabled.
- In Web Search settings, select the provider and enter the name of that secret, not the key itself.
- For SearXNG, also enter the instance URL. For Google, also enter the search engine ID (
cx). DuckDuckGo needs no key.
The plugin's args.user_providers controls personal choices:
# Allow every personal provider (the Community default)
user_providers: null
# Or allow only these providers
user_providers: [duckduckgo, brave, tavily]
# Or disable personal providers (the Enterprise default)
user_providers: []
The deployment provider remains usable regardless of this allowlist. ardinsys is deployment-only: it is not a personal choice and cannot be included in user_providers. Policy is enforced on every search, not just in the settings dropdown. Disabling personal providers ignores saved personal settings and uses the deployment default. When an allowlist is active, a saved selection that is no longer allowed fails with instructions to choose another provider or Deployment default. Missing personal credentials also fail rather than silently using deployment credentials. Personal keys remain in User Secrets; ordinary plugin settings store only the secret name and non-secret provider options.
Configuration
plugins:
- module: codumentor.plugins.websearch
class: WebSearchPlugin
args:
enabled: true
provider: "duckduckgo"
max_results: 10
timeout: 30
target_agents: "main"
research_max_iterations: 15
max_urls: 5
max_chars_per_url: 30000
max_content_length: 500000
| Parameter | Default | Description |
|---|---|---|
enabled | true | Enable the plugin. |
provider | "duckduckgo" | duckduckgo, brave, searxng, tavily, serper, google_cse, or ardinsys. |
provider_config | {} | Provider-specific keys (below). |
user_providers | Community: null; Enterprise: [] | Personal provider policy: null allows all personal providers, [] disables, a list restricts choices. ardinsys is deployment-only. |
max_results | 10 | Results per simple search. |
timeout | 30 | Request timeout in seconds. |
research_max_iterations | 15 | Cap on research-mode subagent steps. (research_max_turns is a deprecated alias.) |
max_urls | 5 | URLs the research subagent may fetch per call. |
max_chars_per_url | 30000 | Character cap per fetched page (research mode). |
max_content_length | 500000 | Raw byte cap per fetched page (research mode). |
target_agents | "main" | "main", "subagent", or "all". |
API keys in provider_config accept ${ENV_VAR} (process environment) or ${secret:<name>} (per-user, via User Secrets). Paid providers also read a well-known env var if api_key is omitted.
Providers
| Provider | Required | Free tier (typical) |
|---|---|---|
| duckduckgo | none | Unlimited |
| brave | API key (api_key or BRAVE_API_KEY) | 2000 queries/month |
| searxng | base_url of your instance | Unlimited (self-hosted) |
| tavily | API key (api_key or TAVILY_API_KEY) | Free tier |
| serper | API key (api_key or SERPER_API_KEY) | 2500 free queries |
| google_cse | API key (api_key or GOOGLE_API_KEY) and CSE id (cx or GOOGLE_CSE_ID) | 100/day |
| ardinsys | Gateway base_url and the deployment's ARDINSYS_API_KEY | Depends on the hosted search plan |
provider_config by provider
ardinsys — hosted search through the Ardinsys gateway. Set base_url to the same API base as agent_base_url, including /v1; the provider appends /search. The gateway must have the search route enabled. Use the same ARDINSYS_API_KEY as for the model; no third-party search key is needed. If api_key is omitted, the provider reads ARDINSYS_API_KEY from the process environment.
provider: ardinsys
provider_config:
base_url: "http://127.0.0.1:1248/v1/" # Example with a local SSH tunnel
api_key: "${ARDINSYS_API_KEY}"
depth: "basic" # basic | advanced, subject to gateway policy
topic: "general" # general | news
time_range: null # null | day | week | month | year
include_domains: []
exclude_domains: []
Hosted search returns at most 20 results per request. In research mode the search requests go through the gateway, but page fetching still connects directly from the Codumentor host and needs web access.
duckduckgo — no key.
provider: duckduckgo
provider_config:
region: "wt-wt" # search region; wt-wt = worldwide
safesearch: "moderate" # off | moderate | strict
timelimit: null # d | w | m | y
brave
provider: brave
provider_config:
api_key: "${BRAVE_API_KEY}" # or ${secret:brave_api_key}
country: "us"
search_lang: "en"
safesearch: "moderate"
searxng — base_url is required.
provider: searxng
provider_config:
base_url: "https://searx.example.com"
categories: "general"
language: "en"
safesearch: 1 # 0=off, 1=moderate, 2=strict
tavily
provider: tavily
provider_config:
api_key: "${TAVILY_API_KEY}"
search_depth: "basic" # or advanced
include_answer: false
include_domains: []
exclude_domains: []
serper
provider: serper
provider_config:
api_key: "${SERPER_API_KEY}"
gl: "us"
hl: "en"
google_cse
provider: google_cse
provider_config:
api_key: "${GOOGLE_API_KEY}"
cx: "${GOOGLE_CSE_ID}"
gl: "us"
lr: null # optional language restriction
safe: "medium"
Tool: web_search
| Argument | Required | Default | Description |
|---|---|---|---|
query | yes | — | Search string, or a full research brief when agentic_research is true. |
agentic_research | no | false | true to research across pages. |
num_results | no | max_results | Simple mode only. |
In research mode, write a detailed task rather than a short keyword query. Pair with Web Retrieve when you already have URLs.
Notes
- Missing or invalid keys surface as a setup error from that provider.
- Prefer simple mode for a quick lookup; research mode is slower by design.