***

title: swmlChangeContext
slug: /reference/typescript/agents/function-result/swml-change-context
description: Switch to a different conversation context.
max-toc-depth: 3
---------------------

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

[contextbuilder]: /docs/server-sdks/reference/typescript/agents/context-builder

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Switch to a different conversation context. Contexts represent distinct
operational modes (e.g., "sales", "support", "billing"), each with their own
prompts, tools, and steps defined via
[`ContextBuilder`][contextbuilder].

## **Parameters**

<ParamField path="contextName" type="string" required={true} toc={true}>
  Name of the context to switch to.
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .swmlChangeContext('billing');
```