Skip to main content
Agents can have a voice intereface. A fast voice model handles immediate user interaction and delegates complex tasks to a more powerful primary agent.

Architecture

  1. Voice Interface Agent - An interface agent that uses a low-latency, real-time audio model to handle greetings, chitchat, and simple clarifications directly.
  2. Primary Agent - The main agent with tools and all the capabilities of Autonomy agents. Handles complex questions, database lookups, and tool-based tasks.
When the voice agent receives a complex request, it says a filler phrase (like “Let me check on that”) and delegates to the primary agent. The primary agent processes the request, potentially calling tools, and returns a response that the voice agent speaks verbatim.

Create a Voice Agent

Add a voice configuration to any agent to enable voice capabilities:
images/main/main.py
Once running, connect to your voice agent via WebSocket. The agent also remains available via the standard HTTP API for text interactions.

Voice Configuration

The voice parameter accepts a dictionary with the following options:

Default Allowed Actions

By default, the voice agent handles these interactions directly:
  • Greetings
  • Chitchat
  • Collecting information
  • Clarifications

Default Filler Phrases

Before delegating complex requests, the voice agent says one of:
  • “Just a second.”
  • “Let me check.”
  • “One moment.”
  • “Let me look into that.”
  • “Give me a moment.”
  • “Let me see.”

VAD Settings for Responsive Interaction

Tune Voice Activity Detection for your environment:
images/main/main.py

Voice Agents with Tools

Voice agents work seamlessly with tools. The primary agent has access to all tools and uses them when handling delegated requests:
images/main/main.py
When a user asks “Where is my order 12345?”, the flow is:
  1. Voice agent says “Let me look up your order.”
  2. Voice agent delegates to primary agent
  3. Primary agent calls lookup_order("12345")
  4. Primary agent returns “Your order has shipped and will arrive tomorrow.”
  5. Voice agent speaks the response verbatim

Voice Agents with Knowledge

Combine voice with knowledge search for intelligent Q&A:
images/main/main.py

Memory Isolation

Voice sessions support the same memory isolation as text conversations. Pass scope and conversation parameters when connecting:
This ensures each user’s voice conversation history is isolated.

Complete Example: Software Engineering Interviewer

This example demonstrates a voice agent that conducts first-round screening interviews for software engineering candidates. The agent assesses technical fundamentals, problem-solving ability, and communication skills.

Using the Interviewer

Connect via WebSocket for voice:
Or use HTTP for text:
curl
The interviewer will:
  1. Greet the candidate and explain the interview format
  2. Ask about their background and experience
  3. Pose technical questions adapted to their level
  4. Explore behavioral scenarios
  5. Answer questions about the role
  6. Provide feedback on their performance