feat: native short-term memory + everos long-term consolidation#9
Merged
Merged
Conversation
Two related changes to the EverOS-backed memory subsystem. Migrated three recall improvements from the legacy everclaw repo (env vars renamed EVERCLAW_* -> RAVEN_*): - drop current-session hits from the # Memory recall so it does not duplicate the live conversation already in the history window (over-fetch top_k*2, then filter by session_id) - add `raven agent --message-file` for prompts beyond the shell ARG_MAX - env-gated episodic recall + preference annotation in the consolidator (RAVEN_EPISODIC_TOPK / RAVEN_ANNOTATE_PREFS / RAVEN_EPISODIC_CLUSTER), default-off Restructured when EverOS is invoked so native memory owns short-term and EverOS owns long-term: - recall is now on-miss: native runs every turn; EverOS user-track recall fires only when native surfaces nothing relevant to the query - the per-turn EverOS store is removed; EverOS consolidation runs only (a) intra-day when a session crosses everos_consolidation_threshold_pct of the context window (default 80, background, non-blocking) and (b) nightly at everos_nightly_consolidation_hour (default 0, offline) - backend.store gains force_flush to promote a batch immediately; consolidation is incremental per session (metadata watermark) so the two triggers never double-ingest - native short-term compaction (maybe_consolidate_by_tokens) is unchanged Tests: unit coverage for the threshold / nightly / on-miss paths plus a full in-memory lifecycle smoke, and a real-everos e2e for the force_flush single-store recall path. Co-authored-by: Claude (claude-opus-4-8) <noreply@anthropic.com>
7 tasks
chuanruihu
added a commit
that referenced
this pull request
Jun 30, 2026
revert: pr #9 native short-term memory + everos long-term consolidation
Kendrick-Song
added a commit
that referenced
this pull request
Jul 22, 2026
- Move _everos_server.py from raven/cli/ to raven/plugin/memory/everos/ _server.py to fix plugin->cli layering violation (CR #1) - Split HTTP timeout: client default 60s (recall/health), memorize add/flush per-request 360s (CR #2) - Defer backend.start() to post-handshake background task in TUI so first render is not blocked by server startup (CR #3) - Remove unused app_id/project_id from ImportSession and scanner (CR #4) - Add note on per-source-unit checkpoint granularity (CR #5) - Add fcntl file lock to prevent concurrent server spawn race (CR #6) - Fix loguru %s format to {} in state.py (CR #7) - Fix docstring step numbering (CR #8) - Remove redundant Table import in status_cmd (CR #9) Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
Kendrick-Song
added a commit
that referenced
this pull request
Jul 22, 2026
- Move _everos_server.py from raven/cli/ to raven/plugin/memory/everos/ _server.py to fix plugin->cli layering violation (CR #1) - Split HTTP timeout: client default 60s (recall/health), memorize add/flush per-request 360s (CR #2) - Defer backend.start() to post-handshake background task in TUI so first render is not blocked by server startup (CR #3) - Remove unused app_id/project_id from ImportSession and scanner (CR #4) - Add note on per-source-unit checkpoint granularity (CR #5) - Add fcntl file lock to prevent concurrent server spawn race (CR #6) - Fix loguru %s format to {} in state.py (CR #7) - Fix docstring step numbering (CR #8) - Remove redundant Table import in status_cmd (CR #9) Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change description
Restructures the EverOS-backed memory subsystem so native memory owns short-term and EverOS owns long-term, and ports three recall improvements from the legacy
everclawrepo.Ported from the legacy repo (env vars renamed
EVERCLAW_*->RAVEN_*):# Memoryrecall so it does not duplicate the live conversation already in the history window (over-fetchtop_k*2, then filter bysession_id).raven agent --message-filefor prompts beyond the shellARG_MAX.RAVEN_EPISODIC_TOPK/RAVEN_ANNOTATE_PREFS/RAVEN_EPISODIC_CLUSTER), default-off.EverOS call-timing refactor (native = short-term, EverOS = long-term):
everos_consolidation_threshold_pctof the context window (default 80), and (b) nightly ateveros_nightly_consolidation_hour(default 0, offline).backend.storegainsforce_flushto promote a batch immediately; consolidation is incremental per session (ametadatawatermark) so the intra-day and nightly triggers never double-ingest.maybe_consolidate_by_tokens) is unchanged.Testing
test_agent_loop_everos_pipeline.py), plus updatedtest_segments.py/test_default_context_engine.pyfor the new over-fetch behavior.test_everos_backend_e2e.py,real_llm): existing dual-track recall plus a newforce_flushsingle-store recall.Type of change
Related issues (if there is)
Checklists
Development
Security
Code review