Codumentor logo Codumentor

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.

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, or google_cse.
provider_config{}Provider-specific keys (below).
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

provider_config by provider

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"

searxngbase_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
queryyesSearch 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