[Feature] Triplet-scoped delete for L3 persona (`core/delete`) — the only memory layer with no API deletion path
Summary
On MemoryCore 2.0.0-beta.1, the v3 data plane exposes deletion for L0 (conversation/delete), L1 (atomic/delete), and L2 (scenario/rm), but L3 persona has no delete endpoint: core exposes only read/write/count. This makes a complete per-user/per-team data-removal workflow impossible via the API — after deleting all conversations, atoms, and scenarios, the distilled persona files remain, and the only way to remove them is tearing down the whole data directory (which also destroys every other tenant's data).
Delete-surface inventory (v3 data plane, verified in source + live)
| Layer | Endpoint | Triplet-scoped |
|---|---|---|
| L0 conversation | conversation/delete |
yes (isolation fields in body/headers) |
| L1 atom | atomic/delete |
yes |
| L2 scenario | scenario/rm |
yes (path + triplet) |
| L3 persona | — none — (core has read/write/count only) |
— |
(chat-memory/clear and instance/destroy exist but are meta-plane / instance-wide — far too coarse for per-user or per-team removal, and out of scope for the data plane.)
Measured (standalone Gateway, node 22, SQLite default)
During our export/exit tooling validation we deleted everything the API allows for a test triplet — 8 conversations, 6 atom batches, 2 scenarios — and then re-checked residuals: 2 persona files remained with no API path to remove them. Our exit tooling has to report them as non-removable residuals and document "full exit = data-dir teardown" as the only complete path, which is unusable for shared/multi-tenant deployments.
Request
A core/delete (or equivalent) endpoint scoped like its siblings: (team_id, agent_id, user_id) triplet (+ optional persona path for partial deletes), with the same batch/confirmation semantics as scenario/rm. Suggested response: {deleted_count, paths}. Regression test: write persona via core/write, delete via the new endpoint, core/read returns empty, other triplets' personas untouched.
Why it matters
- Data-removal compliance: any deployment honoring user deletion requests (GDPR-style erasure, offboarding, tenant exit) needs per-scope removal; today L3 silently survives.
- Symmetry: every other layer has a scoped delete; L3 is the odd one out.
- Safety: today operators are pushed toward data-dir teardown — the nuclear option — because the precise one is missing.
Environment
Found while building export/exit tooling against a throwaway copy of the TAM tree (product tree untouched; Gateway standalone). Happy to open a PR with the endpoint + regression test if that is preferred.
Source: TencentCloud/TencentDB-Agent-Memory