Skip to main content

Mastra.getStorage()

The .getStorage() method is used to retrieve the storage instance that has been configured in the Mastra instance.

Usage example
Direct link to Usage example

mastra.getStorage()

Parameters
Direct link to Parameters

This method doesn't accept any parameters.

Returns
Direct link to Returns

storage:

MastraCompositeStore | undefined
The configured storage instance, or undefined if no storage has been configured.
On this page