@squidcloud/client
    Preparing search index...

    Class AiKnowledgeBaseReference

    A reference to an AI knowledge base.

    Index

    Methods

    • Deletes the AI knowledge base.

      Returns Promise<void>

      A promise that resolves when the deletion is complete.

    • Deletes a specific context by its ID.

      Parameters

      • contextId: string

      Returns Promise<void>

    • Deletes multiple contexts.

      Parameters

      • contextIds: string[]

      Returns Promise<void>

    • Returns the AI knowledge base.

      Returns Promise<AiKnowledgeBase | undefined>

      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.

      Returns Promise<string[]>

    • Lists all contexts associated with the knowledge base.

      Parameters

      • OptionaltruncateTextAfter: number

      Returns Promise<AiKnowledgeBaseContext[]>

      Fetches every context in one call with no pagination — expensive for large knowledge bases. Use listContextsPage instead, which supports offset/limit/search.

    • Returns all AI knowledge bases.

      Returns Promise<AiKnowledgeBase[]>

      A promise that resolves to an array of AI Knowledge Bases

    • 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.

      Parameters

      Returns Promise<void>