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

setup

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

updateSkillData

Next
Built with

Initialize the skill: validate environment variables, initialize API clients, and prepare resources. Called once when the skill is loaded, before any tool registration.

This is a concrete method with a default that returns true. Override it in your SkillBase subclass when you need initialization logic or need to short-circuit loading on invalid config.

Returning false from setup() causes SkillManager.addSkill() (and AgentBase.addSkill()) to fail closed: the skill is not registered and the call throws. This matches the Python SDK’s behavior — never silently continue with a half-initialized skill.

Takes no parameters.

Returns

Promise<boolean> — true on success, false to signal that the skill cannot be loaded (invalid config, missing credentials, failed handshake, etc.).

Example

1class MySkill extends SkillBase {
2 override async setup(): Promise<boolean> {
3 if (!this.hasAllEnvVars()) return false;
4 const missing = await this.validatePackages();
5 if (missing.length) return false;
6 // Initialize API connections here
7 return true;
8 }
9}