Agents
The Agents namespace provides the core framework for building AI-powered voice
agents with SignalWire. It includes the central AgentBase class, SWML document
generation, tool/function definitions, skills, multi-agent hosting, CLI tools
for local testing and deployment, and configuration management for security
and environment settings.
The Agents SDK generates SWML documents under the hood.
Each agent produces a SWML document with the ai verb that the SignalWire platform executes.
Example
A complete agent that answers calls, uses an AI prompt, and exposes a custom tool:
Classes
The central class for building AI agents. Manages prompts, tools, skills, and serving.
SWML document generation and FastAPI service base class.
Fluent builder for constructing SWML documents programmatically.
Wraps Python functions as callable SWAIG tools with validation and metadata.
Fluent interface for returning actions and responses from tool functions.
Multi-step agent workflows with context and step navigation.
Server-side API tools that execute REST calls without agent webhooks.
Base class for building reusable skill plugins.
Prompt Object Model builder for structured prompt composition.
Host multiple agents on a single FastAPI process with route-based dispatch.
Amazon Bedrock voice-to-voice agent extending AgentBase.
Pre-built agent templates for common conversational patterns.
Built-in skills catalog with 17 pluggable capabilities.
Command-line tools for testing, searching, scaffolding, and deployment.
Environment variables, config files, security settings, and authentication.
LiveKit-compatible API layer — use familiar livekit-agents classes on SignalWire infrastructure.
Vector search engine for building knowledge bases with document processing and indexing.
Model Context Protocol bridge connecting MCP servers to SWAIG functions.
Static file serving with security, CORS, and SSL support.
Convenience functions for creating contexts, API tools, and managing skills.