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

hasAllEnvVars

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

hasAllPackages

Next
Built with

Convenience wrapper around validateEnvVars() that returns a boolean. Mirrors the Python SDK’s validate_env_vars() -> bool return shape. Checks each entry in the skill class’s REQUIRED_ENV_VARS static array against process.env.

Returns

boolean — true if every required env var is present, false otherwise.

Example

1import { SkillBase } from '@signalwire/sdk';
2
3export class WeatherSkill extends SkillBase {
4 static SKILL_NAME = 'weather';
5 static SKILL_DESCRIPTION = 'Fetches current weather.';
6 static REQUIRED_ENV_VARS = ['WEATHER_API_KEY'];
7
8 async setup(): Promise<boolean> {
9 if (!this.hasAllEnvVars()) {
10 this.logger.error('Missing required environment variables');
11 return false;
12 }
13 return true;
14 }
15}