Skip to content

feat(memory): Implement Scoped Memory Architecture with Background Extraction and Hybrid Search#282

Open
esafwan wants to merge 18 commits into
developfrom
feature/scoped-memory-implementation
Open

feat(memory): Implement Scoped Memory Architecture with Background Extraction and Hybrid Search#282
esafwan wants to merge 18 commits into
developfrom
feature/scoped-memory-implementation

Conversation

@esafwan
Copy link
Copy Markdown
Contributor

@esafwan esafwan commented Jun 1, 2026

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:

  • Phase 1-2 (Policy Enforcement): Memory Policy records actively enforce validation, automatically promote confident records to knowledge endpoints, and seamlessly inject boundaries into agent prompts.
  • Phase 3-4 (Learning Profiles): Implemented run_background_memory_extraction for asynchronous post-run parsing (inspired by the Hindsight memory pattern). Added a learning_agent property to the Memory Policy to offload this extraction to dedicated/cheaper agents. Four default Policy Presets (Conservative, Conversational, Research, Operational) are now auto-installed.
  • Phase 5 (Retrieval Upgrades): Created a new sqlite_hybrid knowledge backend that performs both semantic vector similarity and FTS5 keyword searches, merging results via Reciprocal Rank Fusion (RRF). Advanced metadata filtering via json_extract() is now supported across all SQLite backends and the knowledge_search tool.

Closes #274
Closes #275
Closes #276

@esafwan esafwan changed the title feat(memory): Implement Phase 1-5 of Scoped Memory Architecture feat(memory): Implement Scoped Memory Architecture with Hindsight Extraction and Hybrid Search Jun 1, 2026
@esafwan esafwan changed the title feat(memory): Implement Scoped Memory Architecture with Hindsight Extraction and Hybrid Search feat(memory): Implement Scoped Memory Architecture with Background Extraction and Hybrid Search Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant