@squidcloud/client
    Preparing search index...

    Interface AiKnowledgeBase

    Represents an AI knowledge base that can be attached to an AI agent.

    interface AiKnowledgeBase {
        appId: string;
        chatModel: AiChatModelSelection;
        contextualIngestUsage?: KnowledgeBaseGraphUsage;
        description: string;
        embeddingModel: AiEmbeddingsModelSelection;
        graphRag?: AiKnowledgeBaseGraphConfig;
        id: string;
        metadataFields: AiKnowledgeBaseMetadataField[];
        ragType?: "contextual" | "basic";
        updatedAt: Date;
        vectorDbType?: "postgres" | "mongoAtlas";
    }
    Index

    Properties

    appId: string

    The app id that the knowledge base belongs to.

    The model name that should be used when asking questions of this knowledge base.

    contextualIngestUsage?: KnowledgeBaseGraphUsage

    Lifetime LLM usage of the contextual-RAG situating-blurb calls on this KB (server-managed; ignored on upsert). Persisted on the KB itself so the record survives Core restarts and covers any vector store. Under the combined-ingest strategy this stays ≈0 — growth is a visible fallback-rate signal.

    description: string

    The user's description of the knowledge base

    The embedding model that should be used for this knowledge base.

    Opt-in GraphRAG configuration. Only honored for vectorDbType:'mongoAtlas' KBs; enables per-chunk entity/relationship extraction at ingest and searchMode:'graph' at query time.

    id: string

    The unique identifier of the knowledge base.

    A set of predefined metadata fields for the knowledge base that can be used for filtering.

    ragType?: "contextual" | "basic"

    Default RAG strategy for newly ingested contexts; a per-request options.ragType overrides it. Omitted ⇒ the server default ('basic'). Changing it affects future ingests only — existing chunks are not re-processed.

    updatedAt: Date

    The timestamp the knowledge base was last updated

    vectorDbType?: "postgres" | "mongoAtlas"

    The vector store backend this knowledge base reads/writes from. Set at creation (defaulting to the server's SQUID_DEFAULT_VECTOR_DB_TYPE, otherwise 'postgres') and immutable thereafter. Optional on the read type for backwards compatibility with older records.