AgentsAgentBase

add_internal_filler

View as MarkdownOpen in Claude

Add filler phrases for a specific internal/native SWAIG function and language.

Parameters

function_name
strRequired

Name of the SWAIG function (e.g., "next_step", "check_time").

language_code
strRequired

Language code (e.g., "en-US", "es", "fr").

fillers
list[str]Required

List of filler phrases for this function and language. The AI randomly selects from this list each time the function is invoked.

Returns

AgentBase — Returns self for method chaining.

Example

from signalwire import AgentBase
agent = AgentBase(name="support", route="/support")
agent.set_prompt_text("You are a helpful assistant.")
agent.add_internal_filler(
"next_step", "en-US",
["Moving to the next step...", "Great, let's continue..."]
)
agent.add_internal_filler(
"next_step", "es",
["Pasando al siguiente paso...", "Continuemos..."]
)
agent.serve()