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
          • createAzureHandler
          • createGcfHandler
          • createLambdaHandler
          • detectPlatform
          • generateUrl
          • getPlatform
          • handleRequest
        • 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
  • Parameters
  • Returns
  • Example
AgentsConfigurationServerlessAdapter

generateUrl

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

getPlatform

Next
Built with

Generate the platform-specific invocation URL for a deployed function. Uses environment variables as defaults, with optional overrides.

Parameters

opts
object

Optional URL generation overrides.

opts.region
string

Cloud region override. Defaults to AWS_REGION or FUNCTION_REGION env var.

opts.projectId
string

GCP project ID override. Defaults to GCLOUD_PROJECT env var.

opts.functionName
string

Function name override. Defaults to AWS_LAMBDA_FUNCTION_NAME env var or "agent".

opts.stage
string

API Gateway stage override (Lambda only). Defaults to "prod".

opts.apiId
string

API Gateway ID override (Lambda only). Defaults to "API_ID".

Returns

string — The constructed URL string.

Example

1import { ServerlessAdapter } from '@signalwire/sdk';
2
3const adapter = new ServerlessAdapter('gcf');
4const url = adapter.generateUrl({
5 projectId: 'my-project',
6 region: 'us-central1',
7 functionName: 'my-agent',
8});
9console.log(url);
10// "https://us-central1-my-project.cloudfunctions.net/my-agent"