connect
Create a directed edge between two memories in the knowledge graph. Edges represent relationships like relates_to, supersedes, or contradicts.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
from | number | Yes | Source memory ID |
to | number | Yes | Target memory ID |
relation | string | Yes | Edge type |
Relation Types
Section titled “Relation Types”relates_to— General associationsupersedes— Replaces outdated knowledgecontradicts— Conflicts withpart_of— Component of a larger conceptderived_from— Conclusion drawn from sourcesummarized_by— Condensed version
Return Value
Section titled “Return Value”Confirmation with edge ID. Duplicate edges are idempotent.
Examples
Section titled “Examples”Link related memories
Section titled “Link related memories”{ "from": 42, "to": 17, "relation": "relates_to"}Mark a decision as superseded
Section titled “Mark a decision as superseded”{ "from": 55, "to": 42, "relation": "supersedes"}Flag a contradiction
Section titled “Flag a contradiction”{ "from": 60, "to": 42, "relation": "contradicts"}Related Tools
Section titled “Related Tools”- disconnect — Remove an edge
- graph — View a memory’s neighborhood
- recall — Use
depthparameter to traverse edges