feat(memory): Implement Scoped Memory Architecture with Background Extraction and Hybrid Search#282
Open
esafwan wants to merge 18 commits into
Open
feat(memory): Implement Scoped Memory Architecture with Background Extraction and Hybrid Search#282esafwan wants to merge 18 commits into
esafwan wants to merge 18 commits into
Conversation
- Phase 2: Policy enforcement, injection boundaries, auto-promotion - Phase 3: Post-run extraction with Learning Agents via Frappe background jobs - Phase 4: Formalized Memory Profiles and dedicated extraction agents - Phase 5: Hybrid search (RRF) via sqlite_hybrid and advanced JSON metadata filtering
This was referenced Jun 1, 2026
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.
This PR represents the finalized and fully functioning culmination of the Scoped Memory architecture proposed in the RFC. It integrates and supersedes the work from #274, #275, and #276.
Key Deliverables:
Memory Policyrecords actively enforce validation, automatically promote confident records to knowledge endpoints, and seamlessly inject boundaries into agent prompts.run_background_memory_extractionfor asynchronous post-run parsing (inspired by the Hindsight memory pattern). Added alearning_agentproperty to the Memory Policy to offload this extraction to dedicated/cheaper agents. Four default Policy Presets (Conservative, Conversational, Research, Operational) are now auto-installed.sqlite_hybridknowledge backend that performs both semantic vector similarity and FTS5 keyword searches, merging results via Reciprocal Rank Fusion (RRF). Advanced metadata filtering viajson_extract()is now supported across all SQLite backends and theknowledge_searchtool.Closes #274
Closes #275
Closes #276