Overview
Thelua persona command manages your AI agent’s personality, behavior, and response style with separate workflows for sandbox and production environments.
Direct environment access lets you skip the selection prompt for faster workflows!
Non-Interactive Mode
lua persona sandbox view prints the persona text and exits (no interactive menu) - perfect for CI/CD and scripts.Sandbox Mode
Edit and test persona locally
Production Mode
Deploy persona versions
Version Control
Track all persona changes
Safe Deployment
Confirmation required
Usage Modes
- Interactive Mode
- Direct Mode - Sandbox
- Direct Mode - Production
Default behavior - prompts for environmentBest for: When you’re exploring options
1
Edit in Sandbox
2
Test with Chat
3
Create Version
4
Deploy to Production
Environment Modes
- Sandbox Mode
- Production Mode
Local Development & TestingActions:
- 👁️ View full persona
- ✏️ Edit persona
- 📦 Create version (push to production)
- 📋 List versions
LuaAgent in src/index.ts)Use for:- Writing and editing persona
- Testing before deployment
- Iterating on personality
Channel-Aware Personas
Personas can be split per channel using an object form. The previous string form keeps working — adopt the object form only when a channel needs its own phrasing.voicechannel → usesvoiceif defined, elsebase.text(chat) channel → usestextif defined, elsebase.- A channel-agnostic operation (e.g.
lua initsource write, the agent description fallback) flattens all defined branches.
- Voice-only override — Keep your existing string persona, add
voiceonly when voice needs different phrasing: - Voice-only persona — A voice agent that only needs a voice prompt:
Pushing a voice-only persona (no
base, no text) now correctly applies on the server. lua sync --pull round-trips the object form back to your source file with all channel branches preserved.The PersonaText type is exported from lua-cli if you need it in your own typings.Writing Great Personas
Structure Template
Good vs Bad Examples
Example 1: Customer Support
- ❌ Bad
- ✅ Good
- Too vague
- No personality
- No guidelines
- No context
Example 2: Sales Assistant
- ❌ Bad
- ✅ Good
- No sales methodology
- Vague personality
- No product knowledge
- No dos/don’ts
Example 3: Technical Support
- ❌ Bad
- ✅ Good
- No troubleshooting methodology
- No personality
- No technical depth
- No escalation paths
Example 4: Onboarding Assistant
- ❌ Bad
- ✅ Good
- No structure
- No learning methodology
- No success criteria
- No personality
Example 5: E-commerce Shopping Assistant
- ❌ Bad
- ✅ Good
Good vs Bad Persona Patterns
Pattern 1: Role Definition
Pattern 2: Personality
Pattern 3: Guidelines
Pattern 4: Context
Pattern 5: Tone Examples
Industry-Specific Examples
Healthcare Patient Portal
Financial Services
Restaurant/Food Service
Persona Testing Checklist
Before deploying, test your persona:✅ Role Clarity
✅ Role Clarity
- Role is clearly defined
- Responsibilities are specific
- Boundaries are set
- Escalation paths are clear
✅ Personality Consistency
✅ Personality Consistency
- Tone is consistent across conversations
- Personality traits come through naturally
- Communication style matches brand
- Appropriate for target audience
✅ Guideline Compliance
✅ Guideline Compliance
- “Always” rules are followed
- “Never” rules are respected
- Conditional guidelines work (“When X, do Y”)
- Edge cases are handled appropriately
✅ Context Accuracy
✅ Context Accuracy
- Company information is correct
- Policies are accurate
- Product details are up-to-date
- Contact information is current
✅ User Experience
✅ User Experience
- Conversations feel natural
- Users get helpful responses
- Tone is appropriate
- Problems are solved effectively
Common Mistakes to Avoid
❌ Too Generic
❌ Too Generic
Bad:Why it fails:
- No unique personality
- No specific knowledge
- No actionable guidelines
- Could be any chatbot
❌ Too Restrictive
❌ Too Restrictive
Bad:Why it fails:
- Users ask in different ways
- Blocks natural conversation
- Frustrating user experience
- Misses opportunities to help
❌ Contradictory Instructions
❌ Contradictory Instructions
Bad:Why it fails:
- Conflicting directives confuse the AI
- Inconsistent responses
- Unpredictable behavior
❌ No Personality
❌ No Personality
Bad:Why it fails:
- Robotic and cold
- No human connection
- Forgettable experience
❌ Outdated Information
❌ Outdated Information
Bad:Why it fails:
- Gives wrong information
- Undermines trust
- Creates customer frustration
Next Steps
Test Your Persona
Use
lua chat to test persona in sandboxEnvironment Variables
Configure API keys and settings
Development Workflows
See persona in complete workflows
Skill Management
Deploy skills that persona uses

