> Discover all available pages from the documentation index: https://mastra.zisheng.pro/ja/llms.txt # Memory.getThreadById() `.getThreadById()` メソッドは、ID を指定して特定のスレッドを取得します。 ## 使用例 ```typescript await memory?.getThreadById({ threadId: 'thread-123' }) ``` ## パラメーター **threadId** (`string`): 取得するスレッドの ID。 ## 戻り値 **thread** (`Promise`): 指定した ID に関連付けられたスレッドへ解決される Promise。見つからない場合は null。 ### 関連項目 - [Memory クラスリファレンス](https://mastra.zisheng.pro/ja/reference/memory/memory-class) - [Memory 入門](https://mastra.zisheng.pro/ja/docs/memory/overview)(スレッドの概念を解説) - [createThread](https://mastra.zisheng.pro/ja/reference/memory/createThread) - [listThreads](https://mastra.zisheng.pro/ja/reference/memory/listThreads)