Build your agent
Interruptions
Choose, per speaking step, whether the caller can cut the agent off, and when.
Every step that speaks (Say, AI reply) has its own interruption_type, so a disclaimer can be protected while normal chat stays interruptible. An AI reply can also choose it per reply by returning interruption_type.
Types
| interruption_type | Behaviour |
|---|---|
full | Stop and listen. The agent stops as soon as the caller starts talking. |
no | Always finish. The agent never stops mid-reply. Good for legal lines and key details. |
duration | Only at the start. The caller can cut in during the first few seconds; after that the agent finishes. |
inverse_duration | Only after a few seconds. The opening of every reply is protected; after that the caller can cut in. |
word_length | Only on short replies. Short replies can be interrupted; longer ones are always finished. |
inverse_word_length | Only on long replies. Short replies are always finished; the caller can cut into longer ones. |
The numbers
durationnumber (seconds)- For
durationandinverse_duration: the cut-off, counted from when the agent starts speaking. lengthnumber (words)- For
word_lengthandinverse_word_length: replies shorter (or longer) than this many words can be interrupted. ignore-wordsstring[]- Words that never count as interrupting, such as
hmm,okay,haan. A space-separated string works too.
Once the agent has finished speaking, the caller can always talk; these rules only apply while it's speaking.
Example
Protect the first three seconds of a reply, and ignore back-channel words:
"parameters": { "out_dict": { "speak": "This call may be recorded for quality and training." }, "interruption_type": "inverse_duration", "interruption_metadata": { "duration": 3, "ignore-words": ["hmm", "okay", "haan"] }}Next steps
- Turn-taking: reply timing.