⚡ Add this skill
One command
Agent onboarding
Fetch this skill when a customer already uses Tidio Lyro and wants its AI support agent to consume Autoplay live user activity.View the skill →
🎬 End-to-end walkthrough
🤖 Create the Action
In your Tidio dashboard, go to Lyro AI Agent → Actions → + Create Action → Create from scratch.Name
Give the Action a clear, descriptive name — Lyro uses the name as context for when to trigger it:Instructions
The Instructions field tells Lyro when to call this Action. Fill it in with:⚙️ Build the Action sequence
Click Create sequence in the Action sequence section. In the sequence builder, click the empty step and select API call from the right panel.Configure the API call
Set up the API call to the Autoplay MCP server:- Method:
POST - URL:
https://mcp.autoplay.ai/mcp
| Key | Value |
|---|---|
Authorization | Bearer YOUR_MCP_KEY |
Content-Type | application/json |
Save the response
After the API call step, add an Update session variable step. Save the activity data from the response so Lyro can reference it when composing its reply:- Variable name:
activity - Value: the
result.content[0].textfield from the API response
🔐 Identity — wire the user id into the session
Lyro needs the current user’s stable id to pass asuser_id in the API call. Set it from your frontend via the Tidio JS SDK after the user logs in:
- PostHog
- Amplitude
How the pieces fit: your frontend identifies the user
in your activity source → Autoplay stores activity under
that id → your frontend also sets
custom.user_id on the
Tidio contact → Lyro reads {{contact.user_id}} and passes
it in the API call → the buckets match.💬 Update the Guidance instructions
Go to Lyro AI Agent → Behavior → Guidance → Communication Style → Custom. Add this to the instructions so Lyro knows how to use the activity data returned by the Action:✅ Test the full loop
- Log in to your app as a test user — fires your activity source’s identify call and sets
custom.user_idon the Tidio contact. - Click around — visit a couple of pages, click a button, submit a form.
- Open the Tidio chat widget as that same logged-in user.
- Ask Lyro: “What have I been doing in the app recently?”
- Lyro triggers Get Live User Activity, calls the Autoplay MCP server, and answers with what you actually just did.
- 401 / auth error → the
Authorizationheader is missing or the token is wrong — revisit the API call headers above. - Empty activity returned → identity is working but that user has no recent activity yet. Browse around in your app first, then re-test.
- Wrong user’s activity →
{{contact.user_id}}doesn’t match the id your activity source uses. Check both are identical.
“No recent activity” = identity mismatch. Confirm the
same value in all three:
- the stable id your activity source identifies the user
with (PostHog:
posthog.identify(id), Amplitude:amplitude.setUserId(id)), - the
custom.user_idyou set viatidioChatApi.setVisitorData, - the
{{contact.user_id}}referenced in the Action’s API call body.
Next: Step 2 — Define proactive triggers