add_relation
Add a directed relation between two entities with a specified type and weight to model connections in a knowledge base.
Instructions
Add a directed relation between two entities.
Args: source_id: Source entity ID. target_id: Target entity ID. rel_type: Type of relation (CALLS, DEPENDS_ON, CONTAINS, etc.). weight: Relation strength (0.0 to 1.0).
Returns: Created relation details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| weight | No | ||
| rel_type | No | related_to | |
| source_id | Yes | ||
| target_id | Yes |