twining_add_relation
Adds or updates a relation between two knowledge graph entities. Resolves names or IDs and merges properties on duplicate edges, so you can establish or correct links without duplication.
Instructions
Add a relation between two knowledge graph entities. Source and target can be entity IDs or names. Returns an error for ambiguous name matches. Upsert semantics: re-adding the same (source, target, type) merges properties instead of duplicating the edge. Relations are provenance-marked: agent-typed edges get properties.origin "declared", auto-populated edges "derived", absent means legacy/unknown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | Relation type: "depends_on", "implements", "decided_by", "affects", "tested_by", "calls", "imports", "related_to" | |
| source | Yes | Source entity ID or name | |
| target | Yes | Target entity ID or name | |
| properties | No | Key-value properties for this relation (max 50 entries, values ≤1000 chars) |