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:- 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:- 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:Interruption handling
Controls how the agent handles turn-taking in real-time conversations:- VAD (Voice Activity Detection): Standard silence detection
- ML-based projection: Predicts when user is finished speaking
- LLM-based decision: AI distinguishes between pauses and actual turn ends
Knowledge base integration
Connects the agent to vector databases for Retrieval Augmented Generation (RAG):Integrations configuration
Defines which AI providers and services the agent uses:- 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
- User input arrives (voice, text, or DTMF)
- Agent loads active script and current conversation state
- Context is assembled from business data, variables, and knowledge base
- System prompt is generated from personality, capabilities, and context
- AI model processes the input and generates a response
- Deterministic layer validates the response against script constraints
- Response is delivered through the appropriate channel
- 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
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:Outbound campaigns
Agents can run proactive campaigns:Multi-channel deployment
The same agent can handle:- Voice calls (SIP/PSTN)
- WebRTC browser conversations
- REST API chat integrations
- WhatsApp/SMS messaging
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