Skip to main content

How it works

MemWire has a built-in four-level isolation hierarchy. Every memory, graph node, graph edge, and knowledge chunk is tagged with up to four identifiers:
All queries like recall, search, and knowledge are automatically scoped to the identifiers you pass. No cross-tenant data leaks are possible because every vector storage filter and SQL index is keyed on this hierarchy.

Levels explained

You only need to use the levels that make sense for your architecture. user_id is always required; the others default to None.

Code example


Agent isolation

Pass agent_id to further scope memories to a specific AI agent within a user session:

Configuration reference