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
      • Prefabs
      • SkillBase
        • cleanup
        • defineTool
        • getAgent
        • getConfig
        • getDataMapTools
        • getGlobalData
        • getHints
        • getInstanceKey
        • getParameterSchema
        • getPromptSections
        • getSkillData
        • getSkillNamespace
        • getTools
        • hasAllEnvVars
        • hasAllPackages
        • isInitialized
        • markInitialized
        • setAgent
        • setup
        • updateSkillData
        • validateEnvVars
        • validatePackages
      • 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
  • Returns
  • Example
AgentsSkillBase

getPromptSections

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

getSkillData

Next
Built with

Returns prompt sections that the agent incorporates into its system prompt.

Subclasses should override the internal _getPromptSections() method, not getPromptSections() directly. The public method checks skip_prompt before delegating to the internal one.

Takes no parameters.

Returns

SkillPromptSection[] — Array of prompt section objects. Each section has a title and either a body string or a bullets array. An optional numbered boolean flag renders bullets as a numbered list.

Example

1import { SkillBase, type SkillToolDefinition, type SkillPromptSection } from '@signalwire/sdk';
2
3class WeatherSkill extends SkillBase {
4 static override SKILL_NAME = 'weather';
5 static override SKILL_DESCRIPTION = 'Provides weather information';
6
7 override getTools(): SkillToolDefinition[] {
8 return [];
9 }
10
11 protected override _getPromptSections(): SkillPromptSection[] {
12 return [
13 {
14 title: 'Weather Information',
15 body: 'You can check weather for any location using the get_weather tool.',
16 },
17 {
18 title: 'Weather Guidelines',
19 bullets: [
20 'Always confirm the location before checking weather',
21 'Report temperature in the user\'s preferred units',
22 ],
23 },
24 ];
25 }
26}