AgentsAgentBase

manual_set_proxy_url

View as MarkdownOpen in Claude

Manually set the proxy URL base used when constructing webhook callback URLs in the SWML document. Use this when your agent is behind a reverse proxy, tunnel, or load balancer and the auto-detected URL is incorrect.

You can also set the SWML_PROXY_URL_BASE environment variable for the same effect without calling this method.

Parameters

proxy_url
strRequired

The base URL to use for webhooks (e.g., "https://abc123.ngrok.io"). Trailing slashes are automatically stripped.

Returns

AgentBase — Returns self for method chaining.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="support", route="/support")
4agent.set_prompt_text("You are a helpful assistant.")
5agent.manual_set_proxy_url("https://abc123.ngrok.io")
6agent.serve()