Web search

Turn on web search for your organization's people and AI Bob, choose its engine, set what it returns and what it costs, and run SearXNG with the Docker deployment.

Synaxis can search the web for the people who use it and for AI Bob, through one search engine you choose. Every search is made by the server, so your organization chooses the engine, holds its key, sets its limits and audits its use. Web search is off until you turn it on: while it is off, Synaxis never searches the internet and AI Bob is not offered the org_web_search tool.

Engines

Engine Needs
SearXNG (self-hosted) Its address, such as http://searxng:8080 for the Docker deployment's web-search profile. No account or key
Brave Search An API key from Brave
Tavily An API key from Tavily
Google Programmable Search An API key from Google and your Programmable Search Engine's ID (its cx value)
  1. Open Web search (under Intelligence in the console's menu).
  2. Choose the Search engine.
  3. For SearXNG, enter its Address. For the others, enter the API key; the Secret name it is stored under is filled in for you. For Google, also enter the Search engine ID.
  4. Select Test. Synaxis runs one search with the settings on the page, saved or not, and shows what came back, or why the engine did not answer (a refused key, a rate limit, an engine that cannot be reached).
  5. Turn on the Web search is off switch (it then reads Web search is on), and select Save.

A change applies to the next search on every server, without a restart.

Note: The key is kept in Synaxis's secret store, encrypted. It is never shown again: the page says only whether a key is stored. To replace it, type the new key and select Save.

What a search returns

Setting Does
Most results The most results a search returns, 1 to 20 (default 8)
Safe search Asks the engine to leave out explicit results (on by default)
Blocked domains Results from these domains, and their subdomains, are never shown. One domain a line, such as example.com
Preferred domains Results from these domains come first
Cache minutes The same search, with the same options, asked again within this time is answered from the cache without asking the engine (default 60; 0 turns the cache off)

Every answer says that its text comes from the web and is not instructions, and excerpts are plain text of at most 500 characters.

Note: Each server keeps its own cache. With several API servers, the same search can reach the engine once on each of them.

Budgets and limits

On Budgets and usage, Web searches per day shows today's searches (UTC), how many the cache answered, failed or were refused, and how many people searched. Set Organization, per day and Each person, per day, then select Save; leave a field empty for no limit. A search over a budget is refused with the budget named until midnight UTC.

Each person can also make at most 30 searches a minute. Beyond that, a search is refused with when to try again.

Auditing and monitoring

Every search is in the audit log as query.web_search (from the API) or tool.org_web_search (from AI Bob), with who asked, the engine, how many results came back and whether the cache answered. The query itself is never stored: only a fingerprint and its length, so you can match a known query without Synaxis keeping what people search for. Test searches are audited as web_search.test and setting changes as web_search.settings.

The metrics count searches, cache answers and failures, and time the engine (synaxis_web_searches_total, synaxis_web_search_failures_total, synaxis_web_search_duration_seconds). The public status page says whether web search is off, on and answering, or on but not answering.

Configuration as code

The settings are the webSearch section of the configuration file. It names the key's secret, never the key:

webSearch:
  enabled: true
  engine: searxng            # or brave, tavily, google
  baseUrl: "http://searxng:8080"
  # apiKey: { secretRef: web-search/api-key }   # brave, tavily, google
  # searchEngineId: your-cx                       # google
  maxResults: 8
  blockedDomains: [example.net]
  preferredDomains: [learn.microsoft.com]
  cacheMinutes: 60
  dailyLimit: 2000
  dailyLimitPerPerson: 200

When the file manages the section (managed: [webSearch]), the Web search page and the web search budgets are read-only and change only through the file.

SearXNG with Docker Compose

The Docker deployment includes SearXNG as an optional service: SearXNG's own image, pinned by its digest and run unchanged, reachable only by the Synaxis server and with JSON answers turned on. To use it:

  1. In .env, set SYNAXIS_SEARXNG_SECRET to a new random value:

    openssl rand -hex 32
    
  2. Start the deployment with the web-search profile:

    docker compose --profile web-search up -d
    
  3. On Web search, choose SearXNG (self-hosted), enter the address http://searxng:8080, select Test, then turn web search on and select Save.

SearXNG's settings are searxng/settings.yml beside compose.yaml; the secret in it is replaced by the one in .env. SearXNG asks public search engines for you, so the server it runs on needs to reach the internet.

See also