Knowledge Bases

Retrieve Knowledge Base

Changed on

Embed query and return the top-k matching chunks from the KB.

Requires write:agents, because chunks contain your data (the same gate as /agents/{id}/logs).

A kb_id from another tenant returns 404, like the read endpoint, so the response never reveals whether it exists.

Rate limit: 30 req/min per tenant -> 429.

The Streamkap MCP server's streamkap_kb_retrieve tool calls this endpoint, so external agents get the same results. Deployed Streamkap agents query the knowledge base's vector store directly rather than through this endpoint.

post/knowledge-bases/{kb_id}/retrieve

Request

Path parameters

kb_idstring required

Request body

querystring required
top_kinteger

Response

Successful Response

Changes