Skip to main content
Agents are the brain of your conversational applications. They orchestrate the conversation by combining natural language understanding with deterministic execution, personality configuration, and business context awareness.

What is an agent?

An agent is not just an AI model wrapper. It’s a complete configuration that defines:
  • Identity and personality: Who the agent is and how it behaves
  • Capabilities: What the agent can do (scripts, tools, knowledge)
  • Context awareness: Business data the agent has access to
  • Interaction rules: How the agent handles interruptions and turn-taking
  • Intelligence configuration: Which AI models and services to use
Think of an agent as a “digital employee” with a job description, personality traits, available tools, and access to company information.

Agent structure

Every agent is composed of several key components:

General information

Basic identity that appears in dashboards and routing:
Example configuration:
  • Emoji: 🏥
  • Name (English): “Medical Appointment Assistant”
  • Name (Arabic): “مساعد المواعيد الطبية”
  • Description: “Helps patients schedule, reschedule, and confirm medical appointments”

Context awareness

Defines which business data the agent has access to:
When enabled, these flags automatically inject relevant business information into the agent’s system prompt:
  • Branding: Company name, description, values
  • Branches: Office locations, hours, contact information
  • Services: Available services, pricing, descriptions
  • Products: Product catalog, features, availability
Context injection is dynamic. The agent automatically receives updated business information without manual reconfiguration.

Personality configuration

Defines how the agent behaves and communicates:
Example configuration:
These personality traits are automatically injected into the AI’s system prompt, shaping how it generates responses.

Interruption handling

Controls how the agent handles turn-taking in real-time conversations:
Turn-taking modes:
  1. VAD (Voice Activity Detection): Standard silence detection
  2. ML-based projection: Predicts when user is finished speaking
  3. LLM-based decision: AI distinguishes between pauses and actual turn ends
This is critical for natural voice conversations where detecting “uh-huh” vs. a true interruption matters.
For voice agents handling sensitive information, use LLM-based turn detection to better understand when users are pausing to think vs. actually finished speaking.

Knowledge base integration

Connects the agent to vector databases for Retrieval Augmented Generation (RAG):
When enabled, the agent automatically searches your knowledge base and includes relevant information in its responses.

Integrations configuration

Defines which AI providers and services the agent uses:
This allows you to mix and match providers:
  • Use OpenAI for English conversations
  • Use Azure for Arabic with culturally appropriate voices
  • Use Groq for low-latency responses
  • Use Anthropic for complex reasoning tasks

How agents work

Conversation flow

  1. User input arrives (voice, text, or DTMF)
  2. Agent loads active script and current conversation state
  3. Context is assembled from business data, variables, and knowledge base
  4. System prompt is generated from personality, capabilities, and context
  5. AI model processes the input and generates a response
  6. Deterministic layer validates the response against script constraints
  7. Response is delivered through the appropriate channel
  8. State is updated and conversation continues

Multi-script orchestration

Agents can work with multiple scripts simultaneously:
  • Primary script: The main conversation flow
  • Added scripts: Additional capabilities loaded dynamically
  • Transfer scripts: Conversation flows from other agents
This allows complex scenarios like:
When transferring between agents, ensure the receiving agent has access to necessary context variables. Use the ScriptTransferToAgentNodeReferences to track dependencies.

Agent vs Script

Understanding the difference is crucial:
Think of it this way: The agent is the person, the script is the instruction manual they follow.

Deployment patterns

Inbound routing

Agents can be assigned to handle incoming calls/chats:
Example: Route calls from +1-555-SUPPORT to “Technical Support Agent”

Outbound campaigns

Agents can run proactive campaigns:
Example: “Appointment Reminder Agent” calls patients 24 hours before appointments

Multi-channel deployment

The same agent can handle:
  • Voice calls (SIP/PSTN)
  • WebRTC browser conversations
  • REST API chat integrations
  • WhatsApp/SMS messaging
The personality and capabilities remain consistent across all channels.

Best practices

Define clear boundaries

Be explicit about what the agent can and cannot do:

Use context wisely

Only enable context that the agent actually needs:

Optimize per language

Different languages may need different configurations:

Test interruption behavior

Different use cases need different turn-taking:
  • Survey agents: Turn-by-turn mode (wait for complete answers)
  • Support agents: ML-based (natural conversation flow)
  • Authentication agents: LLM-based (understand hesitation vs. completion)

Next steps

Scripts

Learn how to build conversation flows that agents execute

Build an agent

Step-by-step guide to creating your first agent

Multi-language

Configure agents for multiple languages and cultures

Interruptions

Fine-tune turn-taking and conversation dynamics