---
title: "Diff a memory store between two points in time"
method: GET
path: "/v1/projects/{projectSlug}/memory/store/diff"
tags: ["Memory"]
---

# Diff a memory store between two points in time

`GET /v1/projects/{projectSlug}/memory/store/diff`

Returns a per-record diff of the store between two points in time — added, updated, and removed records with token deltas. `from` defaults to the empty state (everything counts as added); `to` defaults to the current state. Unchanged records are pruned.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)

## Query parameters

- `storeId` string, required — Store identifier (`gen_ai.memory.store.id`). Pass an empty string to address the unattributed ("") store.
- `from` string, date-time — Lower bound (inclusive) of the diff, ISO-8601. Defaults to the empty state.
- `to` string, date-time — Upper bound (inclusive) of the diff, ISO-8601. Defaults to the current state.

## Response `200`

Memory store diff

- MemoryStoreDiff
  - `storeId` string, required — Store the diff was computed for.
  - `changes` MemoryStoreChange[], required — Per-record changes between the two points; unchanged records are pruned.
    - `recordId` string, required — Record that changed between the two points.
    - `kind` 'added' | 'updated' | 'removed', required — How the record changed: `added` (only at `to`), `removed` (only at `from`), or `updated` (present at both with a different body).
    - `tokensAdded` integer, required — Tokens inserted by this change.
    - `tokensRemoved` integer, required — Tokens deleted by this change.
    - `degraded` boolean, required — `true` when a body was unavailable and token counts fall back to record-level estimates.
  - `tokensAdded` integer, required — Total tokens added across all changed records.
  - `tokensRemoved` integer, required — Total tokens removed across all changed records.
  - `recordsChanged` object, required — Count of changed records per bucket.
    - `added` integer, required — Number of records added.
    - `updated` integer, required — Number of records updated.
    - `removed` integer, required — Number of records removed.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

## Changes

- **2026-07-22** `7fedfdd5ae66` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/latitude-dev/apis/latitude/changes/v1/projects/:projectSlug/memory/store/diff/get.md)

---

[API](https://skmtc.dev/latitude-dev/apis/latitude.md) · [All operations](https://skmtc.dev/latitude-dev/apis/latitude/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latitude-dev/latitude/revisions/a0bf72a85607/schema)
