You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
memory: keep a raw input log of /add requests, independent of extraction #537
EverOS keeps no record of what a client actually sent to POST /api/v2/memory/add. The closest things are by-products of extraction:
unprocessed_buffer holds messages only until boundary detection folds them into a memcell.
memcell.payload_json keeps the conversation text, but not as it was sent. Attachments have already been replaced by their parsed text (service/_boundary.py builds the cell from CanonicalMessage.text), and the messages are grouped the way boundary detection cut them. It also lives in .index/sqlite/system.db, inside the directory that docs/how-memory-works.md says can be deleted without losing anything.
In async mode, memorize_inbox.payload_json is cleared as soon as the row is delivered.
So once extraction has run, the original input can no longer be inspected, replayed or audited. (EverOS Cloud reports every request body to a request log outside the engine.)
Proposal
An input log that has nothing to do with extraction:
What: every /add request that passes validation, as the client sent it (model_dump(mode="json", exclude_unset=True)), plus its request_id and receive time. One JSON line per request. /flush and /search are not logged.
When: in the route, before the sync / async split. Each accepted request is logged exactly once, whatever happens to extraction afterwards; queue retries do not log it again.
Where: <root>/<app>/<project>/.input_log/YYYY-MM-DD.jsonl. The date is in the display timezone, the same as the daily-log Markdown files. The directory is outside .index/, so deleting the index does not lose it. No memory kind matches the path, so the cascade scanner and watcher ignore it.
Retention: retention_days, default 30. A file whose date is older than that is deleted. The sweep runs when a scope writes its first line of a day, including the first line after a restart.
Large attachments: if a line would exceed max_inline_bytes (default 1 MiB), the base64 of each content item is replaced by its length and SHA-256. Text is always kept verbatim.
Failure: a failed log write is logged at error level and does not fail /add.
Config: [memorize.input_log] with enabled = true, retention_days = 30 and max_inline_bytes = 1048576.
A session-only delete must also remove that session's lines from the input log. Otherwise "forget this conversation" leaves the raw text on disk for up to retention_days. That work belongs to #483.
Out of scope
Reading the log through the API.
Moving memcell / unprocessed_buffer out of .index/. The docs' claim that SQLite is rebuildable from Markdown already does not hold for them.
I'd like to take this. Before I start: should the session-delete hook from #483 be part of the same PR, or a follow-up? I'd implement the route-level JSONL log first (enabled / retention_days / max_inline_bytes, one line per accepted /add, outside .index), then wire deletion separately.
@chuiwenwei Yes, please take it, and two PRs are fine. Since this issue was written, #483 was closed by #555 (POST /api/v2/memory/delete) and #594 added online purge, so the deletion side now belongs to this issue rather than #483.
So that the first PR doesn't leave deleted conversations on disk:
First PR: the route-level log as proposed, with enabled = false by default. Everything else stays as in the description: one line per accepted /add, written before the sync/async split, outside .index/, with the retention sweep and max_inline_bytes, and a failed write never fails /add. Please base it on current main (1.7.0+); the code has moved a lot since this was filed.
Second PR: deletion. A /memory/delete that covers a session removes that session's lines, and purge (feat(purge): online purge of a memory root, app or project #594) removes .input_log/ for the purged scope. The default can go back to enabled = true in that PR.
Reading the log through the API stays out of scope.
Done: #611 added the /add input log, #617 removes a session's lines on /memory/delete and a purged scope's .input_log/, and turned the log on by default.
Activity
chuiwenwei commentedon Nov 7, 2026
I'd like to take this. Before I start: should the session-delete hook from #483 be part of the same PR, or a follow-up? I'd implement the route-level JSONL log first (enabled / retention_days / max_inline_bytes, one line per accepted /add, outside .index), then wire deletion separately.
gloryfromca commentedon Nov 19, 2026
@chuiwenwei Yes, please take it, and two PRs are fine. Since this issue was written, #483 was closed by #555 (
POST /api/v2/memory/delete) and #594 added online purge, so the deletion side now belongs to this issue rather than #483.So that the first PR doesn't leave deleted conversations on disk:
enabled = falseby default. Everything else stays as in the description: one line per accepted/add, written before the sync/async split, outside.index/, with the retention sweep andmax_inline_bytes, and a failed write never fails/add. Please base it on currentmain(1.7.0+); the code has moved a lot since this was filed./memory/deletethat covers a session removes that session's lines, and purge (feat(purge): online purge of a memory root, app or project #594) removes.input_log/for the purged scope. The default can go back toenabled = truein that PR.Reading the log through the API stays out of scope.
chuiwenwei commentedon Nov 19, 2026
Opened #611 for the first PR (log only,
enabled = false). The second PR will wire session delete + purge and flip the default.feat(memorize): add opt-in raw input log for /add
feat(memorize): add opt-in raw input log for /add
feat(memorize): delete input log entries with memories
feat(memorize): add opt-in raw input log for /add (#611)
feat(memorize): delete input log entries with memories
feat(memorize): delete input log entries with memories
feat(memorize): delete input log entries with memories
feat(memorize): delete input log entries with memories (#617)
gloryfromca commentedon Nov 23, 2026
Done: #611 added the /add input log, #617 removes a session's lines on /memory/delete and a purged scope's .input_log/, and turned the log on by default.