Codumentor logo Codumentor Enterprise

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.

  1. Save the provider API key in Settings → User Secrets, preferably with Host-only enabled.
  2. In Web Search settings, select the provider and enter the name of that secret, not the key itself.
  3. 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
ParameterDefaultDescription
enabledtrueEnable the plugin.
provider"duckduckgo"duckduckgo, brave, searxng, tavily, serper, google_cse, or ardinsys.
provider_config{}Provider-specific keys (below).
user_providersCommunity: null; Enterprise: []Personal provider policy: null allows all personal providers, [] disables, a list restricts choices. ardinsys is deployment-only.
max_results10Results per simple search.
timeout30Request timeout in seconds.
research_max_iterations15Cap on research-mode subagent steps. (research_max_turns is a deprecated alias.)
max_urls5URLs the research subagent may fetch per call.
max_chars_per_url30000Character cap per fetched page (research mode).
max_content_length500000Raw 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

ProviderRequiredFree tier (typical)
duckduckgononeUnlimited
braveAPI key (api_key or BRAVE_API_KEY)2000 queries/month
searxngbase_url of your instanceUnlimited (self-hosted)
tavilyAPI key (api_key or TAVILY_API_KEY)Free tier
serperAPI key (api_key or SERPER_API_KEY)2500 free queries
google_cseAPI key (api_key or GOOGLE_API_KEY) and CSE id (cx or GOOGLE_CSE_ID)100/day
ardinsysGateway base_url and the deployment's ARDINSYS_API_KEYDepends 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"
ArgumentRequiredDefaultDescription
queryyes—Search string, or a full research brief when agentic_research is true.
agentic_researchnofalsetrue to research across pages.
num_resultsnomax_resultsSimple 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