---
title: "Get session memory footprint"
method: GET
path: "/v1/projects/{projectSlug}/sessions/{sessionId}/memory"
tags: ["Sessions"]
---

# Get session memory footprint

`GET /v1/projects/{projectSlug}/sessions/{sessionId}/memory`

Returns the session's memory footprint: per-record read, added, and removed token metrics plus session-wide totals. Pass `traceId` to restrict the footprint to a single trace of the session.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)
- `sessionId` string, required — Session identifier lifted from instrumentation. Up to 128 characters.

## Query parameters

- `traceId` string — Restrict the memory footprint to this trace of the session. Omit for the whole session.

## Response `200`

Session memory footprint

- SessionMemorySummary
  - `records` MemoryRecordSummary[], required — Per-record read/write token footprint for the session (or a single trace).
    - `storeId` string, required — Store the record belongs to.
    - `recordId` string, required — Record the metrics are for.
    - `readTokens` integer, required — Tokens read from this record across the session's retrievals.
    - `tokensAdded` integer, required — Tokens the session added to this record (endpoint diff).
    - `tokensRemoved` integer, required — Tokens the session removed from this record (endpoint diff).
  - `total` object, required — Session-wide totals.
    - `readTokens` integer, required — Total tokens read across the session.
    - `tokensAdded` integer, required — Total tokens added across the session.
    - `tokensRemoved` integer, required — Total tokens removed across the session.
    - `writeRecords` integer, required — Number of records the session wrote, including zero-delta writes.

## Other responses

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

---

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