***

title: from_sections
slug: /reference/python/agents/pom-builder/from-sections
description: Create a PomBuilder from a list of section dictionaries.
max-toc-depth: 3
---------------------

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

[to-dict]: /docs/server-sdks/reference/python/agents/pom-builder/to-dict

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

Class method that creates a PomBuilder from a list of section dictionaries. Use
this to reconstruct a POM from serialized data produced by
[`to_dict()`][to-dict].

## **Parameters**

<ParamField path="sections" type="list[dict[str, Any]]" required={true} toc={true}>
  List of section definition dictionaries. Each dictionary should contain a
  `"title"` key and optionally `"body"` and `"bullets"` keys.
</ParamField>

## **Returns**

[`PomBuilder`][ref-pombuilder] -- A new builder instance with the sections populated.

## **Example**

```python {8}
from signalwire.core.pom_builder import PomBuilder

sections = [
    {"title": "Role", "body": "You are a helpful assistant."},
    {"title": "Rules", "bullets": ["Be concise", "Be accurate"]}
]

rebuilt = PomBuilder.from_sections(sections)
xml_prompt = rebuilt.render_xml()
print(xml_prompt)
```