{"record":{"id":"7c989e5e641002e4","repo":"mastra-ai/mastra","slug":"knowledge-storage-domain-is-not-available-on-thi","errorCode":null,"errorMessage":"Knowledge storage domain is not available on ${this.storage.constructor.name}","messagePattern":"Knowledge storage domain is not available on (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/memory/src/index.ts","lineNumber":527,"sourceCode":"        throw new Error(\n          '`retrieval: { vector: true }` requires an embedder. Pass an `embedder` option to your Memory instance.',\n        );\n      }\n    }\n    if (omConfig?.experimental_subconscious) {\n      if (!this.vector) {\n        throw new Error('Subconscious semantic knowledge requires a vector store. Pass a `vector` option to Memory.');\n      }\n      if (!this.embedder) {\n        throw new Error('Subconscious semantic knowledge requires an embedder. Pass an `embedder` option to Memory.');\n      }\n    }\n  }\n\n  private async getKnowledgeStore(): Promise<KnowledgeStorage> {\n    const store = await this.storage.getStore('knowledge');\n    if (!store) {\n      throw new Error(`Knowledge storage domain is not available on ${this.storage.constructor.name}`);\n    }\n    return store;\n  }\n\n  public async getKnowledgeSemanticIndex(): Promise<KnowledgeSemanticIndexCoordinator> {\n    if (!this.vector || !this.embedder) {\n      throw new Error('Subconscious semantic knowledge requires both a vector store and an embedder.');\n    }\n    this._knowledgeSemanticIndex ??= this.getKnowledgeStore().then(\n      knowledge =>\n        new KnowledgeSemanticIndexCoordinator({\n          knowledge,\n          vector: this.vector!,\n          embedder: this.embedder!,\n          embedderOptions: this.embedderOptions,\n        }),\n    );\n    return this._knowledgeSemanticIndex;","sourceCodeStart":509,"sourceCodeEnd":545,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/memory/src/index.ts#L509-L545","documentation":"Memory resolves its knowledge domain through `this.storage.getStore('knowledge')`. If the configured storage adapter does not implement/support the 'knowledge' domain, getStore returns undefined and Memory throws this error naming the storage class. It means the chosen storage backend cannot host knowledge data required by subconscious/semantic-index features.","triggerScenarios":"Calling getKnowledgeSemanticIndex or _initOMEngine (which call getKnowledgeStore) on a Memory whose storage adapter lacks a 'knowledge' store — e.g. a minimal/custom storage implementation or an adapter that doesn't support the knowledge domain.","commonSituations":"Using a custom or third-party Storage adapter that hasn't implemented getStore('knowledge'); using a storage backend that predates the knowledge domain; misconfigured storage that fails to register its domains.","solutions":["Use a storage adapter that supports the knowledge domain (e.g. LibSQLStorage/PostgresStorage current versions)","Upgrade the storage package so the knowledge domain is implemented","If using a custom adapter, implement getStore to return a KnowledgeStorage for the 'knowledge' domain","Check for initialization errors in the storage adapter that may prevent domain registration"],"exampleFix":"// before\nnew Memory({ storage: new MyMinimalStorage(), ... })\n// after\nnew Memory({ storage: new LibSQLStorage({ url: process.env.DB_URL }), ... })","handlingStrategy":"validation","validationCode":"const knowledgeStore = await storage.getStore('knowledge');\nif (!knowledgeStore) {\n  throw new Error(`${storage.constructor.name} does not support the knowledge domain; use a compatible adapter`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const idx = await memory.getKnowledgeSemanticIndex();\n} catch (err) {\n  if (err instanceof Error && err.message.includes('Knowledge storage domain is not available')) {\n    // switch to a storage adapter that implements the knowledge domain\n  } else throw err;\n}","preventionTips":["Verify adapter feature matrix (knowledge domain support) before adopting a storage backend","Upgrade storage packages to versions implementing getStore('knowledge')","Smoke-test knowledge features against the target storage in CI","Implement the knowledge domain if writing a custom storage adapter"],"tags":["storage","knowledge","configuration"],"backgroundTag":"unsupported-storage-domain","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}