Skip to main content

Memory.getThreadById()

The .getThreadById() method retrieves a specific thread by its ID.

Usage example
Direct link to Usage example

await memory?.getThreadById({ threadId: 'thread-123' })

Parameters
Direct link to Parameters

threadId:

string
The ID of the thread to be retrieved.

Returns
Direct link to Returns

thread:

Promise<StorageThreadType | null>
A promise that resolves to the thread associated with the given ID, or null if not found.
On this page