Hanzo
OpenapiKnowledge

Runs a semantic search over the caller org's own knowledge — its wiki pages,…

Runs a semantic search over the caller org's own knowledge — its wiki pages, its agent memories and everything its connectors have synced — and returns…

POST /v1/knowledge/search

Addresshttps://api.hanzo.ai/v1/knowledge/search
MethodPOST
Operationpost_knowledge_search
AuthAuthorization: Bearer $HANZO_API_KEY

Runs a semantic search over the caller org's own knowledge — its wiki pages, its agent memories and everything its connectors have synced — and returns the matching passages. This is the RAG entry point: an agent asks "what does this org know about X" and the org's OWN vector namespace answers. The org comes from the validated principal, and both the collection and the payload filter are pinned to it, so cross-tenant retrieval is impossible. An unreachable index returns an honest empty result set with degraded=true, never a 5xx.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
doctypesbodystring[]DocTypes restricts retrieval to a subset of the indexed knowledge doctypes (kb-page, kb-memory, kb-source).
limitbodyintegerLimit bounds the hits returned.
projectbodystringProject narrows retrieval to one project scope.
querybodystringQuery is the natural-language question.

Response

StatusBodyMeaning
200searchOutok

200 body — 9 fields.

FieldInTypeAlwaysDescription
degradedbodybooleanDegraded is true when the index was unreachable and this answer is honestly empty rather than wrong — a RAG caller continues with no context instead of failing…
hitsbodyhit[]Hits are the matching passages, most relevant first.
hits[].doctypebodystringDocType is which kind of knowledge matched: kb-page (a wiki page), kb-memory (a unit of agent memory) or kb-source (a document a connector ingested).
hits[].namebodystringName is the document's name in the framework store — the id to read or open it with.
hits[].projectbodystringProject is the project scope the document was saved under.
hits[].providerbodystringProvider is the connector that ingested the document — github, slack, google or notion.
hits[].scorebodynumberScore is the cosine similarity between the query's embedding and the document's, from -1 to 1, higher being closer — the collection is created with Cosine…
hits[].titlebodystringTitle is the document's title as it was indexed.
hits[].urlbodystringURL is the document's link back into the app it was ingested from.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Knowledge API · All Hanzo APIs · Interactive reference

How is this guide?

On this page