# Memrail

> A Mem0-style memory layer with the isolation moved into Postgres — per-client, enforced at the engine, for agencies handling regulated client data.

Source page: https://saascode.ai/products/memrail
Machine-readable record: https://saascode.ai/products/memrail.md

One-time purchase · full source code · self-hosted by the buyer.

Price: $299 (one-time)

## How to read this document

Written for a model auditing this product on a buyer's behalf. Two labels
appear throughout and they mean different things:

- **measured** — produced by a script reading the product's own source tree
  or database at the stated date. The method is named beside each number.
- **stated** — written by the seller. True or not, it is a claim, and this
  document does not ask you to treat it as evidence.

The live demo is the strongest verification available from outside: it runs
the same source a buyer receives. Nothing to sign up for — the public side is
open, and the seeded credentials below get you into each role.

## What it is

Memrail is the memory layer for AI agents, built for agencies running agents on more than one client's data.

## Live demo

Two doors into the same running instance, and the same source a buyer
receives. There is no account to create; the public side is open, and the
seeded credentials below sign you into each role.

- **Guided (recommended):** https://saascode.ai/demo/memrail — our shell, with a role switcher and
  the credentials in the menu. Best for a person.
- **Direct:** https://memrail.saascode.ai — the product on its own, no chrome.
  Best when you are relaying steps to someone, or fetching a page.

3 roles seeded on the demo (of the 6 the schema defines — the build data below counts them all). Credentials are published deliberately: these
are demo accounts on a public demo instance, and a reviewer who cannot get
in cannot verify anything.

- **Agency owner** (`agency_admin`) — `agency@demo.com` / `demo123`
  Runs the agency: clients, memory, usage, billing, keys.
- **Assigned operator** (`agency_operator`) — `operator@demo.com` / `demo123`
  Works one assigned client; cannot sign delegations.
- **Platform admin** (`super_admin`) — `admin@demo.com` / `demo123`
  The backend: every tenant, delegations and monitoring.

Or open a role directly: https://saascode.ai/demo/memrail?role={role}

## Measured build

*measured — each number names the method that produced it.*

- **roles: 6** — distinct roles accepted by the role CHECK constraint: admin, agency_admin, agency_operator, member, super_admin, viewer
- **tables: 49** — distinct CREATE TABLE statements across every applied migration
- **migrations: 56** — .sql files in supabase/migrations
- **page modules: 84** — files named page.tsx under src/app, excluding node_modules and .next
- **source lines: 111,867** — lines of code (comments and blank lines excluded) across 832 TypeScript files (103,057) and 72 SQL files (8,810); node_modules and .next excluded
- **api route files: 166** — files named route.ts under src/app/api
- **http operations: 218** — exported HTTP method handlers across those files, de-duplicated per file, OPTIONS excluded as CORS preflight
- **schema graph: 49 tables, 79 relationships** — parsed from the applied migrations

A large number here is scope, not quality. It says the product models a
real domain rather than a CRUD skeleton; it says nothing about code
quality, duplication, test coverage or maintainability, and should not be
read as if it did.

Release: v1.0.0 · built 2026-06-20

## Complete capability inventory

10 capabilities. Each summary is *stated* — selected from the
product's own buyer documentation, or written by the seller where marked.

### API, budgets & dashboard

- **Memory read/write/search API** — Memrail is consumed by agents, so the API is the product rather than a companion to it: read, write, search and delete memory, scoped to an organization and a client.
- **Agency dashboard (Recharts)** — The dashboard is built for a portfolio view. An agency's question is rarely "how is this client doing" and almost always "which of my clients needs attention today".
- **Per-client metered writes + budgets** *(seller-authored)* — Writes are metered per client against a budget on an atomic ledger, so an agency can see which accounts are consuming what and cap a runaway one before it becomes a bill nobody predicted.
- **MCP-native interface (memory_ + delegation tools)** — The same operations are exposed as tools an AI agent can call directly through a machine-readable bridge — read, write, search, delete, and initiating a delegation.
- **Connect API (/api/v1/connect/)** *(seller-authored)* — Multi-step operations are exposed as single workflow calls, so another system in the agency's stack can provision a client or move a scope without reproducing the sequence itself.

### Isolation & handoff

- **Per-client memory namespacing (scope tree)** *(seller-authored)* — Each client's memory lives in its own namespace on a scope tree, so a read for one client cannot reach another's material. Isolation is resolved in the store itself rather than trusted to whatever the calling agent asked for.
- **Audit-log export (CSV/JSON)** *(seller-authored)* — Exports the access record as CSV or JSON, so what was read, written and delegated for a given client can be handed to someone outside the agency without giving them the console.
- **Contamination detection (async scan + scoring)** — Isolation is not one mechanism. Memrail runs three, and they are deliberately different in kind.
- **Delegation contract + signed proof** — When an account moves — to another agency, in-house, or to a different team — the handoff produces a signed manifest: a content hash of the export plus an audit event recording it.
- **Audit evidence export (reviewer bundle)** — Access, contamination and handoff events all land in an append-only audit log, exportable as CSV or JSON on every tier.

## What each system gives the operator

*stated.*

- **API, budgets & dashboard** — One agency console answers which client needs attention today, across the whole portfolio.
- **Isolation & handoff** — A read of one client's memory cannot return another client's material — isolation is enforced in the store.

## The problems it was built to solve

*stated — the seller's argument, given in full so you can judge it.*

### The isolation is enforced in the store, not trusted to the agent asking.

An agency running agents across a dozen accounts has exactly one unrecoverable failure: a competitor's information appearing in a client's answer. It does not need to be dramatic. A summary that mentions a strategy from another engagement, a suggestion that could only have come from someone else's data — and the conversation with that client is over, along with the referrals. Most memory layers treat separation as a filter the caller supplies, which means the failure mode is a single wrong parameter and there is no second line of defence behind it. The guarantee is scoped to what Memrail returns: material an agent already holds from several clients in its own context window is the agent's to manage — no memory store can retract that.

### When an account moves, the transfer is a signed record, not an email.

Accounts change hands constantly in agency work — a client leaves, a team is restructured, an engagement ends. The memory built up over months goes with it, and nobody can say precisely what was transferred or when access ended. If a question comes up later about who had reach into what, the answer is reconstructed from calendars and recollection. That is uncomfortable with a client and impossible with anyone auditing the arrangement.

### The console opens on which accounts need attention, not on one dashboard per client.

Tools built for a single tenant force an agency to check accounts one at a time. With three clients that is a habit; with fifteen it is an hour every morning that finds nothing on most days and misses the one that mattered on the others. The work does not scale with headcount either, because the person doing the checking is usually the one who understands enough to know what looks wrong.

## What it takes to run it

*stated — external services the buyer supplies and pays for directly.*

- **Node host** (required) — No platform lock-in.
- **Supabase** (required) — Postgres with row-level security and vector search. The client-identity function and its policies are what enforce isolation, so this is not a swappable component.
- **An embeddings provider** (required) — Memory chunks are embedded on write.
- **OpenRouter (cloud)** (required for detection scoring) — The contamination detector's model scoring runs through OpenRouter in v1 — a cloud dependency the buyer configures and pays for directly. Local SLM scoring is not included in v1.
- **Redis** (required) — The hot cache in front of vector search. Without it reads still work, at uncached latency.
- **A job queue** (required for detection) — The contamination scan runs asynchronously. Without it the deterministic guarantee still holds — reads remain isolated — but nothing is watching for material written into the wrong client.

## FAQ

**What exactly do I receive after purchase?**

The complete source repository behind the live demo — 111,867 lines across the application and its database, 49 tables defined by 56 migrations that the shipped scripts apply for you, plus the seed data, the demo accounts and the setup documentation. Not a subset and not a scaffold: the same code that runs the demo you just used.

**Is the live demo the same product whose source I receive?**

Yes. The Memrail demo runs the delivered release (v1.0.0), and the build figures on this page are measured from that same source — not from a showcase build kept separately.

**Can I test every account role before buying?**

Yes — all 3 of them: Agency owner, Assigned operator, Platform admin. Each one is seeded in the live demo and reachable from the role board above, so you can inspect the product from the customer's side, the agent's side and the administrator's side before you decide.

**Is this a complete product or a starter template?**

Complete. 84 page modules and 218 HTTP operations, with authentication, roles, billing, an administration panel, background jobs and seeded demo data all wired and running. A template gives you the shape of an application; this is one you can deploy and start operating.

**Can I rebrand and modify it?**

Yes, without asking. The name, identity, copy, styling and code are yours to change. Rebranding and operating it as your own service is exactly what the licence is for.

**What does the licence allow?**

A perpetual, worldwide, non-exclusive, non-transferable licence to the product you bought and to every update released for it. The Standard licence covers one business — yours. If you deploy for clients, the Client licence covers up to five. You can modify it, rebrand it, deploy it and charge your own customers.

**Can I resell the source code?**

No. Reselling, redistributing, sublicensing or giving away the source itself is not permitted under either licence. You build and deliver products with it — the code stays with you.

**What services and ongoing costs are required?**

You bring your own accounts, so we never mark anything up and there is no ongoing cost to us beyond the purchase. Required: Node host, Supabase, An embeddings provider, OpenRouter (cloud), Redis, A job queue. Optional: none. The table above says exactly what stops working without each one; most have usable free tiers at low volume.

**How difficult is deployment?**

Two ways, and most buyers use the first. The installer in your saascode dashboard walks it: you create free accounts at Vercel and Supabase, connect them, and it provisions the database, applies 56 migrations, seeds the data, deploys and verifies the result — you watch the steps go green. Or take the source and do it yourself with the shipped scripts and docs, which is the same sequence run by hand.

**What updates and support are included?**

Updates to that product for as long as we maintain it — no renewal fee and no expiry date on your access. Support covers download problems, defects in the code as shipped, questions about what the product does and how it is structured, and licence questions. It does not cover debugging your own modifications, building features for you, or setting up your hosting and third-party accounts.

**Why does a complete codebase cost $299?**

Because it was built once and is distributed many times. SaaSCode builds each product and ships the same finished release through the catalog, so the price reflects repeatable distribution — not a reduced codebase, an unfinished template, or what the same work would cost commissioned.

**Do I need to be a developer?**

No, for the normal path. You create free accounts at Vercel and Supabase, connect them to the installer in your saascode dashboard, and it does the deployment for you — provision, migrate, seed, deploy, verify. What it asks of you is creating two accounts and copying a token, not writing code. If you would rather deploy it yourself, or host it somewhere else, the full source and the scripts are yours to do that with. Running the product day to day needs no technical skill at all: that happens through its own interface, which is what the demo shows.

## Licence

The buyer receives the complete source and may deploy, modify and operate it
as their own SaaS, charging their own customers. The source itself is not
resold or redistributed: you build and deliver **with** it, you do not sell **it**.

## What this document cannot tell you

Stated plainly because a review that misses it is not a review:

- code quality, duplication, or architectural consistency
- test coverage
- query performance under load
- security posture beyond what the stack implies
- how maintainable it will be in a year

Scope is measurable from outside; implementation quality is not. Anyone
evaluating this should say so rather than infer quality from size.

## Written about it

- [Agent Memory Infrastructure for Agencies 2026 — A Buyer's Guide](https://saascode.ai/inside/agent-memory-infrastructure-for-agencies-2026-a-buyer-s.md)
- [Memrail vs Cognee — The Competitor Named Your Market. Here Is Where the Designs Differ.](https://saascode.ai/inside/memrail-vs-cognee-self-hosted-agent-memory-compared-own-the.md)
- [Memrail: an agent-memory layer with per-client isolation in Postgres](https://saascode.ai/inside/road-to-memrail.md)

## Links

- Catalog page: https://saascode.ai/products/memrail
- Product record: https://saascode.ai/inside/products/memrail
- Live demo: https://memrail.saascode.ai
- Every product: https://saascode.ai/llms.txt

