BPO

Outbound Compliance Dialer

TCPA-safe outbound dialing for collections, surveys, and follow-ups. Built-in disclosures, opt-out handling, and full call-detail logging for compliance review.

Why this matters

Voice agents for outsourcing operations. Inbound queues, outbound dialers, multi-tenant agent provisioning. Replace seats, keep quality, full QA + audit trails. This example shows you how to automate outbound compliance dialer calls end-to-end with Guava's SDK — no telephony plumbing, no prompt engineering, just Python.

How to set persona & task
Working with Fields and Say items
Handling callbacks
Running the agent
Step 01

Installation

Install from Guava's private PyPI index. A public package is coming soon — the install command will simplify to pip install guava.

terminal
# Step 1: Install Guava
pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com

# Public PyPI package coming soon — the install command will simplify to:
# pip install guava

# Step 2: Set your credentials
export GUAVA_API_KEY="..."
export GUAVA_AGENT_NUMBER="..."
Step 02

How it's built

Every Guava agent is a Python class. Walk through the key sections below, then grab the complete file at the end.

01

Imports

Import the Guava SDK and any helpers you need. guava.CallController is the base class for every voice agent.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os
02

Agent setup

set_persona() defines how the agent presents itself. set_task() gives it its mission in plain English. The checklist drives the conversation — Guava works through it top-to-bottom, collecting Field values and speaking Say items as it goes.

example.py
class ComplianceDialerBot(guava.CallController):
    def __init__(self, contact_name: str, account_id: str, campaign: str):
        super().__init__()
        self.contact_name = contact_name
        self.account_id = account_id
        self.set_persona(
            organization_name="Acme Recovery Services",
            agent_name="Morgan",
        )
        self.set_task(
            objective=f"Make a TCPA-compliant outbound call to {contact_name} for {campaign}",
            checklist=[
                guava.Field(
                    key="right_party_contact",
                    field_type="bool",
                    description=f"Have you confirmed you're speaking with {contact_name}?",
                ),
                guava.Say(
                    "This call may be recorded for quality and compliance. This is an attempt to "
                    "collect a debt and any information obtained will be used for that purpose."
                ),
                guava.Field(
                    key="opt_out_requested",
                    field_type="bool",
                    description="Has the consumer requested no further calls?",
                ),
                guava.Field(
                    key="callback_requested",
                    field_type="text",
                    description="If a callback is requested, when?",
                    required=False,
                ),
            ],
            on_complete=self.handle_disposition,
        )

    def handle_disposition(self, fields):
        if fields.get("opt_out_requested"):
            print(f"OPT-OUT: {self.contact_name} ({self.account_id}) — suppress all future contact")
        elif fields.get("callback_requested"):
            print(f"CALLBACK: {self.contact_name} requested {fields['callback_requested']}")
        else:
            print(f"CONTACTED: {self.account_id} — log disposition for QA review")

guava.dial(
    controller=ComplianceDialerBot,
    controller_args={"contact_name": "Pat Lee", "account_id": "AC-4729", "campaign": "30-day past due"},
    to=os.environ["CONTACT_PHONE"],
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)

Platform performance

<1s

Response time

99.99%

Uptime SLA

13+

Industries served

Step 03

Full example

The complete file — copy it, save it as example.py, and run it.

example.py
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os

class ComplianceDialerBot(guava.CallController):
    def __init__(self, contact_name: str, account_id: str, campaign: str):
        super().__init__()
        self.contact_name = contact_name
        self.account_id = account_id
        self.set_persona(
            organization_name="Acme Recovery Services",
            agent_name="Morgan",
        )
        self.set_task(
            objective=f"Make a TCPA-compliant outbound call to {contact_name} for {campaign}",
            checklist=[
                guava.Field(
                    key="right_party_contact",
                    field_type="bool",
                    description=f"Have you confirmed you're speaking with {contact_name}?",
                ),
                guava.Say(
                    "This call may be recorded for quality and compliance. This is an attempt to "
                    "collect a debt and any information obtained will be used for that purpose."
                ),
                guava.Field(
                    key="opt_out_requested",
                    field_type="bool",
                    description="Has the consumer requested no further calls?",
                ),
                guava.Field(
                    key="callback_requested",
                    field_type="text",
                    description="If a callback is requested, when?",
                    required=False,
                ),
            ],
            on_complete=self.handle_disposition,
        )

    def handle_disposition(self, fields):
        if fields.get("opt_out_requested"):
            print(f"OPT-OUT: {self.contact_name} ({self.account_id}) — suppress all future contact")
        elif fields.get("callback_requested"):
            print(f"CALLBACK: {self.contact_name} requested {fields['callback_requested']}")
        else:
            print(f"CONTACTED: {self.account_id} — log disposition for QA review")

guava.dial(
    controller=ComplianceDialerBot,
    controller_args={"contact_name": "Pat Lee", "account_id": "AC-4729", "campaign": "30-day past due"},
    to=os.environ["CONTACT_PHONE"],
    agent_number=os.environ["GUAVA_AGENT_NUMBER"],
    api_key=os.environ["GUAVA_API_KEY"],
)
Step 04

Run it

Start the agent. It will connect to Guava's infrastructure and begin accepting calls on your assigned number.

terminal
python example.py
Get Started