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
  • Getting Started
    • SignalWire SDKs
    • Development Environment Setup
    • Exposing Your Agent to the Internet
    • Installation
    • Quick Start: Your First Agent
  • Build AI Agents
    • Adding Skills
    • AgentBase
    • AI Parameters
    • Architecture
    • Build AI Agents
    • Built-in Skills
    • Call Flow Customization
    • Call Recording
    • Call Transfer
    • Concierge
    • Contexts and Workflows
    • Custom Skills
    • DataMap
    • FAQBot
    • Hints
    • InfoGatherer
    • MCP Gateway
    • Multi-Agent Servers
    • Native Functions
    • Parameters
    • Prompts & POM
    • Receptionist
    • Request Lifecycle
    • Results & Actions
    • Search and Knowledge
    • Security
    • Skill Configuration
    • Skills
    • State Management
    • Static vs Dynamic Agents
    • Survey
    • SWAIG (SignalWire AI Gateway)
    • SWAIG Functions
    • SWML (SignalWire Markup Language)
    • Voice & Language
  • Make and Receive Calls
    • RELAY Client
  • Manage Resources
    • Account Setup
    • Mapping Numbers
    • Phone Numbers
    • REST Client
    • Testing
    • Troubleshooting
  • Deploy
    • CGI Mode
    • Deploy
    • Docker & Kubernetes
    • Local Development
    • Production Deployment
    • Serverless Deployment
LogoLogoSignalWire Docs
Log inSign up
Support
On this page
  • What you’ll learn
  • Deployment options overview
  • Environment detection
  • Chapter contents
  • Quick start
  • Starting the development server
Deploy

Deploy

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

Docker & Kubernetes

Next
Built with

This chapter covers deployment options from development to production.

What you’ll learn

  1. Local Development - Running agents during development
  2. Production - Deploying to production servers
  3. Serverless - AWS Lambda, Google Cloud Functions, Azure Functions
  4. Docker & Kubernetes - Container-based deployment
  5. CGI Mode - Traditional web server deployment

Deployment options overview

EnvironmentOptions
Developmentagent.run() on localhost, ngrok for public testing, auto-reload on changes
ProductionUvicorn with workers, HTTPS with certificates, load balancing, health monitoring
ServerlessAWS Lambda, Google Cloud Functions, Azure Functions, auto-scaling, pay per invocation
ContainerDocker, Kubernetes, auto-scaling, rolling updates, service mesh
TraditionalCGI mode, Apache/nginx integration, shared hosting compatible

Environment detection

The SDK automatically detects your deployment environment:

Environment VariableDetected Mode
GATEWAY_INTERFACECGI mode
AWS_LAMBDA_FUNCTION_NAMEAWS Lambda
LAMBDA_TASK_ROOTAWS Lambda
FUNCTION_TARGETGoogle Cloud Functions
K_SERVICEGoogle Cloud Functions
GOOGLE_CLOUD_PROJECTGoogle Cloud Functions
AZURE_FUNCTIONS_ENVIRONMENTAzure Functions
FUNCTIONS_WORKER_RUNTIMEAzure Functions
(none of above)Server mode (default)

Chapter contents

SectionDescription
Local DevelopmentDevelopment server and testing
ProductionProduction server deployment
ServerlessLambda, Cloud Functions, Azure
Docker & KubernetesContainer deployment
CGI ModeTraditional CGI deployment

Quick start

Python
TypeScript
1#!/usr/bin/env python3
2from signalwire import AgentBase
3
4class MyAgent(AgentBase):
5 def __init__(self):
6 super().__init__(name="my-agent")
7 self.add_language("English", "en-US", "rime.spore")
8 self.prompt_add_section("Role", "You are a helpful assistant.")
9
10if __name__ == "__main__":
11 agent = MyAgent()
12 agent.run()

The run() method automatically:

  • Detects serverless environments (Lambda, Cloud Functions, Azure) (Python only)
  • Starts a development server on localhost for local development
  • Handles CGI mode when deployed to traditional web servers (Python only)

In TypeScript, run() is an alias for serve() and only starts an HTTP server. For serverless deployments (Lambda, Cloud Functions, Azure, CGI) call agent.runServerless(event, context, platform?) from your platform handler, or use the ServerlessAdapter.createLambdaHandler / createGcfHandler / createAzureHandler helpers. See the Serverless guide.

The SignalWire TypeScript SDK (@signalwire/sdk) is ESM-only. Your package.json must set "type": "module", or your entry file must be named .mjs. Otherwise Node will try to load it as CommonJS and imports will fail.

Starting the development server

The simplest way to run your agent locally:

LanguageRun Command
Pythonpython my_agent.py
TypeScriptnpx tsx my_agent.ts or node my_agent.mjs

All languages default to http://localhost:3000.