Graph & Training

Knowledge Graph & Spreading Activation

Sulcus pairs pgvector HNSW similarity with an SQL-native property and Apache AGE knowledge graph. Memories don't sit in isolated vector silos: SILU extracts entities on ingestion, links related nodes, detects contradictions, and diffuses heat across graph edges.

SQL + Apache AGE GraphSILU Entity Linking2-Hop ResonanceTemporal Validity
01 · Graph Topology

SILU Linking & Semantic Edge Types

Every ingested memory passes through SILU (Sulcus Intelligence Linking Unit), which extracts named services, symbols, files, and domain entities, linking memories that share causal or architectural dependencies.
related_to0.50 default

General associative link between concepts, services, or files (bidirectional by default).

depends_on0.75 typical

Directional architectural or build dependency (for example checkout-web -> payments-rails).

supersedes0.90 typical

Marks a newer decision replacing an older fact; automatically created by memory_deprecate when replacement_id is supplied.

contradictsConflict flagged

Created when a newly ingested fact conflicts with high-similarity existing knowledge, surfacing in /api/v1/agent/conflicts.

derived_fromProvenance

Connects a consolidated synthesis memory back to the episodic source turns that produced it.

mentions_entitySILU auto-edge

Anchors memories to canonical entity vertices for fast /api/v1/agent/entity-context lookup.

Spreading Activation (Resonance Defaults)
During recall and boost cycles, heat diffuses across graph edges using your tenant's ResonanceConfig: spread_factor = 0.30, depth = 2 hops, damping = 0.50 per hop, and thermal_gate = 0.05. Recalling an architectural fact automatically warms adjacent runbooks and edge cases even if they don't share exact keywords.
02 · Temporal Truth & Contradictions

Temporal Queries & Contradiction Resolution

Engineering architectures evolve. Sulcus tracks valid_from / valid_until windows and flags semantic contradictions instead of silently serving conflicting rules.

Point-in-Time Graph Queries

POST /api/v1/agent/graph/temporal evaluates memory validity intervals against an ISO-8601 as_of timestamp so incident postmortems and audits can inspect what architecture contract was active on a given date.

Semantic Conflict Queue

When high-similarity memories assert incompatible facts, Sulcus records a conflict entry inspectable via GET /api/v1/agent/conflicts and resolvable via PATCH /api/v1/agent/conflicts/:id (keep_new, keep_old, keep_both, or dismiss).

bashCreate Graph Edges & Traverse Neighbors
# 1. Link two memories with a weighted semantic edge
curl -X POST https://api.sulcus.ca/api/v1/agent/graph/relate \
  -H "Authorization: Bearer $SULCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "source_id": "0195f410-8a11-7000-8000-000000000010",
    "target_id": "0195f412-3c09-7000-8000-000000000022",
    "relation_type": "depends_on",
    "weight": 0.85,
    "bidirectional": false
  }'

# 2. Traverse 1-hop inbound and outbound graph neighbors around a memory UUID
curl https://api.sulcus.ca/api/v1/agent/graph/neighbors/0195f410-8a11-7000-8000-000000000010 \
  -H "Authorization: Bearer $SULCUS_API_KEY"
bashEntity Context & Temporal Validity Queries
# 3. Retrieve entity-anchored memories and connected neighborhood context
curl -X POST https://api.sulcus.ca/api/v1/agent/entity-context \
  -H "Authorization: Bearer $SULCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "entities": ["Cerberus", "WebhookVerifier", "Stripe"],
    "namespace": "payments-rails",
    "limit": 10
  }'

# 4. Point-in-time temporal validity query (inspect what was true at a specific timestamp)
curl -X POST https://api.sulcus.ca/api/v1/agent/graph/temporal \
  -H "Authorization: Bearer $SULCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "webhook signature tolerance window",
    "as_of": "2026-10-15T00:00:00Z",
    "namespace": "payments-rails"
  }'
jsonMCP Tools: memory_relate & search_memory (include_neighbors)
// Create an explicit edge over MCP (fires on_relate triggers automatically)
{
  "name": "memory_relate",
  "arguments": {
    "source_id": "0195f410-8a11-7000-8000-000000000010",
    "target_id": "0195f412-3c09-7000-8000-000000000022",
    "relation_type": "supersedes",
    "weight": 0.9,
    "bidirectional": false
  }
}

// Expand 1-hop graph neighbors automatically during hybrid recall
{
  "name": "search_memory",
  "arguments": {
    "query": "Stripe webhook HMAC drift rules",
    "namespace": "payments-rails",
    "include_neighbors": true,
    "limit": 8
  }
}
03 · Protocol Reference

Knowledge Graph Endpoints & MCP Tools

GET/api/v1/agent/graph/status
Graph vertex counts, edge counts, and Apache AGE / SQL graph sync status.
GET/api/v1/agent/graph/neighbors/:id
Fetch 1-hop connected memory nodes and edge weights around :id.
POST/api/v1/agent/graph/relate
Create a directed or bidirectional semantic edge (fires on_relate triggers).
POST/api/v1/agent/graph/temporal
Query memories and relationships active at an ISO-8601 as_of timestamp.
GET/api/v1/agent/graph/verify/:id
Verify relational and graph index parity for a specific node UUID.
GET/api/v1/agent/graph/snapshot
Retrieve visual graph topology (nodes + edges) for the Memory Web canvas (alias: /api/v1/admin/visualize/graph).
POST/api/v1/agent/entity-context
Retrieve memories and neighborhood links anchored to named entities.
GET/api/v1/agent/conflicts
List unresolved semantic contradictions across your namespace.
PATCH/api/v1/agent/conflicts/:id
Resolve a semantic conflict and automatically deprecate superseded nodes.
MCPmemory_relate
Create weighted edges between memories from any MCP client.