Transitions

Transitions connect states with conditions and decision types, defining how the conversation moves forward.

What is a Transition?

A transition connects two states and defines the conditions under which the NPC should move from one to the other. After each user message, the AI evaluates all outgoing transitions from the current state. If a condition is met, the conversation moves to the target state.

Default transitions are created automatically when you add a state in the editor. You can click any transition to edit its condition and decision type.

Transition Fields

  • from_state_key — The state this transition originates from.
  • to_state_key — The state this transition leads to.
  • decision_type — What happens when the transition fires. One of pass, redirect, reject, or kick_out.
  • score_delta — Numeric value added to the running score when this transition fires. See scoring.
  • priority — Evaluation order when multiple transitions share the same source state. Lower values are evaluated first.

Decision Types

Each transition carries a decision type that determines what happens when it fires:

TypeMoves State?Ends Conversation?Use Case
passYesNoAdvance to next state on success
redirectNoNoStay in current state and retry — player didn't clearly pass or fail
rejectYes (scoring) / No (pass/fail)No (scoring) / Yes (pass/fail)In scoring mode: apply score penalty and advance using the pass transition. In pass/fail mode: end conversation immediately.
kick_outNoYesEnd conversation immediately

Follow-Up

In addition to the four decision types, each state's evaluation can trigger a follow-up. When follow_up is set to true, the NPC pauses normal transition logic and instead asks a clarifying question before committing to a decision.

Define a follow-up condition in your evaluation criteria to control when this happens. For example: "The player's answer is ambiguous — they neither clearly accept nor reject the offer." Once the player responds to the follow-up, the engine re-evaluates and applies the decision against the original state's transitions.

See States for more details on the follow-up state.

Conditions

Transition conditions are written in natural language. The AI interprets them against the full conversation history to decide whether they are satisfied. The more specific the condition, the more reliably the AI triggers it.

// Examples of effective conditions:
"The user agrees to the proposed price"
"The user has made three or more counteroffers"
"The user becomes hostile or uses threatening language"
Transition limits
A scenario can have a maximum of 500 transitions.