Agentic retrieval
Agentic retrieval is the search engine at the core of Kapa, built for agents rather than for people browsing pages. Your agents query it as a tool and get back the most relevant chunks of your knowledge, ranked and with their source URLs. A chunk is a short, self-contained snippet of text taken from a single page or item in your sources. It never generates text: your agent does the reasoning, Kapa provides the grounding. Under the hood, every search works much harder than a simple embedding lookup, and is tuned for high recall with a lean result, so the relevant chunk is not missed and your agent's context does not drown.
It searches the knowledge base that ingestion builds from your connected knowledge sources, the other half of the engine, one section up; how data ingestion works covers how the index is built and kept current. Agentic retrieval is also what the Prebuilt Agents run on, in case you choose those instead of consuming retrieval yourself through the interfaces below or the Agent SDK.
New here? Getting started takes you from indexing to a first retrieval call in about ten minutes. This section is everything after that first success.
Choose your interface
The choice to make is between the two transports, and it is mostly a matter of preference: they expose the same retrieval, with the same behavior and latency.
| Interface | Pick it when |
|---|---|
| MCP server | Your agent framework or client speaks MCP: one click to deploy, and the tools are ready to register |
| HTTP API | You would rather make plain HTTP calls, or you are wiring retrieval into a pipeline rather than an agent |
Both transports also let the agent fetch whole documents by source URL when it needs the complete page rather than chunks (the Documents endpoint, or the documents tool on MCP).
The special case is the Agent SDK: a narrower, more opinionated option built specifically for in-product agents, with agentic retrieval built in. If you do not want to own your agent's orchestration layer at all, you define your tools and the SDK runs the loop, frontend-only, no retrieval setup needed.
Go deeper
- Hosted MCP server: create the server and hand its search tools to any agent.
- HTTP API: the endpoints behind everything, with the API reference.
- Agent SDK: build an agent into your product with retrieval already wired in.
- Tune retrieval size: how many results to retrieve, once retrieval is connected.
- Prompt your agent for grounded answers: uncertainty and source citations in your own agent.