> 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. # addFunctionInclude > Add a remote function include to the SWAIG configuration. [ai-swaig-includes]: /docs/swml/reference/calling/ai/swaig/includes [swml-swaig-includes-reference]: /docs/swml/reference/calling/ai/swaig/includes [ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base Add a remote SWAIG function include so the agent can call tools hosted on an external server. The remote endpoint is contacted at session start and the listed functions become available to the AI just like locally defined tools. > **Info** > > This maps to the SWML [`ai.swaig.includes`][ai-swaig-includes] array. > See the [SWML SWAIG includes reference][swml-swaig-includes-reference] for details. ## **Parameters** **`url`** `string` — required URL of the remote SWAIG server that hosts the functions. --- **`functions`** `string[]` — required Array of function names to include from the remote server. --- **`metaData`** `Record` Optional metadata object passed along with the function include. Can be used to provide authentication tokens or context to the remote server. --- ## **Returns** [`AgentBase`][ref-agentbase] -- Returns `this` for method chaining. ## **Example** ```typescript {5} import { AgentBase } from '@signalwire/sdk'; const agent = new AgentBase({ name: 'assistant', route: '/assistant' }); agent.setPromptText('You are a helpful assistant.'); agent.addFunctionInclude( 'https://tools.example.com/swaig', ['lookup_order', 'cancel_order'], { auth_token: 'secret-token' }, ); await agent.serve(); ``` > Add a remote function include to the SWAIG configuration.