Relationship Graph Kit

SUBRelationship Graph Kit

Configuration

JS
AC
ON

6 entities • 8 relationships

Relationships

John Smithworks_atAcme Corp0.95
John Smithparticipates_inOp Nexus0.8
Acme CorpsponsorsOp Nexus0.7

Integration Code

import { createGraph } from 'agent-tools-kit/ontology'

const graph = createGraph({ layout: 'force-directed', storage: 'neo4j' })
await graph.addRelationship({ from: 'john', to: 'acme', type: 'works_at', strength: 0.95 })
const neighbors = await graph.traverse('john', { maxDepth: 3 })