Overview
Edges define how execution flows between nodes in your agent graph. Unlike traditional frameworks that hardcode workflows, Aden’s edges are dynamically generated based on your goals.Edge Types
| Type | Trigger | Use Case |
|---|---|---|
on_success | Node completes successfully | Normal flow progression |
on_failure | Node throws an error | Error handling, retries |
conditional | Output matches a condition | Branching logic |
Basic Syntax
Success Edges
Execute the next node when the current node completes without errors.Passing Data
Output from the source node becomes input for the target:Failure Edges
Execute when a node throws an error or times out.Error Context
Failed nodes pass error information:Retry Pattern
Conditional Edges
Route based on output values using expressions.Expression Syntax
| Operator | Description | Example |
|---|---|---|
== | Equals | status == 'approved' |
NOT_EQUAL | Not equals | type NOT_EQUAL 'spam' |
>, <, >=, <= | Comparison | score >= 0.7 |
&& | Logical AND | type == 'urgent' && priority > 5 |
|| | Logical OR | status == 'error' OR retries > 3 |
in | Contains | category in ['billing', 'sales'] |
Accessing Nested Values
Multiple Outgoing Edges
A node can have multiple outgoing edges:Default Path
Use a default edge when no conditions match:Parallel Execution
Execute multiple nodes in parallel by having multiple success edges:Join Strategies
| Strategy | Description |
|---|---|
on_all_success | Wait for all parallel nodes to succeed |
on_any_success | Continue when first node succeeds |
on_all_complete | Wait for all to complete (success or failure) |