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
      • SkillManager
      • SkillRegistry
      • Skills
      • SwaigFunction
      • SwmlBuilder
        • addSection
        • addVerb
        • addVerbToSection
        • ai
        • answer
        • build
        • document
        • getDocument
        • getSchemaUtils
        • hangup
        • play
        • render
        • renderDocument
        • reset
        • say
        • setValidation
      • 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
AgentsSwmlBuilder

setValidation

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

SWMLService

Next
Built with

Toggle verb schema validation at runtime. When validation is enabled (the default), addVerb() validates each verb’s config against the schema and throws if it fails. Disable validation for performance-sensitive call paths or when constructing verbs with custom schemas not known to the built-in schema utilities.

Matches the Python schema_validation constructor parameter on AgentBase. For SWML service validation at construct time, pass schemaValidation: false to the SwmlBuilder constructor via SwmlBuilderOptions.

Parameters

enabled
booleanRequired

true to enable schema validation on subsequent addVerb() calls, false to disable.

Returns

void

Example

1import { SwmlBuilder } from '@signalwire/sdk';
2
3const builder = new SwmlBuilder();
4
5// Validation on (default) — throws on invalid verb
6builder.answer();
7
8// Disable validation for a hot path
9builder.setValidation(false);
10builder.addVerb('custom_verb', { unusual: 'payload' });