# Mastra.getStorage()

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

## Usage example

```typescript
mastra.getStorage()
```

## Parameters

This method doesn't accept any parameters.

## Returns

**storage** (`MastraCompositeStore | undefined`): The configured storage instance, or undefined if no storage has been configured.

## Related

- [Storage overview](https://mastra.ai/reference/storage/overview)
- [Storage reference](https://mastra.ai/reference/storage/libsql)