memory_vector
Attach a caller-computed embedding to a capsule for semantic recall, or list stored embeddings. Pass capsule_id, embedding, and model_tag on attach.
Instructions
Attach (or LIST) a CALLER-FED embedding — the u6a semantic sidecar. nmemory computes NO embedding (zero embedder dependency, zero network): YOU compute the vector with your own model and put it here; recall's semantic lane is DORMANT until you do. PUT: pass capsule_id (its id alias is accepted) + embedding:[f32] + model_tag (the caller-declared provenance of the embedding — MANDATORY, the u6a provenance law; it names WHICH model produced these numbers so a later reader can trust/compare them). ONE EMBEDDER PER STORE, mechanically: the first attach elects the store's resident model_tag, and an attach carrying a DIFFERENT tag is refused naming the resident — two same-dimension model spaces must never fuse in one cosine lane; swapping embedders is an explicit migration (re-attach every vector under the new tag). Order-sensitive flows (attach-then-retrieve) must send requests SERIALLY — the stdio server answers concurrent frames out of order (the initialize instructions' concurrency law). ONE embedding per capsule: a second put REPLACES the row (replace-on-write, no vector history) — recorded is STATE (always true; the embedding exists after the call), replaced:true names the overwrite. The embedding is stored as its exact little-endian f32 bytes (bit-exact round-trip) with the dimension recorded; an empty, non-finite (NaN/±inf), or zero-magnitude vector is rejected with a teaching -32602 (cosine is undefined for those), and an empty model_tag likewise. An unknown capsule_id is a resource-state error (-32002, data {kind:"unknown_capsule", id}) — the same family as memory_get. LIST: pass NOTHING to get every stored embedding's {capsule_id, dimension, model_tag} in append order (the vectors' bytes stay off the wire — this is the cheap index). How recall uses it: memory_retrieve lane auto preserves historical presence-based selection (term without query_embedding, fused with it); explicit term ignores stored vectors, explicit vector runs vector-only RRF, and explicit fused runs both lanes; vector/fused require query_embedding, whose dimension must match what you stored here. Vectors NEVER bypass the fences: quarantine, falsification, archive, supersession, freshness, and an optional fact-time window exclude from the vector lane IDENTICALLY to the term lane; under a time_window, a capsule without a declaration is undated in either lane (the fence-dominance law is lane-agnostic). Everything here is ADVISORY_NOT_AUTHORITY: an embedding is recall fuel, never authority, and dropping the whole vector table loses no canonical byte (Capsule v1 is frozen; vectors are a pure sidecar). Audited on put.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Alias for `capsule_id` (pass one or the other, not both with different values). | |
| embedding | No | PUT payload: the caller-computed embedding (`f32` vector). nmemory computes NO embedding — this is caller-fed. Mandatory on a put. | |
| model_tag | No | PUT provenance (MANDATORY on a put): the caller-declared model that produced `embedding` — the u6a provenance law. Opaque to the store. | |
| capsule_id | No | PUT target: the capsule the embedding attaches to (`cap-<n>`). `id` is an accepted alias — pass exactly one. Omit ALL fields to LIST the stored embeddings. |