For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Log inSign up
Support
GuidesReference
GuidesReference
    • Core
      • Overview
    • Agents
      • Overview
      • AgentBase
      • AgentServer
      • Configuration
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
        • addPomAsSubsection
        • addSection
        • addSubsection
        • addToSection
        • findSection
        • fromSections
        • getSection
        • hasSection
        • renderMarkdown
        • renderXml
        • reset
        • toDict
        • toJson
      • Prefabs
      • SkillBase
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
      • SWMLService
    • RELAY
      • Overview
      • Actions
      • Call
      • Constants
      • Events
      • Message
      • RelayClient
      • RelayError
    • REST Client
      • Overview
      • Addresses
      • Calling
      • ChatResource
      • Compat
      • Datasphere
      • Fabric
      • ImportedNumbersResource
      • Logs
      • LookupResource
      • MFA
      • Number Groups
      • Phone Numbers
      • Project
      • PubSubResource
      • Queues
      • Recordings
      • Registry
      • RestClient
      • RestError
      • Short Codes
      • SIP Profile
      • Verified Callers
      • Video
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • Parameters
  • Returns
  • Example
AgentsPomBuilder

fromSections

|View as Markdown|Open in Claude|
Was this page helpful?
Edit this page
Previous

getSection

Next
Built with

Static factory method that reconstructs a PomBuilder from an array of PomSectionData objects. Use this to restore a prompt serialized via toJson() or toDict().

Parameters

sections
PomSectionData[]Required

Array of section data objects. Each must include at minimum a title, and may include body, bullets, numbered, numberedBullets, and nested subsections.

Returns

PomBuilder — a new builder populated with the given sections.

Example

1import { PomBuilder } from '@signalwire/sdk';
2
3const data = [
4 { title: 'Intro', body: 'Welcome.' },
5 { title: 'Rules', bullets: ['Be nice.', 'Stay on topic.'] },
6];
7
8const pom = PomBuilder.fromSections(data);
9console.log(pom.renderMarkdown());