AgentsAgentBase

clear_swaig_query_params

View as MarkdownOpen in Claude

Clear all query parameters previously added with add_swaig_query_params(). After calling this method, SWAIG webhook URLs will no longer include any extra query parameters.

Parameters

None.

Returns

AgentBase — Returns self for method chaining.

Examples

Reset params in dynamic config

from signalwire import AgentBase
agent = AgentBase(name="assistant", route="/assistant")
agent.set_prompt_text("You are a helpful assistant.")
def dynamic_config(query_params, body_params, headers, agent):
# Start fresh each request to avoid stale params
agent.clear_swaig_query_params()
tier = query_params.get("tier", "free")
agent.add_swaig_query_params({"tier": tier})
agent.set_dynamic_config_callback(dynamic_config)
agent.serve()