Skip to main content

Overview

Lua CLI provides built-in APIs for common operations, so you don’t have to build everything from scratch.

Agents

Invoke another agent through the full chat pipeline

User

Per-user persistent storage for state, preferences, and workflow data

Data

Custom data with vector search

CDN

File upload and retrieval

Products

E-commerce product catalog

Baskets

Shopping cart management

Orders

Order processing

Templates

Template messaging (WhatsApp)

Channels

Send outbound messages on any connected channel

Agents API

Agent-to-agent invocation β€” call a target agent through its full processing pipeline (billing, persistence, skills, preprocessors, postprocessors) from any sandbox code.

Use Cases

Full API Reference

Complete Agents API documentation

User API

Persistent per-user storage that survives across conversations and sessions. Store any data β€” onboarding state, workflow progress, preferences, cart contents, verification results β€” as direct properties on the user object.

Example: Stateful Onboarding Tool

Full API Reference

Complete User API documentation

Data API

Store and retrieve custom data with semantic search capabilities.

Key Features

  • πŸ—„οΈ Custom Collections: Store any JSON data
  • πŸ” Vector Search: Semantic similarity search
  • πŸ“Š Filtering: Query by field values
  • πŸ“„ Pagination: Handle large datasets

Quick Example

Use Cases

Full API Reference

Complete Data API documentation

CDN API

Upload and retrieve files from the Lua CDN.

Key Features

  • πŸ“€ Upload Files: Store any file type
  • πŸ“₯ Retrieve Files: Get files by ID
  • πŸ–ΌοΈ Image Optimization: Automatic WebP compression
  • πŸ€– AI Integration: Use with AI for image analysis

Quick Example

Use Cases

Full API Reference

Complete CDN API documentation

Products API

Manage e-commerce product catalog.

Full API Reference

Complete Products API documentation

Baskets API

Shopping cart management for e-commerce.

Basket Statuses

Currently being used for shopping

Full API Reference

Complete Baskets API documentation

Orders API

Order creation and management.

Order Statuses

1

PENDING

Created, not yet confirmed
2

CONFIRMED

Confirmed, being processed
3

FULFILLED

Completed and delivered
4

CANCELLED

Cancelled by user or system

Full API Reference

Complete Orders API documentation

Templates API

Send template messages across different channels. Currently supports WhatsApp templates.

Use Cases

  • πŸ“¦ Order notifications - Shipping updates, delivery confirmations
  • πŸ“… Appointment reminders - Healthcare, salon, service bookings
  • πŸŽ‰ Marketing campaigns - Promotions, announcements
  • πŸ” Authentication - OTP codes, verification messages

Full API Reference

Complete Templates API documentation

Channels API

Send outbound messages on any channel your agent is connected to β€” WhatsApp, SMS, email, web chat, and more β€” from a tool, job, webhook, or trigger. Each send is recorded to the recipient’s conversation thread so your agent stays coherent across replies.

Use Cases

  • πŸ”” Proactive notifications β€” order updates, reminders, follow-ups
  • ⏰ Scheduled outreach β€” pair with Jobs for time-based sends
  • βœ… Event confirmations β€” send from a webhook the moment something happens

Full API Reference

Complete Channels API documentation

Combining APIs

Most real-world applications combine multiple APIs:

E-commerce Flow Example

CRM with Custom Data Example

API Comparison

Next Steps

API Reference

Complete API documentation with examples

Tool Examples

See working examples using all APIs

Build Your First Skill

Step-by-step tutorial

Environment Variables

Learn about configuration management