sw-agent-init
sw-agent-init
The sw-agent-init command creates new SignalWire agent projects with a
pre-configured directory structure, agent class, environment configuration,
test scaffolding, and optional virtual environment. It supports local,
AWS Lambda, Google Cloud Functions, and Azure Functions deployment targets.
Running without a project name enters interactive mode with guided prompts.
Options
name
Project name. If omitted, sw-agent-init runs in interactive mode and prompts
for all configuration values.
--type
Agent type. Valid values:
"basic"— Minimal agent with a single example tool, test scaffolding, and.envconfig"full"— All features: debug webhooks, post-prompt summary, web UI, basic auth, tests
--platform, -p
Target deployment platform. Valid values:
"local"— Standard FastAPI/uvicorn server (default)"aws"— AWS Lambda with handler and SAM template"gcp"— Google Cloud Function withmain.pyentry point"azure"— Azure Function withfunction_app.pyandhost.json
--region, -r
Cloud region for serverless platforms. Defaults vary by platform:
- AWS:
us-east-1 - GCP:
us-central1 - Azure:
eastus
--no-venv
Skip virtual environment creation. By default, a .venv directory is
created and dependencies are installed. Only applies to local platform.
--dir
Parent directory for the project. The project is created as a subdirectory of this path.
Interactive Mode
When run without arguments, sw-agent-init prompts for:
- Project name
- Project directory
- Agent type (basic or full)
- Feature selection (toggle individual features)
- SignalWire credentials
- Virtual environment creation
Features available in interactive mode:
Generated Project Structure
Local Platform
Serverless Platforms
Environment Detection
The generated project auto-detects SignalWire credentials from environment variables:
If these are set when running sw-agent-init, they are written into the
generated .env file.