{"record":{"id":"1941195ab3a5ec42","repo":"mastra-ai/mastra","slug":"subconscious-semantic-knowledge-requires-a-vector","errorCode":null,"errorMessage":"Subconscious semantic knowledge requires a vector store. Pass a `vector` option to Memory.","messagePattern":"Subconscious semantic knowledge requires a vector store\\. Pass a `vector` option to Memory\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/memory/src/index.ts","lineNumber":516,"sourceCode":"    this.threadConfig = mergedConfig;\n\n    // Validate retrieval vector config at construction time\n    const omConfig = normalizeObservationalMemoryConfig(mergedConfig.observationalMemory);\n    if (omConfig?.retrieval && typeof omConfig.retrieval === 'object' && omConfig.retrieval.vector) {\n      if (!this.vector) {\n        throw new Error(\n          '`retrieval: { vector: true }` requires a vector store. Pass a `vector` option to your Memory instance.',\n        );\n      }\n      if (!this.embedder) {\n        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.');","sourceCodeStart":498,"sourceCodeEnd":534,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/memory/src/index.ts#L498-L534","documentation":"The experimental_subconscious feature stores and queries semantic knowledge, which fundamentally requires a vector store. The Memory constructor validates this eagerly: if `observationalMemory.experimental_subconscious` is set but no `vector` option was provided, construction fails with this error.","triggerScenarios":"`new Memory({ options: { observationalMemory: { experimental_subconscious: new Subconscious({...}) } } })` without a `vector` option in Memory constructor options.","commonSituations":"Enabling the experimental subconscious in a memory configured only with relational storage; following older examples that predate the vector requirement; toggling the feature on in an environment without vector storage provisioned.","solutions":["Add a `vector` option (e.g. LibSQLVector, PGVector) to the Memory constructor","Disable experimental_subconscious if semantic knowledge features are not required","Provision and connect a vector store dependency before enabling the feature"],"exampleFix":"// before\nnew Memory({ storage, options: { observationalMemory: { experimental_subconscious: new Subconscious({ model }) } } })\n// after\nnew Memory({ storage, vector: new LibSQLVector({ connectionUrl: url }), options: { observationalMemory: { experimental_subconscious: new Subconscious({ model }) } } })","handlingStrategy":"validation","validationCode":"if (opts.options?.observationalMemory?.experimental_subconscious && !opts.vector) {\n  throw new Error('experimental_subconscious requires a vector option on Memory');\n}","typeGuard":null,"tryCatchPattern":"try {\n  const memory = new Memory(opts);\n} catch (err) {\n  if (err instanceof Error && err.message.includes('Subconscious semantic knowledge requires a vector store')) {\n    // add vector store and rebuild\n  } else throw err;\n}","preventionTips":["Enable experimental_subconscious only after vector storage is set up","Centralize Memory construction so required pairs (vector/embedder/subconscious) are enforced","Keep feature flags for experimental features aligned with infrastructure availability","Validate the full option set with a schema before constructing Memory"],"tags":["configuration","vector-store","subconscious","validation"],"backgroundTag":"missing-vector-store","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}