The project is in a healthy, maintained state
A Ruby framework for building, deploying, and managing AI agents as microservices that interact with the SignalWire platform.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 5.0
>= 2.0
>= 13.0

Runtime

 Project Readme

SignalWire AI Agents Ruby SDK

A Ruby framework for building, deploying, and managing AI agents as microservices that interact with the SignalWire platform.

Features

  • Agent Framework — Build AI agents with structured prompts, tools, and skills
  • SWML Generation — Automatic SWML document creation for the SignalWire AI platform
  • SWAIG Functions — Define tools the AI can call during conversations
  • DataMap Tools — Server-side API integrations without webhook infrastructure
  • Contexts & Steps — Structured multi-step conversation workflows
  • Skills System — Modular, reusable capabilities (datetime, math, web search, etc.)
  • Prefab Agents — Ready-to-use agent patterns (surveys, reception, FAQ, etc.)
  • Multi-Agent Hosting — Run multiple agents on a single server
  • RELAY Client — Real-time WebSocket-based call control and messaging
  • REST Client — Full SignalWire REST API access with typed resources
  • Rack Compatible — Run standalone or mount in Rails, Sinatra, or any Rack app

Quick Start

require 'signalwire_agents'

agent = SignalWireAgents::AgentBase.new(name: 'my-agent')

agent.set_prompt_text("You are a helpful assistant.")

agent.define_tool(
  name: 'get_time',
  description: 'Get the current time',
  parameters: {}
) do |args, raw_data|
  SignalWireAgents::FunctionResult.new("The current time is #{Time.now}")
end

agent.run

Installation

gem install signalwire_agents

Or in your Gemfile:

gem 'signalwire_agents'

Rack / Rails Integration

# config/routes.rb (Rails)
mount MyAgent.rack_app => '/agent'

# config.ru (Rack)
run MyAgent.rack_app

Documentation

See the docs/ directory for comprehensive guides.

Environment Variables

Variable Description Default
PORT HTTP server port 3000
SWML_BASIC_AUTH_USER Basic auth username auto-generated
SWML_BASIC_AUTH_PASSWORD Basic auth password auto-generated
SWML_PROXY_URL_BASE Proxy/tunnel base URL auto-detected
SIGNALWIRE_PROJECT_ID Project ID for RELAY/REST
SIGNALWIRE_API_TOKEN API token for RELAY/REST
SIGNALWIRE_SPACE Space hostname

License

Copyright (c) SignalWire. All rights reserved.