The full source is shown below. Copy it into a file and run it.
1. Get a character id
Create one, or import a shipped example (see Example characters):2. Save this as character-demo.mjs
3. Run it
http://localhost:3000, tap to start, and the character streams as live
video, talks back in voice, and takes typed messages. Because you pass a stable
ALAKAZAM_PLAYER, it remembers across sessions
(cross-session memory).
ALAKAZAM_EMBED_HOST is wherever the Alakazam embed player (embed.html) is
served. Use your hosted player. For local development against the repo, run the
play-app dev server and point at it (Vite defaults to http://localhost:5173).Going to production
This is the embed pattern verbatim: your backend mints the token, and your page drops the<iframe>. To lock the token to your domain, pass an origin when minting and
add it to your app’s embedding_origins. See Embedding.
