Call Flow Customization
Control call flow with verb insertion points for pre-answer, post-answer, and post-AI actions.
Understanding Call Flow
By default, AgentBase generates a simple call flow:
The SDK provides three insertion points to customize this flow:

Verb Insertion Methods
Pre-Answer Verbs
Pre-answer verbs run while the call is still ringing. Use them for:
- Ringback tones: Play audio before answering
- Call screening: Check caller ID or time
- Conditional routing: Route based on variables
Generated SWML:
Pre-Answer Safe Verbs
Only certain verbs can run before the call is answered:
*These verbs auto-answer by default. Set auto_answer: false for pre-answer use.
Available Ringback Tones
Post-Answer Verbs
Post-answer verbs run after the call is connected but before the AI speaks:
Generated SWML:
Common Post-Answer Uses
Post-AI Verbs
Post-AI verbs run after the AI conversation ends:
Common Post-AI Uses
Complete Example
Here’s an agent with all three insertion points:
Generated SWML:
Controlling Answer Behavior
Disable Auto-Answer
Set auto_answer=False to prevent automatic answering:
Customize Answer Verb
Use add_answer_verb() to configure the answer verb:
Dynamic Call Flow
Modify call flow based on caller information using on_swml_request():
Clear Methods
Remove verbs from insertion points:
Method Chaining
All verb insertion methods return self for chaining:
Related Documentation
- AgentBase API - Full parameter reference
- SWML Schema - All available verbs
- AI Parameters - Tuning AI behavior