feat(memory): MAGMA multi-graph memory with typed edges (issue #1821)#2077
Merged
feat(memory): MAGMA multi-graph memory with typed edges (issue #1821)#2077
Conversation
Add EdgeType enum (Semantic/Temporal/Causal/Entity) to enable subgraph-scoped BFS traversal. Implement 4-phase upgrade: 1. Schema: EdgeType column + migration 041 with UNIQUE index fix + CHECK constraint 2. Extraction: LLM edge_type classification with serde defaults + fallback to Semantic 3. Retrieval: Query classifier (heuristic) + typed subgraph BFS with dynamic filtering 4. Integration: Context assembly calls classifier, TUI/CLI display edge types Key mitigations (per critic review): - insert_edge_typed() dedup key includes edge_type - graph_recall() dedup key includes edge_type - CHECK constraint prevents invalid types - Semantic fallback ensures recall >= current - Backward compatible: empty edge_types = all types All 4 validator phases approved: - Security: 0 vulnerabilities - Impl-Critic: All logic correct - Perf: No regressions - Tester: 6281/6281 PASS (+17) Closes #1821.
…-multi-graph-memory # Conflicts: # CHANGELOG.md
bug-ops
added a commit
that referenced
this pull request
Mar 21, 2026
Resolves CHANGELOG.md conflict by keeping both entries. No code conflicts — changes are in disjoint crates.
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.
Summary
Implement MAGMA (Multi-Graph Agentic Memory Architecture) — multi-graph memory with typed edges (Semantic/Temporal/Causal/Entity) enabling subgraph-scoped BFS retrieval.
4-Phase Implementation:
Test Plan
Key Changes
Validation Results
Related Issues
Closes #1821
Related: #1817 (A-MEM note linking), #1341 (temporal edge columns), #1789 (TA-Mem adaptive retrieval)