All-in-One Voice Feature Engine
Explore the Implementation
Clone RepositoryView on GitHub
Bash
git clone https://github.com/vobiz-ai/Livekit-Vobiz-All-feature-Example.git
cd Livekit-Vobiz-All-feature-ExampleAn ultimate reference repository that unifies every core LiveKit orchestration behavior within one master repository — interlacing AMD isolation, DTMF fallbacks, parallel Agent Tooling handoffs, and final SIP referral commands natively.
How It Works
Rather than maintaining fractured systems for differing business priorities, this codebase encapsulates dynamic pathway routing natively matching robust scale requirements.
- Initial Penetration Layer: An outbound push begins with a strictly silent AMD module sweeping for human confirmation signals. Invalid machine hits are aggressively aborted out of cycle.
- Dynamic Navigability: Confirmed human hits are routed to a primary generalist router, which can flexibly adapt interactions across both continuous conversational speech layers, or rigidly-forced DTMF keypad punch routines interchangeably.
- State-Maintained Context Propagation: Based on the overarching classification, the engine seamlessly hands off context blobs into respective sub-specialist models isolated by hyper-specific system configurations (e.g. strict billing verifications, complex engineering diagnostics, tracking verifications).
- Terminal Deferral Paths: Assuming complex ambiguity occurs — or by direct explicit command — any acting subagent inherently binds with standard Vobiz underlying SIP REFER transfer toolings executing direct trunk relays towards a traditional analog queue or specific designated agent.
Implementation Code
By stacking multiple agents recursively, you achieve the highly robust "Triage-to-Specialist" routing framework that represents the absolute pinnacle of this comprehensive architecture:
Python
from livekit.agents import llm
from .billing_agent import BillingAgent
from .support_agent import SupportAgent
class TriageTools(llm.ToolContext):
"""The master node responsible for unified routing."""
@llm.function_tool(description="Transfer the user to the Billing department")
async def transfer_to_billing(self):
# Gracefully copy the active Conversation Chat Context implicitly
# so the completely new Agent possesses total memory.
ctx_copy = self.chat_ctx.copy(exclude_instructions=True)
return BillingAgent(chat_ctx=ctx_copy)
@llm.function_tool(description="Transfer the user to Technical Support")
async def transfer_to_support(self):
ctx_copy = self.chat_ctx.copy(exclude_instructions=True)
return SupportAgent(chat_ctx=ctx_copy)
@llm.function_tool(description="Escalate and cold-transfer to human staff")
async def sip_human_handoff(self, rep_type: str):
# Execute the raw Vobiz SIP trunk referral bypass natively
target_number = "+15550002222" if rep_type == "billing" else "+15550003333"
await self.local_participant.perform_sip_refer(transfer_to=f"sip:{target_number}@vobiz.ai")
return "Transfer executing immediately."