Skip to documentation
Docs navigation
Docs/getActiveSegments()
MemoGrafterAgent

getActiveSegments()

Read active topic segments for the current session.

What it does

Read active topic segments for the current session.

When to use it

Use to inspect the message-index ranges produced by topic-drift segmentation.

Signature

TypeScript
getActiveSegments(): Promise<TopicSegment[]>

Behavior

Waits for the local pending-ingest chain and returns ordered segments for the current session.

Side effects and completion

Read-only. Segment objects do not contain extracted memories or raw message text.

Example

example.ts
const segments = await agent.getActiveSegments();