Core concepts
DeterministicRouter and SemanticRouter
Author routing as router units instead of hand-writing every edge. Both compile into the FSM; ControlManager still validates and commits.DeterministicRouter — hard rules
First matching (predicate, target) rule wins. Compiles to deterministic edges at FSM build time. No model call — ever. Predicates receive ctx with ctx.state.
Python SDKpython
auth = DeterministicRouter(
id="CheckAuth",
input_schema=CustomerRequest, # required when this router is the FSM entry
rules=[
(lambda ctx: ctx.state.get("token_valid") is True, intent_router),
(lambda ctx: ctx.state.get("token_valid") is False, login_node),
],
)SemanticRouter — labeled intent routes
A model picks among labeled targets (routes={label: node_or_group}). The proposal is validated against the graph before anything executes. v1 supports up to 9 labeled routes plus 1 fallback slot.
Python SDKpython
intent = SemanticRouter(
id="CustomerIntent",
routes={
"refund": refunds_group, # label → group (scoped to entry)
"status": order_status_node, # label → node
"billing": billing_group,
},
fallback_node=out_of_scope, # cannot be a group
)Grounded in neosyntropy-framework/docs/concepts-explained.md §7–8.