Inspiration
Compliance officers answer the same questions every day. Who really owns this client? Which documents are still missing, and why? Does our procedure cover every duty? And what changes when the EU's new AML regulation replaces the Dutch Wwft on 10 July 2027? The answers sit in separate places: the law, the supervisor's guidance, the internal procedure, the client's own documents and published fines. They never point at each other, and that is where the gaps hide.
These are questions about connections, so they belong in a graph. Client data cannot go into one shared database, though. A client file belongs to one client, goes to an auditor as a whole, and must be deleted when the retention period ends. Relate, an embedded graph database that keeps a graph in a single file, fits that exactly.
What it does
- Starts from the client's own documents. In the browser you add a structure chart and scans. Every owner, percentage and veto in the chart becomes a proposal that points to the spot in the chart where it is drawn. Only what the compliance officer confirms enters the client's graph.
- Reviews the file. The review shows which required documents are missing, each with its legal basis, and who the beneficial owners are. It also checks them against the UBO register. In the demo it finds an owner with a veto who is missing from the register, and it drafts the request to the client.
- Keeps the law in the graph. The law texts are read in verbatim. Every duty rests on a dated article, and in July 2027 the Wwft articles hand over to their AMLR successors. Switch the date and the change of law becomes a work list.
- Tests a procedure against the law. A company's own procedure is linked to the duties it cites, and to published enforcement cases on the same duties. Where it cites nothing, Relate proposes the section, and the officer confirms it.
There is no AI at run time: every answer is a Cypher query over the client's own data. An AI agent is optional, and every claim it makes must cite what it read in the graph.
How we built it
- One Relate file per record: per client, per office, per law version, and one for the sector register. The file is the record: isolated, handed over as one unit, deleted as one unit, with no server.
- The same files everywhere: the Relate CLI for building and testing, Relate in WebAssembly in the browser, and MCP for an AI agent.
- Relate features used: schema constraints that Relate enforces, quantified path patterns and shortest paths for ownership chains, full-text and vector indexes for finding the right section, PROFILE, and clone/info for the auditor hand-over. The Relate inside panel in the prototype runs each of them live.
- Tested: an independent implementation checks every answer for 28 test clients and 14 test offices, today and after the AMLR.
Challenges we ran into
- A duty is not an article. Laws change and duties stay, so the article became a dated link from the duty, and its history stays visible.
- Procedures rarely cite the law. Proposals plus a human confirmation keep the graph honest: nothing counts as covered by guesswork.
- Getting the law right. We checked every supervisor and every AMLR article number against the official texts. Whatever is not yet verbatim law is marked in the graph for review.
Accomplishments that we're proud of
- From a client's own documents to a full review in a browser tab, with no server and no AI.
- Every finding can be traced: to the spot in the client's document, and to the article it rests on.
- One date switch shows what the AMLR changes for a company, duty by duty.
What we learned
An embedded graph per record changes how you think about compliance data. Isolation, retention and hand-over come for free, while the shared context (law, rules, enforcement) stays small, public and connected.
What's next for Casefold: KYC compliance as connected context, on Relate
Supervisor guidance from DNB and the AFM, the Dutch implementing act once adopted, more sectors, and pilots with real (anonymised) client files.
All clients, offices and the example company are fictitious. Enforcement cases are published decisions of DNB and the Openbaar Ministerie.