Overview
Thelua chat command provides an interactive command-line interface for conversing with your Lua AI agent in both sandbox and production environments.
Want to test on real channels? You can also test your agent on WhatsApp, Facebook, Instagram, Email, and Slack without setting up your own channels. See Quick Testing Channels for instant testing on any platform.
Features
Sandbox Mode
Test with local skill overrides and persona customizations
Production Mode
Chat with your live production agent
Interactive Loop
Continuous conversation until exit
Multi-Skill Support
All skills automatically included in sandbox
Prerequisites
1
Configure API Key
2
Initialize Project
lua.skill.yaml exists3
Deploy Skills
How It Works
1
Authentication
2
Environment Selection
3
Sandbox Setup (if Sandbox)
4
Chat Interface
Sandbox vs Production
- Sandbox Mode
- Production Mode
For Development & TestingFeatures:
- ✅ Local skill overrides
- ✅ Persona customization
- ✅ Environment variables from
.env - ✅ Test before deploying
- Developing new features
- Testing skill changes
- Iterating on persona
- Before pushing to production
Example Session
Sandbox Mode
Persona Override
Configuration
Inlua.skill.yaml:
- Persona is automatically loaded and sent with each request
- Test different persona variations
- Iterate quickly
- Uses production persona (from server)
- No local override
Skill Override
How It Works
Sandbox mode automatically:- Compiles all skills in your project
- Pushes to sandbox environment
- Gets sandbox IDs for each skill
- Includes all sandbox IDs in chat requests
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Enter | Send message |
Ctrl+C | Exit chat |
Ctrl+D | Exit chat (alternative) |
Best Practices
Development Workflow
Development Workflow
- Make changes to your skills
- Run
lua chatin sandbox mode - Test changes interactively
- Iterate until satisfied
- Run
lua pushto deploy - Test again in production mode
- Deploy with
lua deploy
Testing Strategy
Testing Strategy
Start with sandbox:
- Test happy paths
- Test error cases
- Test edge cases
- Test multi-step flows
- Verify deployed changes work
- Test with production data
- Confirm no regressions
Persona Iteration
Persona Iteration
- Update
personain yourLuaAgentcode (src/index.ts) - Run
lua chatin sandbox - Test conversation style
- Refine persona
- Repeat until satisfied
- Deploy to production with
lua push persona
Troubleshooting
No API key found
No API key found
Error:Solution:
Configuration file missing
Configuration file missing
Error:Solution:
Compilation failed
Compilation failed
Error:Solution:
- Fix TypeScript errors in your code
- Check
src/index.tsfor syntax errors - Verify all imports are correct
Skills not in sandbox
Skills not in sandbox
Error:Solution:
Slow responses
Slow responses
Issue: Long wait times in sandboxCauses:
- First request after compilation
- Large skill bundles
- Network latency
Persona not working
Persona not working
Issue: Persona override not being appliedCheck:
- Using sandbox mode (not production)
agent.personaexists inlua.skill.yaml- Persona is properly formatted YAML
Related Commands
lua test
Test individual tools with specific inputs
lua push
Deploy skills to server
lua deploy
Publish version to production
lua compile
Compile TypeScript code

