Check out our hosted Daily starter project to see how you can connect your LemonSlice-managed agent to a Daily room in a simple web app.
Getting Started
Follow these steps to create a Daily room that your LemonSlice agent joins, and embed it into your application.1. Get your API key
Retrieve your API key from the LemonSlice account page. All API requests must include this header:2. Create a room
Use thePOST /liveai/rooms endpoint to create a Daily room configured with a LemonSlice agent. The agent will automatically join the room once its startup is complete.
BASH
3. Join the room from your frontend
Use Daily’s JavaScript SDK to join the room with the URL and token returned by the API.JAVASCRIPT
4. Listen for LemonSlice events
LemonSlice uses Daily’sapp-message channel to push events about the agent, image updates, and errors.
Example event handler
JAVASCRIPT
You’re ready to build
With a room created, the agent connected, and event hooks wired up, you’re ready to:- Build interactive video AI apps
- Customize agent behavior
- Trigger image changes and respond to events
Receiving Events
Hook into the Daily event handler to get LemonSlice-specific events.Full event handler
JAVASCRIPT
Control Events
Send events through Daily to control the LemonSlice agent.Sending Events
JAVASCRIPT
Avatar image changes with /imagine
The chat-msg control event also supports avatar image updates using a special /imagine prefix.When a message begins with
/imagine, LemonSlice interprets the remainder of the message as an image prompt and updates the agent’s avatar accordingly.
Example
JAVASCRIPT
How it works
- Messages starting with
/imaginedo not trigger a spoken response - Instead, the agent’s avatar image is regenerated based on the prompt
- The avatar retains its core identity and proportions, while updating the visual context
- Once the image update completes, the agent continues normal interaction
Agent setup requirement:
Allow users to modify appearancemust be enabled in the agent configuration. This setting is enabled by default for all newly created agents.

