-
Notifications
You must be signed in to change notification settings - Fork 2
research(memory): MAGMA multi-graph memory with causal/temporal/semantic/entity edge types #1821
Description
Source
MAGMA: Multi-Graph Agentic Memory Architecture
https://arxiv.org/abs/2601.03236 — January 2026
Summary
MAGMA represents each memory item simultaneously across four orthogonal relation graphs (semantic, temporal, causal, entity) and frames retrieval as policy-guided graph traversal rather than flat vector similarity. A dual-stream write mechanism handles fast synchronous ingestion and asynchronous background consolidation.
Benchmark: outperforms A-MEM (0.58) and MemoryOS (0.55) on LoCoMo with a score of 0.70.
Applicability to Zeph
HIGH. Zeph's zeph-memory graph currently uses a single undifferentiated graph with label propagation communities and embedding-based entity resolution. MAGMA's upgrade path:
- Add explicit
edge_typecolumn to theedgestable (semantic/temporal/causal/entity) - Route retrieval queries to the appropriate graph view based on query classification (temporal query → temporal subgraph, causal query → causal subgraph)
- Dual-stream write: synchronous entity extraction (already present) + async background causal-link inference
The SQLite schema (entities, edges, communities) and BFS traversal infrastructure is already in place — the main addition is edge-type classification during extraction and query-time subgraph routing.
Implementation sketch
- Migration: add
edge_type TEXT NOT NULL DEFAULT 'semantic'toedges GraphExtractor: classify extracted relation type (semantic/causal/temporal/entity) via LLM extraction promptMemoryRouter(new): inspect query for temporal/causal markers and select subgraph traversalHeuristicRouterinzeph-memory: integrate graph edge-type routing as a fourth retrieval strategy alongside FTS5, vector, and BM25+RRF hybrid
Related
- A-MEM note linking (bug(memory): A-MEM note linking never creates edges due to missing entity embeddings #1817) should be fixed first
- Temporal edge columns (Temporal versioning on graph memory edges #1341) — MAGMA temporal edges are a superset
- TA-Mem adaptive retrieval (PR feat(memory): adaptive retrieval dispatch by query type (#1629) #1789) — subgraph routing extends the existing router