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
        • AuthHandler
        • ConfigLoader
          • findConfigFile
          • get
          • getAll
          • getConfig
          • getConfigFile
          • getFilePath
          • getSection
          • has
          • hasConfig
          • interpolateEnvVars
          • load
          • loadFromObject
          • mergeWithEnv
          • search
          • set
          • substituteVars
        • Environment Variables
        • Logging
        • PromptManager
        • SchemaUtils
        • ServerlessAdapter
        • SessionManager
        • SslConfig
      • ContextBuilder
      • DataMap
      • FunctionResult
      • Helper Functions & Utilities
      • LiveWire
      • PomBuilder
      • Prefabs
      • SkillBase
      • 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
AgentsConfigurationConfigLoader

hasConfig

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

interpolateEnvVars

Next
Built with

Check whether any configuration data has been loaded. Returns true if a file was loaded or data was set via loadFromObject().

Deliberate deviation from the Python SDK. Python’s has_config() returns True only when a file was loaded. The TypeScript version also returns true for object-loaded data, because loadFromObject() is a TS-only entry point with no Python equivalent — treating object-loaded data as “configured” matches the TS API surface.

If you specifically need file-load detection, check loader.getFilePath() !== null via getFilePath().

Returns

boolean — true if any configuration data exists (from file or object), false if the loader is empty.

Example

1import { ConfigLoader } from '@signalwire/sdk';
2
3const loader = new ConfigLoader('config.json');
4if (loader.hasConfig()) {
5 console.log('Config loaded, proceed with startup');
6}