> Discover all available pages from the documentation index: https://mastra.zisheng.pro/zh-TW/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/zh-TW/reference/storage/overview) - [Storage 參考](https://mastra.zisheng.pro/zh-TW/reference/storage/libsql)