JavaScript SDK

@liforma/client — the integrator-facing JavaScript API.

Install

npm install @liforma/client

Or load from CDN:

<script src="https://cdn.liforma.ai/sdk/v1/client.js"><\/script>

Primary API

import { Experience } from '@liforma/client';

const experience = await Experience.startSession({
  experienceId: 'exp_01DEMO1SPANISHCAFE'
});

await experience.attach({ container: '#avatar' });

Exports

ExportDescription
ExperienceSession lifecycle and events
LiformaExperienceSvelte component (from @liforma/client/svelte)

Lifecycle

await experience.attach({ container });
experience.pause();
experience.resume();
await experience.end();

Events

See Events for the full list.