The knowledge retrieval API for AI agents

Build an agent-ready index across your unstructured data, then retrieve accurate, cited context through one API or MCP server.

How do I rotate API keys without downtime?

How do I rotate API keys without downtime?

API playground ↗

Knowledge base

Synced 2m ago

Developer docs

9 matches

SDK repo (GitHub)

4 matches

API reference (OpenAPI)

3 matches

Help center

2 matches

Resolved tickets

1 match

Knowledge base

Synced 2m ago

Developer docs

9 matches

SDK repo (GitHub)

4 matches

API reference (OpenAPI)

3 matches

Help center

2 matches

Resolved tickets

1 match

product-agent.py

412 tokens

# agent loop · product-agent.py

● retrieve(rotate API keys)

⎿ 11 results · coverage low

● retrieve(API key rollover without downtime)

⎿ 8 more · coverage ok → stop searching

[ { source_url: docs.acme.com/security/api-keys#rotation,

content: Create a secondary key first, update your

applications, verify traffic, then revoke the old key. } ]

Any knowledge source

30+ connectors, any website, multimodal PDFs and images.

Always in sync

Change one page and only that page re-indexes, in minutes.

Zero maintenance

No pipeline, no vector DB, no embedding migrations.

2x more accurate

Beats DIY retrieval and web search on recall@5.

What engineers build with Kapa

In-product agent

Helps customers inside your product

Helps customers inside your product

Connected sources

01

Connect your documentation, SDK repos, and help center

02

Add one retrieval tool call to your agent, any framework

03

Ship cited answers inside your product UI

POST /query/v1/projects/acme/retrieval

{ query: How do I rotate an API key with the Python SDK?, use_pruning: true }

✓ developer documentation · 8 chunks

✓ GitHub code · client.py, keys.py · 5 chunks

✓ help center · 3 chunks

✓ OpenAPI spec · /keys endpoints

✓ PDF guides · 2 chunks

[

{ source_url: docs/sdk/auth#rotate-keys },

{ source_url: github/acme-python/client.py#L214 }

]

agent: Call acme.keys.rotate() with an org token. The old key stays valid for 24 hours, so in-flight jobs finish before cutover.

cited: docs/sdk/auth#rotate-keys · client.py L214

How Kapa works

01

Ingest

Connect documentation, tickets, code, and wikis. Kapa parses and indexes them into one knowledge base, synced within minutes of a change.

+23

01

Ingest

Connect documentation, tickets, code, and wikis. Kapa parses and indexes them into one knowledge base, synced within minutes of a change.

+23

02

Query

Your agent calls one API or hosted MCP server, from whatever framework you build in.

Claude

OpenAI Agents SDK

Vercel AI SDK

LangChain

OpenCode

+ any framework

02

Query

Your agent calls one API or hosted MCP server, from whatever framework you build in.

Claude

OpenAI Agents SDK

Vercel AI SDK

LangChain

OpenCode

+ any framework

03

Retrieve

Fast and accurate agentic retrieval that keeps searching until it finds what it’s looking for.

2x

more accurate than the alternatives

03

Retrieve

Fast and accurate agentic retrieval that keeps searching until it finds what it’s looking for.

2x

more accurate than the alternatives

04

Prune

Wide retrieval brings back more than the question needs. The pruner removes the unnecessary context before it ever reaches your model.

83%

less context, lower cost per query

04

Prune

Wide retrieval brings back more than the question needs. The pruner removes the unnecessary context before it ever reaches your model.

83%

less context, lower cost per query

05

Improve

Unanswered questions flow back as knowledge gaps, so the knowledge base improves every week.

05

Improve

Unanswered questions flow back as knowledge gaps, so the knowledge base improves every week.

Knowledge base · live index

every chunk indexed and live

Proven best in production across 200+ live deployments

2x

2x

more likely to find the right source than DIY retrieval and web search

Recall@5 on human-annotated questions from four production knowledge bases. Kapa averages 1.9x the alternatives shown, evaluated on publicly available information.

Recall@5 · scale 0–75%

Higher is better

Kapa

Web search

DIY retrieval

Kapa

65%

Firecrawl + Pinecone

37%

Exa

35%

Azure AI Foundry

35%

Tavily

27%

Grafana

ClickHouse

n8n

OpenAI

Netlify

Logitech

Matillion

Airbyte

Camunda

Telenor

We build agentic retrieval systems at real-world scale

Our research team constantly evaluates and improves how we handle images, PDFs, source parsing, and retrieval infrastructure.

40B+

tokens of agent-ready knowledge, indexed in real time

10M+

agent calls served every month

Read our research

Build an agent-ready index. Retrieve cited context.

Build an agent-ready index. Retrieve cited context.

Build an agent-ready index. Retrieve cited context.

One API and MCP server for every agent you ship, grounded in your product knowledge.

retrieve.sh

$ curl -s https://api.kapa.ai/query/v1/projects/$PROJECT/retrieval/

-H Authorization: Bearer $KAPA_API_KEY

-d {

query: How do I rotate API keys?,

use_pruning: true,

top_k: 15

}

Focus on building your agent, not retrieval infrastructure

Ingest

Building data connectors

Crawling complex websites (with JS)

Converting PDFs and images

Index

Handling incremental data indexing

Designing optimal conversion and chunking

Choosing embeddings/storage strategy

Retrieve

Building retrieval harness (grep, semantic)

Optimizing recall/accuracy

Tuning context size and num results

Operate

Owning vector/filesystem infra

Migrating when new research/models come out

Providing analytics for the business

Why engineers love Kapa

G2

Rated 4.9/5 on G2

★★★★★

Y

Backed by Y Combinator

“We use Kapa to power self-serve AI agents on our docs, which cuts time-to-value dramatically.”

Jan Oberhauser

CEO · n8n

Netlify

“Kapa is super easy to set up. As we expand, we’ll find more integration points…”

Dana Lawson

CTO, Netlify

“Thousands of complex sources across PDFs, versioned docs, and code. Kapa keeps it all in sync as we ship.”

DC

Deidre Casey

AI Integration Manager · Nordic Semiconductor

Mastra

“Kapa lets us focus on building agents, not maintaining retrieval infrastructure.”

Sam Bhagwat

CEO, Mastra

monday.com

“Kapa is key infrastructure for powering context in our user-facing agents.”

DH

Daniel Hai

AI Product Manager · monday.com

Port

“Kapa started as an agent on our docs. Now it’s the interface layer between our product and everyone.”

Matan Grady

Product Director, Port

Rather not build your own agent?

Deploy a pre-built agent on the knowledge base you already connected. Add the retrieval API whenever you want to build your own.

Put instant answers right where users get stuck. One snippet embeds the Ask AI widget on your website and documentation.

K

Acme Docs AI

Set the panel state with a value mapping:

{ type: value, options: {

0: { text: Offline },

1: { text: Online }

}}

Use thresholds instead when switching color across numeric bands.

docs / panels

github #4821

Ask anything…

Powered by kapa

Enterprise-ready by default

Zero data retention

Available on enterprise plans. Queries and retrieved context can be purged automatically, and your knowledge is never used to train models.

SOC 2 & GDPR

SOC 2 Type II reports and DPAs ready for procurement, so infosec says yes faster.

SSO & RBAC

Single sign-on, role-based access, and audit logs across the platform.

Data regions

US and EU hosting available, so your knowledge stays where compliance needs it.

Retrieval built for your agents

Retrieval built for your agents

Retrieval built for your agents

The most accurate retrieval API over your product knowledge. Give your agents the context they need.

Questions, answered

What is Kapa, in one sentence?

Kapa is a managed retrieval API and MCP server that keeps your product knowledge ingested, indexed, and continuously synced, so the agents you build always answer from accurate, cited context.

How is this different from building retrieval in-house?

+

Why not use Bedrock Knowledge Bases, Agent Search, or Foundry IQ?

+

When would I use a web search API like Exa or Tavily instead?

+

Which knowledge sources can Kapa ingest?

+

Does it work with my agent framework and model?

+

Is my data secure? Is it used for training?

+

I just want a documentation assistant. Do I have to build an agent?

+

How does pricing work?

+

Can Kapa run on-prem or in our own VPC?

+