Skip to main content
@engramviz/adapter-mem0 wraps a Mem0-like JavaScript client without importing a specific Mem0 distribution. It supports current Platform and OSS response containers for add, search, update, delete, and deleteAll. Install the published SDK and adapter packages:

Setup

The wrapper records operations only inside engram.withTurn(...). Calls outside an active turn pass through unchanged.

Retrieval versus context

The adapter can observe records returned by search and the IDs declared selected by selectedIds. It cannot inspect application prompt construction. Call turn.load only after the application has actually placed those memories into model input.

Asynchronous Platform adds

Mem0 Platform may acknowledge an add with a pending event ID before concrete memory IDs exist. Engram does not fabricate a stored memory from that acknowledgement. The adapter calls onInstrumentationGap and emits no store event. A complete production integration should resolve the event through a webhook or event-status flow, then emit the concrete memory operation.

Delete all

If deleteAll does not return affected memory IDs, Engram reports an instrumentation gap. The trace must not pretend to know which records changed.

Source mutation boundary

An incident repair can generate a Mem0-oriented operation recipe. Engram never calls the real Mem0 client from the Incident workspace. Review and apply provider changes in the owning application, then rerun the exported regression against that version. See the stale-location example for the deterministic reference incident.