> 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. # addPomAsSubsection > Append another PomBuilder's sections as subsections of a target section. [ref-findsection]: /docs/server-sdks/reference/typescript/agents/pom-builder/find-section Append every top-level section of another `PomBuilder` as a subsection of a target section in this builder. Useful for composing prompts assembled separately into a single document. > **Warning** > > Throws `Error("No section with title '' found.")` when `target` is a > string and no section with that title exists. For deeper lookups, resolve the > section yourself via [`findSection()`][ref-findsection] and pass the > `PomSection` directly. ## **Parameters** **`target`** `string | PomSection` — required The target section to append into. Pass a title string for top-level sections, or a `PomSection` instance (from `findSection()`) for nested sections. --- **`pomToAdd`** `PomBuilder` — required The builder whose sections should be appended. --- ## **Returns** `this` -- returns the builder for fluent chaining. ## **Example** ```typescript {11} import { PomBuilder } from '@signalwire/sdk'; const subPom = new PomBuilder(); subPom.addSection('Policy A', { body: 'Always greet by name.' }); subPom.addSection('Policy B', { body: 'Escalate billing issues.' }); const main = new PomBuilder(); main.addSection('Introduction', { body: 'You are a helpful agent.' }); main.addSection('Policies'); main.addPomAsSubsection('Policies', subPom); console.log(main.renderMarkdown()); ``` > Append another PomBuilder's sections as subsections of a target section.