Skip to content

research(memory): MAGMA multi-graph memory with causal/temporal/semantic/entity edge types #1821

@bug-ops

Description

@bug-ops

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:

  1. Add explicit edge_type column to the edges table (semantic / temporal / causal / entity)
  2. Route retrieval queries to the appropriate graph view based on query classification (temporal query → temporal subgraph, causal query → causal subgraph)
  3. 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

  1. Migration: add edge_type TEXT NOT NULL DEFAULT 'semantic' to edges
  2. GraphExtractor: classify extracted relation type (semantic/causal/temporal/entity) via LLM extraction prompt
  3. MemoryRouter (new): inspect query for temporal/causal markers and select subgraph traversal
  4. HeuristicRouter in zeph-memory: integrate graph edge-type routing as a fourth retrieval strategy alongside FTS5, vector, and BM25+RRF hybrid

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Research — medium-high complexitymemoryzeph-memory crate (SQLite)researchResearch-driven improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions