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 Hono service for non-AI call flows.
Fluent builder for constructing SWML documents programmatically.
Wraps TypeScript 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 Hono process with route-based dispatch.
Pre-built agent templates for common conversational patterns.
Built-in skills catalog with 19 pluggable capabilities.
Environment variables, config files, security settings, and authentication.
LiveKit-compatible API layer — use familiar livekit-agents classes on SignalWire infrastructure.
Manages the lifecycle of skills loaded on an agent.
Global singleton for registering and discovering skills by name.
Context creation, API tools, security utilities, type inference, and standalone functions.