Skip to documentation
Docs navigation
Docs/enqueueIngest()
MemoGrafter

enqueueIngest()

Submit conversation ingestion to BullMQ.

What it does

Submit conversation ingestion to BullMQ.

When to use it

Use for latency-insensitive conversation ingestion when a BullMQ worker owns extraction.

Signature

TypeScript
enqueueIngest(messages: Message[], sessionId: string, options?: IngestOptions): Promise<void>

Parameters

messages (Message[]) — Ordered conversation messages to extract memory from.
sessionId (string) — The application-owned session whose memory should be read or changed.
options? (IngestOptions) — A typed options object. The applicable fields and defaults are documented below.

IngestOptions fields

tags? (string[]) — Normalized metadata copied to topics and memories created by this ingestion.

Result

The requested identifier or text value.

Behavior

With queue configuration, resolves when the job is accepted. Without it, processes inline before resolving.

Side effects and completion

Queued graph state is not guaranteed to be readable when this promise resolves.

Example

example.ts
await memo.enqueueIngest(messages, "user-42");