> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # add_swaig_query_params > Append query parameters to all SWAIG webhook URLs. [ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base Add query parameters that will be included in all SWAIG webhook URLs generated by this agent. This is particularly useful for preserving dynamic configuration state across SWAIG callbacks -- for example, passing a tenant identifier or feature tier so the same configuration is applied when SignalWire invokes tool webhooks. ## **Parameters** **`params`** `dict[str, str]` — required Dictionary of query parameters to merge into every SWAIG URL. Subsequent calls merge into (not replace) the existing set. Pass the same key again to overwrite its value. --- ## **Returns** [`AgentBase`][ref-agentbase] -- Returns self for method chaining. ## **Examples** ### Preserve tier in dynamic config ```python {10} 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): tier = query_params.get("tier", "free") if tier == "premium": agent.add_skill("advanced_search") agent.add_swaig_query_params({"tier": tier}) agent.set_dynamic_config_callback(dynamic_config) agent.serve() ``` ### Multi-tenant routing ```python {8} from signalwire import AgentBase agent = AgentBase(name="support", route="/support") agent.set_prompt_text("You are a helpful assistant.") def dynamic_config(query_params, body_params, headers, agent): tenant_id = query_params.get("tenant_id", "default") agent.add_swaig_query_params({"tenant_id": tenant_id}) agent.set_dynamic_config_callback(dynamic_config) agent.serve() ``` > Append query parameters to all SWAIG webhook URLs.