Documentation Index
Fetch the complete documentation index at: https://docs.heylua.ai/llms.txt
Use this file to discover all available pages before exploring further.
What Are Channel-aware Prompts?
Channel-aware prompts let you customize your agent’spersona and skill context based on whether the user is interacting via voice or text.
This is rarely needed — the platform handles most channel-specific behavior automatically. But when you have genuinely different communication needs (e.g., conversational tone on voice, structured lists on text), this feature lets you optimize for each channel.
Rule of thumb:
If you need to ask “should I say this differently on voice vs text?”, you probably don’t need channel-aware prompts. Most agents should keep a simple string persona and context.
When to Use Channel-aware Prompts
Use the polymorphic form only if you have a measurably different need:✅ Use it for:
- Conversational tone on voice, structured formatting on text
- Voice-specific instructions (e.g., “avoid markdown”)
- Text-specific instructions (e.g., “use ::: list-item blocks”)
❌ Don't use it for:
- Minor tweaks or polish
- The same concept explained differently
- Most agents (keep it simple)
Syntax
Bothpersona and skill context accept the polymorphic form:
Fields
base— Shared across all channels (optional)voice— Voice-specific additions (optional, ignored on text)text— Text-specific additions (optional, ignored on voice)
Validation: The object must have at least one non-empty field. Empty objects (
{}), empty strings (""), and objects whose only present fields are empty ({ base: "" }) are rejected at push time — pass undefined or omit the field entirely if you want no persona / context.Examples
Example 1: Customer Support Agent
“You are Alex… Speak naturally and conversationally. Use short, clear sentences…”On text, the agent sees:
“You are Alex… For longer explanations, break them into ::: list-item blocks…”
Example 2: Hotel Booking Agent
Example 3: Analytics Report Skill
Migration: From String to Object
If you start with a simple string and later realize you need channel-specific behavior, the migration is straightforward: Before:Common Patterns
Pattern 1: Base + Voice Only
When you only need voice customization (text uses the base):base + voiceOn text:
base (text field is not rendered)
Pattern 2: Base + Text Only
When you only need text customization (voice uses the base):base (voice field is not rendered)On text:
base + text
Pattern 3: Base + Both Channels
Full customization for both channels:base + voiceOn text:
base + text
Best Practices
Start simple
Write a single string persona first. Add channel-aware behavior only when you discover a real need.
Use base for shared content
Put the core agent personality and responsibilities in
base. Use voice and text only for channel-specific nuances.Text: structured
On text, leverage the ::: components (list-item, actions, links, etc.) for visual clarity.
Don't over-optimize
Remember: the platform handles 95% of channel-specific behavior for you (voice tone, text formatting rules, etc.). Only use this feature for cases where you genuinely need different core instructions.
API Reference
See thepersona field in LuaAgent and context field in LuaSkill for complete type signatures and examples.
Next Steps
Persona Guide
Deep dive into creating effective personas
Skill Guide
Learn about skill design and context
Text Formatting
::: component syntax for text channels
Voice Channels
How voice calls work in Lua

