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

# fromSections

> Create a new PomBuilder from an array of section data objects (static).

[ref-tojson]: /docs/server-sdks/reference/typescript/agents/pom-builder/to-json

[ref-todict]: /docs/server-sdks/reference/typescript/agents/pom-builder/to-dict

Static factory method that reconstructs a `PomBuilder` from an array of
`PomSectionData` objects. Use this to restore a prompt serialized via
[`toJson()`][ref-tojson] or
[`toDict()`][ref-todict].

## **Parameters**

<ParamField path="sections" type="PomSectionData[]" required={true} toc={true}>
  Array of section data objects. Each must include at minimum a `title`, and
  may include `body`, `bullets`, `numbered`, `numberedBullets`, and nested
  `subsections`.
</ParamField>

## **Returns**

`PomBuilder` -- a new builder populated with the given sections.

## **Example**

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

const data = [
  { title: 'Intro', body: 'Welcome.' },
  { title: 'Rules', bullets: ['Be nice.', 'Stay on topic.'] },
];

const pom = PomBuilder.fromSections(data);
console.log(pom.renderMarkdown());
```