Context
As part of the Shared Deployment MVP completeness gaps (post-#10691), operators need fine-grained control over session state. Currently, the delete_all_summaries tool provides a blunt full-clear mechanism, which is inappropriate for a shared environment where multiple teams and sessions coexist.
The Problem
A shared environment requires the ability to purge single sessions without disturbing the global state or other active team sessions. Without this, agents or operators cannot selectively clean up corrupted, orphaned, or stale sessions without causing collateral damage.
The Architectural Reality
The Memory Core currently supports global purges. A new MCP tool must be introduced on the Memory Core server to provide session-scoped cleanup. This interacts directly with the MCP boundary and the database layer without bleeding into core Memory Core operational internals inappropriately.
The Fix
Surface a purge_session({session_id}) tool on Memory Core. This tool should remove raw memories and the summary for the specified session. It must be operator-controlled via tool description/permission gating to prevent accidental invocation.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
purge_session MCP Tool |
Memory Core MCP Server |
Delete raw memories and summary for a single session_id. |
Throw explicit error if session not found or permission denied. |
Add to learn/agentos/SharedDeployment.md or tools list. |
L2 (Playwright unit test demonstrating session isolation) |
Acceptance Criteria
Out of Scope
- Global garbage collection routines.
- Purging data across multiple environments simultaneously.
Avoided Traps
- Rejected: Overloading existing
delete_all_summaries. Adding a parameter to a destructive global tool creates a dangerous API surface where a missing parameter wipes the database. A dedicated tool ensures safety by design.
Related
Origin Session ID: 79042442-bebc-431d-8968-8a2e7d7a1151
Retrieval Hint: query_raw_memories(query="purge_session MCP tool Memory Core session isolation")
Context
As part of the Shared Deployment MVP completeness gaps (post-#10691), operators need fine-grained control over session state. Currently, the
delete_all_summariestool provides a blunt full-clear mechanism, which is inappropriate for a shared environment where multiple teams and sessions coexist.The Problem
A shared environment requires the ability to purge single sessions without disturbing the global state or other active team sessions. Without this, agents or operators cannot selectively clean up corrupted, orphaned, or stale sessions without causing collateral damage.
The Architectural Reality
The Memory Core currently supports global purges. A new MCP tool must be introduced on the Memory Core server to provide session-scoped cleanup. This interacts directly with the MCP boundary and the database layer without bleeding into core Memory Core operational internals inappropriately.
The Fix
Surface a
purge_session({session_id})tool on Memory Core. This tool should remove raw memories and the summary for the specified session. It must be operator-controlled via tool description/permission gating to prevent accidental invocation.Contract Ledger Matrix
purge_sessionMCP Toolsession_id.learn/agentos/SharedDeployment.mdor tools list.Acceptance Criteria
purge_sessiontool on Memory Core MCP.session_id.session_id.Out of Scope
Avoided Traps
delete_all_summaries. Adding a parameter to a destructive global tool creates a dangerous API surface where a missing parameter wipes the database. A dedicated tool ensures safety by design.Related
Origin Session ID: 79042442-bebc-431d-8968-8a2e7d7a1151 Retrieval Hint:
query_raw_memories(query="purge_session MCP tool Memory Core session isolation")