Documentation Index
Fetch the complete documentation index at: https://docs.voxworks.ai/llms.txt
Use this file to discover all available pages before exploring further.
What is the Main Flow?
Every Script has exactly one Main Flow. When a call starts:
- The Script is loaded
- The Main Flow is identified via the Script’s
main_flow_id
- The assistant begins execution at step 0 of the Main Flow
- The conversation continues until an end condition is reached
Main Flow Structure
A Main Flow contains an ordered sequence of steps, each step can branch to other steps or sub-flows based on conditions.
Starting the Conversation
The first step of the Main Flow handles the opening message:
Outbound Calls:
- The assistant may wait briefly for the caller to speak
- Example: “Hi, this is Sarah from Voxworks.”
Inbound Calls:
- The assistant speaks first with a greeting
- Example: “Thank you for calling Voxworks. How can I help you today?”
Flow Navigation
From any voice step, conditions determine where to go next:
| Condition Type | Description | Example |
|---|
| Specific match | User response matches a defined scenario | ”User wants to book” → Booking step |
| Otherwise | Fallback when no specific condition matches | Clarification step |
Knowledge Base and Guidelines
When a user asks a question or raises a topic during the conversation, the assistant checks the Knowledge Base and Guidelines for relevant information.
If the assistant has information to respond:
- The assistant answers the question using available knowledge
- The conversation stays on the current step
- The assistant continues with the current step’s objective
This allows the assistant to handle ad-hoc questions without derailing the flow. For example:
Step: "Would you like to schedule a demo?"
User: "How much does it cost?"
→ Assistant answers from Knowledge Base: "We offer flexible pricing
on a cents per minute basis. Would you like to schedule a demo
to discuss your specific needs?"
→ Conversation remains on the same step, waiting for demo response
If the assistant doesn’t have relevant information, it follows the Guidelines for handling unknown questions (e.g., offering to follow up later).
Ending the Conversation
The Main Flow ends when:
- End condition reached — A step’s condition has
end_flow: success or fail
- User hangs up — The participant disconnects
- Maximum duration — The configured time limit is reached
- Assistant hangup — The assistant determines the call should end
When the Main Flow ends, the call terminates.
Main Flow vs Sub-Flows
| Aspect | Main Flow | Sub-Flow |
|---|
| Entry | Automatic at call start | Invoked by a Flow step |
| Exit | Ends the call | Returns to parent flow |
| Required | One per Script | Optional, unlimited |
| Reusability | Specific to Script | Can be shared across Scripts |
Maximising Reusability
While the Main Flow is specific to each Script, you can maximise reusability by keeping it minimal:
- Opening message — Greet the caller
- Flow step — Route immediately to a reusable sub-flow
- Closing messages — Handle success and failure outcomes from the sub-flow
This pattern lets you reuse the core conversation logic across multiple Scripts, with only the opening and closing messages varying per Script.
Interrupts
During a conversation, users may interrupt the assistant while it is speaking. How interrupts are handled depends on the step type:
| Step Type | Interruptible | Behaviour |
|---|
| Voice | Yes (default) | User can interrupt; assistant stops speaking and processes the interruption |
| Tool | No | User cannot interrupt while the tool executes |
| Function | No | User cannot interrupt while the function executes |
Voice steps can be configured to disable interrupts using the interruptible: false setting when you need the assistant to complete critical information without being cut off.
For more on interrupt handling limitations, see Assistant Behaviour.
Best Practices
- Start with a clear opening — Set expectations immediately
- Keep the main path simple — Use sub-flows for complex branches
- Handle common objections — Include conditions for typical responses
- Plan your exit points — Define clear end conditions
- Test the full journey — Walk through every possible path
Next Steps