saascode
Memrail

Memrail

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

inside the product
01· Landing
02· Pricing
03· Developers
04· Use Cases
05· Contact
06· Dashboard
07· Clients
08· Memory
09· Contamination
the complete operation

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

Memrail in depth

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.

  • Per-client memory namespacing (scope tree)
  • Contamination detection (async scan + scoring)

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.

  • Delegation contract + signed proof
  • Audit-log export (CSV/JSON)

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.

  • Agency dashboard (Recharts)
  • Per-client metered writes + budgets
complete feature inventory
Memory read/write/search APIMemrail 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.

Retrieval runs on vector search with a cache in front of it. Cached reads land under 50 milliseconds; uncached reads are slower, and the distinction is stated rather than averaged away — a latency number that only holds on a warm cache should say so.

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".

Three things, aimed at the person who owns the client relationships:

Per-client metered writes + budgetsWrites 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.

Two dimensions bill rather than one: how many clients are active, and how many writes they consume. An agency with five heavy clients and an agency with forty light ones are different businesses, and a single-axis price treats one of them badly.

Budgets are visible per client, so an agency sees which relationship is consuming what before the invoice explains it.

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.

The client identity threads through the tool context, so an agent calling through this interface is subject to exactly the same engine-level assertion as one calling the API. There is no privileged path.

Available from the mid tier.

Connect API (/api/v1/connect/)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.
Per-client memory namespacing (scope tree)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.

Two dimensions bill rather than one: how many clients are active, and how many writes they consume. An agency with five heavy clients and an agency with forty light ones are different businesses, and a single-axis price treats one of them badly.

Budgets are visible per client, so an agency sees which relationship is consuming what before the invoice explains it.

Audit-log export (CSV/JSON)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.

Compliance-report export is available on the higher tiers, for buyers who need the evidence shaped for an auditor rather than as a raw log.

Contamination detection (async scan + scoring)Isolation is not one mechanism. Memrail runs three, and they are deliberately different in kind.

### 1. Deterministic provenance assertion — the hard guarantee

Every memory chunk carries the client it belongs to. Retrieval runs through a function that takes the organization and the client as parameters and asserts them at the engine.

This is the layer that carries the guarantee. It is not a heuristic and it does not have a confidence score: a read either matches the asserted client or returns nothing.

### 2. Continuous contamination scan — the alarm

Asynchronously, an embedding-distance scan looks for chunks that do not belong where they sit — the signature of a boundary violation upstream, in how data was written rather than in how it is read.

The scan never runs on the read path. A security check that adds latency to every retrieval becomes a security check somebody turns off.

### 3. Model scoring on a flag — the triage

When the scan raises something, a scoring pass assesses it, so what reaches a human is a short list rather than every distance outlier.

Delegation contract + signed proofWhen 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.

That artifact is what turns "we removed their data" into something the receiving party can verify and the departing client can keep. Agency relationships end, and they end most badly at exactly this step.

Delegation contracts are available on the higher tiers.

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.

Compliance-report export is available on the higher tiers, for buyers who need the evidence shaped for an auditor rather than as a raw log.

what's included

The platform underneath the product — counted in this product's own source, not claimed from a template. Where a row carries a list, open it to read the names behind the number.

AlipayCoinbasedLocalFlutterwaveKakaoPayKomojuLemon SqueezyMercado PagoMollieNOWPaymentsOpnPaddlePagSeguroPayPalPaystackRazorpayStripeWeChat Pay
AlipayAppleBitbucketDiscordFacebookFigmaGitHubGitLabGoogleKakaoKeycloakLINELinkedInMicrosoft AzureNaverNotionQQSlackSnapchatSpotifyTwitchVKWeChatWeiboWorkOSXYandexZoom
the schema and build
84page modules
218http operations
49tables
56migrations
111,867lines of source
6roles
measured 2026-08-31release v1.0.0 · built 2026-06-20
49 tables · 79 relationships
organizations42 refsusers20 refsscopes4 refsactive_boostsadmin_notificationsannouncement_dismissalsannouncementsapi_key_logsapi_keysaudit_logsauthautomation_logautomation_templatesclient_assignmentscontamination_eventscredit_balancescredit_transactionscurrenciesdata_exportsdata_importsdelegationsfaq_categoriesfaq_itemsfeature_flagsinbound_webhookslanguagesmemory_chunksnotification_lognotification_rulesnotificationsorganization_limit_overridesplansplatform_secretsplatform_settingsproduct_purchasesproductsprovider_pricespush_devicesreport_templatesrolesscheduled_taskssubscriptionstheme_page_sectionstheme_section_librarytheme_sectionstranslationsusage_periodsuser_sessionswebhook_logswebhooks

Hover a table to isolate what it touches; click one to read its relationships. The big nodes are what everything else hangs off. organizations is referenced by 42 tables because every single record in this product belongs to an organization, and that is what makes tenant isolation a property of the database rather than something the application has to remember on every query.

all 49 tables, as text

active_boosts · admin_notifications · announcement_dismissals · announcements · api_key_logs · api_keys · audit_logs · automation_log · automation_templates · client_assignments · contamination_events · credit_balances · credit_transactions · currencies · data_exports · data_imports · delegations · faq_categories · faq_items · feature_flags · inbound_webhooks · languages · memory_chunks · notification_log · notification_rules · notifications · organization_limit_overrides · organizations · plans · platform_secrets · platform_settings · product_purchases · products · provider_prices · push_devices · report_templates · roles · scheduled_tasks · scopes · subscriptions · theme_page_sections · theme_section_library · theme_sections · translations · usage_periods · user_sessions · users · webhook_logs · webhooks

what you need to run Memrail

The chassis, and anything particular to this product. 4 required, 2 optional.

Node hostrequired

No platform lock-in.

Supabaserequired

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 providerrequired

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.

Redisrequired

The hot cache in front of vector search. Without it reads still work, at uncached latency.

A job queuerequired 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.

Already built — plug and play

Every provider integration in this list ships wired into the product. You bring your own keys, connect them in the admin, and go live — there is no integration code to write. Nothing is resold through us: the ongoing cost is whatever these providers charge you. Capabilities marked plan-gated elsewhere on this page unlock by plan, not by extra code.

questions worth answering
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.

AI Memory Layer Source Code – Memrail | saascode