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 MastraStorage parameter.

Usage example​

mastra.setStorage(
new LibSQLStore({
url: ":memory:",
}),
);

Parameters​

storage:

MastraStorage
The storage instance to set for the Mastra instance.

Returns​

This method does not return a value.

On this page