Deploy
This chapter covers deployment options from development to production.
What you’ll learn
- Local Development - Running agents during development
- Production - Deploying to production servers
- Serverless - AWS Lambda, Google Cloud Functions, Azure Functions
- Docker & Kubernetes - Container-based deployment
- CGI Mode - Traditional web server deployment
Deployment options overview
Environment detection
The SDK automatically detects your deployment environment:
Chapter contents
Quick start
Python
TypeScript
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:
All languages default to http://localhost:3000.