Skip to main content

Memory.getThreadById()

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

Usage Example

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

Parameters

threadId:

string
The ID of the thread to be retrieved.

Returns

thread:

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