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

createSession

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

createToolToken

Next
Built with

Return the given callId if provided, or generate a new random session identifier using base64url-encoded random bytes.

Parameters

callId
string

Existing call ID to reuse. If omitted, a new random ID is generated.

Returns

string — The call ID string.

Example

1import { SessionManager } from '@signalwire/sdk';
2
3const sm = new SessionManager();
4const id1 = sm.createSession('call-abc123'); // "call-abc123"
5const id2 = sm.createSession(); // random base64url ID