Per-client isolation
Every read asserts client identity at the Postgres engine through a SECURITY DEFINER retrieval function. A cross-client read returns nothing — structurally, not by policy.
Agent memory for agencies on regulated client data. Every chunk is client-stamped and every read is identity-asserted at the database engine — so a cross-client leak is structurally impossible, not policy-hoped.
Built for agencies on regulated client data.
The stakes
When you run AI agents across legal, healthcare and financial clients, their memory ends up behind one system. A single retrieval that crosses a boundary isn't a bug ticket — it's a breach, a regulatory event, and a lost firm. Memrail moves that boundary below the application, where mistakes in code can't reach it.
How it works
Every read asserts client identity at the Postgres engine through a SECURITY DEFINER retrieval function. A cross-client read returns nothing — structurally, not by policy.
A continuous, three-layer detector polices the boundary: deterministic provenance on the read path, an async embedding-distance scan, and on-flag model scoring.
Account handoffs ship with a signed proof-of-isolation — a SHA-256 export hash and an immutable audit event you can hand a departing client or an auditor.
The boundary
Not less. Nothing. The boundary lives below the application, asserted at the engine on every retrieval.
org.acme.northwind_legal
client_id assert
Postgres engine
org.acme.meridian_capital
Every read is client-id-asserted at the engine — a cross-client read returns nothing, structurally.
API-first
A metered read/write API and MCP-native tools. The client stamp is threaded server-side — the caller never supplies a trusted path.
import { Memrail } from 'memrail';
const memrail = new Memrail('mk_live_a83f…');
await memrail.memory.write({
client: 'northwind_legal', // stamped server-side
content: 'Renewal clause §12 auto-extends…',
});
// → { chunk_hash: 'sha256:3f9a…c21b' }What we guarantee — and what we don't
No cross-client data is ever returned by a Memrail read. Client identity is asserted at the Postgres engine on every retrieval — enforced in the storage layer, not hoped for in application code.
Memrail does not control what a consuming agent does with multiple clients' data already inside its own context window. That sits outside our storage boundary — and we won't claim otherwise.
See the isolation model, the contamination detector, and a signed handoff proof in a 30-minute walkthrough.