Legal Knowledge Graphs: Why AI Needs Connected Legal Data
Legal AI needs more than access to legal documents. Knowledge graphs connect the provisions, cases and references that allow AI agents to navigate the wider legal context behind an answer.
3

Why Legal AI Needs a Knowledge Graph
“A client has requested a memo on the legislative history of Article 6 of the GDPR. Use Moonlit to write it.”
For an AI agent, answering this question involves more than finding Article 6 and summarising it. It needs to understand how the provision developed, what came before it, when different rules applied and which cases have interpreted them.
The relevant sources may not look anything like the original question. An earlier directive may use different terminology, while a national law may implement a European rule without resembling the regulation itself. A judgment may interpret a provision without repeating the language of the original text. To work through the question, the agent therefore needs to understand how these different sources relate to one another.
From documents to connections
Legal research is built around relationships between sources. A judgment cites legislation, a later decision builds on an earlier one, a national law implements an EU rule and an amended provision replaces an earlier version.
Take Article 6 of the GDPR. Understanding its development can lead back to the 1995 Data Protection Directive, including Article 7, which set out the criteria for making data processing legitimate. It can then lead forward through the decisions that have interpreted these rules.
A legal knowledge graph makes these connections part of the data itself. Rather than treating each source as a separate document, it links provisions, cases and other legal materials through the relationships between them. This gives an AI agent a way to move from one source to another while keeping the wider legal context in view.
Search remains an important part of finding relevant sources. Once those sources have been identified, however, the reference graph provides another layer of information by showing what they cite, what cites them and which specific provisions those references relate to.
This becomes particularly useful when answering a question requires following several sources. An agent researching a provision may need to move through its references, follow a particular article and identify the cases that have applied it. Having those relationships structured makes it possible to follow that path rather than reconstructing it each time from individual documents.
When the law crosses borders
Legal research can become even more connected when a question involves more than one jurisdiction. A dispute in the Netherlands can involve an EU regulation, European case law and national implementing legislation, with the relevant material spread across different legal systems and languages.
The Moonlit Data Layer connects these sources across 41+ jurisdictions and links them through their references, covering more than 100M references across the data layer.
Additionally, the scale of these connections also provides context for individual provisions. In the Moonlit reference graph, the GDPR is cited by nearly 100,000 documents, while the European Convention on Human Rights is cited by more than 630,000. These connections show how individual provisions are used and interpreted across the body of global law.
Through the Moonlit Data API and MCP, AI applications can work with this structure directly. An agent can retrieve a document, follow its references and move down to the relevant article while keeping the underlying sources within reach.
Going back to the original GDPR question, the agent needs more than the text of Article 6. It needs the legal history around it and a way to follow the sources that make up that history. Hence, a knowledge graph provides the under

Article written by
Khushi Gadhok
