Scripts for managing outbound calling campaigns.
- Audience Creation — Build contact lists for campaigns
- Campaign Setup — Link agents, audiences, and phone numbers
- Campaign Control — Start, stop, pause, and monitor
- Contact Management — Add contacts to existing audiences
1. Create Agent (via dashboard or API)
↓
2. Create Audience (contact list)
↓
3. Create Campaign (link agent + audience + phone)
↓
4. Start Campaign
↓
5. Monitor Status
↓
6. Stop/Pause as needed
Make sure you've run
uv venv && uv pip install -r requirements.txtat the repo root first. See the main README. AddSMALLEST_API_KEYandAGENT_IDto your.env.
uv pip install -r requirements.txtuv run create_audience.pyThis creates an audience and saves AUDIENCE_ID to .env.
uv run create_campaign.pyThis creates a campaign linking your agent, audience, and phone number.
# Start calling
uv run manage_campaign.py start
# Check status
uv run manage_campaign.py status
# Pause (can resume later)
uv run manage_campaign.py pause
# Stop completely
uv run manage_campaign.py stop
# List all campaigns
uv run manage_campaign.py listuv run add_contacts.py- Automated outbound calling at scale — sales outreach, appointment reminders, surveys
- Managing audiences, phone numbers, and campaign lifecycle
- For inbound call handling, Inbound IVR is recommended
from smallestai.atoms import Audience
audience = Audience()
result = audience.create(
name="My Contacts",
phone_numbers=["+1234567890", "+1234567891"],
names=[("John", "Doe"), ("Jane", "Smith")],
description="Optional description"
)
audience_id = result["data"]["_id"]from smallestai.atoms import Campaign
campaign = Campaign()
result = campaign.create(
name="My Campaign",
agent_id="agent_123",
audience_id="audience_456",
phone_ids=["phone_789"], # Get from get_phone_numbers()
max_retries=3,
retry_delay=15
)
campaign_id = result["data"]["_id"]campaign = Campaign()
# Start
campaign.start(campaign_id)
# Pause
campaign.pause(campaign_id)
# Stop
campaign.stop(campaign_id)
# Get status
status = campaign.get(campaign_id)You can also use the unified client:
from smallestai.atoms import AtomsClient
client = AtomsClient()
# Audience operations
client.audience.create(...)
# Campaign operations
client.campaign.create(...)
client.campaign.start(campaign_id)
# Get phone numbers
phones = client.get_phone_numbers()| Setting | Type | Description |
|---|---|---|
name |
string | Campaign name |
agent_id |
string | Agent to use for calls |
audience_id |
string | Contact list to call |
phone_ids |
list | Outbound phone number IDs |
max_retries |
int | Retry attempts if no answer (0-10) |
retry_delay |
int | Minutes between retries (1-1440) |
campaigns/
├── create_audience.py # Create a new audience with contacts
├── add_contacts.py # Add contacts to existing audience
├── create_campaign.py # Create a campaign
└── manage_campaign.py # Start/stop/pause/status commands
- Test First — Use a small audience to test your agent
- Monitor Status — Check campaign progress regularly
- Handle Retries — Configure appropriate retry settings
- Respect Regulations — Follow TCPA and local calling regulations
- Track Results — Use the analytics cookbook to analyze outcomes
- Analytics — Call logs and metrics for campaign results
- Knowledge Base RAG — KB-enabled agents