Deletes the AI knowledge base.
A promise that resolves when the deletion is complete.
Deletes a specific context by its ID.
Deletes multiple contexts.
Gets the download URL for the requested context.
Object with temporary URL to download the requested context. Will be undefined if file is unavailable.
Returns a bounded slice of the knowledge base's entity graph (highest-degree entities and the
relationships among them) for exploration/visualization. Requires graphRag.enabled.
Optionalrequest: Omit<ExploreKnowledgeBaseGraphRequest, "knowledgeBaseId">AI-generates descriptions for this knowledge base's metadata fields and returns them WITHOUT
persisting — the caller saves them onto the KB (e.g. via upsertKnowledgeBase). By default only
fields with an empty description are generated; pass overwriteExisting to regenerate all.
Optionaloptions: Omit<GenerateMetadataFieldDescriptionsRequest, "knowledgeBaseId">Optional fieldNames to limit generation to specific fields, and overwriteExisting.
The (re)generated fields with their new descriptions (not yet persisted).
Retrieves a specific context by its ID.
Returns the knowledge base's graph build/readiness status: counts, facets, staleness, the most
recent rebuild job, and the graph's LLM token/cost usage (ingestUsage, lastRebuildUsage).
Returns the AI knowledge base.
A promise that resolves to the AI knowledge base or undefined if not found.
Lists the ids for all contexts associated with the knowledge base.
Lists all contexts associated with the knowledge base.
OptionaltruncateTextAfter: numberFetches every context in one call with no pagination — expensive for large knowledge
bases. Use listContextsPage instead, which supports offset/limit/search.
Lists contexts associated with the knowledge base, paginated via offset/limit and optionally
filtered via search (case-insensitive substring match on id/title only).
Optionaloptions: ListKnowledgeBaseContextsOptionsThe requested page of contexts, plus totalCount (ignoring offset/limit).
Returns all AI knowledge bases.
A promise that resolves to an array of AI Knowledge Bases
Queries the knowledge base's graph (documents, entities, themes, facets) through the closed op set
— overview / resolve / describe / subtree / docsUnder / conceptsOf / neighborhood / pathBetween /
globalSummary. Requires graphRag.enabled on the knowledge base.
Enqueues a graph rebuild/backfill. The default 'full' mode re-extracts every context with an
LLM and rebuilds the concept layer (topics + facets); mode: 'structural' keeps the
already-extracted entity graph (extracting only contexts never graph-indexed) and rebuilds just
the concept layer — a small fraction of a full rebuild's LLM cost. Requires graphRag.enabled.
Track progress via getGraphStatus's buildJob; only one rebuild can run per knowledge
base at a time.
Optionalrequest: Omit<RebuildKnowledgeBaseGraphRequest, "knowledgeBaseId">Performs a semantic search in the knowledge base and returns chunks from the different contexts.
Performs a semantic search in the knowledge base and returns contexts with reasoning. Can be used for matchmaking or similarity search.
Performs a semantic search in the knowledge base and returns contexts with reasoning. Can be used for matchmaking or similarity search.
Like search, but returns the full response — including graphContext (the traversed
subgraph) when the search ran with searchMode: 'graph' and graphOptions.includeGraphContext.
search predates graphContext and keeps returning only the chunks.
Adds or updates a single context.
Optionalfile: FileAdds or updates multiple contexts. A context request may omit its contextId; when it does, the server
generates one and rejects the request if identical content already exists in the knowledge base
(content-level dedup). Requests that carry an explicit contextId overwrite that context unconditionally.
Optionalfiles: File[]Optionaloptions: UpsertContextsOptionsUpserts the AI knowledge base.
A reference to an AI knowledge base.