Skip to main content
Mastra v1 was released! Start new projects with v1 or upgrade your existing project today.

Mastra.setStorage()

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

Usage exampleDirect link to Usage example

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

ParametersDirect link to Parameters

storage:

MastraStorage
The storage instance to set for the Mastra instance.

ReturnsDirect link to Returns

This method does not return a value.

On this page