---
title: "Get Shared Data Memory"
method: GET
path: "/api/admin/shared-data/users/{user_id}/memory"
tags: ["admin"]
---

# Get Shared Data Memory

`GET /api/admin/shared-data/users/{user_id}/memory`

Return the consenting user's MemoryDocument (memory + history).

``memory_text`` is the agent's working memory file (persistent
notes, reminders, current context). ``history_text`` is the
accumulated output of session compactions: each time a long
session compacts, the LLM extracts durable facts and appends them
here. Reading ``history_text`` is the closest persisted surface to
a per-event compaction stream; per-event timing lives in
``logger.info("compaction.summary user=...")`` lines only and is
not yet queryable.

Both columns are envelope-encrypted at rest. A user with no
document yet (never compacted, never wrote memory) returns empty
strings rather than 404 — consenting and "no memory yet" is a
valid combined state.

## Path parameters

- `user_id` string, required

## Response `200`

Successful Response

- SharedDataMemoryDocumentResponse — Working memory + accumulated compaction history for a consenting user. ``memory_text`` is the agent's working memory file; ``history_text`` is the chronological log of what compaction extracted from older sessions. Per-event metadata (when, sizes, costs, what got updated) lives in ``compaction_events`` and is exposed via the sibling ``/compaction-events`` endpoint; this response is the working memory itself.
  - `user_id` string, required
  - `consent_at` string, nullable, required
  - `memory_text` string, required
  - `history_text` string, required
  - `updated_at` string, nullable, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/mozilla-ai/apis/clawbolt.md) · [All operations](https://skmtc.net/mozilla-ai/apis/clawbolt/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mozilla-ai/clawbolt/revisions/0e52fe5f8d33/schema)
