{"record":{"id":"2c822181864410a7","repo":"mastra-ai/mastra","slug":"experiments-store-not-available","errorCode":"EXPERIMENTS_STORE_NOT_AVAILABLE","errorMessage":"Experiments store not available. Ensure your storage adapter provides an experiments domain.","messagePattern":"Experiments store not available\\. Ensure your storage adapter provides an experiments domain\\.","errorType":"error_code","errorClass":"MastraError","httpStatus":null,"severity":"error","filePath":"packages/core/src/datasets/dataset.ts","lineNumber":106,"sourceCode":"    return store;\n  }\n\n  async #getExperimentsStore(): Promise<ExperimentsStorage> {\n    if (this.#experimentsStore) return this.#experimentsStore;\n\n    const storage = this.#mastra.getStorage();\n    if (!storage) {\n      throw new MastraError({\n        id: 'DATASETS_STORAGE_NOT_CONFIGURED',\n        text: 'Storage not configured. Configure storage in Mastra instance.',\n        domain: 'STORAGE',\n        category: 'USER',\n      });\n    }\n\n    const store = await storage.getStore('experiments');\n    if (!store) {\n      throw new MastraError({\n        id: 'EXPERIMENTS_STORE_NOT_AVAILABLE',\n        text: 'Experiments store not available. Ensure your storage adapter provides an experiments domain.',\n        domain: 'STORAGE',\n        category: 'USER',\n      });\n    }\n\n    this.#experimentsStore = store;\n    return store;\n  }\n\n  /**\n   * Preflight tenancy gate for storage APIs whose signatures don't accept\n   * `filters`. When the handle has a `#scope`, a scoped `getDatasetById` is\n   * used to prove the dataset exists in the caller's tenancy; on miss we\n   * throw NOT_FOUND, mirroring {@link Dataset.getDetails}. Callers that must\n   * return a non-throwing empty result (e.g. list endpoints) should catch and\n   * translate.","sourceCodeStart":88,"sourceCodeEnd":124,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/core/src/datasets/dataset.ts#L88-L124","documentation":"Storage is configured but does not provide an `experiments` store. #getExperimentsStore() throws EXPERIMENTS_STORE_NOT_AVAILABLE when storage.getStore('experiments') returns undefined. The adapter must implement the experiments domain for experiment features to work.","triggerScenarios":"Calling experimentsStore or any experiment-persisting Dataset API against a storage adapter lacking the experiments domain (getStore('experiments') yields undefined).","commonSituations":"Storage adapter version older than the experiments domain; custom storage implementations; mixing a new core with an old adapter package.","solutions":["Upgrade your storage adapter package to a version implementing the experiments domain.","Switch to an adapter that supports experiments (recent libsql/pg/upstash releases).","For custom storage, implement the experiments domain store.","As a workaround for read-only dataset use, avoid experiment APIs or set persistence.experiments='none' where applicable."],"exampleFix":"// before\nconst store = await storage.getStore('experiments'); // undefined on old adapter\n// after\npnpm add @mastra/pg@latest  # adapter now implements getStore('experiments')","handlingStrategy":"validation","validationCode":"const store = await storage.getStore?.('experiments');\nif (!store) throw new Error('Storage adapter lacks experiments domain');","typeGuard":"null","tryCatchPattern":"try { await dataset.startExperimentAsync(cfg); } catch (e) { if (e?.id === 'EXPERIMENTS_STORE_NOT_AVAILABLE') { /* upgrade adapter or set persistence.experiments='none' */ } else throw e; }","preventionTips":["Keep storage adapter packages on versions that ship the experiments domain","Probe getStore('experiments') once at boot in integration tests","Prefer official adapters over custom implementations"],"tags":["storage","experiments","adapter-compatibility"],"backgroundTag":"storage-domain-not-supported","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}