Why AI agents need a graph layer next to vectors and SQL
Vectors retrieve similarity. SQL retrieves facts. A graph retrieves the connective tissue agents need when the next step depends on how entities, events, permissions, and history relate.
Field notes from building an embedded graph layer for modern data platforms, lakehouses, and retrieval-heavy AI products.
How real relationships change retrieval, planning, personalization, and fraud analysis.
Vectors retrieve similarity. SQL retrieves facts. A graph retrieves the connective tissue agents need when the next step depends on how entities, events, permissions, and history relate.
Start with a dependency. Move to managed graph capacity only when multiple services need the same traversal layer.
Use table formats and SQL DDL as the foundation for graph labels, edge types, and derived traversals.
Practical writing for teams connecting operational data, analytics, and AI systems.
Patterns for grounding LLM calls in relationship paths instead of isolated chunks.
Neighbourhood expansion, shortest path, deduping, projection, and result shaping.
How tables, foreign keys, and views map cleanly to vertices, edges, and derived relationships.
Short, implementation-minded reads from the CrabGraph team.
SQL schema definitions, persistent storage, SDKs, and TinkerPop-compatible traversals.
How to think about hot traversals, fanout, materialization, and cost controls.
A quick schema walkthrough using vertices, edges, and views with standard SQL DDL.