Skip to documentation
Docs navigation
Docs/getTopics()
MemoGrafter

getTopics()

Read topics and segments for a session.

What it does

Read topics and segments for a session.

This lower-level API keeps session selection explicit, which is useful for services that manage many users or conversations through one instance.

Signature

TypeScript
getTopics(sessionId: string, options?: TagFilterOptions): Promise<{ nodes: TopicNode[]; segments: TopicSegment[] }>

Parameters

sessionId (string) — The application-owned session whose memory should be read or changed.
options? (TagFilterOptions) — Optional limits, filters, tags, or operation-specific behavior.

Result

The topic nodes created, selected, or copied by the operation.

Example

example.ts
const { nodes, segments } = await memo.getTopics("session-1");