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
  • Parameters
  • Returns
  • Example
AgentsSkillBase

getConfig

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

getDataMapTools

Next
Built with

Look up a configuration value by key, with an optional default. The config object is whatever was passed to the skill’s constructor (typed as SkillConfig, a string-keyed record). Values are returned as-is; the caller provides the type argument for casting.

Parameters

key
stringRequired

The configuration key to look up.

defaultValue
T | undefined

Value to return when the key is not present. The result is cast to T.

Returns

T — the configured value cast to the generic type, or the default value.

Example

1import { SkillBase } from '@signalwire/sdk';
2
3export class WeatherSkill extends SkillBase {
4 static SKILL_NAME = 'weather';
5 static SKILL_DESCRIPTION = 'Fetches current weather for a city.';
6
7 async setup(): Promise<boolean> {
8 const apiKey = this.getConfig<string>('api_key');
9 const units = this.getConfig<'metric' | 'imperial'>('units', 'metric');
10 if (!apiKey) return false;
11 this.logger.info(`Weather skill configured in ${units} units`);
12 return true;
13 }
14}