Keenable
Explore Keenable’s search API, CLI, and MCP server.
Voice web search demo
See a Gradbot demo that answers spoken questions with live web search.
Instant voice search
A voice search agent built on Gradium and Keenable follows this loop:- The user asks a spoken question, such as “What did the Fed announce today?”
- Gradium Speech-to-Text transcribes the request in real time.
- The agent calls a
web_searchtool with a focused query, silently and as its first action. - Keenable returns the top results with titles, sources, and snippets.
- The agent answers in one to three short sentences, citing the source naturally.
- Gradium Text-to-Speech streams the answer back to the user.
Core wiring
The demo exposes search as a single voice-agent tool. Gradium handles the live STT and TTS session; the agent decides when to callweb_search.
Search tool definition
Calling the Keenable Search API
When the model calls the tool, the handler runs a Keenable realtime search. The API takes a POST request with anX-API-Key header and returns a list of results.
title, url, and description, plus an extended snippet and published_at timestamp when available. The request body also accepts optional filters such as site to restrict results to one domain, and published_after or published_before to bound results by publication date.
Returning results to the agent
The tool handler sends a compact text summary back to the agent, along with instructions for how to speak the answer. Keeping the payload small keeps the LLM leg of the turn fast.Agent session config
The session config wires the tool into a live Gradium voice session.Keep the voice loop fast
Latency is what makes voice search feel magical or broken. The demo applies a few rules worth copying:- Search silently. Prompt the agent to call
web_searchimmediately, without filler like “let me look that up”. The first spoken words should be the answer itself. - One search per question. Instruct the agent to trust its first results instead of reformulating the query to double-check. A second search doubles the wait.
- Cap and truncate results. Five results with snippets trimmed to about 300 characters give the LLM enough to answer without inflating the prompt.
- Warm up the search path. Fire a throwaway Keenable query when the user starts a session, a few seconds before the first real question, so DNS and the search origin are already warm.
- Handle failures in the agent’s voice. If a search fails, return a tool message telling the agent to say it could not reach the web right now, rather than letting the model guess.
Authentication
Get an API key from the Keenable console. Keys are prefixed withkeen_ and are passed in the X-API-Key header. Set it alongside your Gradium key:
| Variable | Purpose |
|---|---|
KEENABLE_API_KEY | Keenable search key (keen_...) |
GRADIUM_API_KEY | Gradium voice (STT and TTS) |
Why use Keenable with Gradium?
- Answers inside a conversational pause: realtime mode is fast enough that the caller hears the answer without dead air or spoken filler.
- Built for agents: results come back as clean structured JSON with titles, snippets, and timestamps, ready to summarize and speak.
- Grounded spoken answers: the agent answers from live web results instead of stale model memory, and can cite the source naturally.
- Focused follow-ups: callers can refine a question conversationally, and filters like
siteandpublished_afterkeep each new search sharp.
Demo
The voice web search demo shows the full pattern: a FastAPI app that runs a Gradbot session, exposesweb_search as the agent’s only tool, streams source cards to the browser as results arrive, and reports per-turn latency across STT, LLM, search, and TTS. Use it as a reference for building your own instant voice search experience.