Skip to main content

NLWeb /ask

EvalGate exposes an authenticated NLWeb-compatible /ask endpoint for agents that need to find published documentation. It performs bounded deterministic search over EvalGate’s published documentation catalog. It does not call a model, read repositories, access customer data, or summarize private content. Every request requires an organization-scoped EvalGate API key with the docs:read scope:
The endpoint also accepts the modern POST shape:
The legacy POST shape { "query": "How do I connect MCP?", "streaming": true } remains accepted. GET uses query, q, or text as the query parameter. Results are list/search results only; summarize and generate modes return a truthful unsupported-mode error.

JSON response

Non-streaming requests return query_id, the normalized query, a deterministic results list, and NLWeb metadata:

Streaming response

Set prefer.streaming to true (or use the legacy streaming field) to receive text/event-stream. Events are emitted in this order:
  1. start — identifies the query.
  2. result — one event per matching published document.
  3. complete — reports the result count.
The WWW-Authenticate challenge on a 401 points agents to EvalGate’s protected-resource metadata. A key with no docs:read grant receives 403.