plur_learn_batch
Batch-create engrams with sequential dedup and per-item decisions. Accepts an array of statements, applies dedup pipeline, and returns aligned ids and failures, enabling efficient bulk knowledge persistence.
Instructions
Create many engrams in one call — the batch form of plur_learn. Accepts an array of engram objects and writes them sequentially through the SAME dedup + policy pipeline as plur_learn (content-hash NOOP → semantic recall → LLM ADD/UPDATE/MERGE decision). Dedup also applies WITHIN the batch: a statement duplicating an earlier item in the same array resolves to NOOP against it. Returns ids aligned 1:1 with the input array (ids[i] is the engram id for input i, or null if input i failed), the per-item decisions (each carrying its input_index), aggregate stats, and any per-item failures (each with its input index) — a single bad item does not abort the batch. Use this when an orchestration fans out and wants to persist consolidated findings without N separate calls. LLM dedup calls are capped (default 50, override with max_llm_calls) to bound bulk-import cost. Note: unlike plur_learn, batch items take the LOCAL learn path — remote-scope auto-routing (learnRouted) is not applied per item, so for shared/remote-store writes prefer plur_learn or pass an explicit local scope. See plur-ai/plur#281.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engrams | Yes | Engram objects to persist. Each requires `statement`; the other fields mirror plur_learn. | |
| max_llm_calls | No | Max LLM dedup calls across the whole batch (default 50). Once spent, remaining items use the cheap hash/cosine path. Pass a large number to opt out. |