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
        • AuthHandler
        • ConfigLoader
        • Environment Variables
        • Logging
        • PromptManager
          • addSection
          • addSubsection
          • addToSection
          • getPomBuilder
          • getPostPrompt
          • getPrompt
          • hasSection
          • setPostPrompt
          • setPromptText
        • SchemaUtils
        • ServerlessAdapter
        • SessionManager
        • SslConfig
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • 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
AgentsConfigurationPromptManager

addSection

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

addSubsection

Next
Built with

Add a POM section to the prompt. If POM mode was not initially active, it is automatically enabled. The PomBuilder is initialized if needed.

Parameters

title
stringRequired

The section heading.

opts
object

Optional section content.

opts.body
string

Section body text.

opts.bullets
string[]

List of bullet point strings.

opts.numbered
boolean

Whether to number the section heading.

opts.numberedBullets
boolean

Whether to use numbered bullets instead of dashes.

opts.subsections
Array<{ title: string; body?: string; bullets?: string[] }>

Subsections to add under this section.

Returns

void

Example

1import { PromptManager } from '@signalwire/sdk';
2
3const pm = new PromptManager();
4pm.addSection('Role', { body: 'You are a support agent.' });
5pm.addSection('Rules', { bullets: ['Be concise', 'Be polite'] });
6console.log(pm.getPrompt());