What is an AI Agent?
An AI Agent is an autonomous system that:- Listens to caller input
- Processes the information intelligently
- Generates contextual responses
- Maintains conversation flow
- Can execute tools and integrations
Creating an Agent
Via API
Via Python
Agent Configuration
Basic Properties
| Property | Type | Description |
|---|---|---|
name | string | Agent display name |
initial_message | string | First message to caller |
ai_provider | string | gemini, openai, or hume |
system_prompt | string | Instructions for agent behavior |
voice_provider | string | twilio, plivo, or livekit |
temperature | float | 0.0-1.0, controls creativity |
max_tokens | integer | Maximum response length |
System Prompts
The system prompt defines the agent’s personality and behavior:AI Provider Selection
Gemini
Best for:- Real-time streaming
- Cost-effective solutions
- Multi-modal understanding
OpenAI
Best for:- Advanced reasoning
- Function calling
- Fine-tuned models
Hume AI
Best for:- Emotional intelligence
- Empathy detection
- Sentiment analysis
Agent Behavior
Conversation Flow
Context Management
Agents maintain conversation context:Tool Calling
Agents can execute tools:Managing Agents
List Agents
Get Agent Details
Update Agent
Delete Agent
Advanced Agent Features
Multi-Language Support
Custom Voice
Emotion Recognition (Hume)
Knowledge Base Integration
Agent Templates
Customer Support Agent
Sales Agent
Technical Support Agent
Appointment Scheduling Agent
Agent Performance
Monitoring
Optimization Tips
- Shorter prompts: Reduce tokens, faster responses
- Clear instructions: Better understood by AI
- Few-shot examples: Improve output quality
- Temperature tuning: 0.3-0.7 is usually best
- Model selection: Larger models = better quality but slower
Cost Optimization
Testing Agents
Local Testing
Test Call
Troubleshooting
Agent Not Responding
Poor Response Quality
- Review and improve system prompt
- Increase temperature for more creative responses
- Use a larger AI model
- Add few-shot examples to the prompt
- Enable emotion recognition for better empathy