@mastra/core
Version:
Mastra is a framework for building AI-powered applications and agents with a modern TypeScript stack.
22 lines (13 loc) • 545 B
Markdown
# 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)