> Discover all available pages from the documentation index: https://mastra.zisheng.pro/llms.txt # Mastra.setStorage() `.setStorage()` 方法用于设置 Mastra 实例的 Storage 实例。此方法接受一个 `MastraCompositeStore` 参数。 ## 使用示例 ```typescript mastra.setStorage( new LibSQLStore({ id: 'mastra-storage', url: ':memory:', }), ) ``` ## 参数 **storage** (`MastraCompositeStore`): 要为 Mastra 实例设置的 Storage 实例。 ## 返回值 此方法没有返回值。 ## 相关内容 - [Storage 概览](https://mastra.zisheng.pro/reference/storage/overview) - [Storage 参考](https://mastra.zisheng.pro/reference/storage/libsql)