Loading ZabSys Cloud…

New Business software, email, SMS and AI built for growing companies, with support by a real team

Add Lily to your website or app

One line for the chat button, and full API clients when you want to build more.

Quick start User manual Lily plans

Overview

One line puts a chat button on every screen. Press it and the full chat opens in a web view, and everything (replies, photos, voice notes, products and orders) is handled by Lily itself. Your app never sends or receives messages, and the look is set in your Lily panel.

How it works

  1. Your app or siteOne line adds a button on every screen
  2. Web viewThe button opens Lily's own chat page
  3. Lily panelReplies, team inbox, colour and title

Only a public key

You use your public site key (lily_...), shown under Sites & Embed. It is safe inside pages and published apps.

Look set in the panel

Colour, title, side of the screen and button label are read from your panel each time the chat opens. Change them once and every site and app follows, with no new release.

Replies handled by the chat

The web view is the real chat, so team replies, AI answers, photos, voice notes, product cards and orders just work. The SDK does not send messages itself.

Keys and setup

The two kinds of key
KeyLooks likeWhere it can be used
Public site keylily_...Web pages and published apps. This is all the chat button needs.
Secret API keylily_sk_...Your own server only. Never put it in a web page or a downloadable app.

In the examples, replace lily_YOUR_SITE_KEY with your site key and https://YOUR_LILY_ADDRESS with the address of your Lily. Use https on live sites. Voice recording needs https.

The packages are not on public registries yet. Install them from the SDK files we send with your Lily account.

Quick start

Add one line and your website or app gets a small chat button on every screen. Choose your platform.

JavaScript · index.html
<!-- Script tag: nothing else to set, the look comes from your portal -->
<script src="https://YOUR_LILY_ADDRESS/sdk/lily-launcher.js"
  data-site-key="lily_YOUR_SITE_KEY"></script>

// Or from code
import { LilyAssistant } from 'lily-assistant-sdk';
LilyAssistant.init('lily_YOUR_SITE_KEY', { baseUrl: 'https://YOUR_LILY_ADDRESS' });
React · App.tsx
import { LilyAssistantButton } from 'lily-assistant-react';

export default function App() {
  return (
    <>
      <YourApp />
      <LilyAssistantButton siteKey="lily_YOUR_SITE_KEY" baseUrl="https://YOUR_LILY_ADDRESS" />
    </>
  );
}
Python · views.py
# Django, Flask, FastAPI, Jinja: print the script tag in your page template
from lily_assistant import script_tag

tag = script_tag("lily_YOUR_SITE_KEY", "https://YOUR_LILY_ADDRESS")
# Jinja:   {{ tag|safe }}     Django:   {{ tag|safe }}   (before </body>)
# Optional overrides: color="#6d4aff", position="left", title="Help", label="Chat"
Flutter · main.dart
import 'package:lily_assistant_flutter/lily_assistant_flutter.dart';

MaterialApp(
  builder: (context, child) => LilyAssistant(
    siteKey: 'lily_YOUR_SITE_KEY',
    baseUrl: 'https://YOUR_LILY_ADDRESS',
    child: child!,
  ),
  home: const MyHome(),
);
.NET · MainPage.xaml
<!-- .NET MAUI: last child of the page's root Grid -->
<ContentPage xmlns:lily="clr-namespace:Lily.Assistant.Maui;assembly=Lily.Assistant.Maui">
  <Grid>
    <!-- your page -->
    <lily:LilyAssistantView SiteKey="lily_YOUR_SITE_KEY" BaseUrl="https://YOUR_LILY_ADDRESS" />
  </Grid>
</ContentPage>
React Native · App.tsx
import { LilyAssistant } from 'lily-assistant-react-native';

export default function Root() {
  return (
    <LilyAssistant siteKey="lily_YOUR_SITE_KEY" baseUrl="https://YOUR_LILY_ADDRESS">
      <App />
    </LilyAssistant>
  );
}
Android · MyApp.kt
// Android: add the lily-assistant module, then in your Application class
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        LilyAssistant.start(this, "lily_YOUR_SITE_KEY", "https://YOUR_LILY_ADDRESS")
    }
}
iOS · MyApp.swift
// iOS: add the LilyAssistant Swift package, then
import SwiftUI
import LilyAssistant

@main
struct MyApp: App {
    init() { LilyAssistant.start(siteKey: "lily_YOUR_SITE_KEY", baseUrl: "https://YOUR_LILY_ADDRESS") }
    var body: some Scene { WindowGroup { ContentView() } }
}
ASP.NET · _Layout.cshtml
@* ASP.NET Razor / Blazor server: before </body> *@
@using Lily.Assistant
@Html.Raw(LilyAssistantHtml.ScriptTag("lily_YOUR_SITE_KEY", "https://YOUR_LILY_ADDRESS"))

The look is set in your Lily panel, not in code. Colour, title, side of the screen, button label and “hide on mobile” are read from your site's appearance settings each time the chat opens. Anything you pass in code overrides the panel.

That is all you need. Extras, only if you want your own button (such as a Help menu item): LilyAssistant.open(), close(), toggle() (LilyAssistant.Open() in .NET), and hide() on web, iOS and Android.

Options

Chat button options, all optional
OptionDefaultMeaning
color, position, title, labelFrom the panelOverride the look in code (data-color and so on on the script tag)
offset20Distance from the screen edge in pixels
openOnLoadfalseStart open (data-open="1")
data-base-urlScript addressWhere Lily runs, on the script tag
containerThe pageElement that holds the button (web)
onOpen, onClose, onReadyNoneCallbacks (web)
  • Escape on the web and the Android back button close the chat.
  • On a phone-sized web screen the chat fills the whole screen.
  • The chat loads only when it is opened for the first time.
  • No button is shown if Lily cannot be reached or the key is unknown.

Install packages

Most websites only need the script tag. Install a package when you work in code.

JavaScript · Terminal
npm install ./sdk/js
React · Terminal
npm install ./sdk/js ./sdk/react
Python · Terminal
pip install ./sdk/python
Flutter · pubspec.yaml
dependencies:
  lily_assistant:
    path: ../lily/sdk/flutter
.NET · Terminal
dotnet add reference ../lily/sdk/dotnet/src/Lily.Assistant.csproj

Web

Tested in a real browser

Works with plain HTML and any website builder that accepts a script. Paste this before the closing body tag.

index.html
<script src="https://YOUR_LILY_ADDRESS/sdk/lily-launcher.js"
        data-site-key="lily_YOUR_SITE_KEY"></script>

From JavaScript or TypeScript (browsers, Node 18 or newer, Deno, Bun and React Native, with types included and no dependencies):

Terminal
npm install ./sdk/js
JavaScript
import { LilyAssistant } from 'lily-assistant-sdk';

LilyAssistant.init('lily_YOUR_SITE_KEY', { baseUrl: 'https://YOUR_LILY_ADDRESS' });

launchLily() or new LilyLauncher() give you the object with a ready promise.

React

Builds and type checks

React 18 or newer. Render the button once near the top of your app. It is safe with server rendering, for example in Next.js.

Terminal
npm install ./sdk/js ./sdk/react
App.tsx
import { LilyAssistantButton } from 'lily-assistant-react';

<LilyAssistantButton siteKey="lily_YOUR_SITE_KEY" baseUrl="https://YOUR_LILY_ADDRESS" />

Drop-in chat box

Unstyled, so style it with the lily-chat, lily-msg and lily-products class names.

Chat.tsx
import { LilyChatBox } from 'lily-assistant-react';

<LilyChatBox siteKey="lily_YOUR_SITE_KEY" baseUrl="https://YOUR_LILY_ADDRESS" title="Chat with us" />

Read the site settings

Status.tsx
const { config, loading, error } = useLilyConfig('lily_YOUR_SITE_KEY', { baseUrl: 'https://YOUR_LILY_ADDRESS' });
// config.status === 'online' | 'offline'

iOS (Swift)

4 unit tests, run in the iPhone simulator

iOS 15 or newer. In Xcode choose File, Add Package Dependencies, Add Local, then the sdk/ios folder.

MyApp.swift
// iOS: add the LilyAssistant Swift package, then
import SwiftUI
import LilyAssistant

@main
struct MyApp: App {
    init() { LilyAssistant.start(siteKey: "lily_YOUR_SITE_KEY", baseUrl: "https://YOUR_LILY_ADDRESS") }
    var body: some Scene { WindowGroup { ContentView() } }
}
  • UIKit apps call the same line in application(_:didFinishLaunchingWithOptions:).
  • For voice notes add NSMicrophoneUsageDescription to Info.plist.
  • Use https in production. Plain http needs an App Transport Security exception.
  • Optional: LilyAssistant.open(), close() and hide().

Android (Kotlin)

3 unit tests, run on an Android emulator

Minimum SDK 23. Copy the lily-assistant module into your project, or include it by path.

settings.gradle.kts
include(":lily-assistant")
MyApp.kt
// Android: add the lily-assistant module, then in your Application class
class MyApp : Application() {
    override fun onCreate() {
        super.onCreate()
        LilyAssistant.start(this, "lily_YOUR_SITE_KEY", "https://YOUR_LILY_ADDRESS")
    }
}
  • The library adds the internet and record-audio permissions and the chat screen.
  • Photo upload uses the system file picker. The microphone permission is asked when someone records a voice note.
  • Use https in production. Only local test servers need usesCleartextTraffic.
  • Optional: LilyAssistant.open() and hide().

To build the sample app (Gradle 8.14, JDK 17, Android SDK 35):

Terminal
cd sdk/android && gradle :sample:assembleDebug

Flutter

7 widget tests, clean analyzer

One widget puts the button on every screen. It is built on webview_flutter.

pubspec.yaml
dependencies:
  lily_assistant_flutter:
    path: ../lily/sdk/flutter_ui
main.dart
import 'package:lily_assistant_flutter/lily_assistant_flutter.dart';

MaterialApp(
  builder: (context, child) => LilyAssistant(
    siteKey: 'lily_YOUR_SITE_KEY',
    baseUrl: 'https://YOUR_LILY_ADDRESS',
    child: child!,
  ),
  home: const MyHome(),
);
  • Options: color (overrides the panel), bottom and side.
  • Optional: LilyAssistant.open(), close(), toggle() and isOpen.
  • The Android back button closes the chat first. Android needs nothing else.
  • On iOS add NSMicrophoneUsageDescription to ios/Runner/Info.plist for voice notes.

For your own chat screen, the pure Dart client (lily_assistant) needs only package:http and works on mobile, web, desktop and servers.

React Native

Preview

Terminal
npm install ./sdk/js ./sdk/react-native react-native-webview
App.tsx
import { LilyAssistant } from 'lily-assistant-react-native';

export default function Root() {
  return (
    <LilyAssistant siteKey="lily_YOUR_SITE_KEY" baseUrl="https://YOUR_LILY_ADDRESS">
      <App />
    </LilyAssistant>
  );
}
  • Needs only the public site key. The Android back button closes the chat first.
  • For voice notes add the microphone permission (RECORD_AUDIO on Android, NSMicrophoneUsageDescription on iOS).

Python

Tested

Python 3.8 or newer, standard library only. For pages rendered by Django, Flask, FastAPI or Jinja.

Terminal
pip install ./sdk/python
views.py
# Django, Flask, FastAPI, Jinja: print the script tag in your page template
from lily_assistant import script_tag

tag = script_tag("lily_YOUR_SITE_KEY", "https://YOUR_LILY_ADDRESS")
# Jinja:   {{ tag|safe }}     Django:   {{ tag|safe }}   (before </body>)
# Optional overrides: color="#6d4aff", position="left", title="Help", label="Chat"

Optional overrides: color, position, title, label and open_on_load.

.NET, MAUI and ASP.NET

Preview

.NET 6 and 8, with no dependencies: ASP.NET, MAUI, WPF, WinForms, Blazor and console apps.

Terminal
dotnet add reference ../lily/sdk/dotnet/src/Lily.Assistant.csproj

MAUI

MainPage.xaml
<!-- .NET MAUI: last child of the page's root Grid -->
<ContentPage xmlns:lily="clr-namespace:Lily.Assistant.Maui;assembly=Lily.Assistant.Maui">
  <Grid>
    <!-- your page -->
    <lily:LilyAssistantView SiteKey="lily_YOUR_SITE_KEY" BaseUrl="https://YOUR_LILY_ADDRESS" />
  </Grid>
</ContentPage>

Optional: LilyAssistant.Open(), Close(), Toggle(), IsOpen and Accent.

ASP.NET and Blazor

_Layout.cshtml
@* ASP.NET Razor / Blazor server: before </body> *@
@using Lily.Assistant
@Html.Raw(LilyAssistantHtml.ScriptTag("lily_YOUR_SITE_KEY", "https://YOUR_LILY_ADDRESS"))

The .NET SDK was written without a .NET toolchain. Run dotnet test in sdk/dotnet/tests before relying on it.

Send a first message

You probably do not need this part. The chat button already handles replies, photos, voice notes and orders. Use the API clients only to build your own chat screen, or to read chats and reply from your own backend.

JavaScript · app.ts
import { LilyChat } from 'lily-assistant-sdk';

const chat = new LilyChat('lily_YOUR_SITE_KEY', { baseUrl: 'https://YOUR_LILY_ADDRESS' });
const r = await chat.send('Do you deliver on weekends?');
console.log(r.reply ?? 'A team member will answer soon.');
React · Chat.tsx
import { LilyChatBox } from 'lily-assistant-react';

export const Help = () => (
  <LilyChatBox siteKey="lily_YOUR_SITE_KEY" baseUrl="https://YOUR_LILY_ADDRESS" title="Chat with us" />
);
Python · app.py
from lily_assistant import LilyChat

chat = LilyChat("lily_YOUR_SITE_KEY", base_url="https://YOUR_LILY_ADDRESS")
r = chat.send("Do you deliver on weekends?")
print(r.get("reply") or "A team member will answer soon.")
Flutter · main.dart
import 'package:lily_assistant/lily_assistant.dart';

final chat = LilyChat('lily_YOUR_SITE_KEY', baseUrl: 'https://YOUR_LILY_ADDRESS');
final r = await chat.send('Do you deliver on weekends?');
print(r['reply'] ?? 'A team member will answer soon.');
.NET · Program.cs
using Lily.Assistant;

var chat = new LilyChat("lily_YOUR_SITE_KEY", "https://YOUR_LILY_ADDRESS");
var r = await chat.SendAsync("Do you deliver on weekends?");
Console.WriteLine(r.Reply ?? "A team member will answer soon.");

Visitor chat client

Build your own chat screen with the public site key. The visitor and conversation are kept so the same customer continues the same chat. The JavaScript SDK remembers them in localStorage (pass storage: null to keep nothing). Elsewhere, save visitorId and conversationId and pass them back in.

JavaScript · chat.ts
const r = await chat.send('Hi', { name: 'Alex', email: 'alex@example.com' });
r.products?.forEach((p) => console.log(p.name, p.priceCents / 100, p.currency));

const { messages } = await chat.history();     // includes team replies
await chat.rate(1, 'Very helpful');             // thumbs up

const photo = await chat.upload(fileBlob, { name: 'photo.jpg' });
await chat.send('Do you have something like this?', { attachmentId: photo.id });

await chat.confirmOrder({ code: 'LA-AB12CD', name: 'Alex',
  phone: '+15550100000', email: 'alex@example.com' });
React · Chat.tsx
import { useState } from 'react';
import { useLilyChat } from 'lily-assistant-react';

export function Chat() {
  const { messages, send, sending, error, handler, products } =
    useLilyChat('lily_YOUR_SITE_KEY', { baseUrl: 'https://YOUR_LILY_ADDRESS' });
  const [text, setText] = useState('');
  return (
    <div>
      {handler && <p>You are chatting with {handler.name}</p>}
      {messages.map((m) => <p key={m.id}>{m.text}</p>)}
      {error && <p role="alert">{error}</p>}
      <form onSubmit={(e) => { e.preventDefault(); void send(text); setText(''); }}>
        <input value={text} onChange={(e) => setText(e.target.value)} />
        <button disabled={sending}>Send</button>
      </form>
    </div>
  );
}

// Also returned: rate(), refresh(), reset(), visitorId, chat (for upload/confirmOrder)
// Options: poll (default 4000 ms, false to turn off)
Python · chat.py
r = chat.send("Hi", name="Alex", email="alex@example.com")
print(chat.history()["messages"])              # includes team replies
chat.rate(1, "Very helpful")

up = chat.upload(open("photo.jpg", "rb").read(), name="photo.jpg")
chat.send("Do you have something like this?", attachment_id=up["id"])

# Save these to continue the same chat later
saved = (chat.visitor_id, chat.conversation_id)
Flutter · chat.dart
final r = await chat.send('Hi', name: 'Alex', email: 'alex@example.com');
final history = await chat.history();
await chat.rate(1, comment: 'Very helpful');

// Save these (for example with shared_preferences) and pass them back in
// after the app restarts to continue the same chat.
final saved = (chat.visitorId, chat.conversationId);
.NET · Chat.cs
var r = await chat.SendAsync("Hi", new SendOptions { Name = "Alex", Email = "alex@example.com" });
var history = await chat.HistoryAsync();          // includes team replies
await chat.RateAsync(1, "Very helpful");

var up = await chat.UploadAsync(File.ReadAllBytes("photo.jpg"), "photo.jpg");
await chat.SendAsync("Do you have something like this?", new SendOptions { AttachmentId = up.Id });

// Pass chat.VisitorId and chat.ConversationId to the constructor to continue later

When queued is true there is no AI reply: a team member will answer. Poll history, or use the conversation state helpers, to receive it.

Server client

Read conversations from every channel and answer them. Sending needs a write key. A read key can only read.

JavaScript · server.ts
import { Lily } from 'lily-assistant-sdk';
const lily = new Lily(process.env.LILY_API_KEY!, { baseUrl: 'https://YOUR_LILY_ADDRESS' });

await lily.me();                                   // { scope, sites }
const chats = await lily.conversations({ status: 'open', limit: 20 });
const msgs = await lily.messages(chats[0].id);
await lily.sendMessage(chats[0].id, 'Your order has shipped.');   // write key
await lily.products();
await lily.orders('pending');
React · app/api/chats/route.ts
// Next.js route handler: runs on the server only
import { Lily } from 'lily-assistant-react';

const lily = new Lily(process.env.LILY_API_KEY!, { baseUrl: process.env.LILY_URL! });

export async function GET() {
  return Response.json(await lily.conversations({ status: 'open' }));
}
Python · server.py
from lily_assistant import Lily

lily = Lily("lily_sk_...", base_url="https://YOUR_LILY_ADDRESS")
print(lily.me())
for chat in lily.conversations(status="open", limit=20):
    print(chat["channel"], chat["customerName"], chat["lastMessage"])

lily.send_message(chat["id"], "Your order has shipped.")   # write key
lily.messages(chat["id"]); lily.products(); lily.orders("pending")
Flutter · server.dart
final lily = Lily('lily_sk_...', baseUrl: 'https://YOUR_LILY_ADDRESS');
final chats = await lily.conversations(status: 'open');
await lily.sendMessage(chats.first['id'] as String, 'Your order has shipped.');
.NET · Server.cs
var lily = new LilyClient(Environment.GetEnvironmentVariable("LILY_API_KEY")!, "https://YOUR_LILY_ADDRESS");
var chats = await lily.ConversationsAsync(status: "open", limit: 20);
await lily.SendMessageAsync(chats[0].Id, "Your order has shipped.");   // write key
var products = await lily.ProductsAsync();
var orders = await lily.OrdersAsync("pending");

REST endpoints

Send the key as Authorization: Bearer lily_sk_... to /public/v1/.

REST endpoints
RequestReturns or doesKey
GET /meThe key's access and your sitesread
GET /conversationsChats from all channels. Filters: siteId, status, limitread
GET /conversations/{id}/messagesMessages of one chat. Filter: afterread
POST /conversations/{id}/messagesReplies on the customer's channelwrite
GET /productsYour product catalogread
GET /ordersOrdersread

Conversation state

A ready-made container for a whole chat. Your message appears at once, the answer follows, team replies are picked up by polling, and a failed send is rolled back with the error in state.

JavaScript · store.ts
import { LilyChat, ChatStore } from 'lily-assistant-sdk';

const store = new ChatStore(new LilyChat(siteKey, { baseUrl }));
store.subscribe(() => render(store.getState()));
await store.load();
store.startPolling();                 // picks up team replies
await store.send('Hello');            // shows at once, then the answer
React · Chat.tsx
// useLilyChat is the state container for React.
// It loads earlier messages, sends with an instant message,
// polls for team replies and cleans up on unmount.
const { messages, sending, error, handler, products, send, rate } =
  useLilyChat('lily_YOUR_SITE_KEY', { baseUrl, poll: 4000 });
Python · chat.py
# Python has no UI state container: call history() on your own timer
# to pick up team replies.
import time
while True:
    for m in chat.history()["messages"]:
        handle(m)
    time.sleep(4)
Flutter · chat_screen.dart
final controller = LilyChatController(LilyChat(siteKey, baseUrl: baseUrl));
await controller.load();
controller.startPolling();            // picks up team replies
// dispose: await controller.dispose();

StreamBuilder<ChatState>(
  stream: controller.stream,
  initialData: controller.state,
  builder: (context, snap) => Text('${snap.data!.messages.length} messages'),
);

await controller.send('Hello');
.NET · Controller.cs
using var controller = new LilyChatController(chat);
controller.Changed += state => Render(state);
await controller.LoadAsync();
controller.StartPolling();            // picks up team replies
await controller.SendAsync("Hello");  // shows at once, then the answer
State fields
State fieldMeaning
messagesAll messages, including your team's replies
sendingA send is in progress
errorLast error text, cleared on the next success
handlerThe team member answering now, if any
productsProduct cards from the latest answer
orderAn order waiting for the visitor to confirm

Errors

Every problem is one error type with the HTTP status. Status 0 means Lily could not be reached or the request timed out.

JavaScript · errors.ts
import { LilyError } from 'lily-assistant-sdk';
try { await lily.me(); } catch (e) {
  if (e instanceof LilyError && e.isUnauthorized) console.log('Check your API key');
  else if (e instanceof LilyError && e.isNetworkError) console.log('Lily is unreachable');
}
React · errors.ts
import { LilyError } from 'lily-assistant-react';
// The hook puts the message in `error`. For direct calls:
try { await chat.send(text); } catch (e) {
  if (e instanceof LilyError && e.isRateLimited) console.log('Slow down');
}
Python · errors.py
from lily_assistant import LilyError
try:
    lily.me()
except LilyError as e:
    if e.is_unauthorized: print("Check your API key")
    elif e.is_network_error: print("Lily is unreachable")
    else: print(e.status, e.message)
Flutter · errors.dart
try { await lily.me(); } on LilyError catch (e) {
  if (e.isUnauthorized) { /* check the key */ }
  else if (e.isNetworkError) { /* unreachable */ }
}
.NET · Errors.cs
try { await lily.MeAsync(); }
catch (LilyException e) when (e.IsUnauthorized) { /* check the key */ }
catch (LilyException e) when (e.IsNetworkError) { /* unreachable */ }
Error helpers
HelperWhen
isUnauthorized401: wrong or deleted key
isForbidden403: a read key tried to write, or the key lacks access
isNotFound404: unknown conversation or item
isRateLimited429: too many requests, retry later
isNetworkErrorStatus 0: unreachable or timed out

Method reference

Names are shown in JavaScript style. Python uses snake_case, .NET uses PascalCase with an Async suffix, and Dart matches JavaScript.

Visitor chat client

Visitor chat methods
MethodPurpose
config()Site settings and whether the team is online
send(text, options)Sends a message. Options: name, email, phone, attachment. Returns the reply, queued, products and order
history()All messages so far, including team replies
rate(value, comment)Thumbs up (1) or down (-1) with an optional comment
upload(file, name)Uploads a photo or voice note; attach its id to the next message
confirmOrder(details)Confirms an order the visitor agreed to: code, name, phone (optional), email

Server client

Server client methods
MethodPurposeKey
me()Key scope and the sites it can accessread
conversations({status, limit})Lists chats from all channelsread
messages(id)Messages of one conversationread
sendMessage(id, text)Replies on the customer's own channelwrite
products()Your product catalogread
orders(status)Orders, optionally filtered by statusread

Client options

Client options
OptionDefaultMeaning
baseUrlRequiredWhere Lily runs
timeout30 secondsRequest timeout
HTTP clientBuilt inYour own fetch, http.Client or HttpClient for proxies and tests

Security

Keys stay on the server

Secret keys are stored hashed, shown once and limited to 10 for each account. Delete a leaked key and it stops working at once.

Separate accounts

A key only sees its own account's data. No call can reach another account.

Customers never see the AI

The API does not expose which AI model is used. Orders are placed only after the visitor confirms.

Rate limits

Visitor traffic follows the website chat limits. Server keys allow 120 requests a minute for each key and 60 sends a minute for each account.

  • Use only the public site key in websites and apps.
  • Keep secret keys in server settings, never in code you publish.
  • Limit the chat to your own websites under Sites & Embed, Security.
  • Tell visitors about chat and visitor tracking in your privacy policy.

Platform status

What has been verified
PackagePlatformsVerification
lily-assistant-sdkWeb, Node 18+, Deno, Bun, React Native. Types included15 end-to-end tests
lily-assistant-reactReact 18+: hooks and a drop-in chat box5 end-to-end tests
lily-assistantPython 3.8+, no dependencies8 end-to-end tests
lily_assistantFlutter and Dart on mobile, web, desktop and server9 tests, analyzer clean
lily_assistant_flutterFlutter chat button7 widget tests
LilyAssistantiOS Swift packageRun in iPhone simulator
lily-assistant (Android)Android Kotlin moduleRun on emulator
lily-assistant-react-nativeReact NativePreview
Lily.Assistant.NET 6 and 8: ASP.NET, MAUI, WPF, Blazor, consolePreview

Testing

The test suites run the real SDK code against a real Lily server, with no mocks. A throw-away account with the AI off is created and removed afterwards, so it costs nothing.

Terminal
cd sdk
./run-tests.sh            # Lily must be running (set SDK_BASE to its address)

FAQ

Can I use the server client in a mobile app?

No. A secret key inside an app can be taken out by anyone. Call your own backend from the app, and let the backend use the server client.

How does a customer continue the same chat later?

Save visitorId and conversationId and pass them back when you create the client. The JavaScript SDK does this for you.

How do I receive team replies?

Use the state helper with polling (React hook, ChatStore, LilyChatController), or call history() on your own timer.

Can I reply to Facebook, Instagram, WhatsApp and Telegram chats?

Yes. sendMessage delivers on the customer's own channel. Connect the channels first under Social in your panel. WhatsApp, Facebook and Instagram allow replies within 24 hours of the customer's last message.

What if Lily is unreachable?

The call fails with a LilyError whose status is 0 (isNetworkError). Show a retry option. The state helpers roll back the unsent message.

Need help with your integration?

Tell us your platform and what you want to build.