Standalone C++ examples demonstrating the SignalWire AI Agents SDK. Each file
has a main() and can be compiled independently against the SDK library.
# From the project root (after building the library):
g++ -std=c++20 -I include -I deps examples/simple_agent.cpp \
-L build -lsignalwire -lssl -lcrypto -lpthread -o simple_agent
./simple_agent
File
Description
simple_agent.cpp
POM prompts, tools, hints, languages, SIP routing
simple_dynamic_agent.cpp
Per-request customization via DynamicConfigCallback
simple_dynamic_enhanced.cpp
Enhanced dynamic config: VIP, department, customer ID, language
simple_static_agent.cpp
Static prompt-only agent (no tools)
declarative_agent.cpp
Agent built from JSON-like config
multi_agent_server.cpp
Multiple agents on a single port via AgentServer
custom_path_agent.cpp
Agent at a custom HTTP route
kubernetes_ready_agent.cpp
Production-ready with health checks and signal handling
lambda_agent.cpp
Serverless Lambda handler with global agent for cold-start reuse
comprehensive_dynamic_agent.cpp
Full dynamic config: tenant, voice, model, instructions
File
Description
swaig_features_agent.cpp
All FunctionResult action types: state, media, speech, SMS
call_flow_and_actions_demo.cpp
5-phase verb pipeline: pre-answer, answer, post-answer, post-AI
record_call_example.cpp
Start/stop call recording
tap_example.cpp
Stream call audio to external RTP endpoint
room_and_sip_example.cpp
Video rooms, SIP REFER, conferences
session_and_state_demo.cpp
Global data, session tokens, callbacks
Contexts & Steps Examples
File
Description
relay_demo.cpp
RELAY client: answer calls, play TTS (stub transport)
rest_demo.cpp
REST client: manage resources, place calls
RELAY Examples (relay/examples/)
REST Examples (rest/examples/)
File
Description
rest_manage_resources.cpp
Create agent, search numbers, place call
rest_datasphere_search.cpp
Upload document, semantic search
rest_calling_play_and_record.cpp
Call with play and record
rest_calling_ivr_and_ai.cpp
IVR collect and detect
rest_fabric_subscribers_and_sip.cpp
Subscribers, SIP endpoints
rest_fabric_swml_and_callflows.cpp
SWML scripts, call flows
rest_fabric_conference_rooms.cpp
Conferences, routing rules
rest_phone_number_management.cpp
Search and manage numbers
rest_video_rooms.cpp
Video rooms, sessions, recordings
rest_queues_mfa_and_recordings.cpp
Queues, MFA, recordings
rest_10dlc_registration.cpp
10DLC registration workflow