mastra-ai/mastra · error
Knowledge storage domain is not available on ${this.storage.
Error message
Knowledge storage domain is not available on ${this.storage.constructor.name} What it means
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.
Source
Thrown at packages/memory/src/index.ts:527
throw new Error(
'`retrieval: { vector: true }` requires an embedder. Pass an `embedder` option to your Memory instance.',
);
}
}
if (omConfig?.experimental_subconscious) {
if (!this.vector) {
throw new Error('Subconscious semantic knowledge requires a vector store. Pass a `vector` option to Memory.');
}
if (!this.embedder) {
throw new Error('Subconscious semantic knowledge requires an embedder. Pass an `embedder` option to Memory.');
}
}
}
private async getKnowledgeStore(): Promise<KnowledgeStorage> {
const store = await this.storage.getStore('knowledge');
if (!store) {
throw new Error(`Knowledge storage domain is not available on ${this.storage.constructor.name}`);
}
return store;
}
public async getKnowledgeSemanticIndex(): Promise<KnowledgeSemanticIndexCoordinator> {
if (!this.vector || !this.embedder) {
throw new Error('Subconscious semantic knowledge requires both a vector store and an embedder.');
}
this._knowledgeSemanticIndex ??= this.getKnowledgeStore().then(
knowledge =>
new KnowledgeSemanticIndexCoordinator({
knowledge,
vector: this.vector!,
embedder: this.embedder!,
embedderOptions: this.embedderOptions,
}),
);
return this._knowledgeSemanticIndex;View on GitHub (pinned to 75dd419e61)
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
Example fix
// before
new Memory({ storage: new MyMinimalStorage(), ... })
// after
new Memory({ storage: new LibSQLStorage({ url: process.env.DB_URL }), ... }) Defensive patterns
Strategy: validation
Validate before calling
const knowledgeStore = await storage.getStore('knowledge');
if (!knowledgeStore) {
throw new Error(`${storage.constructor.name} does not support the knowledge domain; use a compatible adapter`);
} Try / catch
try {
const idx = await memory.getKnowledgeSemanticIndex();
} catch (err) {
if (err instanceof Error && err.message.includes('Knowledge storage domain is not available')) {
// switch to a storage adapter that implements the knowledge domain
} else throw err;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- AcpAgent does not support resuming suspended generate calls
- ACP prompt stopped before completing: ${response.stopReason}
- MastraAuthBetterAuth needs a database to build its own bette
- [Slack] Failed to resolve Mastra storage. Ensure your Mastra
- [Slack] No storage available. SlackProvider requires persist
AI-assisted analysis of mastra-ai/mastra@75dd419e61 (2026-08-30).
Data as JSON: /api/errors/7c989e5e641002e4.
Report an issue: GitHub.