***

title: add_section
slug: /reference/python/agents/swml-builder/add-section
description: Add a new named section to the SWML document.
max-toc-depth: 3
---------------------

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

[swmlservice-add-section]: /docs/server-sdks/reference/python/agents/swml-service/add-section

Add a new named section to the SWML document. Delegates to
[`SWMLService.add_section()`][swmlservice-add-section].

## **Parameters**

<ParamField path="section_name" type="str" required={true} toc={true}>
  Name of the section to create.
</ParamField>

## **Returns**

`Self` -- The builder instance for method chaining.

## **Example**

```python {9}
from signalwire import SWMLService, SWMLBuilder

service = SWMLService(name="multi-section")
builder = SWMLBuilder(service)

doc = (
    builder
    .answer()
    .add_section("greeting")
    .play(url="say:Hello!")
    .build()
)
print(doc)
```