create_relation
Connect two memory items with a typed relationship to record how they influence or relate, using strength and metadata to clarify context.
Instructions
Link two memories with typed relationship.
Args: from_memory_id: Source memory UUID. to_memory_id: Target memory UUID. relation_type: Type (related, causes, supports, contradicts, has_decision, consolidated_from). strength: Relation strength (0.0-1.0). metadata: Optional metadata dict.
Returns: Dict with relation_id, from, to, type, strength.
Raises: ValueError: Invalid UUID or relation type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metadata | No | ||
| strength | No | ||
| to_memory_id | Yes | ||
| relation_type | Yes | ||
| from_memory_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||