> ## 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.

# Demo Gallery

> 15 production-ready solutions showcasing Lua's flexibility across business and IoT

## Overview

Explore 15 complete, production-ready AI agent implementations across different industries and IoT use cases. Each demo shows full TypeScript code using the **LuaAgent pattern** with external APIs, Lua Platform APIs, and edge computing.

<Note>
  Every demo now uses `LuaAgent` for unified configuration, showing how to combine skills, webhooks, jobs, and processors in real-world applications.
</Note>

<CardGroup cols={2}>
  <Card title="Customer-Facing" icon="users">
    6 demos for end-user interactions
  </Card>

  <Card title="Internal Operations" icon="building">
    5 demos for business operations
  </Card>

  <Card title="IoT & Edge Computing" icon="microchip">
    4 demos for Raspberry Pi and hardware control
  </Card>

  <Card title="Advanced Features" icon="sparkles">
    All demos use LuaAgent pattern with webhooks, jobs, and processors where applicable
  </Card>

  <Card title="External APIs" icon="cloud">
    Stripe, Zendesk, Plaid, UPS, MLS, BambooHR, and more
  </Card>

  <Card title="Platform APIs" icon="database">
    Products, Baskets, Orders, Data (vector search), Jobs, Templates
  </Card>

  <Card title="Edge APIs" icon="server">
    Custom Flask APIs on Raspberry Pi for GPIO, sensors, and camera
  </Card>

  <Card title="Production-Ready" icon="rocket">
    Complete code with error handling, validation, and best practices
  </Card>
</CardGroup>

## Advanced Features in Demos

See real-world usage of advanced features across different demos:

<Tabs>
  <Tab title="LuaAgent">
    **Used in: ALL demos**

    Every demo shows proper agent configuration:

    ```typescript theme={null}
    export const agent = new LuaAgent({
      name: "demo-agent",
      persona: "...",
      skills: [...],
      webhooks: [...],
      jobs: [...]
    });
    ```
  </Tab>

  <Tab title="Webhooks">
    **Used in: E-commerce, Customer Support, Financial Onboarding**

    Real webhook integrations:

    * Stripe payment events
    * Shopify order notifications
    * Zendesk ticket updates
  </Tab>

  <Tab title="Jobs">
    **Used in: HR, Finance Ops, Customer Support**

    Scheduled automation:

    * Daily reports
    * Abandoned cart reminders
    * Follow-up messages
    * Data cleanup
  </Tab>

  <Tab title="PreProcessors">
    **Used in: Healthcare, Financial Services**

    Message filtering:

    * Verify patient consent
    * Validate financial information
    * Route by urgency
  </Tab>

  <Tab title="PostProcessors">
    **Used in: Healthcare, Financial Services, Legal**

    Response formatting:

    * Medical disclaimers
    * Financial warnings
    * Compliance footers
  </Tab>
</Tabs>

## Customer-Facing Agents

### 1. E-commerce Shopping Assistant

<Card title="E-commerce Assistant" icon="cart-shopping" href="/demos/ecommerce-assistant">
  **Complete shopping experience using Lua Platform APIs**

  **Features:** Product search, cart management, checkout, order tracking

  **APIs:** Products, Baskets, Orders (Lua Platform)

  **Use case:** Online stores, marketplaces
</Card>

### 2. Customer Support Agent

<Card title="Customer Support" icon="headset" href="/demos/customer-support">
  **Support automation with Zendesk + knowledge base**

  **Features:** Knowledge base search, ticket creation, status tracking

  **APIs:** Zendesk API (external) + Lua Data (vector search)

  **Use case:** Help desks, customer service teams
</Card>

### 3. Financial Services Onboarding

<Card title="Financial Onboarding" icon="building-columns" href="/demos/financial-onboarding">
  **KYC onboarding with document verification**

  **Features:** Document upload, identity verification, qualifying questions, account creation

  **APIs:** Stripe Identity API (external) + Lua Data (applications)

  **Use case:** Banks, fintech, investment platforms
</Card>

### 4. Hotel Booking Agent

<Card title="Hotel Booking" icon="hotel" href="/demos/hotel-booking">
  **Reservation management with availability checking**

  **Features:** Room search, bookings, cancellations, room service

  **APIs:** Lua Data API (rooms, reservations)

  **Use case:** Hotels, resorts, vacation rentals
</Card>

### 4. Restaurant Ordering System

<Card title="Restaurant Ordering" icon="utensils" href="/demos/restaurant-ordering">
  **Food ordering and table reservations**

  **Features:** Menu browsing, order placement, reservations

  **APIs:** Lua Products API (menu) + Data API (orders)

  **Use case:** Restaurants, cafes, food services
</Card>

### 5. Real Estate Assistant

<Card title="Real Estate" icon="house" href="/demos/real-estate-assistant">
  **Property search with MLS integration**

  **Features:** Property search, viewings, favorites, comparisons

  **APIs:** MLS API (external) + Lua Data (cache, favorites)

  **Use case:** Real estate agencies, property management
</Card>

## Internal-Facing Agents

### 8. HR Operations Assistant

<Card title="HR Assistant" icon="user-tie" href="/demos/hr-assistant">
  **Employee management with BambooHR integration**

  **Features:** Employee lookup, time off requests, policy search

  **APIs:** BambooHR API (external) + Lua Data (policies)

  **Use case:** HR departments, employee self-service
</Card>

### 9. Finance Operations Agent

<Card title="Finance Operations" icon="building-columns" href="/demos/finance-operations">
  **Banking operations with Plaid integration**

  **Features:** Account balances, transactions, transfers

  **APIs:** Plaid API (external banking)

  **Use case:** Finance teams, accounting, treasury
</Card>

### 10. SaaS Onboarding Assistant

<Card title="SaaS Onboarding" icon="graduation-cap" href="/demos/saas-onboarding">
  **User onboarding with product API integration**

  **Features:** Account creation, documentation search, usage tracking

  **APIs:** Your SaaS API (external) + Lua Data (docs)

  **Use case:** SaaS products, internal tools
</Card>

### 11. Healthcare Patient Portal

<Card title="Healthcare Portal" icon="hospital" href="/demos/healthcare-portal">
  **Patient services with EMR integration**

  **Features:** Appointments, medical records, prescriptions

  **APIs:** EMR/FHIR API (external) + Lua Data (health info)

  **Use case:** Healthcare providers, patient portals
</Card>

### 12. Logistics & Shipping Tracker

<Card title="Logistics Tracker" icon="truck" href="/demos/logistics-tracker">
  **Multi-carrier package tracking**

  **Features:** Track packages (UPS, FedEx, USPS), rate comparison

  **APIs:** UPS, FedEx, USPS APIs (all external)

  **Use case:** Logistics, shipping, warehouse operations
</Card>

## IoT & Edge Computing Agents

Control physical hardware and sensors on **Raspberry Pi** through natural language. All demos use a lightweight Flask Edge API running on the Pi.

### 13. Smart Light / GPIO Control

<Card title="Smart Light Control" icon="lightbulb" href="/demos/iot-smart-light">
  **Control GPIO relays and LEDs via chat**

  **Features:** Turn devices on/off, scheduled automation, safe GPIO control

  **Hardware:** Raspberry Pi + relay module + gpiozero

  **Use case:** Home automation, smart lighting, device control
</Card>

### 14. Greenhouse Climate Monitor

<Card title="Greenhouse Climate" icon="cloud" href="/demos/iot-greenhouse">
  **Monitor temperature, humidity, and pressure with BME280**

  **Features:** Real-time readings, automated alerts, historical tracking

  **Hardware:** Raspberry Pi + BME280 sensor (I²C)

  **Use case:** Greenhouses, server rooms, environmental monitoring
</Card>

### 15. Security Camera Snapshot

<Card title="Security Camera" icon="camera" href="/demos/iot-camera">
  **Capture photos on-demand with Pi Camera**

  **Features:** On-demand capture, scheduled snapshots, motion-triggered photos

  **Hardware:** Raspberry Pi + Camera Module 3/HQ + rpicam-still

  **Use case:** Security monitoring, time-lapse, remote observation
</Card>

### 16. Door Access Control

<Card title="Door Assistant" icon="door-open" href="/demos/iot-door-assistant">
  **WhatsApp-controlled door locks for hotels and apartments**

  **Features:** Guest access verification, time-window control, audit logging, WhatsApp integration

  **Hardware:** Raspberry Pi + relay + 12V electric strike/maglock

  **Use case:** Hotels, apartments, coworking spaces, vacation rentals
</Card>

## API Integration Breakdown

### External APIs Used

| Demo             | External APIs    | Purpose                      |
| ---------------- | ---------------- | ---------------------------- |
| Customer Support | Zendesk          | Ticket management            |
| Real Estate      | MLS              | Property listings            |
| HR Assistant     | BambooHR         | Employee data                |
| Finance          | Plaid            | Banking operations           |
| SaaS Onboarding  | Your API         | Product integration          |
| Healthcare       | EMR/FHIR         | Medical records              |
| Logistics        | UPS/FedEx/USPS   | Shipping tracking            |
| Smart Light      | Edge API (Flask) | GPIO relay control           |
| Greenhouse       | Edge API (Flask) | BME280 sensor readings       |
| Camera           | Edge API (Flask) | Photo capture (rpicam-still) |
| Door Assistant   | Edge API (Flask) | GPIO relay + access control  |

### Lua Platform APIs Used

| Demo             | Platform APIs             | Purpose                           |
| ---------------- | ------------------------- | --------------------------------- |
| E-commerce       | Products, Baskets, Orders | Shopping workflow                 |
| Customer Support | Data                      | Knowledge base search             |
| Hotel Booking    | Data                      | Reservations, rooms               |
| Restaurant       | Products, Data            | Menu, orders                      |
| Real Estate      | Data                      | Property cache, favorites         |
| HR Assistant     | Data                      | Policy search                     |
| SaaS Onboarding  | Data                      | Documentation search              |
| Healthcare       | Data                      | Health information                |
| Greenhouse       | Data                      | Climate history tracking          |
| Camera           | Data                      | Photo metadata logging            |
| Door Assistant   | Data                      | Guest access control + audit logs |

### Edge APIs Used

|| Demo | Edge Technology | Hardware |
\|------|-----------------|----------|
\| Smart Light | Flask + gpiozero | Raspberry Pi + relay module |
\| Greenhouse | Flask + BME280 library | Raspberry Pi + BME280 (I²C) |
\| Camera | Flask + rpicam-still | Raspberry Pi + Camera Module 3/HQ |
\| Door Assistant | Flask + gpiozero | Raspberry Pi + relay + electric strike |

## Integration Patterns Demonstrated

<Tabs>
  <Tab title="Pure External">
    **Finance, Logistics**

    100% external API integration

    * Plaid for banking
    * UPS/FedEx for shipping

    Shows: Complete custom integration
  </Tab>

  <Tab title="Pure Platform">
    **E-commerce, Hotel, Restaurant**

    Uses Lua Platform APIs

    * Products for catalogs
    * Baskets for carts
    * Data for storage

    Shows: Quick development with Platform APIs
  </Tab>

  <Tab title="Hybrid">
    **Support, Real Estate, HR, SaaS, Healthcare**

    Mix of both

    * External for core business logic
    * Platform for enhanced features

    Shows: Best of both worlds
  </Tab>

  <Tab title="Edge Computing">
    **IoT Smart Light, Greenhouse, Camera, Door Assistant**

    Custom Edge APIs on Raspberry Pi

    * Flask APIs for GPIO, sensors, camera, access control
    * Local network communication
    * Hardware control via chat and WhatsApp
    * Security and audit logging

    Shows: Physical world integration with AI agents and secure access control
  </Tab>
</Tabs>

## Learning Paths by Feature

Choose demos based on what advanced features you want to learn:

<AccordionGroup>
  <Accordion title="🤖 Learn LuaAgent (ALL Demos)">
    **Every demo shows the LuaAgent pattern**

    * How to configure agent with persona
    * Adding skills to agent
    * Welcome message best practices
    * Complete agent structure

    **Start with:** E-commerce (simplest) or Customer Support (comprehensive)
  </Accordion>

  <Accordion title="🪝 Learn Webhooks">
    **Demos with webhook integration:**

    * **E-commerce Assistant** - Stripe payment webhooks
    * **Customer Support** - Zendesk ticket webhooks
    * **Financial Onboarding** - Identity verification webhooks
    * **Camera (IoT)** - Motion-triggered captures

    **Learn:** HTTP event handling, signature verification, real-time updates, hardware triggers
  </Accordion>

  <Accordion title="⏰ Learn Jobs & Automation">
    **Demos with scheduled tasks:**

    * **HR Assistant** - Daily attendance reports
    * **Finance Operations** - Weekly reconciliation
    * **Customer Support** - Follow-up reminders
    * **Smart Light (IoT)** - Automated on/off schedules
    * **Greenhouse (IoT)** - Hourly climate monitoring
    * **Camera (IoT)** - Daily snapshots

    **Learn:** Cron patterns, scheduled notifications, automated reports, hardware automation
  </Accordion>

  <Accordion title="🔍 Learn PreProcessors">
    **Demos with message filtering:**

    * **Healthcare Portal** - Patient consent verification
    * **Financial Onboarding** - Information validation
    * **Customer Support** - Business hours filtering
    * **Door Assistant (IoT)** - Rate limiting for security

    **Learn:** Content filtering, routing, validation, rate limiting, security patterns
  </Accordion>

  <Accordion title="✨ Learn PostProcessors">
    **Demos with response formatting:**

    * **Healthcare Portal** - Medical disclaimers
    * **Financial Onboarding** - Compliance footers
    * **Customer Support** - Branding and signatures

    **Learn:** Adding disclaimers, branding, formatting, personalization
  </Accordion>

  <Accordion title="🔌 Learn Edge Computing & IoT">
    **Demos with hardware integration:**

    * **Smart Light** - GPIO control with relays and LEDs
    * **Greenhouse** - I²C sensor reading (BME280)
    * **Camera** - Photo capture with rpicam-still
    * **Door Assistant** - WhatsApp access control with time-window validation

    **Learn:** Edge APIs, Flask on Pi, gpiozero, hardware control via chat, WhatsApp integration, access control, security patterns
  </Accordion>
</AccordionGroup>

## Code Complexity Levels

<AccordionGroup>
  <Accordion title="⭐ Beginner (3 demos)">
    * **E-commerce**: Platform APIs only
    * **Hotel Booking**: Lua Data API
    * **Restaurant**: Products + Data

    Great for learning Platform APIs and basic LuaAgent configuration
  </Accordion>

  <Accordion title="⭐⭐ Intermediate (8 demos)">
    * **Customer Support**: Zendesk + vector search + webhooks + jobs
    * **Real Estate**: MLS + Lua Data
    * **HR Assistant**: BambooHR + Lua Data + jobs
    * **SaaS Onboarding**: Your API + Lua Data
    * **Smart Light (IoT)**: Edge API + GPIO control + jobs
    * **Greenhouse (IoT)**: Edge API + I²C sensors + jobs
    * **Camera (IoT)**: Edge API + rpicam-still + jobs + webhooks
    * **Door Assistant (IoT)**: Edge API + WhatsApp + access control + preprocessors

    Shows hybrid integration patterns with advanced features and hardware control
  </Accordion>

  <Accordion title="⭐⭐⭐ Advanced (4 demos)">
    * **Finance**: Plaid banking integration + jobs
    * **Healthcare**: FHIR-compliant EMR + pre/post processors
    * **Logistics**: Multi-carrier APIs
    * **Financial Onboarding**: Stripe Identity + webhooks + processors

    Complex external integrations with full advanced feature usage
  </Accordion>
</AccordionGroup>

<CardGroup cols={2}>
  <Card title="LuaAgent" icon="robot">
    **Every demo shows:**

    * Proper agent configuration
    * Persona best practices
    * Welcome message patterns
    * Skill organization
  </Card>

  <Card title="API Integration" icon="plug">
    **You'll see how to:**

    * Call external APIs (Stripe, Zendesk, etc.)
    * Use Platform APIs (Products, Data, etc.)
    * Mix both approaches
    * Handle authentication
  </Card>

  <Card title="Advanced Features" icon="sparkles">
    **Selected demos show:**

    * Webhooks for external events
    * Jobs for scheduled tasks
    * PreProcessors for validation
    * PostProcessors for compliance
  </Card>

  <Card title="Production Patterns" icon="shield">
    **Best practices:**

    * Error handling
    * Input validation
    * Security patterns
    * Testing strategies
  </Card>
</CardGroup>

## Quick Start with Demos

<Steps>
  <Step title="Choose a Demo">
    Pick one that matches your industry or use case
  </Step>

  <Step title="Copy the Code">
    All code is production-ready and copy-paste friendly
  </Step>

  <Step title="Set Environment Variables">
    Add required API keys to `.env` file
  </Step>

  <Step title="Test Locally">
    ```bash theme={null}
    lua chat  # Primary testing
    lua test  # Optional: Specific tools
    ```
  </Step>

  <Step title="Customize">
    Modify for your specific needs
  </Step>

  <Step title="Deploy">
    ```bash theme={null}
    lua push && lua deploy
    ```
  </Step>
</Steps>

## All Demos at a Glance

| Demo                 | Type     | External APIs               | Platform APIs             | Complexity |
| -------------------- | -------- | --------------------------- | ------------------------- | ---------- |
| E-commerce           | Customer | None                        | Products, Baskets, Orders | ⭐          |
| Support              | Customer | Zendesk                     | Data                      | ⭐⭐         |
| Financial Onboarding | Customer | Stripe Identity             | Data                      | ⭐⭐⭐        |
| Hotel                | Customer | None                        | Data                      | ⭐          |
| Restaurant           | Customer | None                        | Products, Data            | ⭐          |
| Real Estate          | Customer | MLS                         | Data                      | ⭐⭐         |
| HR                   | Internal | BambooHR                    | Data                      | ⭐⭐         |
| Finance Ops          | Internal | Plaid                       | None                      | ⭐⭐⭐        |
| SaaS                 | Internal | Your API                    | Data                      | ⭐⭐         |
| Healthcare           | Internal | EMR/FHIR                    | Data                      | ⭐⭐⭐        |
| Logistics            | Internal | UPS/FedEx/USPS              | None                      | ⭐⭐⭐        |
| Smart Light          | IoT      | Edge API (Flask)            | None                      | ⭐⭐         |
| Greenhouse           | IoT      | Edge API (Flask)            | Data                      | ⭐⭐         |
| Camera               | IoT      | Edge API (Flask)            | Data                      | ⭐⭐         |
| Door Assistant       | IoT      | Edge API (Flask) + WhatsApp | Data                      | ⭐⭐         |

## Learn Concepts Through Demos

See Key Concepts in action within real-world demos:

<CardGroup cols={2}>
  <Card title="Agent Concept" icon="robot" href="/overview/agent">
    **See in:** ALL demos

    Every demo shows LuaAgent configuration
  </Card>

  <Card title="Skills & Tools" icon="puzzle-piece" href="/overview/skill">
    **See in:** ALL demos

    How to organize tools into skills
  </Card>

  <Card title="Webhooks" icon="webhook" href="/overview/webhooks">
    **See in:** E-commerce, Support, Financial

    Real external event handling
  </Card>

  <Card title="Jobs" icon="clock" href="/overview/jobs">
    **See in:** HR, Finance, Support

    Scheduled automation examples
  </Card>

  <Card title="PreProcessors" icon="filter" href="/overview/preprocessors">
    **See in:** Healthcare, Financial

    Message validation and filtering
  </Card>

  <Card title="PostProcessors" icon="paper-plane" href="/overview/postprocessors">
    **See in:** Healthcare, Financial, Support

    Response formatting and disclaimers
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Start with E-commerce" icon="cart-shopping" href="/demos/ecommerce-assistant">
    Easiest demo - Platform APIs only with LuaAgent
  </Card>

  <Card title="Try Customer Support" icon="headset" href="/demos/customer-support">
    Comprehensive demo with webhooks + jobs
  </Card>

  <Card title="Explore Key Concepts" icon="book-open" href="/overview/agent">
    Learn lua-cli concepts before diving into demos
  </Card>

  <Card title="Quick Start Guide" icon="rocket" href="/getting-started/quick-start">
    Set up your development environment
  </Card>

  <Card title="API Reference" icon="book" href="/api/overview">
    Complete API documentation
  </Card>

  <Card title="Build Your Own" icon="hammer" href="/getting-started/first-skill">
    Follow the first skill tutorial
  </Card>
</CardGroup>
