Endpoints

Search

API reference for semantic search across documents and knowledge bases.

Overview

The Search API provides semantic search capabilities across your documents and knowledge bases. Unlike keyword search, semantic search understands the meaning of your query and returns the most relevant results even when exact keywords don't match.

POST /workspaces/{workspaceId}/documents/search — Search across all documents in a workspace. Body: { query: string, knowledgeBaseIds?: string[], limit?: number }. Returns ranked chunks with relevance scores, source document references, and highlighted text snippets.

POST /workspaces/{workspaceId}/memory-tables/{tableId}/rows/search — Perform semantic search across memory table rows. Body: { query: string, limit?: number }. Searches only columns marked as "searchable" and returns matching rows with similarity scores.

Search Configuration

Control search behavior with parameters: limit (max results, default 10), threshold (minimum relevance score, 0-1), and knowledgeBaseIds (scope to specific knowledge bases). Higher thresholds return fewer but more relevant results.