SKGraph Architecture
Graph Model
SKGraph uses a property graph model where:
- Nodes represent entities (agents, memories, concepts, events)
- Edges represent relationships (authored, references, relates_to, caused)
- Properties store metadata on both nodes and edges
Schema
Node Types
- Agent β AI agents with identity, capabilities, trust scores
- Memory β Stored memories with emotional fingerprints
- Concept β Abstract ideas, topics, themes
- Event β Timestamped occurrences
- Person β Human entities
Edge Types
- authored β Agent authored a memory
- references β Memory references a concept
- relates_to β Semantic similarity above threshold
- caused β Event caused another event
- trusts β Trust relationship between agents
Query Patterns
Find Related Memories
MATCH (m:Memory)-[:relates_to]->(related:Memory)
WHERE m.title CONTAINS 'architecture'
RETURN related.title, related.created_at
ORDER BY related.importance DESC
Agent Knowledge Map
MATCH (a:Agent {name: 'lumina'})-[:authored]->(m:Memory)-[:references]->(c:Concept)
RETURN c.name, count(m) as memory_count
ORDER BY memory_count DESC
FalkorDB Backend
SKGraph uses FalkorDB (a Redis module) for its graph engine:
- Cypher query language β familiar, powerful graph queries
- Redis-compatible β works with existing Redis infrastructure
- Sub-millisecond β graph traversals complete in < 1ms
- Persistent β data survives restarts via Redis persistence