Structurally enforced isolation

Memory that can't leak.

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.

SOC-2 Type IIGDPR Art 28Audit exportSelf-host ready

The stakes

One cross-client leak ends the agency.

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

Three guarantees, one memory layer.

01

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.

02

Contamination detector

A continuous, three-layer detector polices the boundary: deterministic provenance on the read path, an async embedding-distance scan, and on-flag model scoring.

03

Delegation proof

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

A cross-client read returns nothing.

Not less. Nothing. The boundary lives below the application, asserted at the engine on every retrieval.

Client AIsolated

org.acme.northwind_legal

client_id assert

Postgres engine

matched readcross-boundary
Client BIsolated

org.acme.meridian_capital

Every read is client-id-asserted at the engine — a cross-client read returns nothing, structurally.

API-first

Consumed by your agents.

A metered read/write API and MCP-native tools. The client stamp is threaded server-side — the caller never supplies a trusted path.

memory/write.ts
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

We state the boundary plainly.

Guaranteed

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.

Out of scope

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.

Don't bet the firm on a leak you can't see.

See the isolation model, the contamination detector, and a signed handoff proof in a 30-minute walkthrough.