> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# set_function_includes

> Set the complete list of remote function includes.

[ai-swaig-includes]: /docs/swml/reference/ai/swaig/includes

[swml-swaig-includes-reference]: /docs/swml/reference/ai/swaig/includes

[add-function-include]: /docs/server-sdks/reference/python/agents/agent-base/add-function-include

[ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base

Replace the entire list of remote SWAIG function includes at once. Each entry must
contain a `url` and a `functions` list. Invalid entries (missing required keys or
non-list `functions`) are silently dropped.

This maps to the SWML [`ai.swaig.includes`][ai-swaig-includes] array.
See the [SWML SWAIG includes reference][swml-swaig-includes-reference] for details.

Use [`add_function_include()`][add-function-include]
to append a single include without replacing existing ones.

## **Parameters**

List of include objects. Each object must have:

* `url` (`str`) -- Remote SWAIG server URL
* `functions` (`list[str]`) -- Function names to include

Optional keys like `meta_data` are passed through unchanged.

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns self for method chaining.

## **Example**

```python {5}
from signalwire import AgentBase

agent = AgentBase(name="assistant", route="/assistant")
agent.set_prompt_text("You are a helpful assistant.")
agent.set_function_includes([
    {"url": "https://tools.example.com/swaig", "functions": ["lookup_order"]},
    {"url": "https://billing.example.com/swaig", "functions": ["get_invoice", "process_refund"]},
])
agent.serve()
```