link_memories
Create a queryable edge between two memories to track relationships in the graph and enable get_relations() queries. Validates uids and prevents self-links or duplicates with clear errors.
Instructions
Create a queryable edge between two memories.
This is what splitting a body into several memories costs: a [[uid]] written inside prose is a reference a reader follows, and only an edge created here is visible to get_relations() and to the graph.
Refuses an unknown uid, a memory related to itself, and an edge that already exists with that same type -- each as {"ok": False, "errors": [...]}, so a typo comes back as something to fix instead of a dangling edge or a raw database error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | why the two are related, kept on the edge. | |
| to_uid | Yes | the memory it points to. | |
| from_uid | Yes | the memory the edge starts at. | |
| relation_type | Yes | free text, but keep it consistent, e.g. 'supersedes', 'relates_to', 'contradicts', 'links_to'. |