memory: add POST /api/v2/memory/delete so everos-mcp forget_session works on self-hosted servers
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
Direzione di ricerca
Design work, not a first task. The issue says the Cloud side is a placeholder and the three open questions (derived-data handling, cascade through the markdown/SQLite/LanceDB stores, filter semantics) are unresolved. Read the existing cascade path for deleted change events in this repo to see how a batch delete would reuse it. Done means those questions are answered in the issue thread and the POST /api/v2/memory/delete contract is agreed with the maintainers.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
The official MCP server everos-mcp has a forget_session tool. It sends POST /api/v2/memory/delete with {app_id, project_id, session_id} and no owner, then reads data.count from the response. Self-hosted EverOS has no such route, so the tool degrades to "this deployment does not support deleting memories through the API" (verified 2026-10-10). Nothing crashes, but self-hosted users cannot delete through MCP.
Update 2026-10-28: the Cloud contract is settled
The first version of this issue described the Cloud endpoint as a placeholder: 204, a three-state filter, and a sender_id field. That description was copied from an outdated Cloud API reference. Cloud has a real implementation, extended on 2026-10-16. The contract to align with is:
POST /api/v2/memory/delete, success200, responsedata = {filters: [...], count: int}.filterslists the scope fields that were applied.countis the number of memory records deleted; source messages are not counted.- Body:
app_id/project_id(default"default", never matched across apps or projects),user_idXORagent_id, andsession_id. At least one ofuser_id/agent_id/session_idis required. A field that is sent filters; a field that is omitted does not. There is no three-state filter and nosender_id.
| Scope | Memories deleted | Session source (pending buffer, memcells, session record) |
|---|---|---|
session_id only |
episode, atomic_fact, foresight, agent_case of that session | Deleted too |
user_id |
episode, atomic_fact, foresight, profile of that user | Kept |
user_id + session_id |
episode, atomic_fact, foresight (no profile) | Kept |
agent_id (± session_id) |
agent_case, plus agent_skill when agent_id is alone |
Kept |
Only a session-only delete removes the source, because the buffer and memcells belong to every participant of the session. An owner-scoped delete removes what has been extracted so far. Messages not yet flushed will still be extracted later. After a session-only delete:
flushon that session returnsno_extraction.- The delete is serialized with
add/flushon the same session. A busy session returns a retryable503, and nothing is deleted. - The same
session_idcan keep receivingaddcalls; they are treated as a new conversation.
Not touched (known boundaries): clusters, Reflection-merged episodes, and the profile under any delete that carries session_id.
forget_session uses the session-only shape, so that row is the one self-hosted EverOS needs first.
What self-hosted EverOS is missing
| Cloud behaviour | EverOS storage | Status |
|---|---|---|
Route + DeleteInput / DeleteData |
entrypoints/api/routes/ has add / flush / search / get only |
Missing |
| Delete episode, atomic_fact, foresight, agent_case of the session | Daily-log Markdown: users/<id>/{episodes,.atomic_facts,.foresights}/, agents/<id>/agent_cases/. Every entry carries session_id. |
Missing: an operation that removes the matching entries from a file under the writer's existing per-path lock. The index side already works: when a daily-log file is modified, the cascade drops the LanceDB rows of entries that disappeared from it (memory/cascade/handlers/_daily_log_base.py). |
| Find what to delete | Files are named by the date they were written, so one session can span several files and, for a session-only delete, several owners | Open: query LanceDB by session_id to get md_path (fast, but may miss an entry written in the last moment before indexing) or scan the Markdown (always complete, cost grows with the memory root) |
| Delete pending buffer | SQLite unprocessed_buffer |
Missing |
| Delete memcells | SQLite memcell. payload_json holds the full transcript; nothing else removes it. |
Missing |
| Delete session record | SQLite conversation_status (window pointer) |
Missing |
| Serialize with add / flush | service/_session_lock.py (per-process lock, matching the single-instance assumption) |
Reuse |
| Stop in-flight extraction from writing back | OME strategies (extract_atomic_facts, extract_foresight, extract_agent_case, trigger_profile_clustering) write from the event payload and never re-check whether the source still exists |
Missing: a liveness check right before the write |
| Async queue (EverOS only) | SQLite memorize_inbox. A queued row accepted before the delete replays the conversation after it. A failed row keeps the request body for row_retention_hours (168h). |
Open: cancel the session's queued rows, or wait for them |
| Owner-scoped delete | Profile users/<id>/user.md; skills agents/<id>/skills/ (AgentSkillWriter.delete_skill exists) |
Missing; everos-mcp does not need it |
One difference from Cloud: re-importing identical content (same sender, timestamp and text) after a session delete produces no memories on Cloud, because Cloud derives memcell ids from content. EverOS memcell ids are random (mc_<uuid>), so the same import would be extracted again.
Open questions
- Scope of the first version: session-only (what
everos-mcpneeds), or the full contract including owner-scoped deletes. - How to find the affected Markdown files: index lookup or Markdown scan (see the table).
- What happens to queued async requests of the deleted session.
- Whether identical content re-imported after a delete should stay deleted, as on Cloud.
The "not supported" branch in everos-mcp's forget_session can stay for servers that predate the route.
Refs: EverOS-MCP src/everos_mcp/conversation.py::delete_all, src/everos_mcp/client.py::delete_session, src/everos_mcp/server.py::forget_session.
- Lingua principale
- Python
- Stelle
- 13.3k
- Fork
- 926
- Merge medio
- 22h 56m
- PR unite (30g)
- 27
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di EverMind-AI/EverOS
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
EverMind-AI/EverOS#414 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
EverMind-AI/EverOS#537 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: 同一 EverOS 账号下,不同 AI 客户端的记忆无法共享(user 隔离问题) / Cannot share memory between two AI clients under the same EverOS account (user isolation)Forse già presa @dani1005 l’ha presa 6 giorni fa. Apertabug
Difficoltà 4/5 1-2 giorni Idoneità per principianti 48/100
EverMind-AI/EverOS#528 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
memorize(): make delivery resumable per memcell so retries and replays are idempotentForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
EverMind-AI/EverOS#516 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: add/flush returns 500 every time when an extraction reply quotes code with an unmatched `}` (everalgo brace-counting JSON extractor)Forse già presa @Kendrick-Song l’ha presa 8 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
EverMind-AI/EverOS#515 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di EverMind-AI/EverOS
Issue simili
-
difficulty:2 enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
MakazhanAlpamys/Soup#2309 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
google-deepmind/tapnet#173 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
change-description-authoring: jdk-33173-audit check 4 grades the hunk translation by its verbAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Netcracker/qubership-ai-packages#203 ·
I maintainer di solito rispondono entro 1 giorno
-
PAC Wording
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno