set_post_process

View as MarkdownOpen in Claude

Enable or disable post-processing after construction. When post-processing is enabled, the AI speaks the response and takes one more conversational turn with the user before executing actions. This is useful for confirmation workflows.

Parameters

post_process
boolRequired

True to let the AI respond once more before executing actions. False to execute actions immediately.

Returns

FunctionResult — self, for chaining.

Example

from signalwire import AgentBase
from signalwire import FunctionResult
agent = AgentBase(name="my-agent", route="/agent")
agent.set_prompt_text("You are a helpful assistant.")
@agent.tool(name="transfer_with_confirmation", description="Transfer with confirmation")
def transfer_with_confirmation(args, raw_data):
return (
FunctionResult("I'll transfer you to billing. Do you have any other questions first?")
.set_post_process(True)
.connect("+15551234567", final=True)
)
agent.serve()