Overview
The preamble is the system prompt that defines your agent’s identity, behavior, and task. Everything the agent does during a call is guided by this prompt.Recommended Structure
A well-structured preamble typically covers these sections:1. Identity & Role
Define who the agent is and what it represents.2. Personality & Tone
Set the conversation style.3. Response Guidelines
Specify how the agent should format and structure its responses.4. Task & Goals
Define what the agent should accomplish, ideally as numbered steps.5. Guardrails
Set clear boundaries for what the agent should not do.6. Edge Case Handling
Prepare for difficult scenarios.Using Variables
You can reference system variables and custom variables in your prompt using{{variable_name}} syntax.
System variables (always available):
| Variable | Description |
|---|---|
{{agent_name}} | Name of the current agent |
{{agent_id}} | Unique identifier for the agent |
{{agent_number}} | Agent’s phone number |
{{current_time}} | Current time (HH:MM) |
{{current_date}} | Current date (YYYY-MM-DD) |
{{current_datetime}} | Date and time in ISO format |
{{current_day}} | Day of the month (1–31) |
{{current_month}} | Month (1–12) |
{{current_year}} | Year (YYYY) |
{{current_weekday}} | Day of the week |
{{current_timestamp}} | Timestamp in milliseconds |
{{call_id}} | Unique call identifier |
{{call_type}} | Type of call |
{{call_start_time}} | When the call began |
{{direction}} | inbound or outbound |
{{user_number}} | Caller’s phone number |
{{user_number_area_code}} | Caller’s area code |
params when initiating the call. See Variable System for details.
Jinja2 Templates
Beyond simple substitution, prompts support full Jinja2 template syntax — conditionals, filters, and expressions are all available.Tool Integration
When your agent uses tools, include clear instructions for when and how to use them:Common Mistakes
Too vague:Conflicting instructions:
Next Steps
Voice Settings
Configure voice and language options
Call Behavior
Set up response timing and interaction controls
Intelligence Features
Enable smart features like gender detection and smart call end
Knowledge Base
Add reference materials for your agent