Search knowledge files

http
POST /projects/{project_reference}/knowledge/search

Search knowledge files.

Parameters

NameInRequiredDescription
project_referencepathYesProject whose knowledge is selected. Ordinary callers require project.knowledge.read. A run-bound MCP service credential instead must match the persisted run's project and agent plus its actor or runtime transport binding; its effective sealed authority must grant the invoked tool and a knowledge selector. On project-scoped MCP endpoints, the scoped project supplies this value when omitted.

Request body

FieldTypeRequiredDescription
querystringText to match against knowledge file paths and frontmatter. Omit query to list knowledge files.
cursorstringOpaque pagination token. Omit on the first request. To continue REST or MCP pagination, pass page_info.next from the previous response as cursor.
lookup_targetOptional. Omit to search the main preview branch (the default). Set this to target another preview branch, a deployed environment, or a published release; unresolved targets are returned as not found.
limitinteger
shard_countinteger
shard_indexinteger

Responses

StatusDescription
200Ranked knowledge files and the next-page cursor.
400invalid_input: invalid query, limit, shard or cursor
401unauthenticated
404not_found: project or lookup_target not found or not visible
500internal