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

# setFunctionIncludes

> Replace the agent's SWAIG function-includes list.

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

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

Replace the agent's SWAIG function-includes list in a single call. Each
include pulls a remote SWAIG function definition into the agent's toolset. Use
[`addFunctionInclude()`][ref-add-include] to append a single include instead
of replacing the list.

<Note>
  Entries without a `url` or without an array `functions` field are silently
  filtered out.
</Note>

## **Parameters**

<ParamField path="includes" type="FunctionInclude[]" required={true} toc={true}>
  Ordered list of function-include entries. Each entry must provide `url` and
  an array of `functions` names; an optional `meta_data` object is passed to
  the remote server.
</ParamField>

## **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.setFunctionIncludes([
  { url: 'https://tools.example.com/swaig', functions: ['lookup_order'] },
  {
    url: 'https://analytics.example.com/swaig',
    functions: ['log_event'],
    meta_data: { api_key: 'secret' },
  },
]);
await agent.serve();
```