***

title: addSubsection
slug: /reference/typescript/agents/pom-builder/add-subsection
description: Add a subsection to an existing section.
max-toc-depth: 3
---------------------

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

[ref-pombuilder]: /docs/server-sdks/reference/typescript/agents/pom-builder

Add a subsection to an existing section. If the parent section does not exist,
it is created automatically.

## **Parameters**

<ParamField path="parentTitle" type="string" required={true} toc={true}>
  Title of the parent section.
</ParamField>

<ParamField path="title" type="string" required={true} toc={true}>
  Subsection title.
</ParamField>

<ParamField path="opts" type="object" toc={true}>
  Optional subsection content.
</ParamField>

<Indent>
  <ParamField path="opts.body" type="string" toc={true}>
    Subsection body text.
  </ParamField>

  <ParamField path="opts.bullets" type="string[]" toc={true}>
    Bullet points for the subsection.
  </ParamField>
</Indent>

## **Returns**

[`PomBuilder`][ref-pombuilder] -- Self for method chaining.

## **Example**

```typescript {5}
import { PomBuilder } from '@signalwire/sdk';

const pom = new PomBuilder();
pom.addSection('Role', { body: 'You are a helpful assistant.' });
pom.addSubsection('Role', 'Tone', { body: 'Use a friendly, professional tone.' });
```