> 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. # addContext > Create a new named context and add it to the builder. [context]: /docs/server-sdks/reference/typescript/agents/context-builder/context Create a new context and add it to the builder. Returns the Context object for further configuration. > **Warning** > > A single-context agent must name its context `"default"` or validation will fail. > Multi-context agents can use any names. ## **Parameters** **`name`** `string` — required Unique context name. When using a single context, it **must** be named `"default"`. --- ## **Returns** [`Context`][context] -- The newly created context, ready for adding steps. ## **Examples** ### Single context ```typescript {4} import { ContextBuilder } from '@signalwire/sdk'; const builder = new ContextBuilder(); const ctx = builder.addContext('default'); ctx.addStep('greet').setText('Greet the caller and ask how you can help.'); ``` ### Multiple contexts ```typescript {4-6} import { ContextBuilder } from '@signalwire/sdk'; const builder = new ContextBuilder(); const main = builder.addContext('default'); const sales = builder.addContext('sales'); const support = builder.addContext('support'); main.addStep('menu').setText('Ask whether the caller needs sales or support.'); sales.addStep('qualify').setText('Understand what product the caller wants.'); support.addStep('diagnose').setText('Understand the customer\'s issue.'); ``` > Create a new named context and add it to the builder.