Skip to content

Web Providers

KosmoKrator has two web layers:

  1. Built-in fetch tools that can retrieve a URL directly when the runtime has web access.
  2. Optional external providers for search, extraction/fetch, and crawl workflows.

External providers are off by default. Enable only the capabilities you want in a given project or automation environment.

ProviderSearchFetch / ExtractCrawlEnv var
TavilyyesyesyesTAVILY_API_KEY
FirecrawlyesyesyesFIRECRAWL_API_KEY
ExayesyesnoEXA_API_KEY
Brave SearchyesnonoBRAVE_SEARCH_API_KEY
ParallelyesyesnoPARALLEL_API_KEY
Jina Reader/SearchyesyesnoJINA_API_KEY
SearXNGyesnononone; configure base_url
Perplexity SearchyesnonoPERPLEXITY_API_KEY
OpenAI native web searchyesnonoOPENAI_API_KEY
Anthropic native web searchyesnonoANTHROPIC_API_KEY

Inspect the live provider catalog:

Terminal window
kosmokrator web:providers --json

Use web:configure for ergonomic headless setup:

Terminal window
kosmokrator web:configure tavily \
--api-key-env TAVILY_API_KEY \
--enable \
--search \
--global \
--json
kosmokrator web:configure firecrawl \
--api-key-env FIRECRAWL_API_KEY \
--enable \
--fetch \
--crawl \
--project \
--json
kosmokrator web:configure searxng \
--base-url https://search.example.internal \
--enable \
--search \
--project \
--json

Options:

OptionPurpose
--api-keyStore an API key directly. Prefer --api-key-stdin or --api-key-env for automation.
--api-key-stdinRead the key from stdin.
--api-key-envStore the env var name used at runtime.
--base-urlConfigure provider base URL, required for SearXNG.
--enable, --disableToggle the provider.
--searchMake this the search provider and enable search.
--fetchMake this the fetch provider and allow external fetch.
--crawlMake this the crawl provider and enable crawl.
--global, --projectChoose write scope.
--jsonEmit machine-readable output.

All web settings are available through settings:*:

Terminal window
kosmokrator settings:list --category web --json
kosmokrator settings:set web.search.enabled on --project --json
kosmokrator settings:set web.search.provider tavily --project --json
kosmokrator settings:set web.fetch.allow_external on --project --json
kosmokrator settings:set web.crawl.provider firecrawl --project --json
kosmokrator settings:set web.providers.searxng.base_url https://search.example.internal --project --json

Important settings:

SettingMeaning
web.search.enabledRegisters the optional web_search tool.
web.search.providerDefault provider for search commands/tools.
web.search.max_resultsDefault result count.
web.fetch.providerDefault external fetch provider. native keeps built-in fetch.
web.fetch.allow_externalAllows external extract/fetch provider calls.
web.crawl.enabledRegisters the optional web_crawl tool.
web.crawl.providerDefault crawl provider.
web.native.providerNative provider search backend.
web.native.modecached or live freshness hint for native provider search.
web.providers.PROVIDER.enabledProvider-specific enable toggle.
Terminal window
kosmokrator web:doctor --json
kosmokrator web:search "Symfony TUI terminal docs" --provider tavily --max-results 5 --json
kosmokrator web:fetch https://example.com --provider firecrawl --format markdown --json
kosmokrator web:crawl https://docs.example.com --provider firecrawl --max-pages 10 --json

web:fetch --format accepts markdown, text, or html where the provider supports it.

The agent can use these tools when enabled by mode and settings:

ToolPurpose
web_searchSearch through the configured external or native provider.
web_fetchBuilt-in URL fetch/extract path.
web_fetch_external / external extract pathProvider-backed extraction when web.fetch.allow_external is on.
web_crawlCrawl a site with an enabled crawl provider.

Mode access:

ModeWeb access
Editweb_search, web_fetch and enabled provider tools.
Plansame as Edit, but write tools remain unavailable.
Askread-only web search/fetch docs and fetch/search tools only.

OpenAI and Anthropic native web search can be enabled as web providers:

Terminal window
kosmokrator web:configure openai_native --api-key-env OPENAI_API_KEY --enable --search --global --json
kosmokrator web:configure anthropic_native --api-key-env ANTHROPIC_API_KEY --enable --search --global --json
kosmokrator settings:set web.native.mode live --global --json

Use native search when you want the model provider to own search grounding. Use Tavily/Exa/Brave/etc. when you want search results as explicit tool output for inspection, scripting, and deterministic tests.

External web providers send URLs, queries, and sometimes extracted content to third-party services. For private codebases:

  • Prefer project-level settings so teams can see what is enabled.
  • Keep provider API keys in env vars or the managed secret store.
  • Use SearXNG for private/internal search when you control the endpoint.
  • Keep web.fetch.allow_external off unless the project needs provider extraction.
  • Use web:doctor --json in CI images to verify what is enabled.
Terminal window
kosmokrator web:providers --json
kosmokrator web:doctor --json
kosmokrator settings:get web.search.enabled --json
kosmokrator settings:get web.search.provider --json

Common issues:

SymptomFix
web_search is unavailable to the agentSet web.search.enabled to on and restart the session.
Provider says not configuredSet an API key with web:configure --api-key-stdin or --api-key-env.
Crawl command failsEnable web.crawl.enabled and choose Tavily or Firecrawl.
SearXNG returns connection errorsVerify web.providers.searxng.base_url from the same machine running KosmoKrator.