> ## Documentation Index
> Fetch the complete documentation index at: https://developers.autoplay.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tidio Lyro skill

> Connects an existing Tidio Lyro AI agent to Autoplay live activity with a Lyro Action that calls the Autoplay MCP server. Covers creating the action, passing a stable visitor user ID, and letting Lyro pull recent activity on demand. Use when the customer already uses Tidio, Lyro, Tidio Actions, or asks how to give Lyro real-time Autoplay context.

# AI Support Agent — Tidio

> Read `autoplay-core` first for install and credentials (`product_id`, `mcp_url`, `mcp_key`).
>
> **Who does this: Mixed.** Creating the Lyro Action in the Tidio dashboard is
> a user-only step — there's no API for it. Setting the visitor's stable id
> via `tidioChatApi.setVisitorData(...)` (below) is code you write yourself.
> `mcp_key` comes from your own `onboard_product` call, not from a user.
>
> **Stay inside this project's directory tree.** Every file this skill
> touches lives inside the current project root. Never search, list, or read
> outside it.
>
> **Wait for the real `mcp_key` before configuring the Lyro Action.** Run
> `onboard_product` yourself first if it hasn't been run yet — never paste
> the literal `YOUR_MCP_KEY` placeholder into Tidio's Action config.

## Scoping pattern for Tidio

Lyro (Tidio's AI agent) pulls a user's live activity on demand via a **Lyro Action** that calls the Autoplay MCP server — no webhook, no session-linking, no `conv_map`. The read is keyed by `product_id` + `user_id` only.

Set the user's stable id via `window.tidioChatApi.setVisitorData({ custom: { user_id: currentUser.id } })` after login so `{{contact.user_id}}` is available to the Action — it must exactly equal the id your activity source identifies the user with. See the full tutorial for the Action/API-call setup and identity wiring.

## Reference

* Tutorial: [https://developers.autoplay.ai/recipes/tidio](https://developers.autoplay.ai/recipes/tidio)
