create_relation
Establish typed connections between memory nodes to build semantic relationships within codebases, supporting various relation types with weighted edges that update automatically.
Instructions
Create a typed edge between two memory nodes. Supports relation types: relates_to, depends_on, implements, references, similar_to, contains. Edges have weights (0-1) that decay over time via e^(-λt). Duplicate edges update weight instead of creating new ones.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_id | Yes | ID of the source memory node. | |
| target_id | Yes | ID of the target memory node. | |
| relation | Yes | Relationship type between nodes. | |
| weight | No | Edge weight 0-1. Higher = stronger relationship. Default: 1.0. | |
| metadata | No | Optional key-value metadata for the edge. |