Skip to content

Web Search

SwarmVault uses a separate webSearch config block for swarmvault lint --deep --web and for the opt-in --gap-fill flag on query, chat, and explore.

This is intentionally separate from the LLM provider registry. LLM providers generate and analyze content. Web-search adapters fetch external evidence snippets and URLs.

Config Shape

{
  "webSearch": {
    "providers": {
      "evidence": {
        "type": "http-json",
        "endpoint": "https://search.example/api/search",
        "method": "GET",
        "apiKeyEnv": "SEARCH_API_KEY",
        "apiKeyHeader": "Authorization",
        "apiKeyPrefix": "Bearer ",
        "queryParam": "q",
        "limitParam": "limit",
        "resultsPath": "results",
        "titleField": "title",
        "urlField": "url",
        "snippetField": "snippet"
      }
    },
    "tasks": {
      "deepLintProvider": "evidence"
    }
  }
}

Supported Provider Types

  • http-json — generic HTTP or JSON search endpoint with configurable field mapping
  • custom — local module adapter for nonstandard search APIs

Behavior

When swarmvault lint --deep --web runs, SwarmVault:

  1. runs the normal deep-lint pass
  2. extracts a bounded set of search queries from those findings
  3. calls the configured web-search provider
  4. attaches external evidence snippets and URLs back onto the findings

If --web is requested without a configured provider, the command fails clearly.

Gap-Fill For Query, Chat, And Explore

swarmvault query --gap-fill and swarmvault chat --gap-fill use the provider named in webSearch.tasks.queryProvider. swarmvault explore --gap-fill uses webSearch.tasks.exploreProvider. Both keys are optional. Add them to the tasks object from the example above, next to deepLintProvider:

{
  "tasks": {
    "deepLintProvider": "evidence",
    "queryProvider": "evidence",
    "exploreProvider": "evidence"
  }
}

Without --gap-fill, these commands never call the web-search adapter. With it, the question text is sent to the configured search endpoint, so pick an endpoint you are comfortable sharing questions with. If --gap-fill is passed and the matching task is not configured, the command fails with a message naming the missing webSearch.tasks key.