Production-ready AI agent examples showcasing the Lua Platform capabilities
This repository contains 4 complete, production-ready demo applications built with Lua CLI v3.10.0. Each demo showcases different platform features and real-world use cases.
Agent: Mira
Use Case: Complete online shopping experience
Features:
- Product search and catalog browsing
- Shopping cart management
- Checkout and order processing
- Order tracking
APIs Used: Lua Platform APIs (Products, Baskets, Orders)
Perfect for: E-commerce stores, online retailers, product catalogs
Agent: Alex
Use Case: Automated customer support with ticketing
Features:
- Knowledge base search (vector similarity)
- Zendesk ticket creation and management
- Ticket status tracking
- Webhooks for real-time ticket updates
- Scheduled jobs for daily follow-ups
APIs Used: Zendesk API + Lua Data API (vector search)
Perfect for: Support teams, helpdesks, customer service automation
Agent: Financial Onboarding Specialist
Use Case: KYC-compliant account opening
Features:
- Multi-step onboarding journey
- Identity verification (Stripe Identity)
- Document upload and verification
- Risk assessment and suitability scoring
- Webhooks for verification events
- PreProcessors for validation
- PostProcessors for compliance disclaimers
APIs Used: Stripe Identity API + Lua Data API
Perfect for: Banks, fintech, financial services, regulated industries
4. 🏨 Hotel Booking Agent
Agent: Hotel Concierge
Use Case: Hotel reservations and guest services
Features:
- Room availability checking
- Reservation creation and management
- Booking modifications and cancellations
- Room service requests
- Confirmation code system
APIs Used: Lua Data API
Perfect for: Hotels, vacation rentals, hospitality services
# Install Lua CLI globally
npm install -g lua-cli
# Or use npx
npx lua-cli --version# 1. Navigate to any demo
cd lua-shopping-assistant
# 2. Install dependencies
npm install
# 3. Test tools interactively
lua test
# 4. Start development mode (chat interface)
lua dev
# 5. Push to server
lua push
# 6. Deploy to production
lua deployAll demos have been updated to use the latest Lua CLI v3.0.0 patterns:
export const agent = new LuaAgent({
name: "agent-name",
persona: `Detailed personality and behavior guidelines...`,
skills: [mySkill],
webhooks: [myWebhook], // NEW in v3.0.0
jobs: [myScheduledJob], // NEW in v3.0.0
preProcessors: [validator], // NEW in v3.0.0
postProcessors: [formatter] // NEW in v3.0.0
});React to external events in real-time:
const webhook = new LuaWebhook({
name: 'zendesk-webhook',
execute: async (event) => {
// Handle external events
await User.send([{ type: 'text', text: 'Event received!' }]);
}
});Automate recurring tasks:
const job = new LuaJob({
name: 'daily-followup',
schedule: { type: 'cron', pattern: '0 10 * * *' },
execute: async (job) => {
// Run daily at 10 AM
}
});Process messages before/after AI handling:
const preProcessor = new PreProcessor({
execute: async (message, user) => {
// Validate before processing
return { block: false };
}
});
const postProcessor = new PostProcessor({
execute: async (user, message, response, channel) => {
// Add disclaimers, format output
return { modifiedResponse: response + "\n\nDisclaimer..." };
}
});| Feature | Shopping | Support | Financial | Hotel |
|---|---|---|---|---|
| Platform APIs | ✅ Products, Baskets, Orders | ✅ Data (vector) | ✅ Data | ✅ Data |
| External APIs | ❌ | ✅ Zendesk | ✅ Stripe Identity | ❌ |
| Webhooks | ❌ | ✅ Ticket updates | ✅ Verification | ❌ |
| Scheduled Jobs | ❌ | ✅ Daily follow-ups | ❌ | ❌ |
| PreProcessors | ❌ | ❌ | ✅ Validation | ❌ |
| PostProcessors | ❌ | ❌ | ✅ Disclaimers | ❌ |
| Vector Search | ❌ | ✅ Knowledge base | ❌ | ❌ |
| Multi-Step Flow | ✅ Cart → Checkout | ❌ | ✅ 7-step onboarding | ✅ Book → Confirm |
| Complexity | Basic | Intermediate | Advanced | Basic |
All demos use:
- TypeScript - Full type safety
- Zod - Schema validation
- Lua CLI 3.6.6 - Latest version
- Node.js - Runtime environment
Additional integrations:
- Zendesk API (Customer Support)
- Stripe Identity API (Financial Services)
- OpenAI (Embeddings for vector search)
- Pinecone (Vector database)
- Hotel Booking Agent - Simplest demo, basic CRUD operations
- Shopping Assistant - Platform APIs, multi-tool workflows
- Customer Support - External APIs, webhooks, scheduled jobs, vector search
- Financial Services - Complex multi-step flows, compliance, pre/post processors
Each demo is designed to be easily customized:
Deploy directly for quick prototyping
- Change tool descriptions
- Update data schemas
- Adjust persona and behavior
- Add/remove tools
Combine tools from different demos:
import { SearchProductsTool } from '../lua-shopping-assistant/tools/EcommerceTool';
import { SearchKnowledgeBaseTool } from '../lua-customer-support/tools/SupportTools';
const hybridSkill = new LuaSkill({
tools: [
new SearchProductsTool(),
new SearchKnowledgeBaseTool()
]
});lua-dev-examples/
├── lua-shopping-assistant/ # E-commerce demo
│ ├── src/
│ │ ├── index.ts # Agent configuration
│ │ └── tools/
│ │ └── EcommerceTool.ts # 7 shopping tools
│ ├── lua.skill.yaml
│ ├── package.json
│ └── README.md
│
├── lua-customer-support/ # Support automation demo
│ ├── src/
│ │ ├── index.ts # Agent with webhooks & jobs
│ │ └── tools/
│ │ └── SupportTools.ts # 4 support tools
│ ├── lua.skill.yaml
│ └── README.md
│
├── lua-financial-services/ # KYC onboarding demo
│ ├── src/
│ │ ├── index.ts # Agent with pre/post processors
│ │ └── tools/
│ │ └── FinancialOnboardingTools.ts # 7 onboarding tools
│ ├── lua.skill.yaml
│ └── README.md
│
├── lua-hotel-agent/ # Hotel booking demo
│ ├── src/
│ │ ├── index.ts # Simple agent configuration
│ │ └── tools/
│ │ └── HotelTool.ts # 5 hotel tools
│ ├── lua.skill.yaml
│ └── README.md
│
└── README.md # This file
Each demo includes comprehensive testing:
cd lua-shopping-assistant
lua testTest each tool individually with interactive prompts.
lua devOpens browser-based chat interface at http://localhost:3000
lua push # Deploy to staging
# Test in production environment
lua deploy # Promote to productionSome demos require API keys. Create a .env file:
ZENDESK_API_KEY=your_zendesk_key
ZENDESK_SUBDOMAIN=your_company
ZENDESK_EMAIL=support@yourcompany.comSTRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
BANKING_API_KEY=your_banking_api_keySecurity Note: Never commit .env files to version control. All demos include .env in .gitignore.
| Industry | Recommended Demo | Why |
|---|---|---|
| E-commerce | Shopping Assistant | Product catalog, cart, checkout flow |
| SaaS | Customer Support | Knowledge base, ticketing, automation |
| Banking | Financial Services | KYC compliance, identity verification |
| Hospitality | Hotel Agent | Reservations, bookings, guest services |
| Healthcare | Financial Services | Patient onboarding, compliance |
| Insurance | Financial Services | Policy application, risk assessment |
| Real Estate | Hotel Agent | Property viewing, bookings |
| Education | Customer Support | Student support, FAQ automation |
- Products API - Catalog management
- Baskets API - Shopping cart operations
- Orders API - Order processing
- Data API - Custom data with vector search
- User API - User management
- REST APIs - Zendesk, Stripe Identity
- Webhooks - Real-time event handling
- Authentication - API key management
- Error Handling - Graceful degradation
- Multi-step workflows - Guided journeys
- State management - Application tracking
- Vector search - Semantic similarity
- Scheduled automation - Cron jobs
- Message processing - Pre/post processors
- Type safety - Full TypeScript
- Schema validation - Zod schemas
- Error handling - Try/catch patterns
- Security - Environment variables
- Documentation - Comprehensive READMEs
Begin with Hotel or Shopping demos, then progress to more complex ones.
Use lua test and lua dev extensively before deploying.
Make small changes, test frequently, iterate.
All tools are well-commented and production-ready. Learn by reading!
For any searchable content (FAQs, docs, products), use Data.search().
All demos show proper error handling patterns.
lua dev # Local development with hot reloadlua push # Deploy to staging environmentlua deploy # Promote to productionCheck your Lua Platform dashboard for:
- Agent analytics
- Tool usage statistics
- Error logs
- User conversations
- GitHub Issues: Report bugs or request features
- Email: support@lua.ai
- Community: Discord Server
- Getting Started with Lua Platform
- Building Your First Agent
- Advanced Patterns & Best Practices
Found a bug? Have an improvement? Contributions are welcome!
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
All demos are provided as examples for learning and customization. Modify freely for your use case.
Choose a demo that matches your use case:
# E-commerce
cd lua-shopping-assistant && lua dev
# Customer Support
cd lua-customer-support && lua dev
# Financial Services
cd lua-financial-services && lua dev
# Hotel Booking
cd lua-hotel-agent && lua devBuild something amazing with Lua Platform! 🚀
Questions? Check the individual demo READMEs or visit docs.heylua.ai
