
Creating and managing transitions
Use transition functions to control how your agent moves from one step to another, using the open-code Python fields that you can find in other transition items around Agent Studio. Here’s how you can create a new transition function:- Connect two steps If no transition exists, linking two steps will prompt you to create one.
- Name your transition You’ll be asked to name the new transition function. Clear, intent-based names improve flow readability and LLM alignment.
- Handle name conflicts If the name is already in use, the UI will show an error. Rename the function before proceeding.
- View usage references After creation, the UI shows how many times the transition function is referenced in prompts.
Naming functions
Function names directly shape how the LLM behaves — and what it might say. Stick to names that reflect the user’s intent, not the flow structure. Always name from the user’s perspective, rather than that of your AI agent.- Good:
save_postcode,check_availability,confirm_email - Avoid:
goto_next_step,continue_flow,start_confirmation
Managing transition functions

- From a step Open the step’s context menu and select an existing transition or create a new one.
- From the Flow Functions modal Use the modal to view, rename, delete, or connect transitions to steps.
Example: conditional transition logic
A transition function typically checks state and moves to the appropriate step:Best practices
- Step IDs are case-sensitive — so
"CollectName"is not the same as"collectname". - Keep transition functions focused, with one job and one output.
- Use action- or intent-based names like
check_user_verified,handle_no_availability. - Avoid vague or structural names like
goto_step_twoorcontinue_flow— they confuse the LLM and make flows harder to debug. - Transition functions are only visible to the LLM if referenced in the current step.
- They are attached to the current flow, so they are not shared globally. They will not show up in the functions tab.
- Use them to encapsulate branching logic and control step sequencing — not to generate agent responses.
- Avoid
- Instead, use...
Never chain multiple function calls in a single step. This will always increase the failure rate, and it makes flow behavior unpredictable.
Recognising global functions in flows
Global functions are distinguished in flow steps by the function symbol . They can also be edited in the flow editor, but keep in mind this will affect all iterations of that function across Agent Studio.


