---
title: "Matter-aware memory for legal AI"
description: "Why legal AI needs matter memory: who said what and when with the source document, entity resolution for conflicts checks, and recall scoped by audience."
canonical: https://past.dev/industries/legal
last-updated: 2026-09-02
---
# Matter-aware memory for legal AI

Source: https://past.dev/industries/legal

Legal AI needs memory organized around matters rather than chat sessions. A matter accumulates facts for years and across staff changes, and every recalled fact must carry its source and date. That takes event-time records, entity resolution across parties and matters, supersession when deadlines and terms change, and recall scoped to the people allowed to see each matter. Generic chat memory provides none of these, so an agent built on it misstates matter history and cannot say where an answer came from.

## Matter memory is a firm operations problem

A law firm's unit of work is the matter. A matter accumulates correspondence, filings, drafts, deadlines and decisions for years, and often closes after the people who opened it have moved on. The firm's knowledge about a matter outlives every individual conversation about it, so any agent working inside the firm inherits four operational requirements.

- **Who said what, and when.** A settlement position stated on a March 4 call and revised by email on March 19 must come back with both dates and both sources.
- **Which deadline is current.** Docket dates move. A hearing continued from June 10 to September 2 leaves two dates in the record, and only one belongs on the calendar.
- **Who has appeared before.** Conflicts checks at intake need every earlier appearance of a party, affiliate or adverse party across the firm's history, under whatever name it used at the time.
- **Who may see it.** Matter teams are separated from each other. What an agent recalls for one team must exclude every matter that team is barred from.

A different problem, which version of a clause governs a signed contract today, belongs to legal assistant builders and is covered in the [legal use case](/use-cases/legal). This page is about the firm's own operational memory.

## Why generic chat memory fails in a firm

Chat memory stores summaries of recent conversations for one user. It is the default memory in consumer assistants, and each of its defaults breaks against the requirements above.

- **It is scoped to a user, and matters are shared.** Memory attached to one lawyer's chat history leaves the firm's view when that lawyer leaves, and [cross-session memory](/glossary/cross-session-memory) per user still fragments the matter across the people who touched it.
- **It stores conclusions without sources.** A summary saying the settlement floor is 400,000 USD is unusable in review if nothing records who set it, in which document, on which date. That linkage requirement is [data provenance](/guides/data-provenance).
- **It overwrites when facts change.** An overwriting store keeps the new authority figure and destroys when the change happened and who approved it. Change requires [supersession](/glossary/fact-supersession): close the old value's [validity window](/glossary/validity-window), link its replacement, keep both.
- **It has no audience model.** One shared memory exposes matter details across team boundaries, and one memory per user fragments the matter. Recall must be filtered by who is asking.

None of these are retrieval problems. They are storage decisions, and they are made before the first document is ingested.

## What the memory layer must provide

Each firm requirement maps to a specific memory mechanism, and the mapping is the checklist for evaluating any candidate system.

| Firm requirement | Memory mechanism | Where it is defined |
| --- | --- | --- |
| Who said what, when, with the document behind it | Facts carry [event time](/glossary/event-time) from the source's own date, plus a source reference | [Event time vs ingestion time](/guides/event-time-vs-ingestion-time) |
| Deadlines and terms that change | The old fact's validity window closes at the change date and links to its replacement | [Facts that change over time](/guides/facts-that-change-over-time) |
| Conflicts checks across matters and renames | References to one party resolve to one entity across documents and years | [Entity resolution](/guides/entity-resolution) |
| Access boundaries between matter teams | Recall is scoped by audience: a caller recalls only what its team may see | [Recall](/glossary/recall) |
| Retention and erasure obligations | Retention horizons per record class, and deletion by source | [AI data retention](/guides/ai-data-retention) |
| Defensible answers in review | Every recalled fact cites dated evidence | [AI audit trail](/guides/ai-audit-trail) |

Each row can be probed before adoption with dated statements and point-in-time questions. The [benchmark methodology](/benchmarks/methodology) describes how such probes are constructed and scored.

> **Recorded is different from recallable**
>
> The firm decides which people and which agents may recall each matter, and the memory layer enforces that decision at query time. Confidentiality and professional obligations remain the firm's.

## A worked example: Harlow v. Bellwether, three years

Dana Whitfield is the partner on Harlow v. Bellwether Logistics, opened February 3, 2023. The timeline shows what the store must record and answer.

| Date | Event | What the store records |
| --- | --- | --- |
| Feb 3, 2023 | Engagement letter signed, matter opened | Matter entity, parties Harlow Fabrication and Bellwether Logistics, a team of four |
| Nov 2, 2024 | Client email sets settlement authority at 250,000 USD | Fact with event time Nov 2, 2024, source: the email |
| May 9, 2025 | Client call raises authority to 400,000 USD | The 2024 fact closes at May 9, 2025 and links forward; new fact opens, source: the call transcript |
| Jun 20, 2025 | Associate Marcus Osei leaves the firm | Nothing changes: the matter's facts were never attached to his account |
| Aug 14, 2026 | Intake request from Bellwether Freight, a renamed subsidiary | Entity resolution links it to Bellwether Logistics and surfaces the open adverse matter |

```thesettlementauthorityfactsafteronesupersession
[
  {
    "id": "fact_2c8",
    "subject": "matter-harlow-v-bellwether",
    "predicate": "settlement_authority",
    "value": "250000 USD",
    "valid_from": "2024-11-02",
    "valid_to": "2025-05-09",
    "superseded_by": "fact_b61",
    "source": "email-2024-11-02-harlow"
  },
  {
    "id": "fact_b61",
    "subject": "matter-harlow-v-bellwether",
    "predicate": "settlement_authority",
    "value": "400000 USD",
    "valid_from": "2025-05-09",
    "valid_to": null,
    "superseded_by": null,
    "source": "call-transcript-2025-05-09"
  }
]
```

In review, the store answers with dates and sources. Current authority is 400,000 USD, set May 9, 2025, on a recorded call. Prior authority was 250,000 USD, set November 2, 2024, by client email. The August 2026 intake surfaces the earlier adverse appearance under the earlier name; whether to decline the new engagement is the firm's decision.

## Retention and erasure without losing the matter

Firms carry two obligations that pull in opposite directions: keep matter records for the period their jurisdiction and engagement terms require, and erase personal data when a duty to erase arises. A memory layer serves both when retention is set per record class rather than globally, and when deletion works by source.

- **Retention horizons per class.** Filed documents, internal drafts and intake notes can carry different horizons, and a single global expiry forces the shortest obligation onto everything. [AI data retention](/guides/ai-data-retention) covers setting horizons per class.
- **Deletion by source.** An erasure request maps to the sources holding that person's data. Deleting a source must also remove derived facts that only it supported, or the store keeps asserting what it can no longer show. [GDPR memory deletion](/guides/gdpr-memory-deletion) and the [forgetting policy guide](/guides/forgetting-policy) cover the mechanics.

What the law requires is jurisdiction and engagement specific, and those obligations sit with the firm. The memory layer's job is narrower: record faithfully, recall by audience, retain per policy, erase verifiably.

## Where past.dev fits

past.dev is a memory API that stores text with its original timestamp, resolves entities across sources, tracks changed facts through supersession, and scopes recall by audience, so a matter's history can be recalled with dated sources by the people allowed to see it. Firms that keep client data inside their own infrastructure can run it [self-hosted](/docs/memory-api/self-hosting), with memory stored in their own Postgres. The [quickstart](/docs/memory-api/quickstart) shows the ingest and recall calls.

## Frequently asked questions

### Can AI agents at a law firm share memory without exposing other matters?

Yes, if recall is scoped by audience. The store can hold every matter while each query is filtered to what the asking person or agent is allowed to see, so shared storage does not mean shared visibility. The firm defines those audiences and remains responsible for its confidentiality obligations.

### How does legal AI keep track of deadlines that change?

By superseding rather than overwriting. When a hearing moves from June 10 to September 2, the old date's validity period closes at the change and the new date links back to it, so the agent calendars the current date and can still explain the history.

### Can a memory system run conflicts checks for a law firm?

It can surface the evidence a conflicts check needs: every prior appearance of a party across matters, name changes and affiliates, resolved to one entity with dates and sources. Evaluating the conflict and deciding whether to take the engagement remain decisions for the lawyers.

### What happens to matter memory when an associate leaves the firm?

Nothing, if memory is organized by matter rather than by user account. Facts extracted from the associate's emails and notes stay with the matter, with the associate recorded as the source, and the firm controls access from the day of departure.

## Related

- [Financial services AI](https://past.dev/industries/financial-services)
- [Accounting AI](https://past.dev/industries/accounting)
- [Entity resolution](https://past.dev/guides/entity-resolution)
- [AI audit trail](https://past.dev/guides/ai-audit-trail)
- [Data provenance](https://past.dev/guides/data-provenance)