Core concepts
Edges define legal movement
Nodes perform work; edges define which state-to-state movements are legal.State transitions
An edge connects one state to another. A node result may propose a target state; only a listed edge (or allow_unlisted_transitions=True) permits the move.
Edges carry labels with a fixed priority order that drives the deterministic preferred-path router, and optional guards — callables over state that gate the edge at runtime. Guards fail closed.
Python SDKpython
from neosyntropy import Edge, FSM, node
@node(id="VerifyIdentity")
def verify_identity(ctx):
return ctx.result()
@node(id="OutOfScope", is_fallback=True)
def out_of_scope(ctx):
return ctx.result()
graph = FSM(
nodes=[verify_identity, out_of_scope],
edges=[
Edge(source="Start", target="VerifyIdentity", label="first"),
Edge(source="VerifyIdentity", target="End", label="complete"),
],
)
print(graph.allows("Start", "VerifyIdentity")) # TrueWhen edges are not listed
Missing edges do not skip selection. Search still finds relevant nodes; validation fail-closes unless the hop is listed or the graph explicitly allows unlisted transitions.