Overview
Oration enables dynamic content in agent prompts and conversations. Create personalized, context-aware interactions by injecting variables, applying filters, and using conditional logic directly in your agent prompts. Use double curly braces{{ }} for variables and {% %} for logic tags to create data-driven prompts that adapt to each conversation.
Key Benefits
- Dynamic Personalization: Insert customer names, account details, and contextual information
- Conditional Logic: Show different content based on customer data or conversation state
- Data Formatting: Apply filters to format dates, numbers, and text automatically
- Reusable Templates: Create flexible prompts that work across different scenarios
Using Dynamic Variables in Conversations
Basic Variable Injection
Inject dynamic variables into your agent prompts:Conditional Content
Use conditional logic to personalize responses based on customer data:Working with Nested Variables
Oration supports complex nested data structures in variables. You can access nested properties using dot notation and work with arrays and objects seamlessly.Accessing Nested Properties
Working with Objects
Working with Arrays
Complex Nested Structures
Safe Navigation
Use conditional checks to avoid errors when nested properties might not exist:Default Variables
Oration provides several built-in system variables that are always available in your prompts:System Variables
| Variable | Description | Example | 
|---|---|---|
| language | Current conversation language | "en-US" | 
| currentTime | Full current date and time | "Monday, August 27, 2024 at 12:25:37 PM IST" | 
| currentDate | Current date only | "Monday, August 27, 2024" | 
Usage Examples
Custom Dynamic Variables
Define custom variables that are evaluated at runtime:Data Formatting Filters
Filters transform variable output using the pipe| operator. Most useful filters for agent prompts: