Inbound Queue Triage
Handle first-touch intake at SLA, classify caller intent, capture account context, and route to the right specialist queue — no hold music for misrouted calls.
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 inbound queue triage calls end-to-end with Guava's SDK — no telephony plumbing, no prompt engineering, just Python.
Installation
Install from Guava's private PyPI index. A public package is coming soon — the install command will simplify to pip install guava.
# 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="..."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.
Imports
Import the Guava SDK and any helpers you need. guava.CallController is the base class for every voice agent.
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import osAgent 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.
class InboundQueueTriageBot(guava.CallController):
def __init__(self, tenant_name: str):
super().__init__()
self.tenant_name = tenant_name
self.set_persona(
organization_name=tenant_name,
agent_name="Riley",
)
self.set_task(
objective=f"Greet the caller, capture intent, and route to the right queue for {tenant_name}",
checklist=[
f"Greet the caller and confirm they have reached {tenant_name}.",
guava.Field(
key="caller_intent",
field_type="enum",
choices=["billing", "technical_support", "sales", "account_changes", "other"],
description="What is the caller's primary reason for calling?",
),
guava.Field(
key="account_id",
field_type="text",
description="Caller's account number or member ID",
required=False,
),
guava.Say("Acknowledge the caller's reason and let them know you're transferring to the right team."),
],
on_complete=self.route_caller,
)
def route_caller(self, fields):
intent = fields.get("caller_intent")
queue = {
"billing": "billing_specialists",
"technical_support": "tier_2_support",
"sales": "inbound_sales",
"account_changes": "account_services",
"other": "general_support",
}.get(intent, "general_support")
return guava.Transfer(queue=queue, context=fields)
guava.listen(
controller=InboundQueueTriageBot,
controller_args={"tenant_name": "AcmeCo"},
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
Full example
The complete file — copy it, save it as example.py, and run it.
# Install: pip install gridspace-guava --extra-index-url https://guava-pypi.gridspace.com
import guava
import os
class InboundQueueTriageBot(guava.CallController):
def __init__(self, tenant_name: str):
super().__init__()
self.tenant_name = tenant_name
self.set_persona(
organization_name=tenant_name,
agent_name="Riley",
)
self.set_task(
objective=f"Greet the caller, capture intent, and route to the right queue for {tenant_name}",
checklist=[
f"Greet the caller and confirm they have reached {tenant_name}.",
guava.Field(
key="caller_intent",
field_type="enum",
choices=["billing", "technical_support", "sales", "account_changes", "other"],
description="What is the caller's primary reason for calling?",
),
guava.Field(
key="account_id",
field_type="text",
description="Caller's account number or member ID",
required=False,
),
guava.Say("Acknowledge the caller's reason and let them know you're transferring to the right team."),
],
on_complete=self.route_caller,
)
def route_caller(self, fields):
intent = fields.get("caller_intent")
queue = {
"billing": "billing_specialists",
"technical_support": "tier_2_support",
"sales": "inbound_sales",
"account_changes": "account_services",
"other": "general_support",
}.get(intent, "general_support")
return guava.Transfer(queue=queue, context=fields)
guava.listen(
controller=InboundQueueTriageBot,
controller_args={"tenant_name": "AcmeCo"},
agent_number=os.environ["GUAVA_AGENT_NUMBER"],
api_key=os.environ["GUAVA_API_KEY"],
)Run it
Start the agent. It will connect to Guava's infrastructure and begin accepting calls on your assigned number.
python example.py