Nous.Decisions.Edge (nous v0.15.8)
View SourceA directed edge connecting two nodes in the decision graph.
Edges encode the relationships between decision nodes: which options were chosen, what actions lead to which outcomes, and how decisions supersede or depend on one another.
Architecture
Edges are plain structs stored alongside nodes in a Nous.Decisions.Store
backend. Each edge has a typed relationship (edge_type) and connects
a source node (from_id) to a destination node (to_id).
Quick Start
edge = Nous.Decisions.Edge.new(%{
from_id: goal_node.id,
to_id: decision_node.id,
edge_type: :leads_to
})Fields
| Field | Type | Description |
|---|---|---|
id | String.t() | Unique identifier (auto-generated) |
from_id | String.t() | Source node ID |
to_id | String.t() | Destination node ID |
edge_type | edge_type() | Relationship type |
metadata | map() | Arbitrary key-value data |
created_at | DateTime.t() | When the edge was created |
Summary
Functions
Create a new edge with auto-generated ID and timestamp.