Documentation Index
Fetch the complete documentation index at: https://lemonslice.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
LemonSlice avatars always have natural, expressive hand gestures when they speak. Actions allow you to go a step further and programmatically trigger specific, custom motion sequences that you define, like pointing, waving, or cheering. Our RESTful API makes it easy to integrate actions into all of your workflows. This guide walks you through different design architectures for how and when to leverage this powerful feature in your interactive avatar calls.Actions are an enterprise-only feature and must be onboarded for your avatar by the LemonSlice team.
Contact support@lemonslice.com to get access.
Common trigger patterns
LLM Tool Calls
LLM tool calls are a great way to trigger actions that naturally flow with the context and emotional arc of your conversation. Examples include:- Pointing to emphasize content when screen sharing (e.g. for education applications)
- Looking away to signal disappointment or boredom (e.g. for roleplaying)
- Celebrating when the user shares exciting news
function_tool decorator.
By default, the function’s docstring is used to give the LLM proper context for when it should be called.
PYTHON
Call Event Triggers
You may want certain actions to be tied to lifecycle events and happen reliably, independent of what’s being said. For example, to make your avatar wave hello at the start of a call, a robust startup pattern is:- Wait for avatar to join the room (see helper)
- Trigger wave action
- Continue with greeting / conversation
PYTHON
Background Actions
Background actions can help make your avatar feel more alive over the course of a call. A common approach is to run a background loop that randomly triggers subtle motions like swaying or body adjustments. Using subtle movements in this way can help improve the realism of your avatar without being overly distracting.External Events
Sometimes, you may want to trigger an action from a product/backend event rather than conversation context. Examples include:- Triggering a celebratory dance when viewer count crosses a threshold (livestreaming app)
- Waving when a VIP joins the room (livestreaming app)
- Triggering a branded motion when a user completes checkout (website assistant)
- Reacting to a game win with a celebratory jump (game companion)
How to trigger an action
No matter where the intent originates, action playback is triggered by sending aPOST request to the LemonSlice control endpoint:
System Architecture

POST request.
You can keep your runtime architecture simple or advanced depending on your product needs.
Demo
Try talking to the avatar on our homepage, and you will see many of these design principles in action:- The avatar will wave hello at the start of the conversation (call event trigger)
- Ask the avatar to wave and it will oblige (LLM tool call)
- Trigger an action explicitly by clicking the corresponding button (external event trigger)
- The avatar will periodically sway to add more movement (background action)
