Skip to navigation

no_barge_next_response

View as MarkdownOpen in Claude

Make the next spoken reply play in full, such as a read-back the caller should hear before answering.

From the start of the next request until a reply that speaks has played, the caller’s words neither cut the reply off nor cancel its request. They’re held and delivered after the reply. For semantic gates, an answer the caller began during the reply counts as interrupting it at that point, as a barge-in would.

Parameters

None.

Returns

FunctionResult — self, for chaining.

Example

from signalwire import AgentBase, FunctionResult
agent = AgentBase(name="policy", route="/policy")
agent.set_prompt_text("You explain the cancellation policy.")
@agent.tool(name="get_terms", description="Get the cancellation terms to read to the caller")
def get_terms(args, raw_data):
return (
FunctionResult("Read the full terms to the caller: cancellations within 24 hours are free.")
.no_barge_next_response()
)
agent.serve()

This result renders as:

{"response": "Read the full terms to the caller: cancellations within 24 hours are free.",
"action": [{"no_barge_next_response": true}]}