> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-HK/llms.txt # Mastra.setStorage() `.setStorage()` 方法用於為 Mastra 實例設定儲存空間實例。此方法接受單一 `MastraCompositeStore` 參數。 ## 使用範例 ```typescript mastra.setStorage( new LibSQLStore({ id: 'mastra-storage', url: ':memory:', }), ) ``` ## 參數 **storage** (`MastraCompositeStore`): 要為 Mastra 實例設定的儲存空間實例。 ## 傳回值 此方法不會傳回值。 ## 相關內容 - [儲存空間概覽](https://mastra.zisheng.pro/zh-HK/reference/storage/overview) - [儲存空間參考](https://mastra.zisheng.pro/zh-HK/reference/storage/libsql)