How graphadvantage/neo4j-relate-context works
neo4j-relate-context is a federated agent-memory system: host-side taps and memory MCP connectors capture work into local per-agent Relate graphs, while a console manages capture, replication, recall, metrics, and a live topology/query UI. The principal workflow is agent activity → capture → local persistence → asynchronous Aura replication → scoped recall and evidence. Separate Chat and Code recall paths preserve their different scopes and search methods. The README documents the deployment flows; some subsystem links below are documented rather than verified in sampled implementation excerpts.
Main entry points: server.py Console API · memory_graph.py Agent Relate graphs · tap.py Host tap · memory_mcp.py Memory MCP
Components 24
Capture paths
- Host tap
relate_tap/tap.py - Turn capture
memory_graph.py
Memory and recall
- Memory MCP
memory_mcp.py - Chat intent recall
relate_tap/intent_recall.py - Coding recall
relate_tap/coding_recall.py - Recall client
relate_tap/recall_client.py - Query evidence
relate_tap/reuse_evidence.py
Console and storage
- Capture API
relate_tap/routes.py - Capture spool
relate_tap/remote_capture.py - Spool collector
relate_tap/server.py - Capture store
relate_tap/store.py - Agent Relate graphs
memory_graph.py - Aura replication
aura_sync.py - Shared Aura graph
- Console API
relate_tap/server.py - HTTP routes
relate_tap/routes.py - Capture and recall metrics
relate_tap/cowork_metrics.py - Graph query sources
relate_tap/sources.py
Console interface
- Topology view
frontend/src/Topology.tsx - Topology model
frontend/src/topology-model.ts - Query playground
frontend/src/App.tsx - Recall chyron
frontend/src/RecallChyron.tsx
Other components
- Agents
- Domain MCP
Connections 25
- Agents → Host tap: MCP traffic
README.md - Host tap → Domain MCP: forwards traffic
README.md - Host tap → Capture API: sends redacted copies
README.md - Capture API → Capture spool: ingests events
relate_tap/routes.py - Capture spool → Spool collector: queues events
README.md - Spool collector → Capture store: persists events
relate_tap/server.py - Agents → Memory MCP: calls memory tools
README.md - Memory MCP → Agent Relate graphs: records turns
memory_mcp.py - Agents → Turn capture: reports turns
README.md - Turn capture → Agent Relate graphs: stores evidence
memory_graph.py - Agent Relate graphs → Aura replication: snapshots graph
aura_sync.py - Aura replication → Shared Aura graph: pushes snapshots
aura_sync.py - Memory MCP → Recall client: requests recall
memory_mcp.py - Recall client → Console API: posts operation
relate_tap/recall_client.py - Console API → HTTP routes: registers routes
relate_tap/server.py - HTTP routes → Chat intent recall: dispatches recall
relate_tap/server.py - HTTP routes → Coding recall: dispatches recall
- Chat intent recall → Query evidence: uses evidence
relate_tap/intent_recall.py - Coding recall → Agent Relate graphs: searches turns
relate_tap/coding_recall.py - Chat intent recall → Shared Aura graph: promotes intents
README.md - Console API → Capture and recall metrics: serves metrics
relate_tap/server.py - Topology view → Console API: reads topology
README.md - Topology view → Topology model: renders model
frontend/src/Topology.tsx - Query playground → Graph query sources: runs queries
- Recall chyron → Topology model: uses recall state
frontend/src/RecallChyron.tsx