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
        • Environment Variables
        • Logging
        • PromptManager
        • SchemaUtils
        • ServerlessAdapter
        • SessionManager
          • cleanup
          • createSession
          • createToolToken
          • debugToken
          • deleteSessionMetadata
          • generateToken
          • getSessionMetadata
          • setSessionMetadata
          • validateToken
          • validateToolToken
        • 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
  • Parameters
  • Returns
  • Example
AgentsConfigurationSessionManager

getSessionMetadata

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

setSessionMetadata

Next
Built with

Retrieve metadata associated with a session. Always returns an object — callers can check truthiness or iterate keys without a null guard.

Parameters

sessionId
stringRequired

The session identifier.

Returns

Record<string, unknown> — The metadata record for the session, or an empty object ({}) when no metadata has been stored. This matches the Python SDK’s get_session_metadata behavior.

Example

1import { SessionManager } from '@signalwire/sdk';
2
3const sm = new SessionManager();
4sm.setSessionMetadata('session-1', { caller: 'John', topic: 'billing' });
5
6const meta = sm.getSessionMetadata('session-1');
7console.log(meta); // { caller: "John", topic: "billing" }
8
9const missing = sm.getSessionMetadata('unknown-session');
10console.log(missing); // {}