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

getPrompt

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

hasSection

Next
Built with

Return the fully rendered prompt text. If raw text was set via setPromptText(), it is returned directly. Otherwise, POM sections are rendered to Markdown. Returns an empty string if nothing is configured.

Parameters

None.

Returns

string — The prompt string, or empty string if nothing is set.

Example

1import { PromptManager } from '@signalwire/sdk';
2
3const pm = new PromptManager();
4pm.addSection('Role', { body: 'You are a helpful assistant.' });
5
6const prompt = pm.getPrompt();
7console.log(prompt);
8// ## Role
9// You are a helpful assistant.