Skip to main content

Mastra.setStorage()

The .setStorage() method is used to set the storage instance for the Mastra instance. This method accepts a single MastraCompositeStore parameter.

Usage example
Direct link to Usage example

mastra.setStorage(
new LibSQLStore({
id: 'mastra-storage',
url: ':memory:',
}),
)

Parameters
Direct link to Parameters

storage:

MastraCompositeStore
The storage instance to set for the Mastra instance.

Returns
Direct link to Returns

This method doesn't return a value.

On this page