Skip to content

memory: add POST /api/v2/memory/delete so everos-mcp forget_session works on self-hosted servers #483

Open

Description

@gloryfromca

Context

The official MCP server everos-mcp exposes a forget_session tool that calls POST /api/v2/memory/delete with {session_id, app_id, project_id} to delete everything one connection stored. Self-hosted EverOS has no such route, so the tool currently degrades to a message ("this deployment does not support deleting memories through the API"), verified against a local server on 2026-10-10. No crash, but self-hosted users cannot delete through MCP.

Cloud contract to align with

evermind-everos-cloud/docs/api.md §7 defines the endpoint:

  • POST /api/v2/memory/delete, success 204 with no body
  • filters: user_id XOR agent_id, session_id, sender_id; at least one of user_id / agent_id / session_id
  • three-state semantics per field: omitted = skip the filter, null/"" = match empty, value = exact match

The same doc marks the Cloud implementation as a placeholder (returns 204, deletes nothing; semantics to be landed by the pipeline owner). So this is not yet a contract gap to close in a hurry; it is a feature both sides still have to define.

Open questions before implementing

  1. What a session-scoped delete removes. Episodes under the session are the obvious part. Atomic facts, profile clusters and agent cases were derived from those episodes by the offline pipeline — delete them too, recompute them, or leave them? (everos-mcp documents that the profile and learned skills survive forget_session.)
  2. Three stores, one delete. Markdown is the source of truth; SQLite state and LanceDB rows must follow. The cascade already handles deleted change events for single files; a batch delete should go through the same path rather than touch the index directly.
  3. Filter semantics. Whether to implement the full three-state filter from day one or only the session_id (+ owner) shape that everos-mcp sends.

Suggested path

Wait for the Cloud pipeline owner to land the deletion semantics, then implement the same contract here (route + service + markdown delete + cascade propagation), and remove the "not supported" branch in everos-mcp's forget_session. Until then the MCP docs state the limitation.

Refs: EverOS-MCP src/everos_mcp/client.py::delete_session, src/everos_mcp/server.py::forget_session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions