Back to demo

How It Works

Answer current questions aloud using two Exa Instant results and their relevant passages.

Why Exa

Voice interactions have little time to retrieve and read full pages. Exa Instant returns two results with the passages that answer the question, giving the response model current sources without a large context payload.

The Pipeline

Overview

The browser sends text to one streaming route. A language model first decides whether the question needs web search. Only the search branch calls Exa; both branches stream the final text to ElevenLabs and return audio chunks over Server-Sent Events.

  1. Route the question to direct answer or web search.
  2. Optimize dates and category for search-bound questions.
  3. Retrieve two Exa Instant results with focused highlights.
  4. Synthesize a cited answer and stream speech.

Steps

1

Decide whether current evidence is needed

The routing model receives the web_search tool definition and has a three-second timeout. Direct questions reuse the router's answer; a timeout starts a fresh direct completion.

2

Optimize and run Exa Instant

The search path calls searchAndContents with type instant, numResults 2, livecrawl fallback, and up to 4,000 characters of highlights per result. Date bounds and a supported category are included only when the query optimizer returns them.

/search

3

Synthesize a short cited answer

The retrieved title, URL, date, domain, and up to 1,000 characters of highlight text per source go to the answer model, which defaults to gemini-3.7-flash. The response is constrained to short spoken prose with citation markers.

4

Stream text and audio together

Text is stripped of citation markers for speech and sent to ElevenLabs over a WebSocket using eleven_flash_v2_5 and mp3_22050_32. The HTTP TTS fallback uses the same flash model on the main path; a separate ttsOnly fallback uses eleven_turbo_v2_5.

Endnote

Every searched question uses type instant, two results, and livecrawl fallback. The flow does not switch search types, force live crawling, or fetch full page text.